Changeset 1825321
- Timestamp:
- 02/20/2018 02:01:46 PM (8 years ago)
- Location:
- enable-media-replace/trunk
- Files:
-
- 2 edited
-
enable-media-replace.php (modified) (2 diffs)
-
popup.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
enable-media-replace/trunk/enable-media-replace.php
r1825060 r1825321 28 28 add_filter('attachment_fields_to_edit', 'enable_media_replace', 10, 2); 29 29 add_filter('media_row_actions', 'add_media_action', 10, 2); 30 31 add_action('admin_notices', 'emr_display_notices');32 add_action('wp_ajax_emr_dismiss_notices', 'emr_dismiss_notices');33 30 34 31 add_shortcode('file_modified', 'emr_get_modified_date'); … … 162 159 } 163 160 add_action( 'attachment_submitbox_misc_actions', 'ua_admin_date_replaced_media_on_edit_media_screen', 91 ); 164 165 /*----------------------------------------------------------------------------------------------------------166 Display/dismiss admin notices if needed167 -----------------------------------------------------------------------------------------------------------*/168 169 function emr_display_notices() {170 if(!get_option( 'emr_news') && !is_plugin_active('shortpixel-image-optimiser/wp-shortpixel.php')171 && current_action() != "media_page_enable-media-replace/enable-media-replace") {172 require_once( str_replace("enable-media-replace.php", "notice.php", __FILE__) );173 }174 }175 176 function emr_dismiss_notices() {177 update_option( 'emr_news', true);178 return json_encode(array("Status" => 0));179 } -
enable-media-replace/trunk/popup.php
r1825060 r1825321 45 45 <div id="message" class="updated notice notice-success is-dismissible"><p><?php printf( __('NOTE: You are about to replace the media file "%s". There is no undo. Think about it!', "enable-media-replace"), $current_filename ); ?></p></div> 46 46 47 48 <div style="background: #fff;width: 250px;min-height: 270px;border: 1px solid #ccc;float: right;padding: 15px;position: relative;margin: 0 0 10px 10px;">49 <h3 class="" style="margin-top: 0;text-align: center;">50 <a href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank">51 <?php _e("Optimize your images with ShortPixel, get +50% credits!", "enable-media-replace"); ?>52 </a>53 </h3>54 <div class="" style="text-align: center;">55 <a href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank">56 <img src="https://optimizingmattersblog.files.wordpress.com/2016/10/shortpixel.png">57 </a>58 </div>59 <div class="" style="margin-bottom: 10px;">60 <?php _e("Get more Google love by compressing your site's images! Check out how much ShortPixel can save your site and get +50% credits when signing up as an Enable Media Replace user! Forever!", "enable-media-replace"); ?>61 </div>62 <div class=""><div style="text-align: right;">63 <a class="button button-secondary" href="https://shortpixel.com/h/af/VKG6LYN28044" target="_blank">64 <?php _e("More info", "enable-media-replace"); ?></p>65 </a>66 </div>67 </div>68 </div>69 70 47 <p><?php echo __("Choose a file to upload from your computer", "enable-media-replace"); ?></p> 71 48
Note: See TracChangeset
for help on using the changeset viewer.