本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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'));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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'));
}
示例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'));
}
示例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);
}
示例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);
}
示例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);
}