Make WordPress Core

Changeset 31718


Ignore:
Timestamp:
03/11/2015 04:01:07 PM (10 years ago)
Author:
ocean90
Message:

Editor: Hide TinyMCE help button on mobile.

props MattyRob, iseulde.
fixes #31161.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r31715 r31718  
    586586                $mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id );
    587587
     588                $mce_buttons_2 = array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' );
     589
     590                if ( ! wp_is_mobile() ) {
     591                    $mce_buttons_2[] = 'wp_help';
     592                }
     593
    588594                /**
    589595                 * Filter the second-row list of TinyMCE buttons (Visual tab).
     
    594600                 * @param string $editor_id Unique editor identifier, e.g. 'content'.
    595601                 */
    596                 $mce_buttons_2 = apply_filters( 'mce_buttons_2', array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' ), $editor_id );
     602                $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id );
    597603
    598604                /**
Note: See TracChangeset for help on using the changeset viewer.