shortcode_atts_(shortcode) filter-hook . WP 3.6.0
Filters shortcode attributes.
If the third parameter of the shortcode_atts() function is present then this filter is available. The third parameter, $shortcode, is the name of the shortcode.
Usage
add_filter( 'shortcode_atts_(shortcode)', 'filter_function_name_2143', 10, 4 ); function filter_function_name_2143( $out, $pairs, $atts, $shortcode ){ // filter... return $out; }
- $out(array)
- The output array of shortcode attributes.
- $pairs(array)
- The supported attributes and their defaults.
- $atts(array)
- The user defined shortcode attributes.
- $shortcode(string)
- The shortcode name.
Changelog
Since 3.6.0 | Introduced. |
Since 4.4.0 | Added the $shortcode parameter. |
Where the hook is called
shortcode_atts_(shortcode)
wp-includes/shortcodes.php 597
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
Where in WP core the hook is used WordPress
wp-includes/shortcodes.php 128
add_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );
wp-includes/shortcodes.php 165
remove_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );
wp-includes/shortcodes.php 267
add_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );
wp-includes/shortcodes.php 320
remove_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );