Exemplo n.º 1
0
 function _register_hooks()
 {
     if (apply_filters('ngg_load_frontend_logic', TRUE, $this->module_id) && (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES)) {
         C_NextGen_Shortcode_Manager::add('album', array(&$this, 'ngglegacy_shortcode'));
         C_NextGen_Shortcode_Manager::add('nggalbum', array(&$this, 'ngglegacy_shortcode'));
     }
 }
Exemplo n.º 2
0
 function _register_hooks()
 {
     if (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES) {
         C_NextGen_Shortcode_Manager::add('album', array(&$this, 'ngglegacy_shortcode'));
     }
     C_NextGen_Shortcode_Manager::add('nggalbum', array(&$this, 'ngglegacy_shortcode'));
 }
 function _register_hooks()
 {
     if (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES) {
         C_NextGen_Shortcode_Manager::add('imagebrowser', array(&$this, 'render_shortcode'));
     }
     C_NextGen_Shortcode_Manager::add('nggimagebrowser', array(&$this, 'render_shortcode'));
 }
 /**
  * Registers hooks for the WordPress framework
  */
 function _register_hooks()
 {
     // Add a shortcode for displaying galleries
     C_NextGen_Shortcode_Manager::add('ngg_images', array(&$this, 'display_images'));
     add_action('init', array(&$this, '_register_resources'));
     add_action('admin_bar_menu', array(&$this, 'add_admin_bar_menu'), 100);
 }
 function _register_hooks()
 {
     if (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES) {
         C_NextGen_Shortcode_Manager::add('tagcloud', array(&$this, 'render_shortcode'));
     }
     C_NextGen_Shortcode_Manager::add('nggtagcloud', array(&$this, 'render_shortcode'));
     add_filter('the_posts', array($this->get_registry()->get_utility('I_Taxonomy_Controller'), 'detect_ngg_tag'), -10, 2);
 }
 function _register_hooks()
 {
     if (apply_filters('ngg_load_frontend_logic', TRUE, $this->module_id) && (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES)) {
         C_NextGen_Shortcode_Manager::add('imagebrowser', array(&$this, 'render_shortcode'));
         C_NextGen_Shortcode_Manager::add('nggimagebrowser', array(&$this, 'render_shortcode'));
     }
     add_action('ngg_routes', array(&$this, 'define_routes'));
 }
 function _register_hooks()
 {
     if (!is_admin() && (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES)) {
         C_NextGen_Shortcode_Manager::add('imagebrowser', array(&$this, 'render_shortcode'));
         C_NextGen_Shortcode_Manager::add('nggimagebrowser', array(&$this, 'render_shortcode'));
     }
     add_action('ngg_routes', array(&$this, 'define_routes'));
 }
 function _register_hooks()
 {
     if (apply_filters('ngg_load_frontend_logic', TRUE, $this->module_id) && (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES)) {
         C_NextGen_Shortcode_Manager::add('singlepic', array(&$this, 'render_singlepic'));
         C_NextGen_Shortcode_Manager::add('nggsinglepic', array(&$this, 'render_singlepic'));
         // enqueue the singlepic CSS if an inline image has the ngg-singlepic class
         add_filter('the_content', array(&$this, 'enqueue_singlepic_css'), PHP_INT_MAX, 1);
     }
 }
 function _register_hooks()
 {
     if (apply_filters('ngg_load_frontend_logic', TRUE, $this->module_id) && (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES)) {
         C_NextGen_Shortcode_Manager::add('tagcloud', array(&$this, 'render_shortcode'));
         C_NextGen_Shortcode_Manager::add('nggtagcloud', array(&$this, 'render_shortcode'));
         add_filter('the_posts', array(C_Taxonomy_Controller::get_instance(), 'detect_ngg_tag'), -10, 2);
     }
     add_action('ngg_routes', array(&$this, 'define_routes'));
 }
 /**
  * Registers hooks for the WordPress framework
  */
 function _register_hooks()
 {
     // Add a shortcode for displaying galleries
     C_NextGen_Shortcode_Manager::add('ngg_images', array(&$this, 'display_images'));
     add_action('init', array(&$this, '_register_resources'));
     add_action('admin_bar_menu', array(&$this, 'add_admin_bar_menu'), 100);
     add_filter('the_content', array($this, '_render_related_images'));
     add_action('wp_enqueue_scripts', array(&$this, 'no_resources_mode'), PHP_INT_MAX - 1);
     add_filter('run_ngg_resource_manager', array(&$this, 'no_resources_mode'));
 }
Exemplo n.º 11
0
 function _register_hooks()
 {
     C_NextGen_Shortcode_Manager::add('nggallery', array(&$this, 'render'));
     C_NextGen_Shortcode_Manager::add('nggtags', array(&$this, 'render_based_on_tags'));
     C_NextGen_Shortcode_Manager::add('random', array(&$this, 'render_random_images'));
     C_NextGen_Shortcode_Manager::add('recent', array(&$this, 'render_recent_images'));
     C_NextGen_Shortcode_Manager::add('thumb', array(&$this, 'render_thumb_shortcode'));
     C_NextGen_Shortcode_Manager::add('slideshow', array(&$this, 'render_slideshow'));
     C_NextGen_Shortcode_Manager::add('nggslideshow', array(&$this, 'render_slideshow'));
 }
 function initialize()
 {
     parent::initialize();
     if (!is_admin()) {
         // adds lightbox JS overrides
         if (version_compare(NGG_PLUGIN_VERSION, '2.0.67') >= 0) {
             M_NextGen_Pro_Lightbox::add_component('photocrati-nextgen_pro_proofing', 'C_NextGen_Pro_Proofing_Lightbox');
         } else {
             M_NextGen_Pro_Lightbox_Legacy::add_component('photocrati-nextgen_pro_proofing', 'C_NextGen_Pro_Proofing_Lightbox');
         }
         $triggers = C_Displayed_Gallery_Trigger_Manager::get_instance();
         $triggers->add(NGG_PRO_PROOFING_TRIGGER, 'C_NextGen_Pro_Proofing_Trigger');
         C_NextGen_Shortcode_Manager::add('ngg_pro_proofing', array(&$this, 'render_proofed_images'));
     }
 }
 function _register_hooks()
 {
     if (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES) {
         C_NextGen_Shortcode_Manager::add('random', array(&$this, 'render_random_images'));
         C_NextGen_Shortcode_Manager::add('recent', array(&$this, 'render_recent_images'));
         C_NextGen_Shortcode_Manager::add('thumb', array(&$this, 'render_thumb_shortcode'));
         C_NextGen_Shortcode_Manager::add('slideshow', array(&$this, 'render_slideshow'));
     }
     C_NextGen_Shortcode_Manager::add('nggallery', array(&$this, 'render'));
     C_NextGen_Shortcode_Manager::add('nggtags', array(&$this, 'render_based_on_tags'));
     C_NextGen_Shortcode_Manager::add('nggslideshow', array(&$this, 'render_slideshow'));
     C_NextGen_Shortcode_Manager::add('nggrandom', array(&$this, 'render_random_images'));
     C_NextGen_Shortcode_Manager::add('nggrecent', array(&$this, 'render_recent_images'));
     C_NextGen_Shortcode_Manager::add('nggthumb', array(&$this, 'render_thumb_shortcode'));
 }
Exemplo n.º 14
0
 function _register_hooks()
 {
     if (apply_filters('ngg_load_frontend_logic', TRUE, $this->module_id) && (!defined('NGG_DISABLE_LEGACY_SHORTCODES') || !NGG_DISABLE_LEGACY_SHORTCODES)) {
         C_NextGen_Shortcode_Manager::add('random', array(&$this, 'render_random_images'));
         C_NextGen_Shortcode_Manager::add('recent', array(&$this, 'render_recent_images'));
         C_NextGen_Shortcode_Manager::add('thumb', array(&$this, 'render_thumb_shortcode'));
         C_NextGen_Shortcode_Manager::add('slideshow', array(&$this, 'render_slideshow'));
         C_NextGen_Shortcode_Manager::add('nggallery', array(&$this, 'render'));
         C_NextGen_Shortcode_Manager::add('nggtags', array(&$this, 'render_based_on_tags'));
         C_NextGen_Shortcode_Manager::add('nggslideshow', array(&$this, 'render_slideshow'));
         C_NextGen_Shortcode_Manager::add('nggrandom', array(&$this, 'render_random_images'));
         C_NextGen_Shortcode_Manager::add('nggrecent', array(&$this, 'render_recent_images'));
         C_NextGen_Shortcode_Manager::add('nggthumb', array(&$this, 'render_thumb_shortcode'));
     }
     add_action('ngg_routes', array(&$this, 'define_routes'));
 }
 /**
  * Registers hooks for the WordPress framework
  */
 function _register_hooks()
 {
     if (apply_filters('ngg_load_frontend_logic', TRUE, $this->module_id)) {
         C_NextGen_Shortcode_Manager::add('ngg_images', array(&$this, 'display_images'));
         add_action('wp_enqueue_scripts', array(&$this, 'no_resources_mode'), PHP_INT_MAX - 1);
         add_filter('the_content', array($this, '_render_related_images'));
     }
     add_action('init', array(&$this, 'register_resources'), 12);
     add_action('admin_bar_menu', array(&$this, 'add_admin_bar_menu'), 100);
     add_filter('run_ngg_resource_manager', array(&$this, 'no_resources_mode'));
     add_action('init', array(&$this, 'serve_fontawesome'), 15);
     // Add hook to delete displayed galleries when removed from a post
     add_action('pre_post_update', array(&$this, 'locate_stale_displayed_galleries'));
     add_action('before_delete_post', array(&$this, 'locate_stale_displayed_galleries'));
     add_action('post_updated', array(&$this, 'cleanup_displayed_galleries'));
     add_action('after_delete_post', array(&$this, 'cleanup_displayed_galleries'));
     add_action('wp_print_styles', array($this, 'fix_nextgen_custom_css_order'), PHP_INT_MAX - 1);
 }
