enqueuing dashboard js
This commit is contained in:
parent
4e388d6a3a
commit
146b283115
|
|
@ -21,7 +21,7 @@ function register_theme_settings_option_page()
|
|||
if (function_exists('acf_add_options_page')) {
|
||||
|
||||
// Register options page.
|
||||
$homegrade_option_page = acf_add_options_page(array(
|
||||
$lhoist_option_page = acf_add_options_page(array(
|
||||
'page_title' => __('Texte interface', 'homegrade-theme__texte-backoffice'),
|
||||
'menu_title' => __('Texte interface', 'homegrade-theme__texte-backoffice'),
|
||||
'menu_slug' => 'theme-general-settings',
|
||||
|
|
@ -34,7 +34,7 @@ function register_theme_settings_option_page()
|
|||
$press_kit_admin_page = acf_add_options_sub_page(array(
|
||||
'page_title' => __('Presse'),
|
||||
'menu_title' => __('Presse'),
|
||||
'parent_slug' => $homegrade_option_page['menu_slug'],
|
||||
'parent_slug' => $lhoist_option_page['menu_slug'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
@ -45,12 +45,30 @@ add_action('acf/init', 'register_theme_settings_option_page');
|
|||
|
||||
|
||||
// #### ADMIN STYLE
|
||||
function my_custom_admin()
|
||||
function my_custom_admin_styles()
|
||||
{
|
||||
wp_enqueue_style('admin_styles', get_template_directory_uri() . '/css/admin-style.css');
|
||||
}
|
||||
|
||||
add_action('admin_head', 'my_custom_admin');
|
||||
add_action('admin_head', 'my_custom_admin_styles');
|
||||
|
||||
/**
|
||||
* Enqueue a script in the WordPress admin on edit.php.
|
||||
*
|
||||
* @param int $hook Hook suffix for the current admin page.
|
||||
*/
|
||||
function enqueue_admin_script($hook)
|
||||
{
|
||||
// if ('edit.php' != $hook) {
|
||||
// return;
|
||||
// }
|
||||
wp_enqueue_script('stats-dashboard-js', get_template_directory_uri() . '/js/stats-dashboard.js', array(), '1.0');
|
||||
}
|
||||
add_action('admin_enqueue_scripts', 'enqueue_admin_script');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// ##### REMOVE FROM ADMIN MENU
|
||||
function custom_menu_page_removing()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user