当前位置: 首页>>代码示例>>PHP>>正文


PHP WP_Widget::__construct方法代码示例

本文整理汇总了PHP中WP_Widget::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_Widget::__construct方法的具体用法?PHP WP_Widget::__construct怎么用?PHP WP_Widget::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WP_Widget的用法示例。


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

示例1: array

 function __construct($id_base = false, $name = null, $widget_options = array(), $control_options = array())
 {
     if ($name == null) {
         $name = 'Social Media Feather';
     }
     parent::__construct($id_base, $name, $widget_options, $control_options);
 }
开发者ID:jonpetersen,项目名称:PHTC,代码行数:7,代码来源:synved-social.php

示例2: array

 /**
  * Construct
  */
 function __construct()
 {
     $id_base = 'yith-vendor-store-location';
     $name = __('YITH Vendor Store Location', 'yith_wc_product_vendors');
     $widget_options = array('description' => __('Display the vendor\'s store location in Google Maps', 'yith_wc_product_vendors'));
     parent::__construct($id_base, $name, $widget_options);
 }
开发者ID:shwetadubey,项目名称:upfit,代码行数:10,代码来源:class.yith-vendor-store-location.php

示例3: array

 function __construct()
 {
     // Widget settings
     $widget_options = array('classname' => 'pi_tweet_scroll', 'description' => __('A widget that displays your latest tweets.', 'pi_framework'));
     // Create the widget
     parent::__construct('pi_tweet_scroll', __('TweetScroll', 'pi_framework'), $widget_options);
 }
开发者ID:vanbungkring,项目名称:24custom,代码行数:7,代码来源:widget-tweetscroll.php

示例4: array

 function mom_social_counter()
 {
     $widget_ops = array('classname' => 'momizat-social_counter', 'description' => __('Widget display a count of your social networks followers/fans numbers', 'framework'));
     /*		$control_ops = array( 'twitter name' => 'momizat', 'count' => 3, 'avatar_size' => '32' );
     */
     parent::__construct('momizatSocialCounter', __('Momizat - Social Counter', 'framework'), $widget_ops);
 }
开发者ID:justinwool,项目名称:vortago,代码行数:7,代码来源:social-counter.php

示例5: array

 /**
  * Constructor. Set the default widget options and create widget.
  *
  * @since 0.1.8
  */
 function __construct()
 {
     $this->defaults = array('title' => '', 'posts_cat' => '', 'posts_num' => 1, 'posts_offset' => 0, 'orderby' => '', 'order' => '', 'exclude_displayed' => 0, 'exclude_sticky' => 0, 'show_image' => 0, 'image_alignment' => '', 'image_size' => '', 'show_gravatar' => 0, 'gravatar_alignment' => '', 'gravatar_size' => '', 'show_title' => 0, 'show_byline' => 0, 'post_info' => '[post_date] ' . __('By', 'genesis') . ' [post_author_posts_link] [post_comments]', 'show_content' => 'excerpt', 'content_limit' => '', 'more_text' => __('[Read More...]', 'genesis'), 'extra_num' => '', 'extra_title' => '', 'more_from_category' => '', 'more_from_category_text' => __('More Posts from this Category', 'genesis'));
     $widget_ops = array('classname' => 'featured-content featuredpost', 'description' => __('Displays featured posts with thumbnails', 'genesis'));
     $control_ops = array('id_base' => 'featured-post', 'width' => 505, 'height' => 350);
     parent::__construct('featured-post', __('Genesis - Featured Posts', 'genesis'), $widget_ops, $control_ops);
 }
开发者ID:Friends-School-Atlanta,项目名称:Deployable-WordPress,代码行数:12,代码来源:featured-post-widget.php

示例6: __construct

 /**
  * Sets up a new Text widget instance.
  *
  * @since 2.8.0
  * @access public
  */
 public function __construct()
 {
     $widget_ops = array('classname' => 'baldwin_widget_case_study_box', 'description' => __('Case Study box for the Case Study listing, styled for the Baldwin site.'));
     $control_ops = array('width' => 400, 'height' => 350);
     parent::__construct('baldwin_case_study_box', __('Baldwin Case Study Box'), $widget_ops, $control_ops);
     add_action('admin_enqueue_scripts', array($this, 'upload_scripts'));
 }
开发者ID:RainyDayMedia,项目名称:baldwin,代码行数:13,代码来源:class-widget-case-study-box.php

示例7: SlideshowPluginWidget

 /**
  * Initializes the widget
  *
  * @since 1.2.0
  */
 function SlideshowPluginWidget()
 {
     // Settings
     $options = array('classname' => 'SlideshowWidget', 'description' => __('Enables you to show your slideshows in the widget area of your website.', 'slideshow-plugin'));
     // Create the widget.
     parent::__construct('slideshowWidget', __('Slideshow Widget', 'slideshow-plugin'), $options);
 }
开发者ID:qcstw-dev,项目名称:qcsasia,代码行数:12,代码来源:SlideshowPluginWidget.php

示例8: array

 /** constructor */
 function __construct()
 {
     $this->defaults = array('title' => __('Event Locations', 'dbem'), 'scope' => 'future', 'order' => 'ASC', 'limit' => 5, 'format' => '<li>#_LOCATIONLINK<ul><li>#_LOCATIONADDRESS</li><li>#_LOCATIONTOWN</li></ul></li>', 'no_locations_text' => '<li>' . __('No locations', 'dbem') . '</li>', 'orderby' => 'event_start_date,event_start_time,location_name');
     $this->em_orderby_options = array('event_start_date, event_start_time, location_name' => __('Event start date/time, location name', 'dbem'), 'location_name' => __('Location name', 'dbem'));
     $widget_ops = array('description' => __("Display a list of event locations on Events Manager.", 'dbem'));
     parent::__construct(false, $name = 'Event Locations', $widget_ops);
 }
开发者ID:sajjadalisiddiqui,项目名称:cms,代码行数:8,代码来源:em-locations.php

示例9: array

 /**
  * Constructor. Set the default widget options and create widget.
  *
  * @since 0.1.8
  */
 function __construct()
 {
     $this->defaults = array('title' => '', 'page_id' => '', 'show_image' => 0, 'image_alignment' => '', 'image_size' => '', 'show_title' => 0, 'show_content' => 0, 'custom_text' => '', 'content_limit' => '', 'more_text' => '');
     $widget_ops = array('classname' => 'featured-content wsmfeaturedpage', 'description' => __('Displays featured page with thumbnails', 'genesis'));
     $control_ops = array('id_base' => 'wsmfeatured-page', 'width' => 200, 'height' => 250);
     parent::__construct('wsmfeatured-page', __('WSM - Featured Page', 'genesis'), $widget_ops, $control_ops);
 }
开发者ID:Bobcatou,项目名称:enhanceworldwide,代码行数:12,代码来源:wsm-featured-page.php

示例10: array

 function __construct()
 {
     /* Widget settings. */
     $widget_ops = array('classname' => 'zp_contact_widget', 'description' => __('A widget that addresss your contact information.', 'novo'));
     /* Create the widget. */
     parent::__construct('zp_contact_widget', __('ZP Contact Widget', 'novo'), $widget_ops);
 }
开发者ID:lukasalbrecht,项目名称:www.genesis-playground.dev,代码行数:7,代码来源:widget-address.php

示例11: array

 function __construct()
 {
     parent::__construct($this->id_base, $this->name, $this->widget_options);
     add_action('save_post', array($this, 'flush_widget_cache'));
     add_action('deleted_post', array($this, 'flush_widget_cache'));
     add_action('switch_theme', array($this, 'flush_widget_cache'));
 }
开发者ID:DimaStelmakh,项目名称:WEB4PRO-test,代码行数:7,代码来源:widget.php

示例12: array

 /** constructor -- name this the same as the class above */
 function __construct()
 {
     $widget_ops = array('classname' => 'wplms_dash_news', 'description' => __('News for Members', 'wplms-dashboard'));
     $control_ops = array('width' => 300, 'height' => 350, 'id_base' => 'wplms_dash_news');
     parent::__construct('wplms_dash_news', __(' DASHBOARD : Member News', 'wplms-dashboard'), $widget_ops, $control_ops);
     add_action('init', array($this, 'register_essentials'));
 }
开发者ID:nikitansk,项目名称:devschool,代码行数:8,代码来源:news.php

示例13: array

 function __construct()
 {
     $params = array('description' => 'Webnus Contact Form', 'name' => 'Webnus-Contact Form');
     $this->woptions = new webnus_options();
     //var_dump($this->woptions->webnus_contact_email());
     parent::__construct('WebnusContactForm', 'WebnusContactForm', $params);
 }
开发者ID:arkev,项目名称:IntelligentMode,代码行数:7,代码来源:contactform.php

示例14: array

 function __construct()
 {
     /* Widget settings. */
     $widget_ops = array('description' => _x('A widget with albums', 'widget albums', LANGUAGE_ZONE));
     /* Create the widget. */
     parent::__construct('dt-albums-widget', DT_WIDGET_PREFIX . _x('Photo Albums', 'widget albums', LANGUAGE_ZONE), $widget_ops);
 }
开发者ID:mnjit,项目名称:aa-global,代码行数:7,代码来源:albums.php

示例15: array

 function mom_video_widgets()
 {
     $widget_ops = array('classname' => 'momiazat-videos', 'description' => __('Widget display video support Youtube, vimeo, dailymotion', 'framework'));
     /*		$control_ops = array( 'twitter name' => 'momizat', 'count' => 3, 'avatar_size' => '32' );
     */
     parent::__construct('momizar-videos', __('Momizat - Videos', 'framework'), $widget_ops);
 }
开发者ID:justinwool,项目名称:vortago,代码行数:7,代码来源:video-widget.php


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