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

PHP unregister_widget函数代码示例

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

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



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

示例1: load_widget_sb_search_widget

function load_widget_sb_search_widget()
{
    // Widget: Search Widget
    unregister_widget('WP_Widget_Search');
    // We're being StartBox-specific; remove WP default
    register_widget('sb_search_widget');
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:7,代码来源:search.php


示例2: uw_register_widgets

function uw_register_widgets()
{
    if (!is_blog_installed()) {
        return;
    }
    unregister_widget('Widget_Akismet');
    unregister_widget('WP_Widget_Meta');
    unregister_widget('WP_Widget_Recent_Posts');
    unregister_widget('WP_Widget_RSS');
    //register_widget('UW_Widget_Single_Image');
    //register_widget('UW_RSS_Widget');
    //register_widget('UW_Widget_Recent_Posts');
    //register_widget('UW_Widget_CommunityPhotos');
    register_widget('UW_Widget_Categories');
    //register_widget('UW_Widget_Twitter');
    //register_widget('UW_KEXP_KUOW_Widget');
    //register_widget('UW_Showcase_Widget');
    //register_widget('UW_Subpage_Menu');
    register_widget('UW_Nav_Menu_Widget');
    //register_widget('UW_Calendar');
    //register_widget('UW_Campus_Map');
    // Specific to Page Builder only
    register_widget('UW_Headline_Separator_Widget');
    register_widget('UW_Headline_Widget');
    register_widget('UW_Intro_Widget');
    //register_widget('UW_YouTube_Playlist_Widget');
    if (is_multisite() && get_blog_details('marketing')) {
        register_widget('UW_Pride_Points');
    }
}
开发者ID:uw-sop,项目名称:htdocs,代码行数:30,代码来源:custom-widgets.php


示例3: deregister_widgets

 function deregister_widgets()
 {
     //todo: only unregister if on the story edit page?
     foreach ($this->get_widgets() as $widget) {
         unregister_widget($widget);
     }
 }
开发者ID:uweb,项目名称:story-central,代码行数:7,代码来源:post-type-story.php


示例4: load_sWidgets

function load_sWidgets()
{
    unregister_widget('Latest_Releases_Widget');
    register_widget('Latest_Releases_Widget');
    unregister_widget('Chapters_Progress_Widget');
    register_widget('Chapters_Progress_Widget');
}
开发者ID:Albirew,项目名称:wp-manga-project-manager,代码行数:7,代码来源:wp_widget.php


示例5: unregister_widgets

function unregister_widgets()
{
    $unregister = array('WP_Widget_Archives', 'WP_Widget_Calendar', 'WP_Widget_Categories', 'WP_Widget_Links', 'WP_Widget_Meta', 'WP_Widget_Pages', 'WP_Widget_Recent_Comments', 'WP_Widget_Recent_Posts', 'WP_Widget_RSS', 'WP_Widget_Search', 'WP_Widget_Tag_Cloud', 'WP_Widget_Text', 'WP_Nav_Menu_Widget');
    for ($i = 0; $i < count($unregister); $i++) {
        unregister_widget($unregister[$i]);
    }
}
开发者ID:milanezlucas,项目名称:move-it,代码行数:7,代码来源:sidebar.php


示例6: _mw_adminimize_unregister_widgets

/**
 * Remove widgets, areas for different roles
 *
 * @return  void
 */
function _mw_adminimize_unregister_widgets()
{
    // Get settings.
    $adminimizeoptions = _mw_adminimize_get_option_value();
    // Update settings.
    _mw_adminimize_update_option($adminimizeoptions);
    // exclude super admin
    if (_mw_adminimize_exclude_super_admin()) {
        return NULL;
    }
    $user_roles = _mw_adminimize_get_all_user_roles();
    foreach ($user_roles as $role) {
        $disabled_widget_option_[$role] = _mw_adminimize_get_option_value('mw_adminimize_disabled_widget_option_' . $role . '_items');
    }
    foreach ($user_roles as $role) {
        if (!isset($disabled_widget_option_[$role]['0'])) {
            $disabled_widget_option_[$role]['0'] = '';
        }
    }
    foreach ($user_roles as $role) {
        $user = wp_get_current_user();
        if (is_array($user->roles) && in_array($role, $user->roles)) {
            if (_mw_adminimize_current_user_has_role($role) && is_array($disabled_widget_option_[$role])) {
                foreach ($disabled_widget_option_[$role] as $widgets) {
                    unregister_widget($widgets);
                    $GLOBALS['wp_widget_factory']->unregister($widgets);
                    //wp_unregister_sidebar_widget( 'Monster_Widget' );
                }
            }
        }
        // end if user roles
    }
}
开发者ID:domalexxx,项目名称:nashvancouver,代码行数:38,代码来源:widget.php


示例7: recent_posts

 function recent_posts()
 {
     unregister_widget('WP_Widget_Recent_Posts');
     $widget_ops = array('classname' => 'recent-posts', 'description' => __('The latest posts, with a preview thumb.', 'yit'));
     $control_ops = array('id_base' => 'recent-posts');
     $this->WP_Widget('recent-posts', __('Recent Posts', 'yit'), $widget_ops, $control_ops);
 }
开发者ID:jayeshnair,项目名称:ctp,代码行数:7,代码来源:recent_posts.php


示例8: makeclean_custom_widgets

function makeclean_custom_widgets()
{
    register_widget('Footer_WP_Widget_Categories');
    register_widget('Widget_form_footer');
    register_widget('Custom_Search');
    //woocommerce category
    if (class_exists('WC_Widget_Product_Categories')) {
        unregister_widget('WC_Widget_Product_Categories');
        include_once 'class-wc-widget-product-categories.php';
        register_widget('Custom_WC_Widget_Product_Categories');
    }
    if (class_exists('WC_Widget_Price_Filter')) {
        unregister_widget('WC_Widget_Price_Filter');
        include_once 'class-wc-widget-price-filter.php';
        register_widget('Custom_WC_Widget_Price_Filter');
    }
    if (class_exists('WC_Widget_Product_Search')) {
        unregister_widget('WC_Widget_Product_Search');
        include_once 'class-wc-widget-product-search.php';
        register_widget('Custom_Widget_Product_Search');
    }
    if (class_exists('WP_Widget_Recent_Posts')) {
        unregister_widget('WP_Widget_Recent_Posts');
    }
    register_widget('Custom_WP_Widget_Recent_Posts');
    if (class_exists('WP_Widget_Categories')) {
        unregister_widget('WP_Widget_Categories');
    }
    register_widget('Custom_WP_Widget_Categories');
    if (class_exists('WP_Widget_Search')) {
        unregister_widget('WP_Widget_Search');
    }
    register_widget('Custom_Gallery_Post');
}
开发者ID:khiconit,项目名称:makeclean,代码行数:34,代码来源:widgets.php


示例9: fadtastic_widget_init

function fadtastic_widget_init()
{
    register_sidebar(array('before_title' => "<h3 class='widgettitle'>", 'after_title' => "</h3>", 'name' => 'Sidebar 1', 'id' => 'main-sidebar'));
    register_sidebar(array('before_title' => "<h3 class='widgettitle'>", 'after_title' => "</h3>", 'name' => 'Sidebar 2', 'id' => 'bottom-bar'));
    unregister_widget('WP_Widget_Links');
    wp_register_sidebar_widget('links', __('Links', 'sandbox'), 'widget_fadtastic_links');
}
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:7,代码来源:functions.php


示例10: unregister_all

 /**
  * Unregister all widgets.
  */
 public static function unregister_all()
 {
     global $wp_widget_factory;
     foreach ($wp_widget_factory->widgets as $widget => $class) {
         unregister_widget($widget);
     }
 }
开发者ID:moxie-lean,项目名称:wp-widgets,代码行数:10,代码来源:Register.php


示例11: unregister_default_widgets

/**
 * Register sidebars and widgets
 */
function unregister_default_widgets()
{
    unregister_widget('WC_Widget_Featured_Products');
    unregister_widget('WC_Widget_Best_Sellers');
    unregister_widget('WC_Widget_Price_Filter');
    unregister_widget('WC_Widget_Top_Rated_Products');
}
开发者ID:pqzada,项目名称:avispate,代码行数:10,代码来源:widgets.php


示例12: remove_unneeded_widgets

function remove_unneeded_widgets()
{
    unregister_widget('WP_Widget_Pages');
    unregister_widget('WP_Widget_Calendar');
    unregister_widget('WP_Widget_Tag_Cloud');
    unregister_widget('WP_Nav_Menu_Widget');
}
开发者ID:2bj,项目名称:zero,代码行数:7,代码来源:etc.php


示例13: tst_custom_widgets

function tst_custom_widgets()
{
    unregister_widget('WP_Widget_Pages');
    unregister_widget('WP_Widget_Archives');
    unregister_widget('WP_Widget_Calendar');
    unregister_widget('WP_Widget_Meta');
    unregister_widget('WP_Widget_Categories');
    unregister_widget('WP_Widget_Recent_Posts');
    unregister_widget('WP_Widget_Tag_Cloud');
    unregister_widget('WP_Widget_RSS');
    unregister_widget('WP_Widget_Search');
    unregister_widget('FrmListEntries');
    unregister_widget('FrmShowForm');
    //Most of widgets do not perform well with MDL as for now
    unregister_widget('Leyka_Donations_List_Widget');
    unregister_widget('Leyka_Campaign_Card_Widget');
    unregister_widget('Leyka_Campaigns_List_Widget');
    unregister_widget('Su_Widget');
    unregister_widget('Ninja_Forms_Widget');
    //register_widget('BB_RSS_Widget');
    //register_widget('BB_Recent_Posts_Widget');
    register_widget('TST_Featured_Product_Widget');
    register_widget('TST_Social_Links');
    //register_widget('TST_Related_Widget');
}
开发者ID:Teplitsa,项目名称:giger,代码行数:25,代码来源:widgets.php


示例14: recent_comments

 function recent_comments()
 {
     unregister_widget('WP_Widget_Recent_Comments');
     $widget_ops = array('classname' => 'recent-comments', 'description' => __('The most recent comments.', 'yit'));
     $control_ops = array('id_base' => 'recent-comments');
     WP_Widget::__construct('recent-comments', __('Recent Comments', 'yit'), $widget_ops, $control_ops);
 }
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:7,代码来源:recent_comments.php


示例15: true_remove_default_widget

function true_remove_default_widget()
{
    unregister_widget('WP_Widget_Archives');
    // Архивы
    unregister_widget('WP_Widget_Calendar');
    // Календарь
    unregister_widget('WP_Widget_Categories');
    // Рубрики
    unregister_widget('WP_Widget_Meta');
    // Мета
    unregister_widget('WP_Widget_Pages');
    // Страницы
    unregister_widget('WP_Widget_Recent_Comments');
    // Свежие комментарии
    unregister_widget('WP_Widget_Recent_Posts');
    // Свежие записи
    unregister_widget('WP_Widget_RSS');
    // RSS
    unregister_widget('WP_Widget_Search');
    // Поиск
    unregister_widget('WP_Widget_Tag_Cloud');
    // Облако меток
    unregister_widget('WP_Widget_Text');
    // Текст
    unregister_widget('WP_Nav_Menu_Widget');
    // Произвольное меню
}
开发者ID:ur5fot,项目名称:leding3_final,代码行数:27,代码来源:functions.php


示例16: reg_wm_default_widgets

function reg_wm_default_widgets() {
	unregister_widget('WP_Widget_Pages');
  unregister_widget('WP_Nav_Menu_Widget');

	register_widget( 'wm_WP_Widget_Pages' );
	register_widget( 'wm_WP_Nav_Menu_Widget' );
} // /reg_wm_default_widgets
开发者ID:unisexx,项目名称:drtooth,代码行数:7,代码来源:w-default-widgets.php


示例17: widgets_init

 /**
  * Registers widgets, and widget areas.
  *
  * @since Jobify 1.0
  *
  * @return void
  */
 function widgets_init()
 {
     /** Widgets */
     $widgets = array('class-widget-job-company-logo.php', 'class-widget-job-type.php', 'class-widget-job-location.php', 'class-widget-job-apply.php', 'class-widget-job-company-social.php', 'class-widget-job-categories.php', 'class-widget-job-more-jobs.php', 'class-widget-job-share.php', 'class-widget-jobs-recent.php', 'class-widget-jobs-spotlight.php', 'class-widget-jobs-search.php', 'class-widget-jobs-map.php');
     foreach ($widgets as $widget) {
         require_once get_template_directory() . '/inc/integrations/wp-job-manager/widgets/' . $widget;
     }
     unregister_widget('WP_Job_Manager_Widget_Recent_Jobs');
     register_widget('Jobify_Widget_Job_Company_Logo');
     register_widget('Jobify_Widget_Job_Type');
     register_widget('Jobify_Widget_Job_Location');
     register_widget('Jobify_Widget_Job_Apply');
     register_widget('Jobify_Widget_Job_Company_Social');
     register_widget('Jobify_Widget_Job_Categories');
     register_widget('Jobify_Widget_Job_More_Jobs');
     register_widget('Jobify_Widget_Job_Share');
     register_widget('Jobify_Widget_Jobs');
     register_widget('Jobify_Widget_Jobs_Spotlight');
     register_widget('Jobify_Widget_Jobs_Search');
     register_widget('Jobify_Widget_Stats');
     register_widget('Jobify_Widget_Map');
     if ('side' == jobify_theme_mod('jobify_listings', 'jobify_listings_display_area')) {
         register_sidebar(array('name' => __('Job Page Sidebar', 'jobify'), 'id' => 'sidebar-single-job_listing', 'description' => __('Choose what should display on single job listings.', 'jobify'), 'before_widget' => '<aside id="%1$s" class="job_listing-widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="job_listing-widget-title">', 'after_title' => '</h3>'));
     } else {
         $columns = jobify_theme_mod('jobify_listings', 'jobify_listings_topbar_columns');
         for ($i = 1; $i <= $columns; $i++) {
             register_sidebar(array('name' => sprintf(__('Job Info Column %s', 'jobify'), $i), 'id' => sprintf('single-job_listing-top-%s', $i), 'description' => sprintf(__('Choose what should display on single job listings column #%s.', 'jobify'), $i), 'before_widget' => '<aside id="%1$s" class="job_listing-widget-top %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="job_listing-widget-title-top">', 'after_title' => '</h3>'));
         }
     }
 }
开发者ID:Josizzle,项目名称:VisitLift,代码行数:37,代码来源:class-wp-job-manager-template.php


示例18: unregister_d_widget

function unregister_d_widget()
{
    unregister_widget('WP_Widget_Search');
    unregister_widget('WP_Widget_Recent_Comments');
    unregister_widget('WP_Widget_Tag_Cloud');
    unregister_widget('WP_Nav_Menu_Widget');
}
开发者ID:QQ920924960,项目名称:FKWordPress,代码行数:7,代码来源:index.php


示例19: load_widget_sb_tagcloud_widget

function load_widget_sb_tagcloud_widget()
{
    // Widget: Tag Cloud Widget
    unregister_widget('WP_Widget_Tag_Cloud');
    // We're being StartBox-specific; remove WP default
    register_widget('sb_tagcloud_widget');
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:7,代码来源:tagcloud.php


示例20: register_ejo_edited_knowledgebase_widget

function register_ejo_edited_knowledgebase_widget()
{
    //* Unregister primary knowledgebase widget
    unregister_widget('EJO_Knowledgebase_Widget');
    //* Include Widget Class
    register_widget('EJO_Knowledgebase_Widget_Edited');
}
开发者ID:EJOweb,项目名称:ejoweb,代码行数:7,代码来源:edited-knowledgebase-widget.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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