FIX Refactoring admin functions names to avoid conflicts with parent theme
This commit is contained in:
parent
7b0ee9cfcd
commit
71e28f2004
|
|
@ -5,56 +5,46 @@
|
|||
------------------------------------------------------------------*/
|
||||
function dynamiques_custom_admin()
|
||||
{
|
||||
wp_enqueue_style('admin_styles', get_template_directory_uri() . '/css/admin-style.css');
|
||||
// wp_enqueue_style('admin_styles', get_template_directory_uri() . '/css/admin-style.css');
|
||||
wp_enqueue_style('admin_styles', get_stylesheet_directory_uri() . '/css/admin-style.css');
|
||||
}
|
||||
|
||||
add_action('admin_head', 'dynamiques_custom_admin');
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
##### 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');
|
||||
|
||||
add_action('admin_enqueue_scripts', 'dynamiques_custom_admin');
|
||||
// add_action('admin_head', 'dynamiques_custom_admin');
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
##### REMOVES FROM ADMIN BAR
|
||||
------------------------------------------------------------------*/
|
||||
function mytheme_admin_bar_render()
|
||||
function dynamiques_admin_bar_render()
|
||||
{
|
||||
global $wp_admin_bar;
|
||||
$wp_admin_bar->remove_menu('comments');
|
||||
}
|
||||
add_action('wp_before_admin_bar_render', 'mytheme_admin_bar_render');
|
||||
add_action('wp_before_admin_bar_render', 'dynamiques_admin_bar_render');
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
##### MODIFIER LE LIEN DU LOGO SUR LA BLADE DE CONNEXION À L'INTERFACE ADMIN
|
||||
-------------------------------------------------------------------------------*/
|
||||
function change_login_logo_url($url)
|
||||
function dynamiques_change_login_logo_url($url)
|
||||
{
|
||||
return site_url();
|
||||
}
|
||||
add_filter('login_headerurl', 'change_login_logo_url');
|
||||
add_filter('login_headerurl', 'dynamiques_change_login_logo_url');
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
##### ENQUEUE DU CSS BLADE LOGIN ADMIN
|
||||
------------------------------------------------------------------------*/
|
||||
function enqueue_custom_login_stylesheet()
|
||||
function dynamiques_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');
|
||||
add_action('login_enqueue_scripts', 'dynamiques_enqueue_custom_login_stylesheet');
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
PASSER LES COULEURS DU THEMES AU COLOR PICKER ACF
|
||||
------------------------------------------------------------------------*/
|
||||
function change_acf_input_colors()
|
||||
function dynamiques_change_acf_input_colors()
|
||||
{ ?>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
|
|
@ -72,4 +62,4 @@ function change_acf_input_colors()
|
|||
})(jQuery);
|
||||
</script>
|
||||
<?php }
|
||||
add_action('acf/input/admin_footer', 'change_acf_input_colors');
|
||||
add_action('acf/input/admin_footer', 'dynamiques_change_acf_input_colors');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user