Skip to content

Commit 49401d4

Browse files
committed
Add Filters to README
1 parent dc771b1 commit 49401d4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,28 @@ Install ACF Move WP Editor using Composer:
1414
```
1515
$ composer require log1x/move-wp-editor:dev-master
1616
```
17+
18+
## Recommended Filters
19+
The filters below remove the TinyMCE editor feature that expands its container to the height of the content as well as removes the option from the Help menu.
20+
21+
```php
22+
/**
23+
* Unregister the editor expand script.
24+
*
25+
* @return void
26+
*/
27+
add_action('admin_init', function () {
28+
wp_deregister_script('editor-expand');
29+
});
30+
31+
/**
32+
* Disable TinyMCE's autoresize.
33+
*
34+
* @param array $init
35+
* @return array
36+
*/
37+
add_filter('tiny_mce_before_init', function ($init) {
38+
unset($init['wp_autoresize_on']);
39+
return $init;
40+
});
41+
```

0 commit comments

Comments
 (0)