Viewing 9 replies - 1 through 9 (of 9 total)
  • no easy way to do that. why do you want it gone?

    remove_action('media_buttons');

    Is that what you mean?

    Thread Starter shadd

    (@shadd)

    Well, I dont need them which is why I want to rid of them.

    t31os, I tried that code, nothing happened.. Here is my code:

    function the_editor_enqueu()
    { // add libraries for editor
            wp_enqueue_script('post');
            wp_enqueue_script('media-upload');
            wp_enqueue_script('word-count');
            wp_enqueue_script('schedule');
            wp_enqueue_script('editor');
            add_thickbox();
            wp_admin_css('thickbox');
    }
    
    function enqueue_editor_head() {
           if (function_exists('wp_tiny_mce')) wp_tiny_mce();
    }
    
    // add actions
    add_action('admin_head',array(&$this, 'enqueue_editor_head'));
    add_action('admin_menu',array(&$this, 'the_editor_enqueu'));
    remove_action('media_buttons');

    Hmm, i’d had hoped that would work, apparently not..

    This works in removing them all together, assuming that’s what you want.

    add_action( 'media_buttons_context' , 'test' );
    function test() {
    	return;
    }

    Thread Starter shadd

    (@shadd)

    Excellent. Worked a charm. BTW, do you know how I can set a custom name for the editor ? The current name is set to ‘content’ (checked via firebug).

    Can you be a little more specific by what you mean please.

    Thread Starter shadd

    (@shadd)

    Sorry. What I meant was that when I invoke the_editor() tag it’ll load all the relevant html/js for the editor. However, I would like to change the default textarea name property to a custom value.

    <textarea name=”content”></textarea>

    I would suggest something if you’re manually calling “the_editor”, the function does support enabling or disabling the media buttons, so you could avoid the need for my previously suggested code.

    Regarding renaming the content area name.. You could try a filter on “the_editor” or “the_editor_content” , they both have filter hooks, though i’m not entirely sure on usage for either of them.. (i’ve just looked directly in wp-include/general-template.php) where the function is defined.

    Failing those, then the alternative would be jQuery i guess, assuming you don’t mind loading that alongside your code.

    Hi everyone, where would i type the code?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove Upload/Insert from WP editor’ is closed to new replies.