Filter List

Revision for “Filter List” created on September 9, 2014 @ 15:52:26

Title
Filter List
Content
This is a list of all custom NextCellent <a title="WP Codex" href="http://codex.wordpress.org/Glossary#Filter">filters</a> that can be used in a plugin or theme. <ul> <li><strong>ngg_render_template:</strong> can be used to replace the <a title="Templates" href="http://wpgetready.com/wiki/nextcellent-plugin/templates/">template</a> that's used when displaying galleries, albums, etc. Example usage: <pre class="brush:php">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; }</pre> </li> <li><strong>ngg_load_stylesheet</strong> : allows to replace nggallery.css for any other stylesheet you need See <a href="http://wpgetready.com/wiki/nextcellent-plugin/css-override-keeping-changes-between-updates/" target="_blank">CSS Override: keeping changes between updates</a>. Example usage: <pre class="brush:php">add_filter('ngg_load_stylesheet','replace_stylesheet'); function replace_stylesheet() { return get_stylesheet_directory_uri() . "/css/mycustom-nggallery.css"; }</pre> </li> </ul> <ul> <li><strong>ngg_show_imagebrowser_first: </strong> this very specific filter allows enable/disable slideshow mode. To use, first you would need to activate in<strong> Settings-&gt;Gallery-&gt;Show First-&gt;Slideshow </strong>After that check or modify the filter to return true (to activate ImageBrowser) or false (to disable it) . Example usage: Please see the <a href="http://wpgetready.com/2014/09/nextcellent-adsense-browsing-more/" target="_blank">following post</a> for an example <pre class="brush:php">add_filter("ngg_show_imagebrowser_first","enable_gallery_for_browsing",10,2); 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)); }</pre> </li> <li><strong>ngg_show_gallery_content: </strong> 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.</li> </ul> This list is currently being built.
Excerpt


OldNewDate CreatedAuthorActions
September 9, 2014 @ 15:52:26 admin
September 9, 2014 @ 12:27:12 [Autosave] admin
September 9, 2014 @ 12:14:51 admin
May 6, 2014 @ 14:17:10 admin
May 6, 2014 @ 10:58:45 admin
May 2, 2014 @ 15:46:05 Niko Strijbol
May 2, 2014 @ 15:45:36 [Autosave] Niko Strijbol
April 29, 2014 @ 21:23:40 admin