WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/10/2020 11:34:41 AM (16 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct documentation for customize_controls_head hook and _customizer_mobile_viewport_meta() function.

Follow-up to [48412].

See #47369.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r48412 r48420  
    10281028     */
    10291029    $viewport_meta = apply_filters( 'admin_viewport_meta', 'width=device-width,initial-scale=1.0' );
     1030
    10301031    if ( empty( $viewport_meta ) ) {
    10311032        return;
    10321033    }
     1034
    10331035    echo '<meta name="viewport" content="' . esc_attr( $viewport_meta ) . '">';
    10341036}
    10351037
    10361038/**
    1037  * Viewport meta for mobile in customize.
     1039 * Adds viewport meta for mobile in Customizer.
    10381040 *
    10391041 * Hooked to the {@see 'admin_viewport_meta'} filter.
    10401042 *
    10411043 * @since 5.5.0
    1042  */
    1043 function _customizer_mobile_viewport_meta( $content ) {
    1044     return trim( $content, ',' ) . ',minimum-scale=0.5,maximum-scale=1.2';
     1044 *
     1045 * @param string $viewport_meta The viewport meta.
     1046 * @return string Filtered viewport meta.
     1047 */
     1048function _customizer_mobile_viewport_meta( $viewport_meta ) {
     1049    return trim( $viewport_meta, ',' ) . ',minimum-scale=0.5,maximum-scale=1.2';
    10451050}
    10461051
Note: See TracChangeset for help on using the changeset viewer.