当前位置: 首页>>代码示例>>PHP>>正文


PHP genesis_register_sidebar函数代码示例

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


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

示例1: ddw_gwfoot_register_widget_areas

/**
 * Register additional widget areas.
 *
 * Note: Has to be early on the "init" hook in order to display translations!
 *
 * @since 1.0.0
 *
 * @uses  genesis_register_sidebar()
 */
function ddw_gwfoot_register_widget_areas()
{
    /** Add shortcode support to widgets */
    if (!GWFOOT_NO_WIDGETS_SHORTCODE && !is_admin()) {
        add_filter('widget_text', 'do_shortcode');
    }
    // end-if constant & !is_admin() check
    /** Set filter for "Footer Area #1" widget title */
    $gwfoot_footer_one_widget_title = apply_filters('gwfoot_filter_footer_one_widget_title', __('Footer Area #1', 'genesis-widgetized-footer'));
    /** Set filter for "Footer Area #1" widget description */
    $gwfoot_footer_one_widget_description = apply_filters('gwfoot_filter_footer_one_widget_description', sprintf(__('This is the first widget area (%s) within the Genesis Footer.', 'genesis-widgetized-footer'), $gwfoot_footer_one_widget_title));
    /** Register the "Footer Area #1" widget area */
    genesis_register_sidebar(array('id' => 'gwfoot-footer-one-widget', 'name' => esc_attr__($gwfoot_footer_one_widget_title), 'description' => esc_attr__($gwfoot_footer_one_widget_description), 'before_widget' => '<div id="%1$s" class="gwfoot-footer-one widget-area %2$s">', 'after_widget' => '</div>'));
    /** Set filter for "Footer Area #2" widget title */
    $gwfoot_footer_two_widget_title = apply_filters('gwfoot_filter_footer_two_widget_title', __('Footer Area #2', 'genesis-widgetized-footer'));
    /** Set filter for "Footer Area #2" widget description */
    $gwfoot_footer_two_widget_description = apply_filters('gwfoot_filter_footer_two_widget_description', sprintf(__('This is the second widget area (%s) within the Genesis Footer.', 'genesis-widgetized-footer'), $gwfoot_footer_two_widget_title));
    /** Register the "Footer Area #2" widget area */
    genesis_register_sidebar(array('id' => 'gwfoot-footer-two-widget', 'name' => esc_attr__($gwfoot_footer_two_widget_title), 'description' => esc_attr__($gwfoot_footer_two_widget_description), 'before_widget' => '<div id="%1$s" class="gwfoot-footer-two widget-area %2$s">', 'after_widget' => '</div>'));
    /** Set filter for "Footer Disclaimer" widget title */
    $gwfoot_footer_disclaimer_widget_title = apply_filters('gwfoot_filter_footer_disclaimer_widget_title', __('Footer Disclaimer', 'genesis-widgetized-footer'));
    /** Set filter for "Footer Disclaimer" widget description */
    $gwfoot_footer_disclaimer_widget_description = apply_filters('gwfoot_filter_footer_disclaimer_widget_description', __('This is Footer Disclaimer widget area within the Genesis Footer.', 'genesis-widgetized-footer'));
    /**
     * Register the "Footer Disclaimer" widget area
     *    Do not register for AgentPress 2.x and RealPro 1.x child themes
     *      as these already have their own Disclaimer widget area
     */
    if (!GWFOOT_NO_DISCLAIMER_WIDGET_AREA && (!function_exists('agentpress_disclaimer') || !function_exists('realpro_disclaimer'))) {
        genesis_register_sidebar(array('id' => 'gwfoot-footer-disclaimer-widget', 'name' => esc_attr__($gwfoot_footer_disclaimer_widget_title), 'description' => esc_attr__($gwfoot_footer_disclaimer_widget_description), 'before_widget' => '<div id="%1$s" class="gwfoot-footer-disclaimer widget-area %2$s">', 'after_widget' => '</div>'));
    }
    // end-if constant plus AgentPress 2.x / RealPro 1.x check
}
开发者ID:BarkerCA,项目名称:parallax,代码行数:42,代码来源:gwfoot-widget-areas.php

