Changeset 1745483
- Timestamp:
- 10/12/2017 01:40:49 PM (8 years ago)
- Location:
- wp-imageengine/trunk
- Files:
-
- 4 edited
-
functions.php (modified) (2 diffs)
-
index.php (modified) (1 diff)
-
options.php (modified) (5 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-imageengine/trunk/functions.php
r1714049 r1745483 243 243 } 244 244 if($wpie_options['enabled']) { 245 add_filter('the_content', 'wpie_imgs_find_and_replace'); // Add filter to post and page contents 246 add_filter('widget_text', 'wpie_imgs_find_and_replace'); // Add filter to widgets text 247 add_filter('post_thumbnail_html', 'wpie_imgs_find_and_replace'); // Add filter to wp thumbanils functions 245 $data = wpie_get_real_settings( $user_setting ); 246 if(!empty($data['key'])){ 247 add_filter('the_content', 'wpie_imgs_find_and_replace'); // Add filter to post and page contents 248 add_filter('widget_text', 'wpie_imgs_find_and_replace'); // Add filter to widgets text 249 add_filter('post_thumbnail_html', 'wpie_imgs_find_and_replace'); // Add filter to wp thumbanils functions 250 } 248 251 } 249 252 /** … … 280 283 */ 281 284 if(function_exists('wp_calculate_image_srcset') && $wpie_options['enabled']) { 282 add_filter('wp_calculate_image_srcset', 'wpie_srcset_filter', 21, 5); 283 } 285 $data = wpie_get_real_settings( $user_setting ); 286 if(!empty($data['key'])){ 287 add_filter('wp_calculate_image_srcset', 'wpie_srcset_filter', 21, 5); 288 } 289 } -
wp-imageengine/trunk/index.php
r1714049 r1745483 14 14 } 15 15 16 define( 'IMGENG_VERSION', '1.4. 2');16 define( 'IMGENG_VERSION', '1.4.3'); 17 17 define( 'IMGENG_PATH', plugin_dir_path( __FILE__ ) ); 18 18 define( 'IMGENG_URL', plugin_dir_url( __FILE__ ) ); -
wp-imageengine/trunk/options.php
r1714049 r1745483 27 27 'fit' => $_POST['wpie_fit'] 28 28 ); 29 if(empty($_POST['wpie_key'])){ 30 $data['enabled']=0; 31 } 32 29 33 $save_res = update_option('wpie_options',$data); 30 34 if($save_res){ … … 33 37 echo '<div class="error notice"><p>'.__('Nothing changed!','imageengine').'</p></div>'; 34 38 } 39 35 40 } 36 41 $data = get_option('wpie_options'); … … 91 96 <?php _e('Then, copy your token into the text field below.','imageengine'); ?> 92 97 </p> 93 <p><?php _e('NOTE: If you activate the plugin without a token ,or an invalid token, your images may be watermarked.','imageengine'); ?></p>94 98 <div class="input-group has-error"> 95 99 <?php endif; ?> … … 153 157 <?php endif; ?> 154 158 <li><a target="_blank" href="https://www.scientiamobile.com/myaccount?utm_source=wp-imageengine-admin&utm_medium=Wordress&utm_term=wp-imageengine&utm_campaign=wp-imageengine"><?php _e('Your account','imageengine'); ?></a></li> 155 <li><a target="_blank" href="http ://www.scientiamobile.com/page/WP-ImageEngine?utm_source=wp-imageengine-admin&utm_medium=Wordress&utm_term=wp-imageengine&utm_campaign=wp-imageengine"><?php _e('Plugin Homepage','imageengine'); ?></a></li>159 <li><a target="_blank" href="https://www.scientiamobile.com/page/WP-ImageEngine?utm_source=wp-imageengine-admin&utm_medium=Wordress&utm_term=wp-imageengine&utm_campaign=wp-imageengine"><?php _e('Plugin Homepage','imageengine'); ?></a></li> 156 160 <li><a target="_blank" href="https://www.scientiamobile.com/forum/viewforum.php?f=21&utm_source=wp-imageengine-admin&utm_medium=Wordress&utm_term=wp-imageengine&utm_campaign=wp-imageengine"><?php _e('Support Forum','imageengine'); ?></a></li> 157 161 </div> … … 169 173 if(empty($data['key'])){ 170 174 ?> 171 <div class="notice error my_wpie_admin_notice is-dismissible" >172 <p><?php _e( '<a href="options-general.php?page=wpie-options-page">ImageEngine Alert</a>: Application Token missing. You need to <a href="'.IMGENG_LITE_REGISTRATION_URL.'" target="_blank">register to get an application token</a>. Then, copy the token and paste it into the "Your token" input field below before you save.', 'imageengine' ); ?></p>175 <div class="notice error my_wpie_admin_notice" > 176 <p><?php _e( '<a href="options-general.php?page=wpie-options-page">ImageEngine Alert</a>: <b>Application Token missing.</b> You need to <a href="'.IMGENG_LITE_REGISTRATION_URL.'" target="_blank">register to get an application token</a>. Then, copy the token and paste it into the "Your Token" input field below before you save. Until the token is present, the plugin will not optimize your images.', 'imageengine' ); ?></p> 173 177 </div> 174 178 <?php 175 179 } 176 180 } 177 178 181 add_action( 'admin_notices', 'my_wpie_admin_notice' ); 182 183 184 function my_wpie_admin_notice_inactive() { 185 $data = get_option('wpie_options'); 186 if(!$data['enabled']){ 187 ?> 188 <div class="notice notice-warning my_wpie_admin_notice_inactive" > 189 <p><?php _e( '<a href="options-general.php?page=wpie-options-page">ImageEngine Alert</a>: <b>Local development mode is enabled.</b> Images are currently not optimized. Please remember to disable "Local Development Mode", when the site is publicly available.', 'imageengine' ); ?></p> 190 </div> 191 <?php 192 } 193 } 194 add_action( 'admin_notices', 'my_wpie_admin_notice_inactive' ); 195 179 196 180 197 /** -
wp-imageengine/trunk/readme.txt
r1714049 r1745483 4 4 Requires at least: 4.0.8 5 5 Tested up to: 4.8 6 Stable tag: 1.4. 26 Stable tag: 1.4.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 19 19 The plugin will automatically optimize the images you include in your posts and pages. For images baked into your theme, there is a php API available (See FAQ). 20 20 21 [Registration](https://scientiamobile.com/imageengine/signup?utm_source=wordpress.org&utm_medium=page&utm_term=wp-imageengine&utm_campaign=wp-imageengine#imageengine-lite) is required to get the most out of ImageEngine. 21 [Registration](https://scientiamobile.com/imageengine/signup?utm_source=wordpress.org&utm_medium=page&utm_term=wp-imageengine&utm_campaign=wp-imageengine#imageengine-lite) is required to get your unique application token. Without this token, the plugin will not be activated. 22 22 23 23 24 = Responsive Images Support = … … 76 77 = Is the plugin compatible with other plugins? = 77 78 78 If you have other plugins altering the URLs of images or plugins for other CDNs you might want to do a test before launching. We constantly monitor this, but if you stumble upon a case of incompability, please submit a ticket. 79 If you have other plugins altering the URLs of images or plugins for other CDNs you might want to do a test before launching. We constantly monitor this, but if you stumble upon a case of incompability, please submit a ticket. Note that if you use plugins that caches the markup or plugins enabling CDNs, you might need to purge the cache or disable the plugins fully if you want to turn on or off ImageEngine. 79 80 80 81 = Can I use it in my theme or plugin ? = … … 117 118 118 119 == Changelog == 120 121 = 1.4.3 = 122 - If no token is present, the plugin is now disabled (local dev mode) 123 - doc tweaks 119 124 120 125 = 1.4.2 =
Note: See TracChangeset
for help on using the changeset viewer.