Skip to content

Commit

Permalink
Fixed TinyMCE disable media button bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
joelworsham committed Feb 11, 2015
1 parent a1aa9fd commit 18d3f6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions build/core/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,5 +576,9 @@ function render_disable_tinymce_media_button( $hook_name, $label , $priority = 1
return $buttons;
} );

if ( get_option( "render_enable_tinymce_button_$hook_name" ) != 'enabled' ) {
remove_action( 'media_buttons', $hook_name, $priority );
}

render_disable_tinymce_button( $hook_name, $label );
}
1 change: 0 additions & 1 deletion build/core/tinymce.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public static function remove_tinymce_buttons( $buttons ) {

// Different method for media buttons
if ( isset( $media_buttons[ $button_ID ] ) ) {
remove_action( 'media_buttons', $button_ID, $media_buttons[ $button_ID ] );
continue;
}

Expand Down

0 comments on commit 18d3f6f

Please sign in to comment.