Exemplo n.º 16
0
 /**
  * Filter support for WordPress SEO by Yoast 0.4.0 or higher ( http://wordpress.org/extend/plugins/wordpress-seo/ )
  *
  * @since Version 1.8.0
  * @param array $images
  * @param int $post ID
  * @return array $image list of all founded images
  */
 function add_wpseo_xml_sitemap_images($images, $post_id)
 {
     $this->images = $images;
     // first get the content of the post/page
     $p = get_post($post_id);
     // Backward check for older images
     $p->post_content = NextGEN_Shortcodes::convert_shortcode($p->post_content);
     // Don't process the images in the normal way
     remove_all_shortcodes();
     // We cannot parse at this point a album, just galleries & single images
     C_NextGen_Shortcode_Manager::add('singlepic', array(&$this, 'add_images'));
     C_NextGen_Shortcode_Manager::add('thumb', array(&$this, 'add_images'));
     C_NextGen_Shortcode_Manager::add('nggallery', array(&$this, 'add_gallery'));
     C_NextGen_Shortcode_Manager::add('imagebrowser', array(&$this, 'add_gallery'));
     C_NextGen_Shortcode_Manager::add('slideshow', array(&$this, 'add_gallery'));
     // Search now for shortcodes
     do_shortcode($p->post_content);
     return $this->images;
 }
 function initialize()
 {
     parent::initialize();
     if (!is_admin()) {
         // Add lightbox components
         if (version_compare(NGG_PLUGIN_VERSION, '2.0.67') >= 0) {
             M_NextGen_Pro_Lightbox::add_component('photocrati-add_to_cart', 'C_NextGen_Pro_Add_To_Cart');
         } else {
             M_NextGen_Pro_Lightbox_Legacy::add_component('photocrati-add_to_cart', 'C_NextGen_Pro_Add_To_Cart');
         }
         // Add trigger
         $triggers = C_Displayed_Gallery_Trigger_Manager::get_instance();
         $triggers->add(NGG_ECOMMERCE_TRIGGER, 'C_NextGen_Pro_Ecommerce_Trigger');
         C_NextGen_Shortcode_Manager::add('ngg_pro_cart_count', array(&$this, 'render_cart_count'));
         C_NextGen_Shortcode_Manager::add('ngg_pro_checkout', array(&$this, 'render_checkout_form'));
         C_NextGen_Shortcode_Manager::add('ngg_pro_digital_downloads', array(&$this, 'render_digital_downloads'));
         C_NextGen_Shortcode_Manager::add('ngg_pro_order_details', array(&$this, 'render_order_details'));
         C_NextGen_Shortcode_Manager::add('ngg_pro_verify_order', array(&$this, 'render_order_verification'));
     }
     // Add pricelist sources
     $sources = C_Pricelist_Source_Manager::get_instance();
     $sources->register(NGG_PRO_MANUAL_PRICELIST_SOURCE, array('title' => __('Manual Pricelist', 'nextgen-gallery-pro'), 'shipping_method' => 'C_NextGen_Pro_Flat_Rate_Shipping_Calculator', 'settings_field' => 'manual_settings'));
     $sources->register(NGG_PRO_DIGITAL_DOWNLOADS_SOURCE, array('title' => __('Digital Downloads', 'nextgen-gallery-pro'), 'shipping_method' => NULL, 'settings_field' => 'digital_download_settings'));
 }
 function _register_hooks()
 {
     C_NextGen_Shortcode_Manager::add('tagcloud', array(&$this, 'render_shortcode'));
 }
 function _register_hooks()
 {
     C_NextGen_Shortcode_Manager::add('singlepic', array(&$this, 'render_singlepic'));
 }
 function _register_hooks()
 {
     C_NextGen_Shortcode_Manager::add('imagebrowser', array(&$this, 'render_shortcode'));
 }
Exemplo n.º 21
0
 function _register_hooks()
 {
     C_NextGen_Shortcode_Manager::add('album', array(&$this, 'ngglegacy_shortcode'));
     C_NextGen_Shortcode_Manager::add('nggalbum', array(&$this, 'ngglegacy_shortcode'));
 }
 function _register_hooks()
 {
     C_NextGen_Shortcode_Manager::add('tagcloud', array(&$this, 'render_shortcode'));
     add_filter('the_posts', array($this->get_registry()->get_utility('I_Taxonomy_Controller'), 'detect_ngg_tag'), -10, 2);
 }