• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP genesis_unregister_layout函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中genesis_unregister_layout函数的典型用法代码示例。如果您正苦于以下问题:PHP genesis_unregister_layout函数的具体用法?PHP genesis_unregister_layout怎么用?PHP genesis_unregister_layout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了genesis_unregister_layout函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: utility_pro_setup

/**
 * Theme setup.
 *
 * Attach all of the site-wide functions to the correct hooks and filters. All
 * the functions themselves are defined below this setup function.
 *
 * @since 1.0.0
 */
function utility_pro_setup()
{
    define('CHILD_THEME_NAME', 'utility-pro');
    define('CHILD_THEME_URL', 'https://store.carriedils.com/utility-pro');
    define('CHILD_THEME_VERSION', '1.0.0');
    // Add HTML5 markup structure
    add_theme_support('html5', array('caption', 'comment-form', 'comment-list', 'gallery', 'search-form'));
    // Add viewport meta tag for mobile browsers
    add_theme_support('genesis-responsive-viewport');
    // Add support for custom background
    add_theme_support('custom-background', array('wp-head-callback' => '__return_false'));
    // Add support for three footer widget areas
    add_theme_support('genesis-footer-widgets', 3);
    // Add support for additional color style options
    add_theme_support('genesis-style-selector', array('utility-pro-purple' => __('Purple', 'utility-pro'), 'utility-pro-green' => __('Green', 'utility-pro'), 'utility-pro-red' => __('Red', 'utility-pro')));
    // Add support for structural wraps (all default Genesis wraps unless noted)
    add_theme_support('genesis-structural-wraps', array('footer', 'footer-widgets', 'header', 'home-gallery', 'nav', 'site-inner', 'site-tagline'));
    // Add support for two navigation areas (theme doesn't use secondary navigation)
    add_theme_support('genesis-menus', array('primary' => __('Primary Navigation Menu', 'utility-pro')));
    // Add custom image sizes
    add_image_size('feature-large', 960, 330, array('center', 'center'));
    add_image_size('feature-post', 1144);
    add_image_size('feature-post-archive', 743, 458, array('center', 'center'));
    add_image_size('feature-post-home', 360, 223, array('center', 'center', true));
    add_image_size('feature-rss', 564);
    add_image_size('yarpp-thumbnail', 360, 223, array('center', 'center', true));
    // Unregister secondary sidebar
    unregister_sidebar('sidebar-alt');
    // Unregister layouts that use secondary sidebar
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-content-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    // Register the default widget areas
    utility_pro_register_widget_areas();
    // Add Utility Bar above header
    add_action('genesis_before_header', 'utility_pro_add_bar');
    // Add featured image above posts
    // Add a navigation area above the site footer
    add_action('genesis_before_footer', 'utility_pro_do_footer_nav');
    // Remove Genesis archive pagination (Genesis pagination settings still apply)
    remove_action('genesis_after_endwhile', 'genesis_posts_nav');
    // Add WordPress archive pagination (accessibility)
    // Load accesibility components if the Genesis Accessible plugin is not active
    if (!utility_pro_genesis_accessible_is_active()) {
        // Load skip links (accessibility)
        include get_stylesheet_directory() . '/includes/skip-links.php';
    }
    // Apply search form enhancements (accessibility)
    add_filter('get_search_form', 'utility_pro_get_search_form', 25);
    // Load files in admin
    if (is_admin()) {
        // Add suggested plugins nag
        include get_stylesheet_directory() . '/includes/suggested-plugins.php';
        // Add theme license (don't remove, unless you don't want theme support)
        include get_stylesheet_directory() . '/includes/theme-license.php';
    }
}
开发者ID:ashenkar,项目名称:sanga,代码行数:65,代码来源:functions.php


示例2: bw_theme_setup

function bw_theme_setup()
{
    /*
     * Custom Image Sizes
     */
    add_image_size('featured-image', 225, 160, TRUE);
    /*
     * Enable custom background
     */
    add_theme_support('custom-background');
    /* 
     * Add HTML5 markup structure
     */
    add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
    /* 
     * Add support for structural wraps
     */
    add_theme_support('genesis-structural-wraps', array('header', 'subnav', 'footer-widgets', 'footer'));
    remove_action('genesis_after_header', 'genesis_do_nav');
    add_action('genesis_header_right', 'genesis_do_nav');
    /* 
     * Remove uneeded layouts 
     */
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    /*
     * Footer Widgets
     */
    add_theme_support('genesis-footer-widgets', 3);
    /*
     * Genesis Menus
     * Socratic comes with 2 navigation systems built-in ready.
     */
    add_theme_support('genesis-menus', array('primary' => __('Primary Navigation Menu', CHILD_DOMAIN), 'secondary' => __('Secondary Navigation Menu', CHILD_DOMAIN)));
    /*
     * Enqueue Scripts
     */
    add_action('wp_enqueue_scripts', 'bw_enqueue_scripts');
    /*
     * Register Sidebars
     */
    bw_register_sidebars();
    /*
     * Unregister SuperFish - Won't be needed in 2.0
     */
    add_action('wp_enqueue_scripts', 'bw_unregister_superfish');
    function bw_unregister_superfish()
    {
        wp_deregister_script('superfish');
        wp_deregister_script('superfish-args');
    }
}
开发者ID:ngo6012,项目名称:socratic-genesis-starter-theme,代码行数:53,代码来源:functions.php


示例3: child_theme_setup

