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

PHP is_active_widget函数代码示例

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

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



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

示例1: delicious_load_scripts

function delicious_load_scripts()
{
    if (is_active_widget(0, 0, 'slider-posts')) {
        wp_enqueue_script('cycle', $src = CHILD_URL . '/lib/js/jquery.cycle.all.min.js', array('jquery'), CHILD_THEME_VERSION, TRUE);
        wp_enqueue_script('delicious-scripts', $src = CHILD_URL . '/lib/js/delicious-scripts.js', array('jquery'), CHILD_THEME_VERSION, TRUE);
    }
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:7,代码来源:functions.php


示例2: __construct

 /**
  * Register widget with WordPress.
  */
 public function __construct()
 {
     parent::__construct('twitter_timeline', apply_filters('jetpack_widget_name', esc_html__('Twitter Timeline', 'jetpack')), array('classname' => 'widget_twitter_timeline', 'description' => __('Display an official Twitter Embedded Timeline widget.', 'jetpack')));
     if (is_active_widget(false, false, $this->id_base) || is_active_widget(false, false, 'monster')) {
         wp_enqueue_script('twitter-widgets', '//platform.twitter.com/widgets.js', '', '', true);
     }
 }
开发者ID:pauEscarcia,项目名称:AIMM,代码行数:10,代码来源:twitter-timeline.php


示例3: HW_Taxonomy_Post_List_widget

 /**
  * constructor
  */
 function HW_Taxonomy_Post_List_widget()
 {
     //Hoangweb Taxonomy Post List
     parent::WP_Widget(false, $name = "Truy xuất nội dung theo chuyên mục", array('description' => 'Hiển thị bài viết theo danh mục/taxonomy'));
     //you should check if whether this widget actived on frontend or neither maybe you can get widget data by get_option($this->option_name)
     if (!is_admin() && !is_active_widget(false, false, $this->id_base, true)) {
         return;
     }
     $this->setup_actions();
     //instance skin
     if (class_exists('HW_SKIN')) {
         $this->skin = new HW_SKIN($this, plugin_dir_path(__FILE__), self::SKINS_FOLDER, 'hw-category-posts.php', 'skins');
         //$this->skin->skin_name='hw-category-posts.php';   #/wp-contents/hw_yahooskype/yahooskype.php
         //$this->skin->skin_folder='wcp_hw_skins';   #create folder in /wp-contents/hw_yahooskype
         $this->skin->plugin_url = plugins_url('', __FILE__);
         $this->skin->enable_external_callback = false;
         $this->skin->create('pagination', '__paginations', 'hwtpl-pagination.php')->enable_external_callback = false;
         //create new skin for pagination
         //create scrollbar skins
         $this->skin->create('scrollbar', '__scrollbars', 'hwtpl-scrollbar.php')->enable_external_callback = false;
         $this->skin->enable_template_engine();
     }
     self::$instance = $this;
     //save lastest instance of this widget
     //register widget features from HW_AWC
     if (class_exists('HW_AWC')) {
         /*HW_AWC::register_widget_feature($this,'grid_posts');  //depricated
           HW_AWC::register_widget_feature($this, 'saveconfig');
           HW_AWC::register_widget_feature($this, 'fancybox');*/
     }
     $this->hwtpl = new HW_Taxonomy_Post_List();
     $this->hwtpl->localize_object_callback = array($this, '_set_localize_scripts_data');
 }
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:36,代码来源:hw-taxonomy-post-list-widget.php


示例4: init

 /**
  * parse_request
  */
 public function init()
 {
     if (is_active_widget(FALSE, FALSE, $this->id_base, TRUE)) {
         global $wp;
         EED_Espresso_Calendar::instance()->run($wp);
     }
 }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:10,代码来源:EEW_Espresso_Calendar.widget.php


示例5: __construct

 function __construct()
 {
     parent::__construct('wd_faq_widget', __('WD FAQ', 'wd-faq'), array('description' => __('Publish your frequently asked questions.', 'wd-faq')));
     if (is_active_widget(false, false, $this->id_base, true) and !is_admin()) {
         $this->load_widget_scripts();
     }
 }
开发者ID:WorkingToine,项目名称:wd-faq,代码行数:7,代码来源:class-widget.php


示例6: __construct

 function __construct()
 {
     parent::__construct('akismet_widget', __('Akismet Widget'), array('description' => __('Display the number of spam comments Akismet has caught')));
     if (is_active_widget(false, false, $this->id_base)) {
         add_action('wp_head', array($this, 'css'));
     }
 }
开发者ID:Nancers,项目名称:Snancy-Website-Files,代码行数:7,代码来源:widget.php


示例7: __construct

 /**
  * Register widget with WordPress.
  */
 public function __construct()
 {
     parent::__construct('twitter_timeline', THEME_NAME . ' - ' . esc_html__('Twitter Timeline', 'lambda-admin-td'), array('classname' => 'widget_twitter_timeline', 'description' => __('Display an official Twitter Embedded Timeline widget.', 'lambda-admin-td')));
     if (is_active_widget(false, false, $this->id_base)) {
         add_action('wp_footer', array($this, 'library'));
     }
 }
开发者ID:ntngiri,项目名称:Wordpress-dhaba,代码行数:10,代码来源:OxyWidgetTwitter.php


示例8: __construct

 function __construct()
 {
     parent::__construct('twitter', apply_filters('jetpack_widget_name', __('Twitter', 'jetpack')), array('classname' => 'widget_twitter', 'description' => __('Display your Tweets from Twitter', 'jetpack')));
     if (is_active_widget(false, false, $this->id_base) || is_active_widget(false, false, 'monster')) {
         add_action('wp_head', array($this, 'style'));
     }
 }
开发者ID:ugurozer,项目名称:little,代码行数:7,代码来源:twitter.php


示例9: lexicon_load_scripts

function lexicon_load_scripts()
{
    if (is_active_widget(0, 0, 'feature-posts')) {
        wp_enqueue_script('cycle', $src = CHILD_URL . '/lib/js/jquery.cycle.all.min.js', array('jquery'), CHILD_THEME_VERSION, TRUE);
        wp_enqueue_script('lexicon-scripts', $src = CHILD_URL . '/lib/js/lexicon-scripts.js', array('jquery'), CHILD_THEME_VERSION, TRUE);
    }
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:7,代码来源:functions.php


示例10: maybe_enqueue

 public function maybe_enqueue()
 {
     if (is_active_widget(false, false, $this->id_base)) {
         wp_enqueue_style('wp-strava-style');
         //only load this when wigit is loaded
     }
 }
开发者ID:nullify005,项目名称:shcc-website,代码行数:7,代码来源:LatestRidesWidget.class.php


示例11: onAddScripts

 /**
  * 
  * a must function. you can not use it, but the function must stay there!
  */
 public static function onAddScripts()
 {
     global $wp_version;
     $slver = apply_filters('revslider_remove_version', RevSliderGlobals::SLIDER_REVISION);
     $style_pre = '';
     $style_post = '';
     if ($wp_version < 3.7) {
         $style_pre = '<style type="text/css">';
         $style_post = '</style>';
     }
     $operations = new RevSliderOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = RevSliderFunctions::getVal($arrValues, "includes_globally", "on");
     $includesFooter = RevSliderFunctions::getVal($arrValues, "js_to_footer", "off");
     $strPutIn = RevSliderFunctions::getVal($arrValues, "pages_for_includes");
     $isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
     //put the includes only on pages with active widget or shortcode
     // if the put in match, then include them always (ignore this if)
     if ($isPutIn == false && $includesGlobally == "off") {
         $isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
         $hasShortcode = RevSliderFunctionsWP::hasShortcode("rev_slider");
         if ($isWidgetActive == false && $hasShortcode == false) {
             return false;
         }
     }
     wp_enqueue_style('rs-plugin-settings', RS_PLUGIN_URL . 'public/assets/css/settings.css', array(), $slver);
     $custom_css = RevSliderOperations::getStaticCss();
     $custom_css = RevSliderCssParser::compress_css($custom_css);
     if (trim($custom_css) == '') {
         $custom_css = '#rs-demo-id {}';
     }
     wp_add_inline_style('rs-plugin-settings', $style_pre . $custom_css . $style_post);
     $setBase = is_ssl() ? "https://" : "http://";
     wp_enqueue_script(array('jquery'));
     //add icon sets
     //wp_register_style('rs-icon-set-fa-icon-', RS_PLUGIN_URL .'public/assets/fonts/font-awesome/css/font-awesome.css', array(), $slver);
     //wp_register_style('rs-icon-set-pe-7s-', RS_PLUGIN_URL .'public/assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css', array(), $slver);
     if ($includesFooter == "off") {
         $waitfor = array('jquery');
         $enable_logs = RevSliderFunctions::getVal($arrValues, "enable_logs", 'off');
         if ($enable_logs == 'on') {
             wp_enqueue_script('enable-logs', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.enablelog.js', $waitfor, $slver);
             $waitfor[] = 'enable-logs';
         }
         wp_enqueue_script('tp-tools', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.tools.min.js', $waitfor, $slver);
         wp_enqueue_script('revmin', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.revolution.min.js', 'tp-tools', $slver);
     } else {
         //put javascript to footer
         add_action('wp_footer', array('RevSliderFront', 'putJavascript'));
     }
     add_action('wp_head', array('RevSliderFront', 'add_meta_generator'));
     add_action("wp_footer", array('RevSliderFront', "load_icon_fonts"));
     // Async JS Loading
     $js_defer = RevSliderBase::getVar($arrValues, 'js_defer', 'off');
     if ($js_defer != 'off') {
         add_filter('clean_url', array('RevSliderFront', 'add_defer_forscript'), 11, 1);
     }
     add_action('wp_before_admin_bar_render', array('RevSliderFront', 'add_admin_menu_nodes'));
     add_action('wp_footer', array('RevSliderFront', 'putAdminBarMenus'));
 }
开发者ID:dawnthemes,项目名称:tkb,代码行数:64,代码来源:revslider-front.class.php


示例12: __construct

 function __construct()
 {
     parent::__construct('facebook-likebox', apply_filters('jetpack_widget_name', __('Facebook Page Plugin', 'jetpack')), array('classname' => 'widget_facebook_likebox', 'description' => __('Use the Facebook Page Plugin to connect visitors to your Facebook Page', 'jetpack'), 'customize_selective_refresh' => true));
     if (is_active_widget(false, false, $this->id_base) || is_active_widget(false, false, 'monster') || is_customize_preview()) {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
     }
 }
开发者ID:pcuervo,项目名称:wp-carnival,代码行数:7,代码来源:facebook-likebox.php


示例13: __construct

 function __construct()
 {
     parent::__construct('upcoming_events_widget', apply_filters('jetpack_widget_name', __('Upcoming Events', 'jetpack')), array('description' => __('Display upcoming events from an iCalendar feed.', 'jetpack'), 'customize_selective_refresh' => true));
     if (is_active_widget(false, false, $this->id_base)) {
         add_action('wp_head', array($this, 'css'));
     }
 }
开发者ID:automattic,项目名称:jetpack,代码行数:7,代码来源:upcoming-events.php


示例14: __construct

 public function __construct()
 {
     parent::__construct('uw_facebook', $name = __('UW - Facebook', 'kho'), array('classname' => 'uw_widget_wrap uw_facebook_widget', 'description' => __('Adds support for Facebook Page Plugin.', 'kho')));
     if (is_active_widget(false, false, $this->id_base)) {
         add_action('wp_footer', array(&$this, 'uw_facebook_script'));
     }
 }
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:7,代码来源:widget-facebook.php


示例15: woothemes_add_javascript

 function woothemes_add_javascript()
 {
     global $woo_options;
     wp_register_script('prettyPhoto', get_template_directory_uri() . '/includes/js/jquery.prettyPhoto.js', array('jquery'));
     wp_register_script('portfolio', get_template_directory_uri() . '/includes/js/portfolio.js', array('jquery', 'prettyPhoto'));
     wp_register_script('flexslider', get_template_directory_uri() . '/includes/js/jquery.flexslider.min.js', array('jquery'));
     wp_register_script('enable-lightbox', get_template_directory_uri() . '/includes/js/enable-lightbox.js', array('jquery', 'prettyPhoto'));
     // Feedback Scripts
     wp_register_script('slides', get_template_directory_uri() . '/includes/js/slides.min.jquery.js', array('jquery'));
     wp_register_script('woo-feedback', get_template_directory_uri() . '/includes/js/feedback.js', array('jquery', 'slides'));
     if ((is_home() || is_front_page()) && isset($woo_options['woo_featured']) && $woo_options['woo_featured'] == 'true') {
         wp_enqueue_script('flexslider');
     }
     if (is_page_template('template-portfolio.php') || is_front_page() || is_singular() && get_post_type() == 'portfolio' || is_tax('portfolio-gallery') || is_post_type_archive('portfolio')) {
         wp_enqueue_script('portfolio');
     }
     wp_enqueue_script('third-party', get_template_directory_uri() . '/includes/js/third-party.js', array('jquery'));
     wp_enqueue_script('general', get_template_directory_uri() . '/includes/js/general.js', array('jquery', 'third-party'));
     // Conditionally load the Feedback JavaScript, where needed.
     $load_feedback_js = false;
     // Allow child themes/plugins to load the Feedback JavaScript when they need it.
     $load_feedback_js = apply_filters('woo_load_feedback_js', $load_feedback_js);
     if ($load_feedback_js && (is_active_widget(false, false, 'woo_feedback', true) || is_page_template('template-feedback.php'))) {
         wp_enqueue_script('woo-feedback');
     }
     do_action('woothemes_add_javascript');
 }
开发者ID:jaiweb,项目名称:ASP,代码行数:27,代码来源:theme-js.php


示例16: __construct

 /**
  * Register widget with WordPress.
  */
 public function __construct()
 {
     parent::__construct('twitter_timeline', apply_filters('jetpack_widget_name', esc_html__('Twitter Timeline', 'jetpack')), array('classname' => 'widget_twitter_timeline', 'description' => __('Display an official Twitter Embedded Timeline widget.', 'jetpack')));
     if (is_active_widget(false, false, $this->id_base) || is_active_widget(false, false, 'monster')) {
         add_action('wp_footer', array($this, 'library'));
     }
 }
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:10,代码来源:twitter-timeline.php


示例17: HW_LC_Taxonomy

 /**
  * constructor
  */
 public function HW_LC_Taxonomy()
 {
     parent::WP_Widget('hwlct_taxonomy', $name = 'HW Liệt kê categories/taxonomy terms');
     //you should check if whether this widget actived on frontend or neither maybe you can get widget data by get_option($this->option_name)
     if (!is_admin() && !is_active_widget(false, false, $this->id_base, true)) {
         return;
     }
     if (!is_admin()) {
         HW_HOANGWEB::load_class('hwArray');
     }
     //init skins
     if (class_exists('HW_SKIN')) {
         $this->skin = new HW_SKIN($this, plugin_dir_path(__FILE__), 'hw_lct_skins', 'hwlct-skin.php', 'skins');
         #$this->skin->set_group('group1');
         $this->skin->plugin_url = plugins_url('', __FILE__);
         $this->skin->enable_external_callback = false;
         #$this->skin->getSavedCallbacksJs_data(array($this,'get_callbacks_data'));
         #$this->skin->create('t1')->files_skin_folder = 'images';    //set skin folder files
         #$this->skin->create('t2')->files_skin_folder = 'image1';    //set skin folder files
         #$this->skin->create('t3','group2','hwlct-pagi-skin.php');    //set skin folder files
         #$this->skin->get_skin_instance('t1')->getSavedCallbacksJs_data(array($this,'get_callbacks_data'));
         $this->skin->registerExternalStorage_JSCallback(array($this, 'save_callback_event'));
         $this->skin->enable_template_engine(1, 0);
         $this->skin->init();
     }
     if (class_exists('HW_AWC')) {
         /*HW_AWC::register_widget_feature($this,'grid_posts');  //dynamic config
           HW_AWC::register_widget_feature($this, 'fancybox');*/
     }
     $this->setup_actions();
 }
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:34,代码来源:list-custom-taxonomy-widget.php


示例18: onAddScripts

 /**
  * 
  * a must function. you can not use it, but the function must stay there!.
  */
 public static function onAddScripts()
 {
     $operations = new BizOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = UniteFunctionsBiz::getVal($arrValues, "includes_globally", "on");
     $includesFooter = UniteFunctionsBiz::getVal($arrValues, "js_to_footer", "off");
     $strPutIn = UniteFunctionsBiz::getVal($arrValues, "pages_for_includes");
     $isPutIn = ShowBizOutput::isPutIn($strPutIn, true);
     $includeFancy = UniteFunctionsBiz::getVal($arrValues, "includes_globally_facybox", "on");
     //put the includes only on pages with active widget or shortcode
     // if the put in match, then include them always (ignore this if)
     if ($isPutIn == false && $includesGlobally == "off") {
         $isWidgetActive = is_active_widget(false, false, "showbiz-widget", true);
         $hasShortcode = UniteFunctionsWPBiz::hasShortcode("showbiz");
         if ($isWidgetActive == false && $hasShortcode == false) {
             return false;
         }
     }
     self::addStyle("settings", "showbiz-settings", "showbiz-plugin/css");
     $url_jquery = "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=showbiz";
     self::addScriptAbsoluteUrl($url_jquery, "jquery");
     if ($includeFancy == "on") {
         self::addStyle("jquery.fancybox", "fancybox", "showbiz-plugin/fancybox");
         self::addScript("jquery.fancybox.pack", "showbiz-plugin/fancybox", "fancybox");
     }
     if ($includesFooter == "off") {
         $waitfor = array('jquery');
         self::addScript("jquery.themepunch.tools.min", "showbiz-plugin/js", 'tp-tools', $waitfor);
         self::addScript("jquery.themepunch.showbizpro.min", "showbiz-plugin/js");
     } else {
         //put javascript to footer
         UniteBaseClassBiz::addAction('wp_footer', 'putJavascript');
     }
 }
开发者ID:Juliaandavid,项目名称:securexa,代码行数:38,代码来源:showbiz_front.php


示例19: widget

    function widget($args, $instance)
    {
        extract($args);
        /*Our variables from the widget settings. */
        $title = apply_filters('widget_title', $instance['title']);
        $show_info = isset($instance['show_info']) ? $instance['show_info'] : false;
        global $is_floter;
        echo $before_widget;
        ?>
            <div class="sfsi_widget">   
				<div id='sfsi_wDiv'></div>
                    <?php 
        /* Display the widget title */
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        /* Link the main icons function */
        echo sfsi_check_visiblity(0);
        ?>
	      		<div style="clear: both;"></div>
            </div>
            <?php 
        if (is_active_widget(false, false, $this->id_base, true)) {
        }
        echo $after_widget;
    }
开发者ID:shazadmaved,项目名称:vizblog,代码行数:26,代码来源:sfsi_widget.php


示例20: __construct

 /**
  * Constructor.
  *
  * @since Twenty Fourteen 1.0
  *
  * @return Twenty_Fourteen_Ephemera_Widget
  */
 public function __construct()
 {
     parent::__construct('widget_twentyfourteen_ephemera', __('Twenty Fourteen Ephemera', 'twentyfourteen'), array('classname' => 'widget_twentyfourteen_ephemera', 'description' => __('Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts.', 'twentyfourteen'), 'customize_selective_refresh' => true));
     if (is_active_widget(false, false, $this->id_base) || is_customize_preview()) {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
     }
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:14,代码来源:widgets.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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