commenting option page
This commit is contained in:
parent
7ca346a869
commit
c8951e7bda
|
|
@ -14,34 +14,34 @@ add_action('admin_menu', 'post_remove');
|
||||||
PAGE D'OPTIONS DU THEME
|
PAGE D'OPTIONS DU THEME
|
||||||
---------------------------*/
|
---------------------------*/
|
||||||
|
|
||||||
function register_theme_settings_option_page()
|
// function register_theme_settings_option_page()
|
||||||
{
|
// {
|
||||||
|
|
||||||
// Check function exists.
|
// // Check function exists.
|
||||||
if (function_exists('acf_add_options_page')) {
|
// if (function_exists('acf_add_options_page')) {
|
||||||
|
|
||||||
// Register options page.
|
// // Register options page.
|
||||||
$lhoist_option_page = acf_add_options_page(array(
|
// $lhoist_option_page = acf_add_options_page(array(
|
||||||
'page_title' => __('Texte interface', 'homegrade-theme__texte-backoffice'),
|
// 'page_title' => __('Texte interface', 'homegrade-theme__texte-backoffice'),
|
||||||
'menu_title' => __('Texte interface', 'homegrade-theme__texte-backoffice'),
|
// 'menu_title' => __('Texte interface', 'homegrade-theme__texte-backoffice'),
|
||||||
'menu_slug' => 'theme-general-settings',
|
// 'menu_slug' => 'theme-general-settings',
|
||||||
'capability' => 'activate_plugins',
|
// 'capability' => 'activate_plugins',
|
||||||
'redirect' => false,
|
// 'redirect' => false,
|
||||||
'icon_url' => 'dashicons-admin-site-alt',
|
// 'icon_url' => 'dashicons-admin-site-alt',
|
||||||
'position' => 2,
|
// 'position' => 2,
|
||||||
));
|
// ));
|
||||||
// Add sub page.
|
// // Add sub page.
|
||||||
$press_kit_admin_page = acf_add_options_sub_page(array(
|
// $press_kit_admin_page = acf_add_options_sub_page(array(
|
||||||
'page_title' => __('Presse'),
|
// 'page_title' => __('Presse'),
|
||||||
'menu_title' => __('Presse'),
|
// 'menu_title' => __('Presse'),
|
||||||
'parent_slug' => $lhoist_option_page['menu_slug'],
|
// 'parent_slug' => $lhoist_option_page['menu_slug'],
|
||||||
));
|
// ));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
// add_options_page( 'MyPlugin Options', 'MyPlugin Options', 'activate_plugins', 'myplugin-options', 'myplugin_options' );
|
// add_options_page( 'MyPlugin Options', 'MyPlugin Options', 'activate_plugins', 'myplugin-options', 'myplugin_options' );
|
||||||
|
|
||||||
|
|
||||||
add_action('acf/init', 'register_theme_settings_option_page');
|
// add_action('acf/init', 'register_theme_settings_option_page');
|
||||||
|
|
||||||
|
|
||||||
// #### ADMIN STYLE
|
// #### ADMIN STYLE
|
||||||
|
|
@ -52,24 +52,15 @@ function my_custom_admin_styles()
|
||||||
|
|
||||||
add_action('admin_head', 'my_custom_admin_styles');
|
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)
|
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');
|
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');
|
add_action('admin_enqueue_scripts', 'enqueue_admin_script');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ##### REMOVE FROM ADMIN MENU
|
// ##### REMOVE FROM ADMIN MENU
|
||||||
function custom_menu_page_removing()
|
function custom_menu_page_removing()
|
||||||
{
|
{
|
||||||
|
|
@ -103,8 +94,6 @@ function enqueue_custom_login_stylesheet()
|
||||||
add_action('login_enqueue_scripts', 'enqueue_custom_login_stylesheet');
|
add_action('login_enqueue_scripts', 'enqueue_custom_login_stylesheet');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
REORDER ADMIN MENU & POST TYPE ORDER ON MENU BAR
|
REORDER ADMIN MENU & POST TYPE ORDER ON MENU BAR
|
||||||
------------------------------------------------------------------------*/
|
------------------------------------------------------------------------*/
|
||||||
|
|
@ -123,8 +112,8 @@ function my_new_admin_menu_order($menu_order)
|
||||||
// define your new desired menu positions here
|
// define your new desired menu positions here
|
||||||
// for example, move 'upload.php' to position #9 and built-in pages to position #1
|
// for example, move 'upload.php' to position #9 and built-in pages to position #1
|
||||||
$new_positions = array(
|
$new_positions = array(
|
||||||
'session-datas-options' => 1,
|
'session-datas-options' => 2,
|
||||||
'admin.php?page=my_options' => 4,
|
'edit.php?post_type=search-and-find' => 3,
|
||||||
'edit.php' => 6,
|
'edit.php' => 6,
|
||||||
'edit.php?post_type=page' => 9,
|
'edit.php?post_type=page' => 9,
|
||||||
'upload.php' => 11,
|
'upload.php' => 11,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user