Exemplo n.º 1
0
 function recipe_hero_admin_help_tab()
 {
     $recipe_hero_help_edit_page = 'edit.php';
     $recipe_hero_help_post_new_page = 'post-new.php';
     $recipe_hero_settings_page = add_submenu_page('', __('Recipe Hero Settings', 'recipe-hero'), __('New Settings', 'recipe-hero'), 'administrator', 'recipe_hero_general_options', 'recipe_hero_general');
     $recipe_hero_settings_page_2 = add_submenu_page('', __('Style', 'recipe-hero'), __('Style', 'recipe-hero'), 'administrator', 'recipe_hero_style_options');
     $recipe_hero_settings_page_3 = add_submenu_page('', __('Labels', 'recipe-hero'), __('Labels', 'recipe-hero'), 'administrator', 'recipe_hero_labels_options');
     $screen = get_current_screen();
     if (recipe_hero_admin_get_current_post_type() == 'recipe') {
         add_action('load-' . $recipe_hero_help_edit_page, 'recipe_hero_admin_add_help_tab');
         add_action('load-' . $recipe_hero_help_post_new_page, 'recipe_hero_admin_add_help_tab');
         add_action('load-' . $recipe_hero_settings_page, 'recipe_hero_admin_add_help_tab');
         add_action('load-' . $recipe_hero_settings_page_2, 'recipe_hero_admin_add_help_tab');
         add_action('load-' . $recipe_hero_settings_page_3, 'recipe_hero_admin_add_help_tab');
     }
 }
Exemplo n.º 2
0
 /**
  * Register and enqueue admin-specific style sheet.
  *
  * @since     0.5.0
  *
  * @return    null    Return early if no settings page is registered.
  */
 public function enqueue_admin_styles()
 {
     if (recipe_hero_admin_get_current_post_type() == 'recipe') {
         wp_enqueue_style($this->plugin_slug . '-admin-styles', RH()->plugin_url() . '/assets/admin/css/admin.css', array(), RecipeHero::$version);
     }
 }