__('Paramètres du site'), 'menu_title' => __('Paramètres du site'), 'menu_slug' => 'theme-general-settings', 'capability' => 'activate_plugins', 'redirect' => false, 'position' => 9, )); } } // add_options_page( 'MyPlugin Options', 'MyPlugin Options', 'activate_plugins', 'myplugin-options', 'myplugin_options' ); add_action('acf/init', 'register_theme_settings_option_page'); /* --------------------------- ADMIN STYLES ---------------------------*/ // Amin Stylesheet function my_custom_admin() { wp_enqueue_style('admin_styles', get_template_directory_uri() . '/css/admin-style.css'); } add_action('admin_head', 'my_custom_admin'); // ENQUEUE DU CSS BLADE LOGIN ADMIN function enqueue_custom_login_stylesheet() { wp_enqueue_style('custom-login', get_stylesheet_directory_uri() . '/style-login.css'); } add_action('login_enqueue_scripts', 'enqueue_custom_login_stylesheet'); /* ---------------------------------- ENQUEUE DU COLOR SCHEME ADMIN -----------------------------------*/ function homegrade_admin_color_scheme() { //Get the theme directory $theme_dir = get_stylesheet_directory_uri(); //Homegrade wp_admin_css_color( 'homegrade_light', 'Homegrade Light', $theme_dir . '/homegrade-light-color-scheme.css', array('#cf4944', '#fff', '#d54e21', '#2f0154') ); wp_admin_css_color( 'homegrade_dark', 'Homegrade Dark', $theme_dir . '/homegrade-dark-color-scheme.css', array('#2f2a33', '#fff', '#e14d43', '#e14d43') ); } add_action('admin_init', 'homegrade_admin_color_scheme'); /* ---------------------------------- REMOVE FROM ADMIN MENU -----------------------------------*/ function custom_menu_page_removing() { // remove_menu_page('edit.php'); // Hide Articles remove_menu_page('edit-comments.php'); // Hide Commentaires } add_action('admin_menu', 'custom_menu_page_removing'); /* ---------------------------------- REMOVE FROM ADMIN BAR -----------------------------------*/ function mytheme_admin_bar_render() { global $wp_admin_bar; $wp_admin_bar->remove_menu('comments'); } add_action('wp_before_admin_bar_render', 'mytheme_admin_bar_render'); /* ---------------------------------------------------------------------- MODIFIER LE LIEN DU LOGO SUR LA BLADE DE CONNEXION À L'INTERFACE ADMIN ------------------------------------------------------------------------*/ function change_login_logo_url($url) { return site_url(); } add_filter('login_headerurl', 'change_login_logo_url');