Plugin Directory

Changeset 667274


Ignore:
Timestamp:
02/13/2013 08:34:59 AM (13 years ago)
Author:
mohanjith
Message:

Add WPMUDEV as an Author

Location:
lean-media/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lean-media/trunk/lean-media.php

    r645251 r667274  
    44Plugin URI: http://codemaster.fi/wordpress/plugins/lean-media/
    55Description: Delete large image files
    6 Version: 1.0
     6Version: 1.0.1
    77Author: S H Mohanjith (Code Master Oy)
    88Author URI: http://codemaster.fi/
     
    1616   
    1717    if (get_option('lean_media_settings-delete_large_files', 1) == 1) {
    18         add_filter('wp_generate_attachment_metadata', 'lean_media_delete_fullsize_image');
     18        add_filter('wp_generate_attachment_metadata', 'lean_media_delete_fullsize_image', 100, 2);
    1919    }
    2020}
     
    2525}
    2626
    27 function lean_media_delete_fullsize_image($metadata) {
     27function lean_media_delete_fullsize_image($metadata, $attachment_id) {
    2828   
    2929    $upload_dir = wp_upload_dir();
     
    3232    $width = 0;
    3333    $height = 0;
    34    
     34
     35    if ( get_post_meta($attachment_id, '_wp_attachment_context', true) == 'custom-background' ) {
     36    return $metadata;
     37    }
     38
    3539    foreach ($metadata['sizes'] as $thumbnail) {
    3640        if ($thumbnail['width'] > $width) {
  • lean-media/trunk/readme.txt

    r645256 r667274  
    11=== Lean Media ===
    2 Contributors: codix, mohanjith
     2Contributors: codix, mohanjith, WPMUDEV
    33Donate link: http://twitter.com/codemasteroy
    44Tags: media, thumbnail, storage, save
Note: See TracChangeset for help on using the changeset viewer.