function enqueue_static_resources($displayed_gallery, $lightbox_library)
 {
     $router = C_Router::get_instance();
     // TODO: (possibly?) find a better solution, This feels too hackish.
     // Remove all currently enqueued CSS & JS. Resources needed by the pro-lightbox incidentally happen
     // to be enqueued after this particular code is run anyway.
     global $wp_styles;
     global $wp_scripts;
     $wp_styles->queue = array();
     $wp_scripts->queue = array();
     wp_enqueue_script('photocrati_ajax');
     // our only necessary script
     wp_enqueue_script('galleria', $this->object->get_static_url('photocrati-galleria#galleria-1.2.9.min.js'), array('jquery'), FALSE, FALSE);
     wp_enqueue_script('pro-lightbox-galleria-init', $this->object->get_static_url('photocrati-nextgen_pro_lightbox#galleria_init.js'), array('galleria'), FALSE, FALSE);
     M_Gallery_Display::enqueue_fontawesome();
     wp_enqueue_script('velocity', $this->object->get_static_url('photocrati-nextgen_pro_lightbox#jquery.velocity.min.js'));
     // retrieve and add some fields to the lightbox settings
     $lightbox = C_Lightbox_Library_Manager::get_instance()->get(NGG_PRO_LIGHTBOX);
     $lightbox_style = $lightbox->values['nplModalSettings']['style'];
     if (!empty($lightbox_style)) {
         wp_enqueue_style('nextgen_pro_lightbox_user_style', $router->get_static_url('photocrati-nextgen_pro_lightbox#styles/' . $lightbox_style));
     }
     // this should come after all other enqueue'ings
     $settings = C_NextGen_Settings::get_instance();
     if ((!is_multisite() || is_multisite() && $settings->wpmuStyle) && $settings->activateCSS) {
         wp_enqueue_style('nggallery', C_NextGen_Style_Manager::get_instance()->get_selected_stylesheet_url());
     }
 }
 function enqueue_backend_resources()
 {
     parent::enqueue_backend_resources();
     $router = C_Router::get_instance();
     if (!wp_script_is('sprintf')) {
         wp_register_script('sprintf', $router->get_static_url('photocrati-nextgen_pro_ecommerce#sprintf.js'));
     }
     wp_enqueue_script('sprintf');
     wp_enqueue_script('jquery.number');
     // Enqueue fontawesome
     if (method_exists('M_Gallery_Display', 'enqueue_fontawesome')) {
         M_Gallery_Display::enqueue_fontawesome();
     } else {
         C_Display_Type_Controller::get_instance()->enqueue_displayed_gallery_trigger_buttons_resources();
     }
     wp_enqueue_style('fontawesome');
 }
 function enqueue_static_resources()
 {
     M_NextGen_Pro_Ecommerce::enqueue_cart_resources();
     // Enqueue fontawesome
     if (method_exists('M_Gallery_Display', 'enqueue_fontawesome')) {
         M_Gallery_Display::enqueue_fontawesome();
     } else {
         C_Display_Type_Controller::get_instance()->enqueue_displayed_gallery_trigger_buttons_resources();
     }
     wp_enqueue_style('fontawesome');
     wp_enqueue_style('ngg-pro-checkout', $this->get_static_url('photocrati-nextgen_pro_ecommerce#checkout.css'));
     foreach ($this->object->get_checkout_buttons() as $btn) {
         $method = "enqueue_{$btn}_resources";
         if ($this->object->has_method($method)) {
             $this->object->{$method}();
         }
     }
 }
 public function enqueue_displayed_gallery_trigger_buttons_resources($displayed_gallery = FALSE)
 {
     $retval = FALSE;
     M_Gallery_Display::enqueue_fontawesome();
     if (!$this->run_once && !empty($displayed_gallery) && !empty($displayed_gallery->display_settings['ngg_triggers_display']) && $displayed_gallery->display_settings['ngg_triggers_display'] !== 'never') {
         $pro_active = FALSE;
         if (defined('NGG_PRO_PLUGIN_VERSION')) {
             $pro_active = 'NGG_PRO_PLUGIN_VERSION';
         }
         if (defined('NEXTGEN_GALLERY_PRO_VERSION')) {
             $pro_active = 'NEXTGEN_GALLERY_PRO_VERSION';
         }
         if (!empty($pro_active)) {
             $pro_active = constant($pro_active);
         }
         if (!is_admin() && (empty($pro_active) || version_compare($pro_active, '1.0.11') >= 0)) {
             wp_enqueue_style('fontawesome');
             $retval = TRUE;
             $this->run_once = TRUE;
         }
     }
     return $retval;
 }
function nggShowRelatedImages($type = NULL, $maxImages = 0)
{
    return M_Gallery_Display::_render_related_string(NULL, $maxImages, $type);
}
 function maybe_enqueue_fontawesome()
 {
     $settings = C_NextGen_Settings::get_instance();
     $context = isset($settings->thumbEffectContext) ? $settings->thumbEffectContext : '';
     if ($context != 'nextgen_images') {
         M_Gallery_Display::enqueue_fontawesome();
     }
 }
 /**
  * Enqueues static resources required by the Attach to Post interface
  */
 function enqueue_static_resources()
 {
     $router = C_Router::get_instance();
     // Enqueue resources needed at post/page level
     if (preg_match("/\\/wp-admin\\/(post|post-new)\\.php\$/", $_SERVER['SCRIPT_NAME'])) {
         $this->_enqueue_tinymce_resources();
         M_Gallery_Display::enqueue_fontawesome();
         wp_enqueue_style('ngg_attach_to_post_dialog', $router->get_static_url('photocrati-attach_to_post#attach_to_post_dialog.css'), FALSE, NGG_SCRIPT_VERSION);
         wp_enqueue_script('ngg-igw', $router->get_static_url('photocrati-attach_to_post#igw.js'), array('jquery'), NGG_PLUGIN_VERSION);
         wp_localize_script('ngg-igw', 'ngg_igw_i18n', array('nextgen_gallery' => __('NextGEN Gallery', 'nggallery'), 'edit' => __('Click to edit', 'nggallery'), 'remove' => __('Click to remove', 'nggallery')));
     } elseif (isset($_REQUEST['attach_to_post']) or isset($_REQUEST['page']) && strpos($_REQUEST['page'], 'nggallery') !== FALSE) {
         wp_enqueue_script('iframely', $router->get_static_url('photocrati-attach_to_post#iframely.js'), FALSE, NGG_SCRIPT_VERSION);
         wp_enqueue_style('iframely', $router->get_static_url('photocrati-attach_to_post#iframely.css'), FALSE, NGG_SCRIPT_VERSION);
     }
 }