Changeset 48412 for trunk/src/wp-admin/includes/misc.php
- Timestamp:
- 07/09/2020 11:27:28 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/misc.php
r48345 r48412 1015 1015 1016 1016 /** 1017 * @since 3.3.0 1018 */ 1019 function _ipad_meta() { 1020 if ( wp_is_mobile() ) { 1021 ?> 1022 <meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=1"> 1023 <?php 1024 } 1017 * Displays the viewport meta in the admin. 1018 * 1019 * @since 5.5.0 1020 */ 1021 function wp_admin_viewport_meta() { 1022 /** 1023 * Filters the viewport meta in the admin. 1024 * 1025 * @since 5.5.0 1026 * 1027 * @param string $viewport_meta The viewport meta. 1028 */ 1029 $viewport_meta = apply_filters( 'admin_viewport_meta', 'width=device-width,initial-scale=1.0' ); 1030 if ( empty( $viewport_meta ) ) { 1031 return; 1032 } 1033 echo '<meta name="viewport" content="' . esc_attr( $viewport_meta ) . '">'; 1034 } 1035 1036 /** 1037 * Viewport meta for mobile in customize. 1038 * 1039 * Hooked to the {@see 'admin_viewport_meta'} filter. 1040 * 1041 * @since 5.5.0 1042 */ 1043 function _customizer_mobile_viewport_meta( $content ) { 1044 return trim( $content, ',' ) . ',minimum-scale=0.5,maximum-scale=1.2'; 1025 1045 } 1026 1046
Note: See TracChangeset
for help on using the changeset viewer.