Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 隱藏WordPress後台「個人資料」預設欄位
- // 出處:https://www.yogoeasy.com/hide-profile-fields/
- add_action( 'admin_head', function () { ?>
- <script>
- jQuery(document).ready(function(){
- jQuery('#rich_editing').parents('tr').remove(); //視覺化編輯器
- jQuery('#syntax_highlighting').parents('tr').remove(); //語法醒目提示
- jQuery('#comment_shortcuts').parents('tr').remove(); //鍵盤快速鍵
- jQuery('#url').parents('tr').remove(); //網址
- jQuery('#last_name').parents('tr').remove(); //姓氏
- jQuery('#locale').parents('tr').remove(); //選擇語言
- jQuery('#role').parents('tr').remove(); //角色
- });
- </script>
- <?php
- //隱藏聯絡資訊區的欄位
- function edit_contactmethods( $contactmethods ) {
- unset($contactmethods['yim']);
- unset($contactmethods['aim']);
- unset($contactmethods['jabber']);
- return $contactmethods;
- }
- add_filter('user_contactmethods','edit_contactmethods',10,1);
- //管理後台色彩配置
- remove_action("admin_color_scheme_picker", "admin_color_scheme_picker");
- //新建立使用者時取消勾選寄信
- add_action( 'user_new_form', 'dontchecknotify_register_form' );
- function dontchecknotify_register_form() {
- echo '<scr'.'ipt>jQuery(document).ready(function($) {
- $("#send_user_notification").removeAttr("checked");
- } ); </scr'.'ipt>';
- }
- } );
Add Comment
Please, Sign In to add comment