Editor expand: add docs for the `wp_editor_expand` filter, props DrewAPicture, fixes #29423
git-svn-id: https://develop.svn.wordpress.org/trunk@29654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fcc188193f
commit
1f2ff1d3f3
|
@ -13,6 +13,13 @@ if ( !defined('ABSPATH') )
|
||||||
wp_enqueue_script('post');
|
wp_enqueue_script('post');
|
||||||
$_wp_editor_expand = false;
|
$_wp_editor_expand = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter whether to enable the 'expand' functionality in the post editor.
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*
|
||||||
|
* @param bool $expand Whether to enable the 'expand' functionality. Default true.
|
||||||
|
*/
|
||||||
if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() &&
|
if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() &&
|
||||||
! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) &&
|
! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) &&
|
||||||
apply_filters( 'wp_editor_expand', true ) ) {
|
apply_filters( 'wp_editor_expand', true ) ) {
|
||||||
|
|
Loading…
Reference in New Issue