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

PHP wp_unregister_sidebar_widget函数代码示例

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

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



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

示例1: remove_wp_dashboard_widgets

function remove_wp_dashboard_widgets()
{
    wp_unregister_sidebar_widget('dashboard_primary');
    wp_unregister_sidebar_widget('dashboard_secondary');
    wp_unregister_sidebar_widget('dashboard_plugins');
    wp_unregister_sidebar_widget('dashboard_recent_comments');
    wp_unregister_sidebar_widget('dashboard_recent_drafts');
    remove_meta_box('dashboard_primary', 'dashboard', 'side');
    remove_meta_box('dashboard_secondary', 'dashboard', 'side');
    remove_meta_box('dashboard_plugins', 'dashboard', 'normal');
    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
    remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side');
}
开发者ID:michelemccom,项目名称:jobesdev,代码行数:13,代码来源:functions.php


示例2: unregister_sidebar_widget

/**
 * Alias of {@link wp_unregister_sidebar_widget()}.
 *
 * @since 2.2.0
 * @deprecated 2.8.0
 * @deprecated Use wp_unregister_sidebar_widget()
 * @see wp_unregister_sidebar_widget()
 *
 * @param int|string $id Widget ID.
 */
function unregister_sidebar_widget($id)
{
    _deprecated_function(__FUNCTION__, '2.8', 'wp_unregister_sidebar_widget()');
    return wp_unregister_sidebar_widget($id);
}
开发者ID:rkglug,项目名称:WordPress,代码行数:15,代码来源:deprecated.php


示例3: add_filter

add_filter('previous_posts_link_attributes', 'bouquets_boutonnieres_more_get_previous_posts_link_attributes');
/*********************
CLIENT UX FUNCTIONS
*********************/
//Extend permisitons for the 'editor' role (used for client accounts)
function bouquets_boutonnieres_more_increase_editor_permissions()
{
    $role = get_role('editor');
    $role->add_cap('gform_full_access');
    // Gives editors access to Gravity Forms
    $role->add_cap('edit_theme_options');
    // Gives editors access to widgets & menus
}
add_action('admin_init', 'bouquets_boutonnieres_more_increase_editor_permissions');
// Removes the Powered By WPEngine widget
wp_unregister_sidebar_widget('wpe_widget_powered_by');
//Remove some of the admin bar links to keep from confusing client admins
function bouquets_boutonnieres_more_remove_admin_bar_links()
{
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu('wp-logo');
    // Remove Wordpress Logo From Admin Bar
    $wp_admin_bar->remove_menu('wpseo-menu');
    // Remove SEO from Admin Bar
}
add_action('wp_before_admin_bar_render', 'bouquets_boutonnieres_more_remove_admin_bar_links');
// Custom Backend Footer
function bouquets_boutonnieres_more_custom_admin_footer()
{
    echo '<span id="footer-thankyou">Developed by <a href="//www.hallme.com/" target="_blank">Hall Internet Marketing</a></span>. Built using <a href="//github.com/hallme/scaffolding" target="_blank">scaffolding</a> a fork of <a href="//themble.com/bones" target="_blank">bones</a>.';
}
开发者ID:Gerdie,项目名称:dreamy-wedding-company,代码行数:31,代码来源:base-functions.php


示例4: unregister_sidebar_widget

/**
 * Alias of {@link wp_unregister_sidebar_widget()}.
 *
 * @see wp_unregister_sidebar_widget()
 *
 * @since 2.2.0
 *
 * @param int|string $id Widget ID.
 */
function unregister_sidebar_widget($id)
{
    return wp_unregister_sidebar_widget($id);
}
开发者ID:klr2003,项目名称:sourceread,代码行数:13,代码来源:widgets.php


示例5: on_deactivate_widgets

 function on_deactivate_widgets()
 {
     global $wp_widget_factory, $wp_registered_widgets;
     array_map('register_widget', $this->widgets_xtreme);
     foreach ($wp_widget_factory->widgets as $class => $value) {
         $this->widgets_all[] = $class;
         //register custom widgets for later handling
         if (!in_array($class, $this->widgets_wordpress) && !in_array($class, $this->widgets_xtreme)) {
             $this->widgets_custom[] = $class;
         }
         if (in_array($class, $this->options['widgets-disabled']) || $this->options['general_permission'] === false && !in_array($class, $this->options['widgets-general-enabled'])) {
             unregister_widget($class);
             continue;
         }
     }
     foreach ($wp_registered_widgets as $id => $value) {
         if (!in_array($id, $this->widgets_wordpress) && !in_array($id, $this->widgets_xtreme)) {
             $this->widgets_all[] = $id;
             $this->widgets_deprecated[] = $id;
         }
         if (in_array($id, $this->options['widgets-disabled']) || $this->options['general_permission'] === false && !in_array($id, $this->options['widgets-general-enabled'])) {
             $this->widgets_deprecated_off[$id] = array('name' => $value['name'], 'description' => $value['description']);
             wp_unregister_sidebar_widget($id);
         }
     }
 }
