예제 #1
0
/**
 * Create and display plugin help tab content: "Layout Extras".
 *
 * @since 2.0.0
 *
 * @uses  ddw_gle_help_content_sub_head()
 * @uses  genesis_get_layout()
 */
function ddw_gle_help_content_post_type_support()
{
    ddw_gle_help_content_sub_head(__('Additional Post Type Support', 'genesis-layout-extras'));
    echo '<h4>' . __('Add Genesis Inpost options for public Custom Post Types', 'genesis-layout-extras') . ':</h4>' . '<p><blockquote>' . __('A lot of plugins with post types already integrate good with Genesis but lack support for inpost screen meta boxes. That is especially needed for layout options support.', 'genesis-layout-extras') . ' ' . sprintf(__('To solve this, you can add global support for all %s custom post types below, or, if you want, only for specific post types you need for the project.', 'genesis-layout-extras'), '<em>' . __('public', 'genesis-layout-extras') . '</em>') . ' ' . __('As a bonus, the inpost SEO and Script meta boxes are included as well. You might need those, too :).', 'genesis-layout-extras') . '</blockquote></p>';
    if (class_exists('Genesis_Admin_CPT_Archive_Settings') && ddw_gle_check_cpts()) {
        echo '<h4>' . __('Add Genesis Archive Settings for public Custom Post Types', 'genesis-layout-extras') . ':</h4>' . '<p><blockquote>' . sprintf(__('This optional Genesis feature can now be enabled with this plugin in global way for all public custom post types that were registered with archive support (%s).', 'genesis-layout-extras'), '<code>\'has_archive\' => true</code>') . ' ' . __('Alternatively, you can also only activate that for specific post types you need for the project.', 'genesis-layout-extras') . ' &mdash; ' . __('These archive settings allow for setting of: archive/page title, detailed introductory texts, SEO settings and layout options.', 'genesis-layout-extras') . '</blockquote></p>';
        if (ddw_gle_supported_plugins() || ddw_gle_supported_child_themes()) {
            echo '<p><blockquote>' . __('Note: The layout settings for archives done via these Genesis Archive settings and/or the content archive settings of THIS plugin (see below) do just the same. So you decide which one you use. Nothing could break, and it does no harm. So, enjoy your content archives (settings)!', 'genesis-layout-extras') . ' :)</blockquote></p>';
        }
        // end if supported plugins/child themes check
    }
    // end if Genesis 2.0+, plus not-builtin post types check
}
예제 #2
0
 /**
  * Set up the Help Tab system.
  *
  * @since 2.0.0
  *
  * @uses  callback functions located in theme file
  *        '/includes/gle-admin-help.php' with the actual help tab content
  * @uses  get_current_screen()
  * @uses  WP_Screen::add_help_tab()
  * @uses  WP_Screen::set_help_sidebar()
  * @uses  ddw_gle_help_sidebar_content()
  * @uses  ddw_gle_help_sidebar_content_extra()
  */
 function help()
 {
     /** Get current screen */
     $screen = get_current_screen();
     /** Display help tabs only for WordPress 3.3 or higher */
     if (!class_exists('WP_Screen') || !$screen) {
         return;
     }
     /** Add starting/general help tab */
     $screen->add_help_tab(array('id' => 'gle-plugin-start-help', 'title' => __('Genesis Layout Extras', 'genesis-layout-extras'), 'callback' => apply_filters('gle_filter_help_content_plugin_start', 'ddw_gle_plugin_start_help')));
     /** Add Layout Extras help tab */
     if (ddw_gle_core_sidebars_exists('sidebar')) {
         $screen->add_help_tab(array('id' => 'gle-layout-extras-help', 'title' => __('Layouts', 'genesis-layout-extras'), 'callback' => apply_filters('gle_filter_help_content_layout_extras', 'ddw_gle_help_content_layout_extras')));
     }
     // end if
     /** Add Post Type Support help tab */
     if (ddw_gle_check_cpts()) {
         $screen->add_help_tab(array('id' => 'gle-post-type-support-help', 'title' => _x('Additional Post Type Support', 'Translators: Help tab menu title', 'genesis-layout-extras'), 'callback' => apply_filters('gle_filter_help_content_post_type_support', 'ddw_gle_help_content_post_type_support')));
     }
     // end if
     /** Help tab only if supported plugins active */
     if (ddw_gle_supported_plugins()) {
         /** Add Plugin Support help tab */
         $screen->add_help_tab(array('id' => 'gle-plugin-support-help', 'title' => __('Plugin Support', 'genesis-layout-extras'), 'callback' => apply_filters('gle_filter_help_content_plugins', 'ddw_gle_admin_help_plugins')));
         require_once GLE_PLUGIN_DIR . '/includes/gle-admin-help-plugins.php';
     }
     // end-if plugins check
     /**
      * Help tab only if supported child themes are active
      */
     /** Function slug part - variable init */
     $gle_child_theme_help = 'default';
     /** By StudioPress */
     if ((function_exists('minimum_portfolio_post_type') || function_exists('executive_portfolio_post_type')) && post_type_exists('portfolio')) {
         /** StudioPress function slug part */
         $gle_child_theme_help = 'studiopress';
         require_once GLE_PLUGIN_DIR . '/includes/gle-admin-help-' . $gle_child_theme_help . '.php';
     }
     /** By Themedy brand */
     if (ddw_gle_supported_themedy() && (post_type_exists('products') || post_type_exists('photo'))) {
         /** Themedy function slug part */
         $gle_child_theme_help = 'themedy';
         require_once GLE_PLUGIN_DIR . '/includes/gle-admin-help-' . $gle_child_theme_help . '.php';
     }
     // end-if child theme themedy check
     /** By ZigZagPress brand */
     if (ddw_gle_supported_zigzagpress()) {
         /** ZigZagPress function slug part */
         $gle_child_theme_help = 'zigzagpress';
         require_once GLE_PLUGIN_DIR . '/includes/gle-admin-help-' . $gle_child_theme_help . '.php';
     }
     // end-if child theme zigzagpress check
     /** Add the help tab */
     if ('studiopress' == $gle_child_theme_help || 'themedy' == $gle_child_theme_help || 'zigzagpress' == $gle_child_theme_help) {
         require_once GLE_PLUGIN_DIR . '/includes/gle-admin-help-' . $gle_child_theme_help . '.php';
         $screen->add_help_tab(array('id' => 'gle-child-theme-support', 'title' => __('Child Theme Support', 'genesis-layout-extras'), 'callback' => apply_filters('gle_filter_help_' . $gle_child_theme_help . '', 'ddw_gle_admin_help_' . $gle_child_theme_help . '')));
     }
     // end-if child support check
     /** Add FAQ help tab */
     $screen->add_help_tab(array('id' => 'gle-faq-help', 'title' => __('FAQ - Frequently Asked Questions', 'genesis-layout-extras'), 'callback' => apply_filters('gle_filter_help_content_faq', 'ddw_gle_help_content_faq')));
     /** Add Translations help tab */
     $screen->add_help_tab(array('id' => 'gle-plugin-translations-help', 'title' => __('Translations', 'genesis-layout-extras'), 'callback' => apply_filters('gle_filter_help_content_translations', 'ddw_gle_help_content_translations')));
     /** Add Recommended Plugins help tab */
     $screen->add_help_tab(array('id' => 'gle-recommended-plugins-help', 'title' => __('Recommended Plugins', 'genesis-layout-extras'), 'callback' => apply_filters('gle_filter_help_content_recommended_plugins', 'ddw_gle_help_content_recommended_plugins')));
     /** Add help sidebar */
     $screen->set_help_sidebar(ddw_gle_help_sidebar_content_extra() . ddw_gle_help_sidebar_content());
 }