ngg_image_object

The NextGEN Gallery ngg image object hook.

Description

apply_filters( 'ngg_image_object', (object) $object_image, (unknown) $image_id_field ); 

Parameters (2)

0. $object_image (object) => (object) $image
The object image.
1. $image_id_field (unknown)
The image id field.

Usage

To run the hook, copy the example below.
  1. $object_image = apply_filters( 'ngg_image_object', $object_image, $image_id_field ); 
  2.  
  3. if ( !empty( $object_image ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the ngg_image_object callback 
  2. function filter_ngg_image_object( $object_image, $image_id_field ) { 
  3. // make filter magic happen here... 
  4. return $object_image
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'ngg_image_object', 'filter_ngg_image_object', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'ngg_image_object', 'filter_ngg_image_object', 10, 2 ); 

Defined (2)

The filter is defined in the following location(s).

/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php  
  1. $this->_cache = (array) apply_filters('ngg_image_object', (object) $image, $image[$id_field]); 
/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/package.module.nextgen_basic_imagebrowser.php  
  1. $picture = apply_filters('ngg_image_object', $picture, $numeric_pid);