mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Docs: Correct documentation for customize_controls_head
hook and _customizer_mobile_viewport_meta()
function.
Follow-up to [48412]. See #47369. Built from https://develop.svn.wordpress.org/trunk@48420 git-svn-id: http://core.svn.wordpress.org/trunk@48189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
edb4943a9d
commit
b03053eb2a
@ -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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-beta1-48419';
|
||||
$wp_version = '5.5-beta1-48420';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user