function child_theme_setup()
{
    // ** Backend **
    // Translations
    load_child_theme_textdomain('social-coup', get_stylesheet_directory() . '/lib/languages');
    // Image Sizes
    add_image_size('sc_thumbnail', 405, 375, true);
    // Sidebars
    unregister_sidebar('sidebar-alt');
    unregister_sidebar('header-right');
    add_theme_support('genesis-footer-widgets', 3);
    genesis_register_sidebar(array('name' => __('Home Left', 'social-coup'), 'id' => 'home-left'));
    genesis_register_sidebar(array('name' => __('Home Middle', 'social-coup'), 'id' => 'home-middle'));
    genesis_register_sidebar(array('name' => __('Home Right', 'social-coup'), 'id' => 'home-right'));
    // Remove Unused Page Layouts
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    // Setup Theme Settings
    include_once CHILD_DIR . '/lib/admin/child-theme-settings.php';
    // Editor Stylesheet
    add_editor_style('editor-style.css');
    // Hide Editor on Specific Template Pages
    add_action('admin_init', 'sc_hide_editor');
    // Activate Required Plugins
    require_once CHILD_DIR . '/lib/classes/class-tgm-plugin-activation.php';
    add_action('tgmpa_register', 'cs_register_required_plugins');
    // Add support for custom header
    add_theme_support('genesis-custom-header', array('width' => 545, 'height' => 184, 'textcolor' => '333', 'admin_header_callback' => 'sc_admin_style', 'header_callback' => 'sc_custom_header_style'));
    // ** Frontend **
    // Remove Edit Link
    add_filter('edit_post_link', '__return_false');
    // Viewport Meta Tag for Mobile Browsers
    add_action('genesis_meta', 'cs_viewport_meta_tag');
    // Structural Wraps
    add_theme_support('genesis-structural-wraps', array('header', 'nav', 'subnav', 'event-information', 'footer-widgets', 'footer'));
    // Remove text from search
    add_filter('genesis_search_text', '__return_false');
    add_filter('genesis_search_button_text', '__return_false');
    // Move navigation above header
    remove_action('genesis_after_header', 'genesis_do_nav');
    add_action('genesis_before_header', 'genesis_do_nav');
    // Remove site tagline from header
    add_filter('genesis_seo_description', '__return_false');
    // Event Information
    add_action('genesis_after_header', 'cs_event_description');
    // Footer Text
    add_filter('genesis_footer_backtotop_text', 'cs_footer_left');
    add_filter('genesis_footer_creds_text', 'cs_footer_right');
}
开发者ID:hscale,项目名称:webento,代码行数:50,代码来源:functions.php


示例4: child_theme_setup

function child_theme_setup()
{
    define('CHILD_THEME_VERSION', filemtime(get_stylesheet_directory() . '/style.css'));
    // ** Backend **
    // Image Sizes
    // add_image_size( 'be_featured', 400, 100, true );
    // Structural Wraps
    add_theme_support('genesis-structural-wraps', array('header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer'));
    // Menus
    add_theme_support('genesis-menus', array('primary' => 'Primary Navigation Menu'));
    // Sidebars
    unregister_sidebar('sidebar-alt');
    //genesis_register_sidebar( array( 'name' => 'Blog Sidebar', 'id' => 'blog-sidebar' ) );
    //add_theme_support( 'genesis-footer-widgets', 4 );
    // Remove Unused Page Layouts
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    // Remove Unused User Settings
    add_filter('user_contactmethods', 'be_contactmethods');
    add_action('admin_init', 'be_remove_user_settings');
    // Editor Styles
    add_editor_style('editor-style.css');
    // Setup Theme Settings
    include_once CHILD_DIR . '/lib/functions/child-theme-settings.php';
    // Reposition Genesis Metaboxes
    remove_action('admin_menu', 'genesis_add_inpost_seo_box');
    add_action('admin_menu', 'be_add_inpost_seo_box');
    remove_action('admin_menu', 'genesis_add_inpost_layout_box');
    add_action('admin_menu', 'be_add_inpost_layout_box');
    // Remove Genesis Widgets
    add_action('widgets_init', 'be_remove_genesis_widgets', 20);
    // Remove Genesis Theme Settings Metaboxes
    add_action('genesis_theme_settings_metaboxes', 'be_remove_genesis_metaboxes');
    // Don't update theme
    add_filter('http_request_args', 'be_dont_update_theme', 5, 2);
    // ** Frontend **
    // Remove Edit link
    add_filter('genesis_edit_post_link', '__return_false');
    // Responsive Meta Tag
    add_action('genesis_meta', 'be_viewport_meta_tag');
    // Footer
    remove_action('genesis_footer', 'genesis_do_footer');
    add_action('genesis_footer', 'be_footer');
}
开发者ID:Wordpress-Development,项目名称:BE-Genesis-Child,代码行数:45,代码来源:functions.php


示例5: scratch_setup

function scratch_setup()
{
    // Define theme constants
    define('CHILD_THEME_NAME', 'Scratch');
    define('CHILD_THEME_URL', 'http://github.com/slick514/scratchTheme');
    define('CHILD_THEME_VERSION', '1.0.0');
    // Add support for HTML5
    add_theme_support('html5', array('comment-list', 'comment-form', 'search-form', 'gallery', 'caption'));
    // Add viewport meta tag for mobile browsers
    add_theme_support('genesis-responsive-viewport');
    // Add accessibility support
    add_theme_support('genesis-accessibility', array('404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links'));
    // Add support for (3) footer widgets
    add_theme_support('genesis-footer-widgets', 3);
    // Unregister layouts that use 2ry sidebar
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-content-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
}
开发者ID:slick514,项目名称:scratchTheme,代码行数:19,代码来源:functions.php


示例6: themeName_setup

