Changeset 48942 for trunk/src/wp-admin/edit-form-advanced.php
- Timestamp:
- 09/04/2020 09:46:11 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r48714 r48942 45 45 $_content_editor_dfw = false; 46 46 47 /**48 * Filters whether to enable the 'expand' functionality in the post editor.49 *50 * @since 4.0.051 * @since 4.1.0 Added the `$post_type` parameter.52 *53 * @param bool $expand Whether to enable the 'expand' functionality. Default true.54 * @param string $post_type Post type.55 */56 $_wp_editor_expand_enabled = apply_filters( 'wp_editor_expand', true, $post_type );57 58 47 if ( post_type_supports( $post_type, 'editor' ) 59 48 && ! wp_is_mobile() 60 49 && ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) 61 && $_wp_editor_expand_enabled62 50 ) { 63 64 wp_enqueue_script( 'editor-expand' ); 65 $_content_editor_dfw = true; 66 $_wp_editor_expand = ( 'on' === get_user_setting( 'editor_expand', 'on' ) ); 51 /** 52 * Filters whether to enable the 'expand' functionality in the post editor. 53 * 54 * @since 4.0.0 55 * @since 4.1.0 Added the `$post_type` parameter. 56 * 57 * @param bool $expand Whether to enable the 'expand' functionality. Default true. 58 * @param string $post_type Post type. 59 */ 60 if ( apply_filters( 'wp_editor_expand', true, $post_type ) ) { 61 wp_enqueue_script( 'editor-expand' ); 62 $_content_editor_dfw = true; 63 $_wp_editor_expand = ( 'on' === get_user_setting( 'editor_expand', 'on' ) ); 64 } 67 65 } 68 66
Note: See TracChangeset
for help on using the changeset viewer.