WordPress.org

Plugin Directory

Changeset 549329


Ignore:
Timestamp:
05/26/12 18:59:06 (23 months ago)
Author:
alexdunae
Message:

Added setting to disable automatic smushing on upload

Location:
wp-smushit/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-smushit/trunk/readme.txt

    r462816 r549329  
    54541. Upload the `wp-smushit` plugin to your `/wp-content/plugins/` directory. 
    55551. Activate the plugin through the 'Plugins' menu in WordPress. 
     561. Automatic smushing of uploaded images can be controlled on the `Settings > Media` screen 
    56571. Done! 
    5758 
    5859== Changelog == 
     60 
     61= 1.6.0 = 
     62* added setting to disable automatic smushing on upload (default is true) 
    5963 
    6064= 1.5.0 = 
  • wp-smushit/trunk/wp-smushit.php

    r462810 r549329  
    1717} 
    1818 
     19 
     20 
    1921/** 
    2022 * Constants 
     
    2426 
    2527define('WP_SMUSHIT_DOMAIN', 'wp_smushit'); 
    26 define('WP_SMUSHIT_UA', 'WP Smush.it/1.5.0 (+http://dialect.ca/code/wp-smushit)'); 
     28define('WP_SMUSHIT_UA', 'WP Smush.it/1.6.0 (+http://dialect.ca/code/wp-smushit)'); 
    2729define('WP_SMUSHIT_PLUGIN_DIR', dirname(plugin_basename(__FILE__))); 
    2830 
     31define('WP_SMUSHIT_AUTO', intval(get_option('wp_smushit_auto', 1))); 
     32require( dirname(__FILE__) . '/settings.php' ); 
    2933 
    3034/** 
    3135 * Hooks 
    3236 */ 
    33 add_filter('wp_generate_attachment_metadata', 'wp_smushit_resize_from_meta_data', 10, 2); 
     37 
     38if (WP_SMUSHIT_AUTO !== 0) { 
     39  add_filter('wp_generate_attachment_metadata', 'wp_smushit_resize_from_meta_data', 10, 2); 
     40} 
    3441add_filter('manage_media_columns', 'wp_smushit_columns'); 
    3542add_action('manage_media_custom_column', 'wp_smushit_custom_column', 10, 2); 
     
    4956} 
    5057add_action( 'admin_menu', 'wp_smushit_admin_menu' ); 
     58 
     59 
     60 
    5161 
    5262function wp_smushit_bulk_preview() { 
     
    244254        $file_path =  $upload_path . $file_path; 
    245255    } 
    246      
    247  
    248      
    249256 
    250257  if ( $force_resmush || wp_smushit_should_resmush(  @$meta['wp_smushit'] ) ) { 
Note: See TracChangeset for help on using the changeset viewer.