Minimize Admin Bar

function replace_admin_bar_text() { global $wp_admin_bar; $wp_admin_bar->add_node(array( ‘id’ => ‘my-account’, ‘title’ => ‘👤‘, ‘href’ => get_edit_profile_url(), )); } add_action(‘wp_before_admin_bar_render’, ‘replace_admin_bar_text’, 0); function remove_comments() { global $wp_admin_bar; $wp_admin_bar->remove_menu(‘comments’); } add_action(‘wp_before_admin_bar_render’, ‘remove_comments’, 0); function remove_new_menu() { global $wp_admin_bar; $wp_admin_bar->remove_menu(‘new-content’); } add_action(‘wp_before_admin_bar_render’, ‘remove_new_menu’, 0);Continue reading

Désactiver complètement les commentaires

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Désactiver complètement les commentaires

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Change Comment Reply from Heading to Div

add_filter( ‘comment_form_defaults’, ‘custom_reply_title’ ); function custom_reply_title( $defaults ){ $defaults[‘title_reply_before’] = ‘ ‘; $defaults[‘title_reply_after’] = ‘ ‘; return $defaults; }Continue reading

Change Comment Reply from Heading to Div

add_filter( ‘comment_form_defaults’, ‘custom_reply_title’ ); function custom_reply_title( $defaults ){ $defaults[‘title_reply_before’] = ‘ ‘; $defaults[‘title_reply_after’] = ‘ ‘; return $defaults; }Continue reading

Disable WP options if editor

function remove_pages_from_menu() { if ( current_user_can( ‘editor’ ) ) { remove_menu_page( ‘edit-comments.php’ ); remove_menu_page( ‘edit.php’ ); remove_menu_page( ‘edit.php?post_type=page’ ); remove_menu_page( ‘edit.php?post_type=jet-theme-core’ ); remove_menu_page( ‘tools.php’ ); remove_menu_page( ‘edit.php?post_type=jet-popup’ ); remove_menu_page( ‘edit.php?post_type=jet-form-builder’ ); } } add_action( ‘admin_menu’, ‘remove_pages_from_menu’ ); function remove_link_from_admin_bar( $wp_admin_bar…Continue reading