Plugin Directory

Changeset 1825321


Ignore:
Timestamp:
02/20/2018 02:01:46 PM (8 years ago)
Author:
MungoBBQ
Message:

Gut fix

Location:
enable-media-replace/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • enable-media-replace/trunk/enable-media-replace.php

    r1825060 r1825321  
    2828add_filter('attachment_fields_to_edit', 'enable_media_replace', 10, 2);
    2929add_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');
    3330
    3431add_shortcode('file_modified', 'emr_get_modified_date');
     
    162159}
    163160add_action( 'attachment_submitbox_misc_actions', 'ua_admin_date_replaced_media_on_edit_media_screen', 91 );
    164 
    165 /*----------------------------------------------------------------------------------------------------------
    166     Display/dismiss admin notices if needed
    167 -----------------------------------------------------------------------------------------------------------*/
    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  
    4545        <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>
    4646
    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 
    7047        <p><?php echo __("Choose a file to upload from your computer", "enable-media-replace"); ?></p>
    7148
Note: See TracChangeset for help on using the changeset viewer.