/**
 * Theme setup.
 *
 * Attach all of the site-wide functions to the correct hooks and filters. All
 * the functions themselves are defined below this setup function.
 *
 * @since 1.0.0
 */
function themeName_setup()
{
    // Define theme constants.
    define('CHILD_THEME_NAME', 'ThemeName');
    define('CHILD_THEME_URL', 'https://github.com/engrshahabuddin/Genesis-Child-Theme');
    define('CHILD_THEME_VERSION', '1.0.0');
    // Add HTML5 markup structure.
    add_theme_support('html5', array('comment-list', 'comment-form', 'search-form', 'gallery', 'caption'));
    // Add viewport meta tag for mobile browsers.
    add_theme_support('genesis-responsive-viewport');
    // Add theme support for accessibility.
    add_theme_support('genesis-accessibility', array('404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links'));
    // Add theme support for footer widgets.
    add_theme_support('genesis-footer-widgets', 3);
    // Unregister layouts that use secondary sidebar.
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-content-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    // Unregister secondary sidebar.
    unregister_sidebar('sidebar-alt');
    // Add theme widget areas.
    include_once get_stylesheet_directory() . '/includes/widget-areas.php';
}
开发者ID:engrshahabuddin,项目名称:Genesis-Child-Theme,代码行数:31,代码来源:functions.php


示例7: child_theme_setup

/**
 * Theme Setup
 * @since 1.0.0
 *
 * This setup function attaches all of the site-wide functions
 * to the correct hooks and filters. All the functions themselves
 * are defined below this setup function.
 *
 */
function child_theme_setup()
{
    /****************************************
    	Define child theme version
    	*****************************************/
    define('CHILD_THEME_VERSION', filemtime(get_stylesheet_directory() . '/style.css'));
    /****************************************
    	Setup Foundation 5 by Zurb
    	*****************************************/
    include_once CHILD_DIR . '/lib/foundation/foundation-walker.php';
    include_once CHILD_DIR . '/lib/foundation/genesis-markup.php';
    include_once CHILD_DIR . '/lib/foundation/foundation-functions.php';
    /****************************************
    	Setup child theme functions
    	*****************************************/
    include_once CHILD_DIR . '/lib/theme-functions.php';
    /****************************************
    	Backend
    	*****************************************/
    // Admin Branding
    include_once CHILD_DIR . '/lib/admin-branding.php';
    // Image Sizes
    // add_image_size( $name, $width = 0, $height = 0, $crop = false );
    add_image_size('featured-image', 9999, 600, TRUE);
    add_image_size('square-500', 500, 500, TRUE);
    add_image_size('icon', 100, 100, TRUE);
    // add_filter( 'image_size_names_choose', 'ssm_image_size_names_choose' );
    /**
     *
     * Add new image sizes to media size selection menu
     * See: http://wpdaily.co/top-10-snippets/
     *
     */
    function ssm_image_size_names_choose($sizes)
    {
        $sizes['desktop-size'] = 'Desktop';
        return $sizes;
    }
    // Clean up Head
    remove_action('wp_head', 'rsd_link');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'wp_shortlink_wp_head');
    // Structural Wraps
    // add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );
    // Sidebars
    unregister_sidebar('header-right');
    unregister_sidebar('sidebar-alt');
    // add_theme_support( 'genesis-footer-widgets', 4 );
    // Execute shortcodes in widgets
    add_filter('widget_text', 'do_shortcode');
    // Remove Unused Page Layouts
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    genesis_unregister_layout('sidebar-content');
    // genesis_unregister_layout( 'content-sidebar' );
    // Remove Unused User Settings
    add_filter('user_contactmethods', 'ssm_contactmethods');
    remove_action('show_user_profile', 'genesis_user_options_fields');
    remove_action('edit_user_profile', 'genesis_user_options_fields');
    remove_action('show_user_profile', 'genesis_user_archive_fields');
    remove_action('edit_user_profile', 'genesis_user_archive_fields');
    remove_action('show_user_profile', 'genesis_user_seo_fields');
    remove_action('edit_user_profile', 'genesis_user_seo_fields');
    remove_action('show_user_profile', 'genesis_user_layout_fields');
    remove_action('edit_user_profile', 'genesis_user_layout_fields');
    // Editor Styles
    add_editor_style('editor-style.css');
    // Remove Genesis Page Templates
    add_filter('theme_page_templates', 'ssm_remove_genesis_page_templates');
    // Remove Genesis Theme Settings Metaboxes
    add_action('genesis_theme_settings_metaboxes', 'ssm_remove_genesis_metaboxes');
    // Reposition Genesis Layout Settings Metabox
    remove_action('admin_menu', 'genesis_add_inpost_layout_box');
    add_action('admin_menu', 'ssm_add_inpost_layout_box');
    // Don't update theme
    add_filter('http_request_args', 'ssm_dont_update_theme', 5, 2);
    // Prevent File Modifications
    define('DISALLOW_FILE_EDIT', true);
    // Add support for custom background
    // add_theme_support( 'custom-background' );
    // Add support for custom header
    // add_theme_support( 'genesis-custom-header', array( 'width' => 1140, 'height' => 100 ) );
    // Remove Dashboard Meta Boxes
    add_action('wp_dashboard_setup', 'ssm_remove_dashboard_widgets');
    // Remove default link for images
    add_action('admin_init', 'ssm_imagelink_setup', 10);
    // Show Kitchen Sink in WYSIWYG Editor by default
    add_filter('tiny_mce_before_init', 'ssm_unhide_kitchensink');
    // Disable some or all of the default widgets.
//.........这里部分代码省略.........
开发者ID:Wordpress-Development,项目名称:genesis-foundation,代码行数:101,代码来源:functions.php


示例8: child_theme_setup

function child_theme_setup()
{
    /****************************************
    	Define child theme version
    	*****************************************/
    define('CHILD_THEME_VERSION', filemtime(get_stylesheet_directory() . '/style.css'));
    /****************************************
    	Include theme helper functions
    	*****************************************/
    include_once CHILD_DIR . '/lib/theme-helpers.php';
    /****************************************
    	Setup child theme functions
    	*****************************************/
    include_once CHILD_DIR . '/lib/theme-functions.php';
    /****************************************
    	Backend
    	*****************************************/
    // Image Sizes
    // add_image_size( $name, $width = 0, $height = 0, $crop = false );
    // Clean up Head
    remove_action('wp_head', 'rsd_link');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'wp_shortlink_wp_head');
    // Structural Wraps
    add_theme_support('genesis-structural-wraps', array('header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer'));
    // Unregister Secondary Nav Menu
    add_theme_support('genesis-menus', array('primary' => 'Primary Navigation Menu'));
    // Sidebars
    unregister_sidebar('sidebar-alt');
    genesis_register_sidebar(array('name' => 'Footer', 'id' => 'custom-footer'));
    //add_theme_support( 'genesis-footer-widgets', 4 );
    // Execute shortcodes in widgets
    // add_filter( 'widget_text', 'do_shortcode' );
    // Remove Unused Page Layouts
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    // Remove Unused User Settings
    add_filter('user_contactmethods', 'mb_contactmethods');
    remove_action('show_user_profile', 'genesis_user_options_fields');
    remove_action('edit_user_profile', 'genesis_user_options_fields');
    remove_action('show_user_profile', 'genesis_user_archive_fields');
    remove_action('edit_user_profile', 'genesis_user_archive_fields');
    remove_action('show_user_profile', 'genesis_user_seo_fields');
    remove_action('edit_user_profile', 'genesis_user_seo_fields');
    remove_action('show_user_profile', 'genesis_user_layout_fields');
    remove_action('edit_user_profile', 'genesis_user_layout_fields');
    // Editor Styles
    add_editor_style('editor-style.css');
    // Remove Genesis Theme Settings Metaboxes
    add_action('genesis_theme_settings_metaboxes', 'mb_remove_genesis_metaboxes');
    // Reposition Genesis Layout Settings Metabox
    remove_action('admin_menu', 'genesis_add_inpost_layout_box');
    add_action('admin_menu', 'mb_add_inpost_layout_box');
    // Don't update theme
    add_filter('http_request_args', 'mb_dont_update_theme', 5, 2);
    // Setup Child Theme Settings
    include_once CHILD_DIR . '/lib/child-theme-settings.php';
    // Prevent File Modifications
    define('DISALLOW_FILE_EDIT', true);
    // Set Content Width
    $content_width = apply_filters('content_width', 740, 740, 1140);
    // Add support for custom background
    add_theme_support('custom-background');
    // Add support for custom header
    add_theme_support('genesis-custom-header', array('width' => 1140, 'height' => 100));
    // Remove Dashboard Meta Boxes
    add_action('wp_dashboard_setup', 'mb_remove_dashboard_widgets');
    // Change Admin Menu Order
    add_filter('custom_menu_order', 'mb_custom_menu_order');
    add_filter(' menu_order', 'mb_custom_menu_order');
    // Hide Admin Areas that are not used
    add_action('admin_menu', 'mb_remove_menu_pages');
    // Remove default link for images
    add_action('admin_init', 'mb_imagelink_setup', 10);
    // Show Kitchen Sink in WYSIWYG Editor
    add_filter('tiny_mce_before_init', 'mb_unhide_kitchensink');
    // Define custom post type capabilities for use with Members
    add_action('admin_init', 'mb_add_post_type_caps');
    /****************************************
    	Frontend
    	*****************************************/
    // Add HTML5 markup structure
    add_theme_support('html5');
    // Add viewport meta tag for mobile browsers
    add_theme_support('genesis-responsive-viewport');
    // HTML5 doctype with conditional classes
    remove_action('genesis_doctype', 'genesis_do_doctype');
    add_action('genesis_doctype', 'mb_html5_doctype');
    // Load custom favicon to header
    add_filter('genesis_pre_load_favicon', 'mb_custom_favicon_filter');
    // Load Apple touch icon in header
    add_filter('genesis_meta', 'mb_apple_touch_icon');
    // Remove Edit link
    add_filter('genesis_edit_post_link', '__return_false');
    // Footer
    remove_action('genesis_footer', 'genesis_do_footer');
    add_action('genesis_footer', 'mb_footer');
    // Enqueue Scripts
//.........这里部分代码省略.........
开发者ID:rolka,项目名称:bourbon-genesis,代码行数:101,代码来源:functions.php


示例9: get_stylesheet_directory

/** Theme Option/Functions */
require_once get_stylesheet_directory() . '/include/theme_settings.php';
require_once get_stylesheet_directory() . '/include/theme_functions.php';
/** Theme Widgets */
require_once get_stylesheet_directory() . '/include/widgets/widget-flickr.php';
require_once get_stylesheet_directory() . '/include/widgets/widget-address.php';
require_once get_stylesheet_directory() . '/include/widgets/widget-social_icons.php';
require_once get_stylesheet_directory() . '/include/widgets/widget-latest_portfolio.php';
/** Theme Shortcode */
require_once get_stylesheet_directory() . '/include/shortcodes/shortcode.php';
/** Unregister Layout */
genesis_unregister_layout('content-sidebar-sidebar');
genesis_unregister_layout('sidebar-sidebar-content');
genesis_unregister_layout('sidebar-content-sidebar');
genesis_unregister_layout('sidebar-content');
genesis_unregister_layout('content-sidebar');
/** Unregister Sidebar */
unregister_sidebar('header-right');
unregister_sidebar('sidebar-alt');
/** Add Structural Wraps */
add_theme_support('genesis-structural-wraps', array('header', 'subnav', 'inner', 'footer-widgets', 'footer'));
//* Add support for post formats
add_theme_support('post-formats', array('audio', 'gallery', 'link', 'quote', 'video', 'image'));
/** Reposition Primary Nav */
remove_action('genesis_after_header', 'genesis_do_nav');
add_action('genesis_header', 'genesis_do_nav');
/** Remove Seondary Nav */
remove_action('genesis_after_header', 'genesis_do_subnav');
/** Theme Stylesheets */
add_action('wp_enqueue_scripts', 'zp_print_styles');
function zp_print_styles()
开发者ID:lukasalbrecht,项目名称:www.genesis-playground.dev,代码行数:31,代码来源:functions.php


示例10: child_theme_setup

