su/data/examples

Examples section.

Description

apply_filters( 'su/data/examples', (callback) $array ); 

Parameters (1)

0. $array — Optional. (callback) => array( 'basic' => array( 'title' => __( 'Basic examples', 'shortcodes-ultimate' ), 'items' => array( array( 'name' => __( 'Accordions, spoilers, different styles, anchors', 'shortcodes-ultimate' ), 'id' => 'spoilers', 'code' => plugin_dir_path( SU_PLUGIN_FILE ) . '/inc/examples/spoilers.example', 'icon' => 'tasks' ), array( 'name' => __( 'Tabs, vertical tabs, tab anchors', 'shortcodes-ultimate' ), 'id' => 'tabs', 'code' => plugin_dir_path( SU_PLUGIN_FILE ) . '/inc/examples/tabs.example', 'icon' => 'folder' ), array( 'name' => __( 'Column layouts', 'shortcodes-ultimate' ), 'id' => 'columns', 'code' => plugin_dir_path( SU_PLUGIN_FILE ) . '/inc/examples/columns.example', 'icon' => 'th-large' ), array( 'name' => __( 'Media elements, YouTube, Vimeo, Screenr and self-hosted videos, audio player', 'shortcodes-ultimate' ), 'id' => 'media', 'code' => plugin_dir_path( SU_PLUGIN_FILE ) . '/inc/examples/media.example', 'icon' => 'play-circle' ), array( 'name' => __( 'Unlimited buttons', 'shortcodes-ultimate' ), 'id' => 'buttons', 'code' => plugin_dir_path( SU_PLUGIN_FILE ) . '/inc/examples/buttons.example', 'icon' => 'heart' ), array( 'name' => __( 'Animations', 'shortcodes-ultimate' ), 'id' => 'animations', 'code' => plugin_dir_path( SU_PLUGIN_FILE ) . '/inc/examples/animations.example', 'icon' => 'bolt' ), ) ), 'advanced' => array( 'title' => __( 'Advanced examples', 'shortcodes-ultimate' ), 'items' => array( array( 'name' => __( 'Interacting with posts shortcode', 'shortcodes-ultimate' ), 'id' => 'posts', 'code' => plugin_dir_path( SU_PLUGIN_FILE ) . '/inc/examples/posts.example', 'icon' => 'list' ), array( 'name' => __( 'Nested shortcodes, shortcodes inside of attributes', 'shortcodes-ultimate' ), 'id' => 'nested', 'code' => plugin_dir_path( SU_PLUGIN_FILE ) . '/inc/examples/nested.example', 'icon' => 'indent' ), ) ), )
The array.

Usage

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

Defined (1)

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

/inc/core/data.php  
  1. return apply_filters( 'su/data/examples', array(