From 7ce9d697c64bbfc3ca281291e7530f02a7057bdc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 9 Sep 2014 09:49:55 +0000 Subject: [PATCH] Don't display Edit links for attachments user cannot edit. props skaeser. fixes #29596 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@29723 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media-template.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 8a038337e2..14e78f5cb7 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -312,7 +312,7 @@ function wp_print_media_templates() { <# } #>
- <# if ( 'image' === data.type && ! data.uploading && data.sizes ) { #> + <# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #> <# } #>
@@ -408,19 +408,21 @@ function wp_print_media_templates() {
- | - + + <# if ( data.can.save ) { #> | + + <# } #> <# if ( ! data.uploading && data.can.remove ) { #> | - + <# if ( 'trash' === data.status ) { #> <# } else { #> <# } #> - - - - <# } #> + + + + <# } #>