Created
May 7, 2012 20:31
-
-
Save billerickson/2630202 to your computer and use it in GitHub Desktop.
Don't show "Associate with..." link on post's media uploader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: taxonomy-images.php | |
=================================================================== | |
--- taxonomy-images.php (revision 541085) | |
+++ taxonomy-images.php (working copy) | |
@@ -117,6 +117,11 @@ | |
* @alter 0.7 | |
*/ | |
function taxonomy_image_plugin_modal_button( $fields, $post ) { | |
+ | |
+ | |
+ if( isset( $_GET['post_id'] ) && $_GET['post_id'] ) | |
+ return $fields; | |
+ | |
if ( isset( $fields['image-size'] ) && isset( $post->ID ) ) { | |
$image_id = (int) $post->ID; | |
Just updated it to include isset()
This no longer seems to work in the latest wordpress.
Actually, never mind, it's just that it only works on media library buttons that are on the edit post page. The Associate... button still shows in other plugins and pages that use the media library thickbox.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Bill,
Thanks for looking into this issue! More than a few users have asked about this same thing and, unfortunately, I've not had free time to look into a fix. I'll do some testing and integrate this into the plugin this week. Thanks for the patch. You rock!