开发者ID:katikos,项目名称:xtreme-one,代码行数:26,代码来源:xtreme-widget-manager.php


示例6: bfa_widget_calendar

<?php

function bfa_widget_calendar($args)
{
    extract($args);
    $options = get_option('bfa_widget_calendar');
    $title = apply_filters('widget_title', $options['title']);
    echo $before_widget;
    if (!empty($title)) {
        echo $before_title . $title . $after_title;
    }
    echo '<div id="calendar_wrap">';
    get_calendar();
    echo '</div>';
    if (!empty($title)) {
        echo $after_widget;
    } else {
        echo "</div>";
    }
}
// unregister old / register new calendar widget
$widget_ops = array('classname' => 'widget_calendar', 'description' => __("A calendar of your blog's posts", "atahualpa"));
wp_unregister_sidebar_widget('calendar', __('Calendar', 'atahualpa'), 'wp_widget_calendar', $widget_ops);
wp_register_sidebar_widget('calendar', __('Calendar', 'atahualpa'), 'bfa_widget_calendar', $widget_ops);
开发者ID:aagivecamp,项目名称:FlintRiver,代码行数:24,代码来源:bfa_calendar_widget.php


示例7: deactivate

 /**
  * Deactivate the plugin
  **/
 public static function deactivate()
 {
     wp_unregister_sidebar_widget('simple_signup_form');
 }
开发者ID:naveenchander1909,项目名称:consult1,代码行数:7,代码来源:simple_signup_form.php


示例8: deactivate

 /**
  * Deactivate the plugin
  **/
 public static function deactivate()
 {
     wp_unregister_sidebar_widget('modal_survey');
     unregister_setting('modal_survey-group', 'setting_display_once');
     unregister_setting('modal_survey-group', 'setting_display_once_per_filled');
     unregister_setting('modal_survey-group', 'setting_keep_settings');
     unregister_setting('modal_survey-group', 'setting_minify');
     unregister_setting('modal_survey-group', 'setting_pdf_header');
     unregister_setting('modal_survey-group', 'setting_plugininit');
 }
开发者ID:qhuit,项目名称:dcosta,代码行数:13,代码来源:modal_survey.php


示例9: uncode_add_widget_most_recommended_posts

 function uncode_add_widget_most_recommended_posts()
 {
     wp_unregister_sidebar_widget('most_recommended_posts');
 }
开发者ID:b0123498765,项目名称:fithealthyandwealthy,代码行数:4,代码来源:customizer.php


示例10: while

     // This is the correct way to loop over the directory. //
     while (false !== ($file = readdir($handle))) {
         if ($file != '.' && $file != '..') {
             unlink($filedir[0] . $file);
         }
     }
     closedir($handle);
     rmdir($filedir[0]);
     echo '<li>' . __('eShop template files deleted', 'eshop') . '</li>';
 }
 //unregister widgets
 wp_unregister_sidebar_widget('eshop_widget');
 wp_unregister_sidebar_widget('eshop_pay_widget');
 wp_unregister_sidebar_widget('eshop_products_widget');
 wp_unregister_sidebar_widget('eshop_cart_widget');
 wp_unregister_sidebar_widget('eshop_search_widget');
 unregister_widget('eshop_widget');
 unregister_widget('eshop_pay_widget');
 unregister_widget('eshop_products_widget');
 unregister_widget('eshop_cart_widget');
 unregister_widget('eshop_search_widget');
 delete_option('widget_eshop_widget');
 delete_option('widget_eshop_pay_widget');
 delete_option('widget_eshop_products_widget');
 delete_option('widget_eshop_cart_widget');
 delete_option('widget_eshop_search_widget');
 echo '<li>' . __('Widgets - deleted', 'eshop') . '</li>';
 //clear the cron
 wp_clear_scheduled_hook('eshop_event');
 //remove eshop capability
 remove_eshop_caps();
开发者ID:joaosigno,项目名称:dazake-job,代码行数:31,代码来源:eshop-uninstall.php


示例11: replace_widget_output_callback

 function replace_widget_output_callback()
 {
     global $wp_registered_widgets;
     // Get widget logic options and check visibility settings
     if (empty($this->context_options)) {
         $this->context_options = get_option($this->options_name);
     }
     foreach ($wp_registered_widgets as $widget_id => $widget_data) {
         // Check if widget will be shown
         if (isset($this->context_options[$widget_id])) {
             $do_show = $this->check_widget_visibility($this->context_options[$widget_id]);
         }
         if (isset($do_show) && !$do_show) {
             // If not shown, remove it temporeraly from the list of existing widgets
             wp_unregister_sidebar_widget($widget_id);
         } else {
             //if (!$wp_registered_widgets[$widget_id]['params'][0]['widget_id']) {
             // Save the original widget id
             $wp_registered_widgets[$widget_id]['params'][]['widget_id'] = $widget_id;
             // Store original widget callbacks
             $wp_registered_widgets[$widget_id]['callback_original_wc'] = $wp_registered_widgets[$widget_id]['callback'];
             $wp_registered_widgets[$widget_id]['callback'] = array($this, 'replace_widget_output');
         }
     }
 }
