mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Integrate remove_tinymce_media_button() into wp_tiny_mce(). see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
297f3e3757
commit
f4ad08882e
@ -1407,7 +1407,10 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
|
|||||||
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_adv' ));
|
$mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_adv' ));
|
||||||
$mce_buttons = implode($mce_buttons, ',');
|
$mce_buttons = implode($mce_buttons, ',');
|
||||||
|
|
||||||
$mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' ));
|
$mce_buttons_2 = array('formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' );
|
||||||
|
if ( is_multisite() )
|
||||||
|
unset( $mce_buttons_2[ array_search( 'media', $mce_buttons_2 ) ] );
|
||||||
|
$mce_buttons_2 = apply_filters('mce_buttons_2', $mce_buttons_2);
|
||||||
$mce_buttons_2 = implode($mce_buttons_2, ',');
|
$mce_buttons_2 = implode($mce_buttons_2, ',');
|
||||||
|
|
||||||
$mce_buttons_3 = apply_filters('mce_buttons_3', array());
|
$mce_buttons_3 = apply_filters('mce_buttons_3', array());
|
||||||
|
@ -19,7 +19,6 @@ add_action ( 'template_redirect', 'maybe_redirect_404' );
|
|||||||
add_filter ( 'allowed_redirect_hosts', 'redirect_this_site' );
|
add_filter ( 'allowed_redirect_hosts', 'redirect_this_site' );
|
||||||
|
|
||||||
// Administration
|
// Administration
|
||||||
add_filter ( 'mce_buttons_2', 'remove_tinymce_media_button' );
|
|
||||||
add_filter ( 'term_id_filter', 'global_terms', 10, 2 );
|
add_filter ( 'term_id_filter', 'global_terms', 10, 2 );
|
||||||
add_action ( 'publish_post', 'update_posts_count' );
|
add_action ( 'publish_post', 'update_posts_count' );
|
||||||
add_action ( 'delete_post', 'wpmu_update_blogs_date' );
|
add_action ( 'delete_post', 'wpmu_update_blogs_date' );
|
||||||
|
@ -1758,11 +1758,6 @@ function maybe_redirect_404() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove_tinymce_media_button( $buttons ) {
|
|
||||||
unset( $buttons[ array_search( 'media', $buttons ) ] );
|
|
||||||
return $buttons;
|
|
||||||
}
|
|
||||||
|
|
||||||
function maybe_add_existing_user_to_blog() {
|
function maybe_add_existing_user_to_blog() {
|
||||||
if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
|
if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user