From 137634176fcacdb9ebcc1a49d24f1c4f785fdb36 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Wed, 11 Mar 2015 16:01:07 +0000 Subject: [PATCH] Editor: Hide TinyMCE help button on mobile. props MattyRob, iseulde. fixes #31161. git-svn-id: https://develop.svn.wordpress.org/trunk@31718 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-editor.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index bd3a0c26f9..ffcebc3d62 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -585,6 +585,12 @@ final class _WP_Editors { */ $mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id ); + $mce_buttons_2 = array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' ); + + if ( ! wp_is_mobile() ) { + $mce_buttons_2[] = 'wp_help'; + } + /** * Filter the second-row list of TinyMCE buttons (Visual tab). * @@ -593,7 +599,7 @@ final class _WP_Editors { * @param array $buttons Second-row list of buttons. * @param string $editor_id Unique editor identifier, e.g. 'content'. */ - $mce_buttons_2 = apply_filters( 'mce_buttons_2', array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' ), $editor_id ); + $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id ); /** * Filter the third-row list of TinyMCE buttons (Visual tab).