Пример #1
0
 /**
  * Register widget with WordPress.
  */
 function __construct()
 {
     $widget_ops = array('classname' => 'xt_widget_newsletter', 'description' => _x('Mailchimp Newletter.', 'Widget', XT_TEXT_DOMAIN));
     self::$widget_defaults = array('title' => '', 'fid' => '', 'description' => '', 'bordered' => 0);
     add_shortcode('xt_newsletter', array($this, 'shortcode'));
     parent::__construct('xt-newsletter', XT_WIDGET_PREFIX . _x('Newsletter', 'Widget', XT_TEXT_DOMAIN), $widget_ops);
 }
Пример #2
0
 /**
  * Register widget with WordPress.
  */
 function __construct()
 {
     $widget_ops = array('classname' => 'xt_comments', 'description' => _x('The most recent comments on your site.', 'Widget', XT_TEXT_DOMAIN));
     self::$widget_defaults = array('title' => '', 'number' => '', 'show_date' => 1, 'bordered' => 0);
     add_shortcode('xt_comments', array($this, 'shortcode'));
     parent::__construct('xt-comments', XT_WIDGET_PREFIX . _x('Recent Comments', 'Widget', XT_TEXT_DOMAIN), $widget_ops);
 }
Пример #3
0
 /**
  * Register widget with WordPress.
  */
 function __construct()
 {
     $widget_ops = array('classname' => 'xt_widget_twitter', 'description' => _x('The most recent tweets.', 'Widget', XT_TEXT_DOMAIN));
     self::$widget_defaults = array('title' => '', 'screen_name' => '', 'count' => 3, 'show_avatar' => true, 'show_date' => true, 'bordered' => 0, 'action_title' => '', 'action_obj_id' => '', 'action_ext_link' => '');
     add_shortcode('xt_twitter', array($this, 'shortcode'));
     parent::__construct('xt-twitter', XT_WIDGET_PREFIX . _x('Twitter', 'Widget', XT_TEXT_DOMAIN), $widget_ops);
 }
Пример #4
0
 /**
  * Register widget with WordPress.
  */
 function __construct()
 {
     $widget_ops = array('classname' => 'xt_widget_text', 'description' => _x('Text / HTML', 'Widget', XT_TEXT_DOMAIN));
     self::$widget_defaults = array('title' => '', 'heading' => '', 'description' => '', 'textsize' => 'normal', 'bordered' => 0);
     add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
     add_filter('widget_text', 'shortcode_unautop');
     add_filter('widget_text', 'do_shortcode');
     parent::__construct('xt-text', XT_WIDGET_PREFIX . _x('Text / HTML', 'Widget', XT_TEXT_DOMAIN), $widget_ops);
 }
Пример #5
0
 /**
  * Register widget with WordPress.
  */
 function __construct()
 {
     $widget_ops = array('classname' => 'xt_news', 'description' => _x('The most recent news on your site.', 'Widget', XT_TEXT_DOMAIN));
     self::$widget_defaults = array('title' => '', 'bold_title' => 0, 'number' => get_option('posts_per_page'), 'show_date' => 0, 'show_author' => 0, 'show_category' => 0, 'show_excerpt' => 0, 'show_stats' => 0, 'title_length' => 12, 'excerpt_length' => apply_filters('excerpt_length', 55), 'category' => '', 'format' => '', 'view' => 'list', 'bordered' => 0, 'post_type' => 'post', 'action_title' => '', 'action_obj_id' => '', 'action_ext_link' => '');
     parent::__construct('xt-news', XT_WIDGET_PREFIX . _x('News', 'Widget', XT_TEXT_DOMAIN), $widget_ops);
 }
Пример #6
0
 function __construct()
 {
     $widget_ops = array('classname' => 'xt-widget-grid xt-widget-recommend', 'description' => '淘宝搜索相关折扣推荐');
     $control_ops = array('width' => 500, 'height' => 350);
     parent::__construct('pagerecommendtaobaos', '淘宝相关折扣推荐', $widget_ops, $control_ops);
 }
Пример #7
0
 function __construct()
 {
     $widget_ops = array('classname' => 'xt-widget-shareandtags', 'description' => '通过配置分类,排序显示指定分享与标签');
     $control_ops = array('width' => 400, 'height' => 350);
     parent::__construct('shareandtags', '分享与标签', $widget_ops, $control_ops);
 }
 function __construct()
 {
     $widget_ops = array('classname' => 'xt-widget-system-help', 'description' => '帮助详情页');
     $control_ops = array('width' => 500, 'height' => 350);
     parent::__construct('syshelp', '帮助详情页', $widget_ops, $control_ops);
 }
Пример #9
0
 function XT_Widget($id_base = false, $name, $widget_options = array(), $control_options = array())
 {
     XT_Widget::__construct($id_base, $name, $widget_options, $control_options);
 }
Пример #10
0
 /**
  * Register widget with WordPress.
  */
 function __construct()
 {
     $widget_ops = array('classname' => 'xt_widget_terms', 'description' => _x('A list or dropdown of categories / terms', 'Widget', XT_TEXT_DOMAIN));
     self::$widget_defaults = array('title' => '', 'taxonomy' => 'category', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0);
     parent::__construct('xt-categories', XT_WIDGET_PREFIX . __('Categories / Terms', XT_TEXT_DOMAIN), $widget_ops);
 }