Skip to content

Commit

Permalink
Show media import button only on Media Library
Browse files Browse the repository at this point in the history
We are injecting an Import button, in order to guide people on import media files while on Media Library.
But currently that button show up everywhere, on all post types.

This small change makes the button visible only in the Media Library.
  • Loading branch information
comzeradd committed Nov 15, 2024
1 parent bb16964 commit 510bb8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function add_import_button(): void
?>
<script>
jQuery(function(){
jQuery(".wrap .page-title-action")
jQuery(".upload-php .wrap .page-title-action")
.after('<a href="upload.php?page=media-picker" class="add-new-h2"><?php esc_html_e('Import Greenpeace Media', 'planet4-master-theme-backend'); ?></a>');
});

Expand Down

0 comments on commit 510bb8e

Please sign in to comment.