Filter List

Wikis > NextCellent Plugin > Filter List

This is a list of all custom NextCellent filters that can be used in a plugin or theme.

  • ngg_render_template: can be used to replace the template that’s used when displaying galleries, albums, etc. Example usage:
    add_filter('ngg_render_template','add_template', 10, 2);
    function add_template( $path, $template_name = false) {
       if ($template_name == 'custom-name')
          $path = WP_PLUGIN_DIR . '/' . plugin_basename( dirname(__FILE__) ) . 'custom.php';
       return $path;
  • ngg_load_stylesheet : allows to replace nggallery.css for any other stylesheet you need See CSS Override: keeping changes between updates. Example usage:
    function replace_stylesheet() {
        return get_stylesheet_directory_uri() . "/css/mycustom-nggallery.css";
  • ngg_show_imagebrowser_first:  this very specific filter allows enable/disable slideshow mode. To use, first you would need to activate in Settings->Gallery->Show First->Slideshow
    After that check or modify the filter to return true (to activate ImageBrowser) or false (to disable it) .

    Example usage: Please see the following post for an example

    function enable_gallery_for_browsing($value,$galleryId) {
        //list of galleries Id's you want to enable browsing
        $enable_browsing = array(4);
        return (in_array($galleryId,$enable_browsing));
  • ngg_show_gallery_content:  this is a filter that will be only active for galleries (not slideshows and not ImageBrowsers) giving you a chance to modify HTML output for a gallery.

This list is currently being built.