示例2: gs_register_sidebars

function gs_register_sidebars()
{
    $sidebars = array(array('id' => 'home-top', 'name' => __('Home Top', CHILD_DOMAIN), 'description' => __('This is the top homepage section.', CHILD_DOMAIN)), array('id' => 'home-middle-01', 'name' => __('Home Left Middle', CHILD_DOMAIN), 'description' => __('This is the homepage left section.', CHILD_DOMAIN)), array('id' => 'home-middle-02', 'name' => __('Home Middle Middle', CHILD_DOMAIN), 'description' => __('This is the homepage middle section.', CHILD_DOMAIN)), array('id' => 'home-middle-03', 'name' => __('Home Right Middle', CHILD_DOMAIN), 'description' => __('This is the homepage right section.', CHILD_DOMAIN)), array('id' => 'home-bottom', 'name' => __('Home Bottom', CHILD_DOMAIN), 'description' => __('This is the homepage right section.', CHILD_DOMAIN)), array('id' => 'portfolio', 'name' => __('Portfolio', CHILD_DOMAIN), 'description' => __('Use featured posts to showcase your portfolio.', CHILD_DOMAIN)), array('id' => 'after-post', 'name' => __('After Post', CHILD_DOMAIN), 'description' => __('This will show up after every post.', CHILD_DOMAIN)));
    foreach ($sidebars as $sidebar) {
        genesis_register_sidebar($sidebar);
    }
}
开发者ID:jpletner,项目名称:Avritek.Company.Site,代码行数:7,代码来源:functions.php

示例3: ddw_gwat_register_widget_areas

/**
 * Register additional widget areas.
 *
 * Note: Has to be early on the "init" hook in order to display translations!
 *
 * @since 1.2.0
 *
 * @uses  is_admin()
 * @uses  genesis_register_sidebar()
 */
function ddw_gwat_register_widget_areas()
{
    /** Add shortcode support to widgets */
    if (!is_admin() && !GWAT_NO_WIDGETS_SHORTCODE) {
        add_filter('widget_text', 'do_shortcode');
    }
    // end-if constant check
    /** Set filter for "Archive Page Template #1" widget title */
    $gwat_archive_one_widget_title = apply_filters('gwat_filter_archive_one_widget_title', __('Archive Page Template #1', 'genesis-widgetized-archive'));
    /** Set filter for "Archive Page Template #1" widget description */
    $gwat_archive_one_widget_description = apply_filters('gwat_filter_archive_one_widget_description', __('This is the first widget area for the Archive Page Template (bundled with the Genesis Framework).', 'genesis-widgetized-archive'));
    /** Register the "Archive Page Template #1" widget area */
    genesis_register_sidebar(array('id' => 'gwat-archive-widget-one', 'name' => $gwat_archive_one_widget_title, 'description' => $gwat_archive_one_widget_description, 'before_widget' => '<div id="%1$s" class="gwat-archive gwat-archive-one widget-area %2$s">', 'after_widget' => '</div>'));
    /** Second Widget Area */
    if (!GWAT_NO_SECOND_WIDGET_AREA) {
        /** Set filter for "Archive Page Template #2" widget title */
        $gwat_archive_two_widget_title = apply_filters('gwat_filter_archive_two_widget_title', __('Archive Page Template #2', 'genesis-widgetized-archive'));
        /** Set filter for "Archive Page Template #2" widget description */
        $gwat_archive_two_widget_description = apply_filters('gwat_filter_archive_two_widget_description', __('This is the second optional widget area for the Archive Page Template (bundled with the Genesis Framework).', 'genesis-widgetized-archive'));
        /** Register the "Archive Page Template #2" widget area */
        genesis_register_sidebar(array('id' => 'gwat-archive-widget-two', 'name' => $gwat_archive_two_widget_title, 'description' => $gwat_archive_two_widget_description, 'before_widget' => '<div id="%1$s" class="gwat-archive gwat-archive-two widget-area %2$s">', 'after_widget' => '</div>'));
    }
    // end-if constant check for second widget area
    /** Third Widget Area */
    if (!GWAT_NO_THIRD_WIDGET_AREA) {
        /** Set filter for "Archive Page Template #3" widget title */
        $gwat_archive_three_widget_title = apply_filters('gwat_filter_archive_three_widget_title', __('Archive Page Template #3', 'genesis-widgetized-archive'));
        /** Set filter for "Archive Page Template #3" widget description */
        $gwat_archive_three_widget_description = apply_filters('gwat_filter_archive_three_widget_description', __('This is the third optional widget area for the Archive Page Template (bundled with the Genesis Framework).', 'genesis-widgetized-archive'));
        /** Register the "Archive Page Template #3" widget area */
        genesis_register_sidebar(array('id' => 'gwat-archive-widget-three', 'name' => $gwat_archive_three_widget_title, 'description' => $gwat_archive_three_widget_description, 'before_widget' => '<div id="%1$s" class="gwat-archive gwat-archive-three widget-area %2$s">', 'after_widget' => '</div>'));
    }
    // end-if constant check for third widget area
}
开发者ID:BarkerCA,项目名称:parallax,代码行数:44,代码来源:gwat-widget-areas.php

