mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Docs: Correct documentation for customize_controls_head hook and _customizer_mobile_viewport_meta() function.
Follow-up to [48412]. See #47369. git-svn-id: https://develop.svn.wordpress.org/trunk@48420 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
26e29a513a
commit
7b27f3f00a
@ -170,7 +170,7 @@ do_action( 'customize_controls_print_styles' );
|
||||
do_action( 'customize_controls_print_scripts' );
|
||||
|
||||
/**
|
||||
* Fires when Customizer control scripts are printed.
|
||||
* Fires in head section of Customizer controls.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*/
|
||||
|
||||
@ -1027,21 +1027,26 @@ function wp_admin_viewport_meta() {
|
||||
* @param string $viewport_meta The viewport meta.
|
||||
*/
|
||||
$viewport_meta = apply_filters( 'admin_viewport_meta', 'width=device-width,initial-scale=1.0' );
|
||||
|
||||
if ( empty( $viewport_meta ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<meta name="viewport" content="' . esc_attr( $viewport_meta ) . '">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Viewport meta for mobile in customize.
|
||||
* Adds viewport meta for mobile in Customizer.
|
||||
*
|
||||
* Hooked to the {@see 'admin_viewport_meta'} filter.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param string $viewport_meta The viewport meta.
|
||||
* @return string Filtered viewport meta.
|
||||
*/
|
||||
function _customizer_mobile_viewport_meta( $content ) {
|
||||
return trim( $content, ',' ) . ',minimum-scale=0.5,maximum-scale=1.2';
|
||||
function _customizer_mobile_viewport_meta( $viewport_meta ) {
|
||||
return trim( $viewport_meta, ',' ) . ',minimum-scale=0.5,maximum-scale=1.2';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user