function child_theme_setup()
{
    // Admin (Backend) Setup first
    // Change the labeling for the "Posts" menu to "Slides"
    add_action('init', 'crm_change_post_object_label');
    add_action('init', 's25_change_categories_label');
    add_action('admin_menu', 'crm_change_post_menu_label');
    // Change post title text
    add_action('gettext', 'crm_change_title_text');
    // Unregister layout settings
    genesis_unregister_layout('content-sidebar');
    genesis_unregister_layout('sidebar-content');
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    // Unregister unnecessary sidebars
    unregister_sidebar('sidebar-alt');
    unregister_sidebar('sidebar');
    unregister_sidebar('header-right');
    // Force defaults for certain Genesis settings
    add_filter('genesis_options', 'define_genesis_setting_custom', 10, 2);
    function define_genesis_setting_custom($options, $setting)
    {
        if ($setting == GENESIS_SETTINGS_FIELD) {
            $options['nav'] = 0;
            $options['nav_superfish'] = 0;
            $options['breadcrumb_home'] = 0;
            $options['breadcrumb_single'] = 0;
            $options['breadcrumb_page'] = 0;
            $options['breadcrumb_archive'] = 0;
            $options['breadcrumb_404'] = 0;
        }
        return $options;
    }
    // Setup new sidebars for the footer
    genesis_register_sidebar(array('id' => 'homepage', 'name' => __('Homepage', 'genesis'), 'description' => __('')));
    genesis_register_sidebar(array('id' => 'footer-bottom-left', 'name' => __('Footer Bottom Left', 'genesis'), 'description' => __('')));
    genesis_register_sidebar(array('id' => 'footer-bottom-mid', 'name' => __('Footer Bottom Mid', 'genesis'), 'description' => __('')));
    genesis_register_sidebar(array('id' => 'footer-bottom-right', 'name' => __('Footer Bottom Right', 'genesis'), 'description' => __('')));
    // Frontend setup
    // Add necessary wrapper div
    /*	add_action( 'genesis_before_content_sidebar_wrap','s25_1140_container');
    	function s25_1140_container() {
    		echo '<div class="twelvecol">';
    	}
    */
    // Close necessary wrapper div
    /*	add_action( 'genesis_after_content_sidebar_wrap','s25_close_1140_container');
    	function s25_close_1140_container() {
    		echo '</div>';
    	}
    */
    // Load javascripts & CSS
    add_action('init', 'my_scripts');
    function my_scripts()
    {
        if (!is_admin()) {
            $theme = get_theme(get_current_theme());
            $css_loc = CHILD_URL . '/lib/css/';
            // CSS
            wp_register_style('flexslide', $css_loc . 'flexslider.css', array(), $theme['Version'], 'screen');
            wp_register_style('i140', $css_loc . '1140.css', array(), $theme['Version'], 'screen');
            //wp_register_style('ie',$css_loc.'ie.css', array(), $theme['Version'], 'screen');
            wp_enqueue_style('i140');
            //wp_enqueue_style('ie');
            wp_enqueue_style('flexslide');
            // Javascripts
            $js_loc = CHILD_URL . '/lib/js/';
            wp_register_script('flexslider', $js_loc . 'jquery.flexslider-min.js', array('jquery'), '1.8', false);
            wp_register_script('modernizr', $js_loc . 'modernizr.custom.97724.js', array('jquery'), '97724', false);
            wp_register_script('slide25', $js_loc . 'slide25.js', array('jquery'), '1.0', false);
            wp_enqueue_script('modernizr');
            wp_enqueue_script('flexslider');
            wp_enqueue_script('slide25');
        }
    }
    // Setup Shortcodes
    include_once CHILD_DIR . '/lib/functions/shortcodes.php';
    //Remove the right-hand items from Main Navigation
    remove_filter('genesis_nav_items', 'genesis_nav_right', 10, 2);
    remove_filter('wp_nav_menu_items', 'genesis_nav_right', 10, 2);
    // remove post info & meta
    remove_action('genesis_after_post_content', 'genesis_post_meta');
    remove_action('genesis_before_post_content', 'genesis_post_info');
    // remove site description
    remove_action('genesis_site_description', 'genesis_seo_site_description');
    // Customize the entire footer
    remove_action('genesis_footer', 'genesis_do_footer');
    add_action('genesis_footer', 'child_do_footer');
    function child_do_footer()
    {
        echo '<p>&copy; Copyright ' . date('Y') . '</p>';
    }
    // Change the Comments' "Speak your mind" text
    add_filter('genesis_comment_form_args', 'custom_comment_form_args');
    function custom_comment_form_args($args)
    {
        $args['title_reply'] = 'Comment on this slide';
        return $args;
    }
//.........这里部分代码省略.........
开发者ID:ramseyp,项目名称:genesis-wp-presenter,代码行数:101,代码来源:functions.php


示例11: child_theme_setup

function child_theme_setup()
{
    /****************************************
    	Define child theme version
    	*****************************************/
    define('CHILD_THEME_VERSION', filemtime(get_stylesheet_directory() . '/style.css'));
    /****************************************
    	Include theme helper functions
    	*****************************************/
    include_once CHILD_DIR . '/lib/theme-helpers.php';
    /****************************************
    	Setup child theme functions
    	*****************************************/
    include_once CHILD_DIR . '/lib/theme-functions.php';
    /****************************************
    	Backend
    	*****************************************/
    // Image Sizes
    // add_image_size( $name, $width = 0, $height = 0, $crop = false );
    // Clean up Head
    remove_action('wp_head', 'rsd_link');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'wp_shortlink_wp_head');
    // Structural Wraps
    add_theme_support('genesis-structural-wraps', array('header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer'));
    add_theme_support('genesis-accessibility', array('headings', 'search-form', 'skip-links', 'rems', '404-page'));
    // Sidebars
    // unregister_sidebar( 'sidebar-alt' );
    add_theme_support('genesis-footer-widgets', 3);
    // Execute shortcodes in widgets
    // add_filter( 'widget_text', 'do_shortcode' );
    // Remove Unused Page Layouts
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    //genesis_unregister_layout( 'sidebar-content-sidebar' );
    // Remove Unused User Settings
    // remove_action( 'show_user_profile', 'genesis_user_options_fields' );
    // remove_action( 'edit_user_profile', 'genesis_user_options_fields' );
    // remove_action( 'show_user_profile', 'genesis_user_archive_fields' );
    // remove_action( 'edit_user_profile', 'genesis_user_archive_fields' );
    // remove_action( 'show_user_profile', 'genesis_user_seo_fields' );
    // remove_action( 'edit_user_profile', 'genesis_user_seo_fields' );
    // remove_action( 'show_user_profile', 'genesis_user_layout_fields' );
    // remove_action( 'edit_user_profile', 'genesis_user_layout_fields' );
    // Editor Styles
    add_editor_style('editor-style.css');
    // Remove Genesis Theme Settings Metaboxes
    add_action('genesis_theme_settings_metaboxes', 'ncgen_remove_genesis_metaboxes');
    // Reposition Genesis Layout Settings Metabox
    remove_action('admin_menu', 'genesis_add_inpost_layout_box');
    add_action('admin_menu', 'ncgen_add_inpost_layout_box');
    // Setup Child Theme Settings
    include_once CHILD_DIR . '/lib/child-theme-settings.php';
    // Prevent File Modifications
    define('DISALLOW_FILE_EDIT', true);
    // Set Content Width
    // The 3 numbers correspond to content width of the default, small and large layouts.
    // The default layout refers to 2-column layouts; small refers to 3-column layouts
    // and large refers to the full-width content layout.
    $content_width = apply_filters('content_width', 740, 740, 1140);
    // Add support for custom background
    add_theme_support('custom-background');
    // Add support for SVG in media uploader
    add_filter('upload_mimes', 'ncgen_enable_svg_upload');
    add_filter('genesis_get_image', 'ncgen_resize_svg');
    // Remove Dashboard Meta Boxes
    add_action('wp_dashboard_setup', 'ncgen_remove_dashboard_widgets');
    // Change Admin Menu Order
    add_filter('custom_menu_order', 'ncgen_custom_menu_order');
    add_filter('menu_order', 'ncgen_custom_menu_order');
    // Hide Admin Areas that are not used
    add_action('admin_menu', 'ncgen_remove_menu_pages');
    // Remove default link for images
    add_action('admin_init', 'ncgen_imagelink_setup', 10);
    //* Remove address and H1 from TinyMCE editor for better accessibility
    add_filter('tiny_mce_before_init', 'ncgen_customize_tinymce');
    // Define custom post type capabilities for use with Members
    // add_action( 'admin_init', 'ncgen_add_post_type_caps' );
    /****************************************
    	Frontend
    	*****************************************/
    // Add HTML5 markup structure
    add_theme_support('html5', array('comment-list', 'search-form', 'comment-form', 'gallery', 'caption'));
    // Add viewport meta tag for mobile browsers
    add_theme_support('genesis-responsive-viewport');
    // Load Apple touch icon in header
    add_action('wp_head', 'ncgen_apple_touch_icon', 9);
    // Remove Edit link
    add_filter('genesis_edit_post_link', '__return_false');
    // Remove Default Genesis footer and add custom footer
    remove_action('genesis_footer', 'genesis_do_footer');
    add_action('genesis_footer', 'ncgen_footer');
    // Enqueue Scripts
    add_action('wp_enqueue_scripts', 'ncgen_scripts');
    // Enqueue Web Fonts
    add_action('wp_enqueue_scripts', 'ncgen_web_fonts');
    // Dequeue skip-links JS from Genesis since this theme includes it in its own JS
    add_action('wp_print_scripts', 'ncgen_dequeue_skip_links');
    // Remove Query Strings From Static Resources
//.........这里部分代码省略.........
开发者ID:dkenzik,项目名称:genesis-starter-grunt-sass,代码行数:101,代码来源:functions.php


示例12: obm_theme_setup

function obm_theme_setup()
{
    // Sets up child, including scripts and styles
    include_once CHILD_DIR . '/lib/child_setup.php';
    // Child theme functions
    include_once CHILD_DIR . '/lib/child_theme_functions.php';
    // Child theme admin area functions
    include_once CHILD_DIR . '/lib/admin_functions.php';
    // Mobile Detection PHP support
    // https://github.com/serbanghita/Mobile-Detect
    include_once CHILD_DIR . '/lib/Mobile_Detect.php';
    $detect = new Mobile_Detect();
    // Stop updates from WordPress repo
    add_filter('http_request_args', 'obm_dont_update', 5, 2);
    /* --- THEME SUPPORT --- */
    // Turn On HTML5 Markup @since GENESIS 2.0 final
    add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
    // Add structural support
    add_theme_support('genesis-structural-wraps', array('header', 'nav', 'subnav', 'site-inner', 'footer-widgets', 'footer'));
    // Menus
    add_theme_support('genesis-menus', array('primary' => 'Primary Navigation Menu', 'secondary' => 'Footer Navigation Menu'));
    /* --- UNREGISTER LAYOUTS AND WIDGETS --- */
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    // genesis_unregister_layout( 'content-sidebar' );
    // genesis_unregister_layout( 'sidebar-content' );
    // genesis_unregister_layout( 'full-width-content' );
    // Remove Genesis Widgets
    add_action('widgets_init', 'obm_remove_genesis_widgets', 20);
    function obm_remove_genesis_widgets()
    {
        unregister_widget('Genesis_eNews_Updates');
        unregister_widget('Genesis_Featured_Page');
        unregister_widget('Genesis_Featured_Post');
        unregister_widget('Genesis_Latest_Tweets_Widget');
        unregister_widget('Genesis_Menu_Pages_Widget');
        unregister_widget('Genesis_User_Profile_Widget');
        unregister_widget('Genesis_Widget_Menu_Categories');
    }
    /* --- SIDEBARS AND WIDGETS --- */
    // Remove Sidebars
    //unregister_sidebar( 'header-right' );
    // unregister_sidebar( 'sidebar' );
    unregister_sidebar('sidebar-alt');
    // Add footer widgets (second argument is number of widgets)
    add_theme_support('genesis-footer-widgets', 2);
    // Home page widgets
    // genesis_register_sidebar( array(
    //  	'id'			=> 'home-hero',
    //  	'name'			=> __( 'Home Hero', 'obm_theme' ),
    //  ) );
    /* --- <HEAD> ELEMENTS --- */
    // Remove default stylesheet
    // See /lib/child_setup.php
    remove_action('genesis_meta', 'genesis_load_stylesheet');
    // Enqueue base scripts and styles
    // See /lib/child_setup.php
    add_action('wp_enqueue_scripts', 'obm_scripts_and_styles', 999);
    // Add viewport meta tag for mobile browsers @since GENESIS 2.0
    add_theme_support('genesis-responsive-viewport');
    // Change favicon location
    add_filter('genesis_pre_load_favicon', 'obm_custom_favicon_location');
    /* --- CLEANING <HEAD> --- */
    // Remove rsd link
    remove_action('wp_head', 'rsd_link');
    // Remove Windows Live Writer
    remove_action('wp_head', 'wlwmanifest_link');
    // Remove index link
    remove_action('wp_head', 'index_rel_link');
    // Remove previous link
    remove_action('wp_head', 'parent_post_rel_link', 10, 0);
    // Remove start link
    remove_action('wp_head', 'start_post_rel_link', 10, 0);
    // Remove links for adjacent posts
    remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
    // Remove WP version
    remove_action('wp_head', 'wp_generator');
    /* --- CHILD THEME IMAGE SIZES --- */
    /*
    	* To add more sizes, simply copy a line from below and change the dimensions & name.
    	  As long as you upload a "featured image" as large as the biggest set width or height,
    	  all the other sizes will be auto-cropped.
    
    	* To call a different size, simply change the text inside the thumbnail function.
    
    	* For example, to call the 225 x 225 sized image, we would use the function:
    	  <?php the_post_thumbnail( 'obm_medium_img' ); ?>
    
    	* You can change the names and dimensions to whatever you like.
    */
    add_image_size('obm_featured_img', 600, 400, TRUE);
    // Change image to default to no link
    update_option('image_default_link_type', 'none');
    // Hide media library items uploaded by other users on upload, unless user is admin
    add_filter('posts_where', 'obm_hide_media_library');
    function obm_hide_media_library($where)
    {
        global $current_user;
        if (is_user_logged_in() && !current_user_can('manage_options')) {
//.........这里部分代码省略.........
开发者ID:netmagik,项目名称:obm-genesis-child,代码行数:101,代码来源:functions.php


示例13: child_theme_setup

function child_theme_setup()
{
    /****************************************
    	Define child theme version
    	*****************************************/
    define('CHILD_THEME_VERSION', filemtime(get_stylesheet_directory() . '/style.css'));
    /****************************************
    	Include theme helper functions
    	*****************************************/
    include_once CHILD_DIR . '/lib/theme-helpers.php';
    /****************************************
    	Setup child theme functions
    	*****************************************/
    include_once CHILD_DIR . '/lib/theme-functions.php';
    //* Setup Theme
    include_once get_stylesheet_directory() . '/lib/theme-defaults.php';
    //* Set Localization (do not remove)
    load_child_theme_textdomain('bourbon-genesis', apply_filters('child_theme_textdomain', get_stylesheet_directory() . '/languages', 'bourbon-genesis'));
    //* Add Image upload and Color select to WordPress Theme Customizer
    require_once get_stylesheet_directory() . '/lib/customize.php';
    //* Include Customizer CSS
    include_once get_stylesheet_directory() . '/lib/output.php';
    /****************************************
    	Backend
    	*****************************************/
    //* Enqueue scripts
    add_action('wp_enqueue_scripts', 'bourbon_genesis_enqueue_scripts');
    function bourbon_genesis_enqueue_scripts()
    {
        wp_enqueue_style('genesis-sample-fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700', array(), CHILD_THEME_VERSION);
        wp_enqueue_style('dashicons');
        wp_enqueue_script('genesis-sample-responsive-menu', get_stylesheet_directory_uri() . '/assets/js/responsive-menu.js', array('jquery'), '1.0.0', true);
        $output = array('mainMenu' => __('Menu', 'genesis-sample'), 'subMenu' => __('Menu', 'genesis-sample'));
        wp_localize_script('genesis-sample-responsive-menu', 'genesisSampleL10n', $output);
    }
    // Image Sizes
    // add_image_size( $name, $width = 0, $height = 0, $crop = false );
    add_image_size('featured-image', 720, 400, TRUE);
    // Clean up Head
    remove_action('wp_head', 'rsd_link');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'wp_shortlink_wp_head');
    //* Add Accessibility support
    add_theme_support('genesis-accessibility', array('404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links'));
    //* Rename primary and secondary navigation menus
    add_theme_support('genesis-menus', array('primary' => __('After Header Menu', 'bourbon-genesis'), 'secondary' => __('Footer Menu', 'bourbon-genesis')));
    //* Reposition the secondary navigation menu
    remove_action('genesis_after_header', 'genesis_do_subnav');
    add_action('genesis_footer', 'genesis_do_subnav', 5);
    // Sidebars
    unregister_sidebar('sidebar-alt');
    genesis_register_sidebar(array('name' => 'Footer', 'id' => 'custom-footer'));
    //add_theme_support( 'genesis-footer-widgets', 3 );
    // Execute shortcodes in widgets
    // add_filter( 'widget_text', 'do_shortcode' );
    // Remove Unused Page Layouts
    genesis_unregister_layout('content-sidebar-sidebar');
    genesis_unregister_layout('sidebar-sidebar-content');
    genesis_unregister_layout('sidebar-content-sidebar');
    // Remove Unused User Settings
    add_filter('user_contactmethods', 'mb_contactmethods');
    remove_action('show_user_profile', 'genesis_user_options_fields');
    remove_action('edit_user_profile', 'genesis_user_options_fields');
    remove_action('show_user_profile', 'genesis_user_archive_fields');
    remove_action('edit_user_profile', 'genesis_user_archive_fields');
    remove_action('show_user_profile', 'genesis_user_seo_fields');
    remove_action('edit_user_profile', 'genesis_user_seo_fields');
    remove_action('show_user_profile', 'genesis_user_layout_fields');
    remove_action('edit_user_profile', 'genesis_user_layout_fields');
    // Editor Styles
    add_editor_style('editor-style.css');
    // Remove Genesis Theme Settings Metaboxes
    add_action('genesis_theme_settings_metaboxes', 'mb_remove_genesis_metaboxes');
    // Reposition Genesis Layout Settings Metabox
    remove_action('admin_menu', 'genesis_add_inpost_layout_box');
    add_action('admin_menu', 'mb_add_inpost_layout_box');
    // Don't update theme
    add_filter('http_request_args', 'mb_dont_update_theme', 5, 2);
    // Setup Child Theme Settings
    include_once CHILD_DIR . '/lib/child-theme-settings.php';
    // Prevent File Modifications
    define('DISALLOW_FILE_EDIT', true);
    // Set Content Width
    $content_width = apply_filters('content_width', 740, 740, 1140);
    // Add support for custom background
    add_theme_support('custom-background');
    //* Add support for custom header
    add_theme_support('custom-header', array('width' => 600, 'height' => 160, 'header-selector' => '.site-title a', 'header-text' => false, 'flex-height' => true));
    // Remove Dashboard Meta Boxes
    add_action('wp_dashboard_setup', 'mb_remove_dashboard_widgets');
    // Change Admin Menu Order
    add_filter('custom_menu_order', 'mb_custom_menu_order');
    add_filter(' menu_order', 'mb_custom_menu_order');
    // Hide Admin Areas that are not used
    add_action('admin_menu', 'mb_remove_menu_pages');
    // Remove default link for images
    add_action('admin_init', 'mb_imagelink_setup', 10);
    // Show Kitchen Sink in WYSIWYG Editor
    add_filter('tiny_mce_before_init', 'mb_unhide_kitchensink');
//.........这里部分代码省略.........
开发者ID:JohnLauber,项目名称:bourbon-genesis,代码行数:101,代码来源:functions.php


示例14: unregister_sidebar

//* Unregister secondary sidebar
unregister_sidebar('sidebar-alt');
// Remove Genesis Layout Settings
remove_theme_support('genesis-inpost-layouts');
//// Unregister content/sidebar layout setting
//genesis_unregister_layout( 'content-sidebar' );
// Unregister sidebar/content layout setting
genesis_unregister_layout('sidebar-content');
// Unregister content/sidebar/sidebar layout setting
genesis_unregister_layout('content-sidebar-sidebar');
// Unregister sidebar/sidebar/content layout setting
genesis_unregister_layout('sidebar-sidebar-content');
 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP genesis_widget_area函数代码示例发布时间:2022-05-15
下一篇:
PHP genesis_structural_wrap函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap