Exemplo n.º 1
0
 /**
  * Creates a new instace of this class, saves the featured_video_instance.
  *
  * @since 1.0.0
  */
 public function __construct()
 {
     parent::__construct();
     add_action('wp_enqueue_scripts', array($this, 'enqueue'));
     add_filter('post_thumbnail_html', array($this, 'filter_post_thumbnail'), 99, 5);
     add_filter('post_class', array($this, 'has_post_video_class'));
     add_shortcode('featured-video-plus', array($this, 'shortcode'));
 }
Exemplo n.º 2
0
 /**
  * Register actions and filters.
  */
 public function __construct()
 {
     parent::__construct();
     FVP_HTML::add_screens(array('post.php', 'post-new.php'));
     add_action('admin_init', array($this, 'upgrade'));
     add_action('admin_enqueue_scripts', array($this, 'enqueue'));
     add_action('admin_menu', array($this, 'metabox_register'));
     add_action('save_post', array($this, 'metabox_save'));
     add_filter('fvphtml_pointers', array($this, 'pointers'), 10, 2);
     add_filter('plugin_action_links', array($this, 'plugin_action_link'), 10, 2);
     add_filter('admin_post_thumbnail_html', array($this, 'featured_image_box'), 10, 2);
     if (defined('DOING_AJAX') && DOING_AJAX) {
         add_action('wp_ajax_fvp_save', array($this, 'metabox_save_ajax'));
         add_action('wp_ajax_fvp_remove_img', array($this, 'ajax_remove_img'));
         add_action('wp_ajax_fvp_get_embed', array($this, 'ajax_get_embed'));
         add_action('wp_ajax_nopriv_fvp_get_embed', array($this, 'ajax_get_embed'));
     }
 }
 /**
  * Creates a new instace of this class, saves the featured_video_instance.
  *
  * @since 1.0.0
  */
 public function __construct()
 {
     parent::__construct();
     add_action('wp_enqueue_scripts', array($this, 'enqueue'));
 }