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

PHP wp_unregister_widget_control函数代码示例

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

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



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

示例1: unregister_widget_control

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


示例2: wp_unregister_sidebar_widget

/**
 * Remove widget from sidebar.
 *
 * @since 2.2.0
 *
 * @param int|string $id Widget ID.
 */
function wp_unregister_sidebar_widget($id)
{
    /**
     * Fires just before a widget is removed from a sidebar.
     *
     * @since 3.0.0
     *
     * @param int $id The widget ID.
     */
    do_action('wp_unregister_sidebar_widget', $id);
    wp_register_sidebar_widget($id, '', '');
    wp_unregister_widget_control($id);
}
开发者ID:Jasonote,项目名称:WordPress,代码行数:20,代码来源:widget-functions.php


示例3: wp_unregister_sidebar_widget

/**
 * Remove widget from sidebar.
 *
 * @since 2.2.0
 *
 * @param int|string $id Widget ID.
 */
function wp_unregister_sidebar_widget($id)
{
    do_action('wp_unregister_sidebar_widget', $id);
    wp_register_sidebar_widget($id, '', '');
    wp_unregister_widget_control($id);
}
开发者ID:CarterNelms,项目名称:www.engineeredcomfort.net,代码行数:13,代码来源:widgets.php


示例4: unregister_widget_control

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


示例5: barthelme_widgets_init

function barthelme_widgets_init()
{
    if (!function_exists('register_sidebars')) {
        return;
    }
    $p = array('before_title' => "<h3 class='widgettitle'>", 'after_title' => "</h3>\n");
    register_sidebars(1, $p);
    // Finished intializing Widgets plugin, now let's load the Barthelme default widgets; first, Barthelme search widget
    $widget_ops = array('classname' => 'widget_search', 'description' => __("A search form for your blog (Barthelme)", "barthelme"));
    wp_register_sidebar_widget('search', __('Search', 'barthelme'), 'widget_barthelme_search', $widget_ops);
    wp_unregister_widget_control('search');
    wp_register_widget_control('search', __('Search', 'barthelme'), 'widget_barthelme_search_control');
    // Barthelme Meta widget
    $widget_ops = array('classname' => 'widget_meta', 'description' => __("Log in/out and administration links (Barthelme)", "barthelme"));
    wp_register_sidebar_widget('meta', __('Meta', 'barthelme'), 'widget_barthelme_meta', $widget_ops);
    wp_unregister_widget_control('meta');
    wp_register_widget_control('meta', __('Meta'), 'wp_widget_meta_control');
    //Barthelme Home Link widget
    $widget_ops = array('classname' => 'widget_home_link', 'description' => __("Link to the front page when elsewhere (Barthelme)", "barthelme"));
    wp_register_sidebar_widget('home_link', __('Home Link', 'barthelme'), 'widget_barthelme_homelink', $widget_ops);
    wp_register_widget_control('home_link', __('Home Link', 'barthelme'), 'widget_barthelme_homelink_control');
    //Barthelme RSS Links widget
    $widget_ops = array('classname' => 'widget_rss_links', 'description' => __("RSS links for both posts and comments (Barthelme)", "barthelme"));
    wp_register_sidebar_widget('rss_links', __('RSS Links', 'barthelme'), 'widget_barthelme_rsslinks', $widget_ops);
    wp_register_widget_control('rss_links', __('RSS Links', 'barthelme'), 'widget_barthelme_rsslinks_control');
}
开发者ID:alpual,项目名称:Caitlin-Sabo,代码行数:26,代码来源:functions.php


示例6: wp_unregister_sidebar_widget

/**
 * Remove widget from sidebar.
 *
 * @since 2.2.0
 *
 * @param int|string $id Widget ID.
 */
function wp_unregister_sidebar_widget($id)
{
    wp_register_sidebar_widget($id, '', '');
    wp_unregister_widget_control($id);
}
开发者ID:beaucollins,项目名称:wp,代码行数:12,代码来源:widgets.php


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


示例8: sandbox_widgets_init

function sandbox_widgets_init()
{
    if (!function_exists('register_sidebars')) {
        return;
    }
    // Formats the Sandbox widgets, adding readability-improving whitespace
    $p = array('before_widget' => "\n\t\t\t" . '<li id="%1$s" class="widget %2$s">', 'after_widget' => "\n\t\t\t</li>\n", 'before_title' => "\n\t\t\t\t" . '<h3 class="widgettitle">', 'after_title' => "</h3>\n");
    // Table for how many? Two? This way, please.
    register_sidebars(2, $p);
    // Finished intializing Widgets plugin, now let's load the Sandbox default widgets; first, Sandbox search widget
    $widget_ops = array('classname' => 'widget_search', 'description' => __("A search form for your blog (Sandbox)", "sandbox"));
    wp_register_sidebar_widget('search', __('Search', 'sandbox'), 'widget_sandbox_search', $widget_ops);
    wp_unregister_widget_control('search');
    // We're being Sandbox-specific; remove WP default
    wp_register_widget_control('search', __('Search', 'sandbox'), 'widget_sandbox_search_control');
    // Sandbox Meta widget
    $widget_ops = array('classname' => 'widget_meta', 'description' => __("Log in/out and administration links (Sandbox)", "sandbox"));
    wp_register_sidebar_widget('meta', __('Meta', 'sandbox'), 'widget_sandbox_meta', $widget_ops);
    wp_unregister_widget_control('meta');
    // We're being Sandbox-specific; remove WP default
    wp_register_widget_control('meta', __('Meta', 'sandbox'), 'wp_widget_meta_control');
    //Sandbox RSS Links widget
    $widget_ops = array('classname' => 'widget_rss_links', 'description' => __("RSS links for both posts and comments (Sandbox)", "sandbox"));
    wp_register_sidebar_widget('rss_links', __('RSS Links', 'sandbox'), 'widget_sandbox_rsslinks', $widget_ops);
    wp_register_widget_control('rss_links', __('RSS Links', 'sandbox'), 'widget_sandbox_rsslinks_control');
}
开发者ID:rafmotionmill,项目名称:default-theme,代码行数:26,代码来源:functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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