Plugin Directory

Changeset 971730


Ignore:
Timestamp:
08/24/2014 03:33:09 PM (12 years ago)
Author:
sutherlandboswell
Message:

Added action hooks before and after generating attachment metadata

Location:
video-thumbnails
Files:
7 deleted
3 edited
35 copied

Legend:

Unmodified
Added
Removed
  • video-thumbnails/tags/2.10.2/php/class-video-thumbnails-settings.php

    r950682 r971730  
    282282        if ( !current_user_can( 'manage_options' ) ) die();
    283283
    284         // Try saving 'http://img.youtube.com/vi/dMH0bHeiRNg/0.jpg' to media library
    285         $attachment_id = Video_Thumbnails::save_to_media_library( 'http://img.youtube.com/vi/dMH0bHeiRNg/0.jpg', 1 );
     284        // Try saving 'http://img.youtube.com/vi/aKAGU2jkaNg/maxresdefault.jpg' to media library
     285        $attachment_id = Video_Thumbnails::save_to_media_library( 'http://img.youtube.com/vi/aKAGU2jkaNg/maxresdefault.jpg', 1 );
    286286        if ( is_wp_error( $attachment_id ) ) {
    287287            echo '<p><span style="color:red;">&#10006;</span> ' . $attachment_id->get_error_message() . '</p>';
  • video-thumbnails/tags/2.10.2/readme.txt

    r966981 r971730  
    55Requires at least: 3.2
    66Tested up to: 3.9.2
    7 Stable tag: 2.10.1
     7Stable tag: 2.10.2
    88
    99Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
     
    131131
    132132== Changelog ==
     133
     134= 2.10.2 =
     135* Added actions hooks before and after generating attachment metadata
    133136
    134137= 2.10.1 =
  • video-thumbnails/tags/2.10.2/video-thumbnails.php

    r966981 r971730  
    66Author: Sutherland Boswell
    77Author URI: http://sutherlandboswell.com
    8 Version: 2.10.1
     8Version: 2.10.2
    99License: GPL2
    1010Text Domain: video-thumbnails
     
    3131define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
    3232define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
    33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10.1' );
     33define( 'VIDEO_THUMBNAILS_VERSION', '2.10.2' );
    3434
    3535// Providers
     
    405405                // for the function wp_generate_attachment_metadata() to work
    406406                require_once( ABSPATH . 'wp-admin/includes/image.php' );
     407                do_action( 'video_thumbnails/pre_generate_attachment_metadata', $attach_id, $upload['file'] );
    407408                $attach_data = wp_generate_attachment_metadata( $attach_id, $upload['file'] );
     409                do_action( 'video_thumbnails/after_generate_attachment_metadata', $attach_id, $upload['file'] );
    408410                wp_update_attachment_metadata( $attach_id, $attach_data );
    409411
  • video-thumbnails/trunk/php/class-video-thumbnails-settings.php

    r950682 r971730  
    282282        if ( !current_user_can( 'manage_options' ) ) die();
    283283
    284         // Try saving 'http://img.youtube.com/vi/dMH0bHeiRNg/0.jpg' to media library
    285         $attachment_id = Video_Thumbnails::save_to_media_library( 'http://img.youtube.com/vi/dMH0bHeiRNg/0.jpg', 1 );
     284        // Try saving 'http://img.youtube.com/vi/aKAGU2jkaNg/maxresdefault.jpg' to media library
     285        $attachment_id = Video_Thumbnails::save_to_media_library( 'http://img.youtube.com/vi/aKAGU2jkaNg/maxresdefault.jpg', 1 );
    286286        if ( is_wp_error( $attachment_id ) ) {
    287287            echo '<p><span style="color:red;">&#10006;</span> ' . $attachment_id->get_error_message() . '</p>';
  • video-thumbnails/trunk/readme.txt

    r966981 r971730  
    55Requires at least: 3.2
    66Tested up to: 3.9.2
    7 Stable tag: 2.10.1
     7Stable tag: 2.10.2
    88
    99Video Thumbnails simplifies the process of automatically displaying video thumbnails in your WordPress template.
     
    131131
    132132== Changelog ==
     133
     134= 2.10.2 =
     135* Added actions hooks before and after generating attachment metadata
    133136
    134137= 2.10.1 =
  • video-thumbnails/trunk/video-thumbnails.php

    r966981 r971730  
    66Author: Sutherland Boswell
    77Author URI: http://sutherlandboswell.com
    8 Version: 2.10.1
     8Version: 2.10.2
    99License: GPL2
    1010Text Domain: video-thumbnails
     
    3131define( 'VIDEO_THUMBNAILS_PATH', dirname(__FILE__) );
    3232define( 'VIDEO_THUMBNAILS_FIELD', '_video_thumbnail' );
    33 define( 'VIDEO_THUMBNAILS_VERSION', '2.10.1' );
     33define( 'VIDEO_THUMBNAILS_VERSION', '2.10.2' );
    3434
    3535// Providers
     
    405405                // for the function wp_generate_attachment_metadata() to work
    406406                require_once( ABSPATH . 'wp-admin/includes/image.php' );
     407                do_action( 'video_thumbnails/pre_generate_attachment_metadata', $attach_id, $upload['file'] );
    407408                $attach_data = wp_generate_attachment_metadata( $attach_id, $upload['file'] );
     409                do_action( 'video_thumbnails/after_generate_attachment_metadata', $attach_id, $upload['file'] );
    408410                wp_update_attachment_metadata( $attach_id, $attach_data );
    409411
Note: See TracChangeset for help on using the changeset viewer.