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:
ryan 2010-02-04 20:00:18 +00:00
parent 297f3e3757
commit f4ad08882e
3 changed files with 5 additions and 8 deletions

View File

@ -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 = 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_3 = apply_filters('mce_buttons_3', array());

View File

@ -19,7 +19,6 @@ add_action ( 'template_redirect', 'maybe_redirect_404' );
add_filter ( 'allowed_redirect_hosts', 'redirect_this_site' );
// Administration
add_filter ( 'mce_buttons_2', 'remove_tinymce_media_button' );
add_filter ( 'term_id_filter', 'global_terms', 10, 2 );
add_action ( 'publish_post', 'update_posts_count' );
add_action ( 'delete_post', 'wpmu_update_blogs_date' );

View File

@ -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() {
if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
return false;
@ -1823,7 +1818,7 @@ function update_blog_public( $old_value, $value ) {
update_blog_status( $wpdb->blogid, 'public', (int) $value );
}
add_action('update_option_blog_public', 'update_blog_public', 10, 2);
/* Redirect all hits to "dashboard" blog to wp-admin/ Dashboard. */
function redirect_mu_dashboard() {
global $current_site, $current_blog;