示例4: register_sidebars

 public static function register_sidebars()
 {
     if (self::get_option('before_content')) {
         genesis_register_sidebar(array('id' => self::BEFORE_CONTENT_SIDEBAR_ID, 'name' => __('Before Content After Header', GENESIS_CLUB_DOMAIN), 'description' => __('Full width area below the header and above the content and any primary and secondary sidebars.', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('before_archive')) {
         genesis_register_sidebar(array('id' => self::BEFORE_ARCHIVE_SIDEBAR_ID, 'name' => __('Before Archive', GENESIS_CLUB_DOMAIN), 'description' => __('Area at the top of the archive for adding an introductory slider', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('before_entry')) {
         genesis_register_sidebar(array('id' => self::BEFORE_ENTRY_SIDEBAR_ID, 'name' => __('Before Entry', GENESIS_CLUB_DOMAIN), 'description' => __('Area before the entry for adding calls to action or ads', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('before_entry_content')) {
         genesis_register_sidebar(array('id' => self::BEFORE_ENTRY_CONTENT_SIDEBAR_ID, 'name' => __('Before Entry Content', GENESIS_CLUB_DOMAIN), 'description' => __('Area before the post content for things like adding social media icons for likes and shares', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('after_entry_content')) {
         genesis_register_sidebar(array('id' => self::AFTER_ENTRY_CONTENT_SIDEBAR_ID, 'name' => __('After Entry Content', GENESIS_CLUB_DOMAIN), 'description' => __('Area after the post content for adding things like social media icons for likes and shares', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('after_entry')) {
         genesis_register_sidebar(array('id' => self::AFTER_ENTRY_SIDEBAR_ID, 'name' => __('After Entry', GENESIS_CLUB_DOMAIN), 'description' => __('Area after the entry for adding calls to action or ads', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('after_archive')) {
         genesis_register_sidebar(array('id' => self::AFTER_ARCHIVE_SIDEBAR_ID, 'name' => __('After Archive', GENESIS_CLUB_DOMAIN), 'description' => __('Area at the end of the archive for adding things like call to actions or ads', GENESIS_CLUB_DOMAIN)));
     }
     if (self::get_option('after_content')) {
         genesis_register_sidebar(array('id' => self::AFTER_CONTENT_SIDEBAR_ID, 'name' => __('After Content Before Footer', GENESIS_CLUB_DOMAIN), 'description' => __('Full width area just above the footer and below the content and any primary and secondary sidebars.', GENESIS_CLUB_DOMAIN)));
     }
 }
开发者ID:jonpetersen,项目名称:PHTC,代码行数:27,代码来源:class-display.php

示例5: utility_pro_register_widget_areas

/**
 * Register the widget areas enabled by default in Utility.
 *
 * @since  1.0.0
 *
 * @return string Markup for each sidebar ID
 */
function utility_pro_register_widget_areas()
{
    $widget_areas = array(array('id' => 'utility-bar', 'name' => __('Utility Bar', 'utility-pro'), 'description' => __('This is the utility bar across the top of page.', 'utility-pro')), array('id' => 'utility-home-welcome', 'name' => __('Home Welcome', 'utility-pro'), 'description' => __('This is the welcome section at the top of the home page.', 'utility-pro')), array('id' => 'utility-home-gallery-1', 'name' => sprintf(_x('Home Gallery %d', 'Group of Home Gallery widget areas', 'utility-pro'), 1), 'description' => sprintf(_x('Home Gallery %d widget area on home page.', 'Description of widget area', 'utility-pro'), 1)), array('id' => 'utility-home-gallery-2', 'name' => sprintf(_x('Home Gallery %d', 'Group of Home Gallery widget areas', 'utility-pro'), 2), 'description' => sprintf(_x('Home Gallery %d widget area on home page.', 'Description of widget area', 'utility-pro'), 2)), array('id' => 'utility-home-gallery-3', 'name' => sprintf(_x('Home Gallery %d', 'Group of Home Gallery widget areas', 'utility-pro'), 3), 'description' => sprintf(_x('Home Gallery %d widget area on home page.', 'Description of widget area', 'utility-pro'), 3)), array('id' => 'utility-home-gallery-4', 'name' => sprintf(_x('Home Gallery %d', 'Group of Home Gallery widget areas', 'utility-pro'), 4), 'description' => sprintf(_x('Home Gallery %d widget area on home page.', 'Description of widget area', 'utility-pro'), 4)), array('id' => 'utility-call-to-action', 'name' => __('Call to Action', 'utility-pro'), 'description' => __('This is the Call to Action section on the home page.', 'utility-pro')));
    $widget_areas = apply_filters('utility_pro_default_widget_areas', $widget_areas);
    foreach ($widget_areas as $widget_area) {
        genesis_register_sidebar($widget_area);
    }
}
开发者ID:ashenkar,项目名称:sanga,代码行数:15,代码来源:widget-areas.php

示例6: child_theme_setup

function child_theme_setup()
{
    // ** Backend **
    // Remove Unused Menu Items
    add_action('admin_menu', 'be_remove_menus');
    // Customize Menu Order
    add_filter('custom_menu_order', 'be_custom_menu_order');
    add_filter('menu_order', 'be_custom_menu_order');
    // Set up Taxonomies
    add_action('init', 'be_create_my_taxonomies');
    // Set up Taxonomy Default Terms
    add_action('save_post', 'mfields_set_default_object_terms', 100, 2);
    // Set up Meta Boxes
    add_action('init', 'be_create_metaboxes');
    // Setup Sidebars
    genesis_register_sidebar(array('name' => 'Home Column 1', 'id' => 'home-column-1'));
    genesis_register_sidebar(array('name' => 'Home Column 2', 'id' => 'home-column-2'));
    genesis_register_sidebar(array('name' => 'Home Column 3', 'id' => 'home-column-3'));
    // Setup Default Layout
    genesis_set_default_layout('full-width-content');
    // Setup Widgets
    include_once 'lib/widgets/widget-old-prospects.php';
    include_once 'lib/widgets/widget-new-prospects.php';
    include_once 'lib/widgets/widget-active-projects.php';
    include_once 'lib/widgets/widget-other-stats.php';
    include_once 'lib/widgets/widget-poc.php';
    include_once 'lib/widgets/widget-inquiry.php';
    include_once 'lib/widgets/widget-inquiry-result.php';
    include_once 'lib/widgets/widget-forwarded.php';
    include_once 'lib/widgets/widget-project-sources.php';
    include_once 'lib/widgets/widget-referral.php';
    include_once 'lib/widgets/widget-activity-graph.php';
    include_once 'lib/widgets/widget-quotes.php';
    // Move Post Editor to Metabox
    add_action('admin_enqueue_scripts', 'crm_move_posteditor', 10, 1);
    // Don't update theme
    add_filter('http_request_args', 'be_dont_update_theme', 5, 2);
    // Change the labeling for the "Posts" menu to "Contacts"
    add_action('init', 'crm_change_post_object_label');
    add_action('admin_menu', 'crm_change_post_menu_label');
    // Change post title text
    add_action('gettext', 'crm_change_title_text');
    // Modify post column layout
    add_filter('manage_posts_columns', 'crm_add_new_columns');
    // Add taxonomies to post column
    add_action('manage_posts_custom_column', 'crm_manage_columns', 10, 2);
    // Remove post meta fields
    add_action('admin_menu', 'crm_remove_page_fields');
    // Remove Genesis SEO Metabox
    remove_post_type_support('post', 'genesis-seo');
    // Remove Genesis Layout Options
    remove_post_type_support('post', 'genesis-layouts');
    // ** Frontend **
    // Exclude Form from login
    add_filter('registered-users-only_exclusions', 'crm_form_exclusion');
    // Remove Footer
    remove_action('genesis_footer', 'genesis_do_footer');
}
开发者ID:joshuadavidnelson,项目名称:Genesis-CRM,代码行数:58,代码来源:functions.php

示例7: genesis_register_footer_widget_areas

/**
 * Registers footer widget areas based on the number of widget areas the user
 * wishes to create with add_theme_support().
 *
 * @since 1.6.0
 *
 * @uses genesis_register_sidebar() Register footer widget areas
 *
 * @return null Returns early if there's no theme support.
 */
function genesis_register_footer_widget_areas()
{
    $footer_widgets = get_theme_support('genesis-footer-widgets');
    if (!$footer_widgets || !isset($footer_widgets[0]) || !is_numeric($footer_widgets[0])) {
        return;
    }
    $footer_widgets = (int) $footer_widgets[0];
    $counter = 1;
    while ($counter <= $footer_widgets) {
        genesis_register_sidebar(array('id' => sprintf('footer-%d', $counter), 'name' => sprintf(__('Footer %d', 'genesis'), $counter), 'description' => sprintf(__('Footer %d widget area.', 'genesis'), $counter)));
        $counter++;
    }
}
开发者ID:hscale,项目名称:webento,代码行数:23,代码来源:widgetize.php

示例8: 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

示例9: __construct

 function __construct($tp_active = false)
 {
     global $current_blog, $gsm_simple_menu;
     $this->home = !is_multisite() || defined('BP_ENABLE_MULTIBLOG') || $current_blog->blog_id == BP_ROOT_BLOG;
     $this->adminbar = !(bp_use_wp_admin_bar() || defined('BP_DISABLE_ADMIN_BAR') || get_site_option('hide-loggedout-adminbar') && !is_user_logged_in());
     $this->stylesheet = get_option('stylesheet');
     $this->settings = get_option($this->settings_key);
     if (!($this->style = genesis_get_option('style_selection'))) {
         $this->style = 'style.css';
     }
     if ($this->simple_menu = !empty($gsm_simple_menu)) {
         $this->custom_subnav =& $gsm_simple_menu;
     }
     do_action('gconnect_before_init');
     if (is_admin()) {
         require_once GENESISCONNECT_DIR . 'lib/class.options.php';
         $this->admin = new GConnect_Admin($this, $tp_active);
     } else {
         require_once GENESISCONNECT_DIR . 'lib/class.front.php';
         $this->front = new GConnect_Front($this, $tp_active);
         if (!$tp_active && !is_user_logged_in() && $this->home) {
             $custom_register = $this->get_option('custom_register');
             if ($custom_register && 'none' != $custom_register) {
                 require_once GENESISCONNECT_DIR . 'lib/class.visitor.php';
                 $this->front->set_visitor(new GConnect_visitor($this, $custom_register));
             } elseif (is_multisite()) {
                 add_action('wp', array(&$this, 'bp_core_wpsignup_redirect'));
             } else {
                 add_action('init', array(&$this, 'bp_core_wpsignup_redirect'));
             }
         }
     }
     if ('widget' == $this->get_option('before_content')) {
         genesis_register_sidebar(array('name' => 'Before BuddyPress', 'description' => __('This is above the BuddyPress content', 'genesis-connect'), 'id' => 'gconnect-before'));
     }
     if (is_dir(GENESISCONNECT_DIR . 'child-theme/' . $this->stylesheet)) {
         $addon_directory = GENESISCONNECT_DIR . 'child-theme/' . $this->stylesheet;
         $addon_functions = $addon_directory . '/my-functions.php';
         if (is_file($addon_functions)) {
             require_once $addon_functions;
         }
         if (!is_admin()) {
             $this->front->set_addon($addon_directory, GENESISCONNECT_URL . 'child-theme/' . $this->stylesheet);
         }
     } elseif (!is_admin()) {
         $this->front->set_addon(get_stylesheet_directory(), get_stylesheet_directory_uri());
     }
     do_action('gconnect_after_init');
 }
开发者ID:hscale,项目名称:webento,代码行数:49,代码来源:class.theme.php

示例10: genesischild_extra_widgets

function genesischild_extra_widgets()
{
    genesis_register_sidebar(array('id' => 'preheaderleft', 'name' => __('PreHeaderLeft', 'genesischild'), 'description' => __('This is the preheader left area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'preheaderright', 'name' => __('PreHeaderRight', 'genesischild'), 'description' => __('This is the preheader right area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'hero', 'name' => __('Hero Home Page', 'genesischild'), 'description' => __('This is the Hero Home Page area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'optin', 'name' => __('Optin', 'genesischild'), 'description' => __('This is the optin area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'home-top', 'name' => __('Home Top', 'genesischild'), 'description' => __('This is the home top area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'home-middle', 'name' => __('Home Middle', 'genesischild'), 'description' => __('This is the home middle area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'home-bottom', 'name' => __('Home Bottom', 'genesischild'), 'description' => __('This is the home bottom area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'before-entry', 'name' => __('Before Entry', 'genesischild'), 'description' => __('This is the before content area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'footerwidgetheader', 'name' => __('Footer Widget Header', 'genesischild'), 'description' => __('This is for the Footer Widget Headline', 'genesischild')));
    genesis_register_sidebar(array('id' => 'footercontent', 'name' => __('Footer', 'genesischild'), 'description' => __('This is the general footer area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'postfooterleft', 'name' => __('Post Footer Left', 'genesischild'), 'description' => __('This is the post footer left area', 'genesischild')));
    genesis_register_sidebar(array('id' => 'postfooterright', 'name' => __('Post Footer Right', 'genesischild'), 'description' => __('This is the post footer right area', 'genesischild')));
}
开发者ID:TripleYou,项目名称:genesischild,代码行数:15,代码来源:widgets.php

示例11: bw_init

/**
 * This function calls necessary child theme files
 *
 * @since 1.1.0
 */
function bw_init()
{
    /** Theme Specific Functions */
    include_once CHILD_LIB_DIR . '/functions/bw-functions.php';
    // Load admin files when necessary
    if (is_admin()) {
        // Admin files here
    }
    /** Customizer Options 
    		Must be outside is_admin check because the Customizer displays a theme page**/
    include_once CHILD_LIB_DIR . '/admin/bw-customizer.php';
    /**Image Reloaded **/
    include_once CHILD_LIB_DIR . '/admin/bw-customize-image-reloaded.php';
    genesis_register_sidebar(array('id' => 'top-bar', 'name' => __('Top Bar', CHILD_DOMAIN), 'description' => __('This is a widget area that is the top bar', CHILD_DOMAIN)));
}
开发者ID:ngo6012,项目名称:socratic-genesis-starter-theme,代码行数:20,代码来源:init.php

示例12: ddw_gwnf_register_widget_areas

/**
 * Register additional widget areas.
 *
 * Note: Has to be early on the "init" hook in order to display translations!
 *
 * @since 1.0.0
 *
 * @uses  is_admin()
 * @uses  genesis_register_sidebar()
 *
 * @param string 	$gwnf_404_widget_title
 * @param string 	$gwnf_404_widget_description
 * @param string 	$gwnf_notfound_widget_title
 * @param string 	$gwnf_notfound_widget_description
 */
function ddw_gwnf_register_widget_areas()
{
    /** Add shortcode support to widgets */
    if (!GWNF_NO_WIDGETS_SHORTCODE && !is_admin()) {
        add_filter('widget_text', 'do_shortcode');
    }
    // end-if constant & !is_admin() check
    /** Set filter for "404 Error Page" widget title */
    $gwnf_404_widget_title = apply_filters('gwnf_filter_404_widget_title', __('404 Error Page', 'genesis-widgetized-notfound'));
    /** Set filter for "404 Error Page" widget description */
    $gwnf_404_widget_description = apply_filters('gwnf_filter_404_widget_description', __('This is the widget area of the 404 Not Found Error Page.', 'genesis-widgetized-notfound'));
    /** Register the "404 Error Page" widget area */
    genesis_register_sidebar(array('id' => 'gwnf-404-widget', 'name' => $gwnf_404_widget_title, 'description' => $gwnf_404_widget_description, 'before_widget' => '<div id="%1$s" class="gwnf-404 widget-area %2$s">', 'after_widget' => '</div>'));
    /** Set filter for "Search Not Found" widget title */
    $gwnf_notfound_widget_title = apply_filters('gwnf_filter_notfound_widget_title', __('Search Not Found', 'genesis-widgetized-notfound'));
    /** Set filter for "Search Not Found" widget description */
    $gwnf_notfound_widget_description = apply_filters('gwnf_filter_notfound_widget_description', __('This is the widget area of the search not found content section.', 'genesis-widgetized-notfound'));
    /** Register the "Search Not Found" widget area */
    genesis_register_sidebar(array('id' => 'gwnf-notfound-widget', 'name' => $gwnf_notfound_widget_title, 'description' => $gwnf_notfound_widget_description, 'before_widget' => '<div id="%1$s" class="gwnf-notfound widget-area %2$s">', 'after_widget' => '</div>'));
}
开发者ID:BarkerCA,项目名称:parallax,代码行数:35,代码来源:gwnf-widget-areas.php

示例13: remove_action

        $class .= ' widget-halves';
    }
    return $class;
}
//* Relocate the post info
remove_action('genesis_entry_header', 'genesis_post_info', 12);
add_action('genesis_entry_header', 'genesis_post_info', 5);
//* Customize the entry meta in the entry header
add_filter('genesis_post_info', 'altitude_post_info_filter');
function altitude_post_info_filter($post_info)
{
    $post_info = '[post_date format="M d Y"] [post_edit]';
    return $post_info;
}
//* Customize the entry meta in the entry footer
add_filter('genesis_post_meta', 'altitude_post_meta_filter');
function altitude_post_meta_filter($post_meta)
{
    $post_meta = 'Written by [post_author_posts_link] [post_categories before=" &middot; Categorized: "]  [post_tags before=" &middot; Tagged: "]';
    return $post_meta;
}
//* Register widget areas
genesis_register_sidebar(array('id' => 'front-page-1', 'name' => __('Front Page 1', 'altitude'), 'description' => __('This is the front page 1 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-2', 'name' => __('Front Page 2', 'altitude'), 'description' => __('This is the front page 2 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-3', 'name' => __('Front Page 3', 'altitude'), 'description' => __('This is the front page 3 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-4', 'name' => __('Front Page 4', 'altitude'), 'description' => __('This is the front page 4 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-5', 'name' => __('Front Page 5', 'altitude'), 'description' => __('This is the front page 5 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-6', 'name' => __('Front Page 6', 'altitude'), 'description' => __('This is the front page 6 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-7', 'name' => __('Front Page 7', 'altitude'), 'description' => __('This is the front page 7 section.', 'altitude')));
genesis_register_sidebar(array('id' => 'front-page-8', 'name' => __('Front Page 8', 'altitude'), 'description' => __('This is the front page 8 section.', 'altitude')));
开发者ID:umairakhtar123,项目名称:hova,代码行数:30,代码来源:functions.php

示例14: genesis_widget_area

        echo '<div class="sub-footer"><div class="wrap">';
        genesis_widget_area('sub-footer-left', array('before' => '<div class="sub-footer-left">', 'after' => '</div>'));
        genesis_widget_area('sub-footer-right', array('before' => '<div class="sub-footer-right">', 'after' => '</div>'));
        echo '</div><!-- end .wrap --></div><!-- end .sub-footer -->';
    }
}
add_action('genesis_after_header', 'amazing_times_homepage_sidebar');
function amazing_times_homepage_sidebar()
{
    if (!is_home()) {
        return;
    }
    remove_action('genesis_sidebar', 'genesis_do_sidebar');
    add_action('genesis_sidebar', 'amazing_times_do_sidebar');
}
function amazing_times_do_sidebar()
{
    dynamic_sidebar('home-sidebar');
}
//* Add support for 3-column footer widgets
add_theme_support('genesis-footer-widgets', 3);
//* Register widget areas
genesis_register_sidebar(array('id' => 'home-sidebar', 'name' => __('Home Sidebar', 'amazingtimes'), 'description' => __('This is the homepage sidebar.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'home-featured-full', 'name' => __('Home Featured', 'amazingtimes'), 'description' => __('This is the featured section of the homepage.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'home-top-full', 'name' => __('Home Top', 'amazingtimes'), 'description' => __('This is the top section of the content area on the homepage.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'home-middle-full', 'name' => __('Home Middle', 'amazingtimes'), 'description' => __('This is the middle section of the content area on the homepage.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'home-bottom-full', 'name' => __('Home Bottom', 'amazingtimes'), 'description' => __('This is the bottom section of the content area on the homepage.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'after-entry', 'name' => __('After Entry', 'amazingtimes'), 'description' => __('This is the after entry widget area.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'sub-footer-left', 'name' => __('Sub Footer - Left', 'amazingtimes'), 'description' => __('This is the left section of the sub footer.', 'amazingtimes')));
genesis_register_sidebar(array('id' => 'sub-footer-right', 'name' => __('Sub Footer - Right', 'amazingtimes'), 'description' => __('This is the right section of the sub footer.', 'amazingtimes')));
开发者ID:gregoryfu,项目名称:amazing-times,代码行数:30,代码来源:functions.php

示例15: streamline_author_box_gravatar_size

function streamline_author_box_gravatar_size($size)
{
    return '80';
}
/** Customize the post meta function */
add_filter('genesis_post_meta', 'post_meta_filter');
function post_meta_filter($post_meta)
{
    if (!is_page()) {
        $post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]';
        return $post_meta;
    }
}
/** Add the after post section */
add_action('genesis_after_post_content', 'streamline_after_post');
function streamline_after_post()
{
    if (!is_singular('post')) {
        return;
    }
    genesis_widget_area('after-post', array('before' => '<div class="after-post widget-area">'));
}
/** Add support for 3-column footer widgets */
add_theme_support('genesis-footer-widgets', 3);
/** Register widget areas */
genesis_register_sidebar(array('id' => 'newsletter', 'name' => __('Newsletter', 'streamline'), 'description' => __('This is the newsletter section below the navigation.', 'streamline')));
genesis_register_sidebar(array('id' => 'home-featured-1', 'name' => __('Home Featured #1', 'streamline'), 'description' => __('This is the featured #1 column on the homepage.', 'streamline')));
genesis_register_sidebar(array('id' => 'home-featured-2', 'name' => __('Home Featured #2', 'streamline'), 'description' => __('This is the featured #2 column on the homepage.', 'streamline')));
genesis_register_sidebar(array('id' => 'home-featured-3', 'name' => __('Home Featured #3', 'streamline'), 'description' => __('This is the featured #3 column on the homepage.', 'streamline')));
genesis_register_sidebar(array('id' => 'after-post', 'name' => __('After Post', 'streamline'), 'description' => __('This is the after post section.', 'streamline')));
开发者ID:hscale,项目名称:webento,代码行数:30,代码来源:functions.php


注:本文中的genesis_register_sidebar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。