public function __construct()
 {
     $widget_opts = array('classname' => 'youxi-recent-posts-widget', 'description' => __('Use this widget to display your recent posts', 'youxi'));
     $control_opts = array();
     // Initialize WP_Widget
     parent::__construct('recent-posts-widget', __('Youxi » Recent Posts', 'youxi'), $widget_opts, $control_opts);
 }
 public function __construct()
 {
     $widget_opts = array('classname' => 'youxi-rotating-quotes-widget', 'description' => __('Use this widget to display a set of rotating quotes.', 'youxi'));
     $control_opts = array('width' => '400px');
     // Initialize WP_Widget
     parent::__construct('rotating-quotes-widget', __('Youxi » Rotating Quotes', 'youxi'), $widget_opts, $control_opts);
 }
示例#3
0
 public function __construct()
 {
     $widget_opts = array('classname' => 'youxi-posts-widget', 'description' => __('Use this widget to display your posts based on a specific criteria.', 'youxi'));
     $control_opts = array();
     // Initialize WP_Widget
     parent::__construct('posts-widget', __('Youxi » Posts', 'youxi'), $widget_opts, $control_opts);
 }
 public function __construct()
 {
     $widget_opts = array('classname' => 'youxi-instagram-widget', 'description' => __('Use this widget to display your Instagram feed.', 'youxi'));
     $control_opts = array();
     // Initialize WP_Widget
     parent::__construct('instagram-widget', __('Youxi » Instagram', 'youxi'), $widget_opts, $control_opts);
     if (!self::$ajax_hook_registered) {
         $ajax_action = apply_filters('youxi_widgets_instagram_ajax_action', 'youxi_widgets_get_instagram_feed');
         if (!has_action("wp_ajax_{$ajax_action}")) {
             add_action("wp_ajax_{$ajax_action}", array('Youxi_Instagram_Widget', 'get_feed'));
         }
         if (!has_action("wp_ajax_nopriv_{$ajax_action}")) {
             add_action("wp_ajax_nopriv_{$ajax_action}", array('Youxi_Instagram_Widget', 'get_feed'));
         }
         self::$ajax_hook_registered = true;
     }
 }
示例#5
0
 public function enqueue()
 {
     if (parent::enqueue()) {
         $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
         if (!wp_script_is('gmap3', 'registered')) {
             wp_register_script('gmap3', self::frontend_plugins_url("gmap/gmap3{$suffix}.js"), array('jquery'), '6.0.0', true);
         }
         if (!wp_script_is('youxi-gmap')) {
             wp_enqueue_script('youxi-gmap', self::frontend_scripts_url("youxi.gmap{$suffix}.js"), array('gmap3'), '1.0', true);
         }
     }
 }
示例#6
0
 public function enqueue()
 {
     if (parent::enqueue()) {
         $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
         if (!wp_script_is('jflickrfeed')) {
             wp_enqueue_script('jflickrfeed', self::frontend_plugins_url("jflickrfeed/jflickrfeed{$suffix}.js"), array('jquery'), '1.0', true);
         }
     }
 }
示例#7
0
 public function enqueue()
 {
     if (parent::enqueue()) {
         if (!wp_style_is('youxi-social-icons', 'registered')) {
             wp_register_style('youxi-social-icons', YOUXI_WIDGETS_URL . "frontend/assets/social/social.css", array(), false, 'screen');
         }
         wp_enqueue_style('youxi-social-icons');
     }
 }
 public function enqueue()
 {
     if (parent::enqueue()) {
         $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
         if (!wp_script_is('mini-tweets')) {
             wp_enqueue_script('mini-tweets', self::frontend_plugins_url("minitweets/jquery.minitweets{$suffix}.js"), array('jquery'), '0.1', true);
         }
     }
 }