Docs: Correct the documentation placement for `wp_print_styles` and `shortcode_atts_{$shortcode}` hooks.
Props jrf. See #48255. git-svn-id: https://develop.svn.wordpress.org/trunk@46688 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
36994ef153
commit
67e82bc32a
|
@ -43,12 +43,13 @@ function wp_print_styles( $handles = false ) {
|
|||
if ( '' === $handles ) { // for wp_head
|
||||
$handles = false;
|
||||
}
|
||||
/**
|
||||
* Fires before styles in the $handles queue are printed.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
|
||||
if ( ! $handles ) {
|
||||
/**
|
||||
* Fires before styles in the $handles queue are printed.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*/
|
||||
do_action( 'wp_print_styles' );
|
||||
}
|
||||
|
||||
|
|
|
@ -558,21 +558,22 @@ function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
|
|||
$out[ $name ] = $default;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Filters a shortcode's default 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.
|
||||
*
|
||||
* @since 3.6.0
|
||||
* @since 4.4.0 Added the `$shortcode` parameter.
|
||||
*
|
||||
* @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 ) {
|
||||
/**
|
||||
* Filters a shortcode's default 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.
|
||||
*
|
||||
* @since 3.6.0
|
||||
* @since 4.4.0 Added the `$shortcode` parameter.
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue