本文整理汇总了PHP中unregister_sidebar函数的典型用法代码示例。如果您正苦于以下问题:PHP unregister_sidebar函数的具体用法?PHP unregister_sidebar怎么用?PHP unregister_sidebar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了unregister_sidebar函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: mb_remove_widgets
function mb_remove_widgets()
{
unregister_sidebar('sidebar-5');
unregister_sidebar('sidebar-6');
unregister_sidebar('sidebar-7');
unregister_sidebar('sidebar-2');
}
开发者ID:acafourek,项目名称:maidstone,代码行数:7,代码来源:functions.php
示例2: __construct
public function __construct($config = array())
{
if (is_admin()) {
return;
}
$this->config = array_replace_recursive($this->config, $config);
remove_action('genesis_doctype', 'genesis_do_doctype');
add_action('genesis_doctype', array($this, 'html5_doctype'));
add_action('wp_footer', array($this, 'output_js_components'));
remove_action('genesis_after_endwhile', 'genesis_posts_nav');
add_action('genesis_after_endwhile', array($this, 'posts_nav'));
add_action('genesis_before', array($this, 'open_container_class'));
add_action('genesis_after', array($this, 'close_container_class'));
remove_action('genesis_header', 'genesis_do_header');
if (true == $this->config['remove_header']) {
unregister_sidebar('header-right');
} else {
add_action('genesis_header', array($this, 'genesis_do_header'));
}
remove_action('genesis_header', 'genesis_header_markup_open', 5);
add_action('genesis_header', array($this, 'header_markup_open'), 5);
if (true == $this->config['main_nav']['filter']) {
add_filter('genesis_do_nav', array($this, 'bootstrap_do_nav'), 10, 3);
}
if (true == $this->config['load_assets']) {
wp_enqueue_script('gtb-bootstrap', $this->url() . '/assets/js/bootstrap.min.js', array('jquery'));
wp_enqueue_style('gtb-bootstrap', $this->url() . '/assets/css/bootstrap.min.css');
wp_enqueue_style('gtb-bootstrap-respsonive', $this->url() . '/assets/css/bootstrap-responsive.min.css');
}
}
开发者ID:Wordpress-Development,项目名称:genesis-twitter-bootstrap,代码行数:30,代码来源:Genesis_Twitter_Bootstrap.php
示例3: register_sidebars
/**
* Register sidebars
*/
public function register_sidebars()
{
unregister_sidebar('sidebar-event');
foreach ($this->sidebars as $id => $name) {
foreach ($this->places as $place) {
register_sidebar(array('id' => $id . '-' . $place, 'name' => $name . " ( {$place} )", 'description' => $name . " ( {$place} )", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'body'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'body')));
}
}
for ($i = 1; $i <= (int) wpv_get_option('footer-sidebars'); $i++) {
register_sidebar(array('id' => "footer-sidebars-{$i}", 'name' => "Footer widget area {$i}", 'description' => "Footer widget area {$i}", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'footer'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'footer')));
}
for ($i = 1; $i <= (int) wpv_get_option('header-sidebars'); $i++) {
register_sidebar(array('id' => "header-sidebars-{$i}", 'name' => "Body Top Widget Area {$i}", 'description' => "Body top widget area {$i}", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'header'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'header')));
}
if (wpv_get_option('feedback-type') == 'sidebar') {
register_sidebar(array('id' => 'feedback-sidebar', 'name' => 'Feedback Widget Area', 'description' => 'Slides out when the feedback button is clicked', 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'feedback'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'feedback')));
}
$custom_sidebars = wpv_get_option('custom-sidebars');
$custom_sidebars = explode(',', $custom_sidebars);
foreach ($custom_sidebars as $sidebar) {
$name = str_replace('wpv_sidebar-', '', $sidebar);
$sidebar = sanitize_title($sidebar);
if (!empty($sidebar)) {
foreach ($this->places as $place) {
register_sidebar(array('id' => $sidebar . '-' . $place, 'name' => "{$name} ( {$place} )", 'description' => "{$name} ( {$place} )", 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => apply_filters('wpv_before_widget_title', '<h4 class="widget-title">', 'body'), 'after_title' => apply_filters('wpv_after_widget_title', '</h4>', 'body'), 'class' => 'vamtam-custom'));
}
}
}
}
开发者ID:amitmula,项目名称:amitandaastha.in,代码行数:32,代码来源:sidebars.php
示例4: scratch_postsetup
function scratch_postsetup()
{
// Add theme widget areas
include_once get_stylesheet_directory() . '/includes/widget-areas.php';
// Unregister secondary sidebar
unregister_sidebar('sidebar-alt');
}
开发者ID:slick514,项目名称:scratchTheme,代码行数:7,代码来源:functions.php
示例5: __construct
function __construct($dir_path)
{
// path & url class properties
$this->dir_path = trailingslashit($dir_path);
$this->url = trailingslashit(dirname(get_stylesheet_uri()));
$this->css_url = $this->url . 'asset/css/';
$this->js_url = $this->url . 'asset/js/';
$this->img_url = $this->url . 'asset/img/';
$this->slug = basename($this->dir_path);
$this->css_js_suffix = defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG ? '' : '.min';
// child theme version
$this->version = '1.0.1';
// actions
add_action('wp_enqueue_scripts', array($this, 'enqueue_assets'));
// enqueue our child theme assets
add_action('pre_get_posts', array($this, 'exclude_podcasts_on_blog_archive'));
// exclude podcast posts on the blog archive
// filters
add_filter('body_class', array($this, 'page_specific_body_class'));
// makes it easier to style specific pages
// custom podcast archive thumbnail image size
add_image_size('apply-filters-podcast-front-page-hard', 1040, 520, true);
/*
* we probably only need 1 site-wide sidebar
* remove all sidebars and instead hardcode the sidebar content into the sidebar.php template
*/
unregister_sidebar('sidebar_blog');
unregister_sidebar('sidebar_single');
unregister_sidebar('sidebar_page');
}
开发者ID:apply-filters,项目名称:child-theme,代码行数:30,代码来源:class-apply-filters-theme.php
示例6: remove_some_widgets
function remove_some_widgets()
{
// Unregister some of the TwentyTen sidebars
unregister_sidebar('sidebar-1');
unregister_sidebar('sidebar-2');
unregister_sidebar('sidebar-3');
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:7,代码来源:functions.php
示例7: calibrefx_do_footer_widgets
/**
* Display the footer widget if the footer widget are active.
*/
function calibrefx_do_footer_widgets()
{
global $wp_registered_sidebars;
$footer_widgets = get_theme_support('calibrefx-footer-widgets');
$all_widgets = wp_get_sidebars_widgets();
//Check if footer widget theme support is activated or is there any widget inside
if (!$footer_widgets or !isset($all_widgets['footer-widget'])) {
return;
}
$count_footer_widgets = count($all_widgets['footer-widget']);
if (0 == $count_footer_widgets) {
return;
}
if (current_theme_supports('calibrefx-responsive-style')) {
$span = 'col-lg-' . strval(floor(12 / $count_footer_widgets)) . ' col-md-' . strval(floor(12 / $count_footer_widgets)) . ' col-sm-12 col-xs-12';
} else {
$span = 'col-xs-' . strval(floor(12 / $count_footer_widgets));
}
$sidebar = $wp_registered_sidebars['footer-widget'];
$footer_widget_column = apply_filters('calibrefx_footer_widget_column_span', $span);
$sidebar['before_widget'] = '<div id="%1$s" class="widget ' . $footer_widget_column . ' %2$s">';
$sidebar['after_widget'] = '</div>';
unregister_sidebar('footer-widget');
register_sidebar($sidebar);
if (is_active_sidebar('footer-widget')) {
echo '<div id="footer-widget">';
calibrefx_put_wrapper('footer-widget', 'open');
$footer_widget_wrapper_class = apply_filters('footer_widget_wrapper_class', calibrefx_row_class());
echo '<div class="footer-widget-wrapper"><div class="' . $footer_widget_wrapper_class . '">';
dynamic_sidebar('footer-widget');
echo '</div></div><!--end .footer-widget-wrapper -->';
calibrefx_put_wrapper('footer-widget', 'close');
echo '</div><!--end #footer-widget-->';
}
}
开发者ID:alispx,项目名称:calibrefx,代码行数:38,代码来源:footer-hook.php
示例8: fbwidget_deactivate
function fbwidget_deactivate()
{
delete_option('widget_fbw_id');
unregister_sidebar('facebook_widget');
global $current_user;
$user_id = $current_user->ID;
delete_user_meta($user_id, 'fb_ignore_notice');
}
开发者ID:rosslibby,项目名称:davinaplugins,代码行数:8,代码来源:facebook_widget.php
示例9: unregistered_sidebars_callback
function unregistered_sidebars_callback()
{
if ($GLOBALS['_unregister_sidebars']) {
foreach ($GLOBALS['_unregister_sidebars'] as $sidebar) {
unregister_sidebar($sidebar);
}
}
unset($GLOBALS['_unregister_sidebars']);
}
开发者ID:amiel,项目名称:bellinghamcircusguild,代码行数:9,代码来源:utilities.php
示例10: 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
示例11: test_register_and_unregister_sidebar
/**
* @see register_sidebar
* @see unregister_sidebar
*/
function test_register_and_unregister_sidebar()
{
global $wp_registered_sidebars;
$sidebar_id = 'wp-unit-test';
register_sidebar(array('id' => $sidebar_id));
$this->assertArrayHasKey($sidebar_id, $wp_registered_sidebars);
unregister_sidebar($sidebar_id);
$this->assertArrayNotHasKey('wp-unit-test', $wp_registered_sidebars);
}
开发者ID:Benrajalu,项目名称:philRaj,代码行数:13,代码来源:widgets.php
示例12: bsg_nav_remove_genesis_header
function bsg_nav_remove_genesis_header()
{
unregister_sidebar('header-right');
remove_action('genesis_site_title', 'genesis_seo_site_title');
remove_action('genesis_site_description', 'genesis_seo_site_description');
remove_action('genesis_header', 'genesis_header_markup_open', 5);
remove_action('genesis_header', 'genesis_do_header');
remove_action('genesis_header', 'genesis_header_markup_close', 15);
}
开发者ID:Wordpress-Development,项目名称:genesis-bootstrap,代码行数:9,代码来源:nav.php
示例13: thaibloom_widgets_init
function thaibloom_widgets_init()
{
// remove second and third footer sidebars
unregister_sidebar('sidebar-1');
unregister_sidebar('sidebar-2');
unregister_sidebar('sidebar-3');
register_sidebar(array('name' => __('Header Area', 'twentyeleven'), 'id' => 'header-widget', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => __('Footer Area', 'twentyeleven'), 'id' => 'footer-widget', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => __('Blog Peripheral', 'twentyeleven'), 'id' => 'blog-peripheral', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => "</aside>", 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
}
开发者ID:adamsro,项目名称:thaibloom,代码行数:10,代码来源:functions.php
示例14: unregister_genesis_widgets
function unregister_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');
unregister_sidebar('header-right');
}
开发者ID:finestpixels,项目名称:foodbytes2016,代码行数:11,代码来源:genesis-setup.php
示例15: polarlite_widgets_init
function polarlite_widgets_init()
{
unregister_sidebar('sidebar-area');
unregister_sidebar('home_sidebar_area');
unregister_sidebar('category-sidebar-area');
unregister_sidebar('bottom-sidebar-area');
register_sidebar(array('name' => 'Sidebar', 'id' => 'sidebar-area', 'description' => 'This sidebar will be shown after the contents.', 'before_widget' => '<div class="pin-article span4"><div class="widget-box">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => 'Home Sidebar', 'id' => 'home_sidebar_area', 'description' => __("This sidebar will be shown for the homepage", "wip"), 'before_widget' => '<div class="pin-article span4"><div class="widget-box">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => 'Category Sidebar', 'id' => 'category-sidebar-area', 'description' => 'This sidebar will be shown after the content.', 'before_widget' => '<div class="pin-article span4"><div class="widget-box">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => 'Bottom Sidebar', 'id' => 'bottom-sidebar-area', 'description' => 'This sidebar will be shown after the content.', 'before_widget' => '<div class="span3"><div class="widget-box">', 'after_widget' => '</div></div>', 'before_title' => '<h4 class="title">', 'after_title' => '</h4>'));
}
开发者ID:OanaRaluca,项目名称:Wordpress-theme-4,代码行数:11,代码来源:functions.php
示例16: widgets_init
/**
* Register sidebars
*/
function widgets_init()
{
register_sidebar(array('name' => __('Header', 'maera_zf'), 'id' => 'sidebar_header', 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => '</section>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => __('Footer', 'maera_zf'), 'id' => 'sidebar_footer', 'before_widget' => '<section id="%1$s" class="widget columns small-12 large-4 %2$s">', 'after_widget' => '</section>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
// Remove the secondary sidebar
unregister_sidebar('sidebar_secondary');
// Remove primary sidebar in order to re-enable it with some extra classes
unregister_sidebar('sidebar_primary');
$class = '';
if (get_theme_mod('widget_panel', 0) == 1) {
$class = 'panel';
}
register_sidebar(array('name' => __('Primary Sidebar', 'maera'), 'id' => 'sidebar_primary', 'before_widget' => '<section id="%1$s" class="widget ' . $class . ' %2$s">', 'after_widget' => '</section>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
}
开发者ID:wpmu,项目名称:maera-foundation,代码行数:17,代码来源:maera-foundation.php
示例17: 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
示例18: remove_some_widgets
function remove_some_widgets()
{
// Unregister some of the TwentyTen sidebars
unregister_sidebar('contact-widget');
unregister_sidebar('main-sidebar');
unregister_sidebar('right-sidebar');
unregister_sidebar('left-sidebar');
unregister_sidebar('left-sidebar');
unregister_sidebar('left-sidebar-half');
unregister_sidebar('right-sidebar-half');
unregister_sidebar('sidebar-right');
unregister_sidebar('sidebar-left');
unregister_sidebar('home-widget-1');
unregister_sidebar('home-widget-2');
unregister_sidebar('home-widget-3');
}
开发者ID:swc-dng,项目名称:swcsandbox,代码行数:16,代码来源:functions.php
示例19: add_and_remove_sidebars
function add_and_remove_sidebars()
{
if (function_exists('register_sidebar')) {
// Unregsiter some of the TwentyTen sidebars
unregister_sidebar('primary-widget-area');
unregister_sidebar('secondary-widget-area');
unregister_sidebar('first-footer-widget-area');
unregister_sidebar('second-footer-widget-area');
unregister_sidebar('third-footer-widget-area');
unregister_sidebar('fourth-footer-widget-area');
}
register_sidebar(array('name' => 'Homepage Main Image', 'before_widget' => '<div class="box_FreeHtml txtBox_cms">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
// Custom sidebar for display latest posts on homepage.
register_sidebar(array('name' => __('Latest Posts Widget Area', 'twentyten'), 'id' => 'latest-posts-widget-area', 'description' => __('The latest posts widget area', 'twentyten'), 'before_widget' => '<div id="%1$s" class="widget-container %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => __('Homepage Content Area', 'twentyten'), 'id' => 'homepage-content-area', 'description' => __('The homepage content area', 'twentyten'), 'before_widget' => '<div id="%1$s" class="widget-container %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
register_sidebar(array('name' => __('Right Sidebar', 'twentyten'), 'id' => 'right-sidebar', 'description' => __('The right sidebar area', 'twentyten'), 'before_widget' => '<div id="%1$s" class="widget-container %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
}
开发者ID:besimhu,项目名称:legacy,代码行数:17,代码来源:my-functions.php
示例20: 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
注:本文中的unregister_sidebar函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论