开发者ID:fdelarosa191,项目名称:iftheme-docs,代码行数:25,代码来源:widget-context-antenna.php


示例12: pageOptions

    function pageOptions()
    {
        // Update or reset options
        if (isset($_POST['updateoptions'])) {
            foreach ((array) $this->options as $key => $value) {
                $newval = isset($_POST[$key]) ? stripslashes($_POST[$key]) : '0';
                if ($newval != $value) {
                    $this->setOption($key, $newval);
                }
            }
            $this->saveOptions();
            $this->message = __('Options saved', 'wpkitcn');
            $this->status = 'updated';
        }
        if (isset($_POST['deletealloptions'])) {
            wp_unregister_sidebar_widget('wkc_advanced_blogroll');
            wp_unregister_widget_control('wkc_advanced_blogroll');
            wp_unregister_sidebar_widget('wkc_most_active_commentors');
            wp_unregister_widget_control('wkc_most_active_commentors');
            wp_unregister_sidebar_widget('wkc_most_commented');
            wp_unregister_widget_control('wkc_most_commented');
            wp_unregister_sidebar_widget('wkc_random_posts');
            wp_unregister_widget_control('wkc_random_posts');
            wp_unregister_sidebar_widget('wkc_recent_commentors');
            wp_unregister_widget_control('wkc_recent_commentors');
            wp_unregister_sidebar_widget('wkc_recent_comments');
            wp_unregister_widget_control('wkc_recent_comments');
            delete_option($this->db_options);
            delete_option('widget_wkc_advanced_blogroll');
            delete_option('widget_wkc_most_active_commentors');
            delete_option('widget_wkc_most_commented_posts');
            delete_option('widget_wkc_random_posts');
            delete_option('widget_wkc_recent_commentors');
            delete_option('widget_wkc_recent_comments');
            deactivate_plugins('wp-kit-cn/wp-kit-cn.php');
            $this->message = __('Options of WP Kit CN have been removed, and the plugin has been deactivated.', 'wpkitcn');
        }
        $this->displayMessage();
        ?>
        <style type="text/css">
        legend {display:none!important;}
        fieldset {border:0 none;margin:0;padding:0;}
        </style>
        <div class="wrap">
            <h2><?php 
        _e('WP Kit CN Options', 'wpkitcn');
        ?>
</h2>
            <p><?php 
        _e('Visit the <a href="http://sexywp.com/wp-kit-cn.htm">plugin\'s homepage</a> for further details. If you find a bug, or have a fantastic idea for this plugin, <a href="mailto:[email protected]">ask me</a> !', 'wpkitcn');
        ?>
</p>
            <form method="post" action="<?php 
        echo $this->admin_base_url . 'wkc_options';
        ?>
">
                <table class="form-table">
                    <tbody>
                        <tr>
                            <th scope="row"><?php 
        _e('Auto Excerpt Settings', 'wpkitcn');
        ?>
</th>
                            <td><fieldset>
                                    <legend><?php 
        _e('Auto Excerpt Settings', 'wpkitcn');
        ?>
</legend>
                                    <input type="hidden" name="enable_excerpt_algorithm" id="enable_excerpt_algorithm" value="0" />
                                    <p><label for="enable_excerpt_algorithm"><input type="checkbox" name="enable_excerpt_algorithm" id="enable_excerpt_algorithm" value="1" <?php 
        echo $this->options['enable_excerpt_algorithm'] ? 'checked="checked"' : '';
        ?>
 /><?php 
        _e('Enable the Excerpt Algorithm', 'wpkitcn');
        ?>
</label></p>
                                    <p><?php 
        _e('The excerpt algorithm in this plugin will replace the original excerpt algorithm. This algorithm allows you customize how many paragraphs or how many words you want use to excerpt the post.', 'wpkitcn');
        ?>
</p>
                                    <p><label for="excerpt_words_number">
                                            <?php 
        _e('How many words?', 'wpkitcn');
        ?>
                                        </label>
                                        <input type="text" name="excerpt_words_number" id="excerpt_words_number" value="<?php 
        echo $this->options['excerpt_words_number'];
        ?>
" size="5" />
                                        <?php 
        _e('words.', 'wpkitcn');
        ?>
                                    </p>
                                    <p><label for="excerpt_paragraphs_number">
                                            <?php 
        _e('or How many paragraphs?', 'wpkitcn');
        ?>
                                        </label>
                                        <input type="text" name="excerpt_paragraphs_number" id="excerpt_paragraphs_number" value="<?php 
        echo $this->options['excerpt_paragraphs_number'];
//.........这里部分代码省略.........
开发者ID:liangwei1988,项目名称:wordpress,代码行数:101,代码来源:wp-kit-cn.admin.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wp_unregister_widget_control函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_unique_term_slug函数代码示例发布时间: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