Opened 5 years ago
Closed 5 years ago
#49225 closed defect (bug) (fixed)
Fix summary for shortcode_atts_{$shortcode}
Reported by: | glebkema | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Shortcodes | Keywords: | |
Focuses: | docs | Cc: |
Description
In the shortcode_atts()
function the shortcode_atts_{$shortcode}
filter is described as:
/**
* Filters a shortcode's default attributes.
*
However, this filter does not affect the default values. Instead, it changes the output values of the attributes after they are combined with the default values:
* @param array $out The output array of shortcode attributes.
* @param array $pairs The supported attributes and their defaults.
* @param array $atts The user defined shortcode attributes.
* @param string $shortcode The shortcode name.
*/
if ( $shortcode ) {
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
}
I suggest to edit the filter summary, for example, like this:
/**
* Filters an array of shortcode attributes.
*
Or even shorter:
/**
* Filters shortcode attributes.
*
Change History (2)
Note: See
TracTickets for help on using
tickets.
In 47087: