Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When I invoke the media uploader from a certain page, I'm looking for a way to hide all of the 'Gallery Settings' options at the bottom of the Gallery tab. I have set a referrer (dd-options-footer), so I can check that to ensure the code is only added for my desired page, but it seems that whatever I add does not work.

I've tried adding both custom CSS and JS to do this, but it appears that WP overrides this in wp-admin/js/gallery-min.js when it outputs the content of the tab.

Anyone know how I can do this? Thanks.

share|improve this question
add comment

1 Answer 1

David, I'm not sure if you're trying to disable the whole gallery (plus the settings) or only its fields. For the first option, you should try do deregister the admin-gallery script:

function disable_gallery()
{

    $post_id = (int) $_GET['post_id'];

    // Check for your post / page ID
    if( $post_id == 343  )
        wp_deregister_script( 'admin-gallery' );

}

add_action( 'admin_enqueue_scripts', 'disable_gallery' ) );
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.