Make WordPress Core

Changeset 16130


Ignore:
Timestamp:
11/01/2010 10:36:35 AM (14 years ago)
Author:
westi
Message:

Allow better contextual based filtering of the path to the image being edited by having specific filters for local filesystem and url based paths.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image-edit.php

    r12823 r16130  
    202202
    203203    if ( $filepath && file_exists($filepath) ) {
    204         if ( 'full' != $size && ( $data = image_get_intermediate_size($post_id, $size) ) )
    205             $filepath = path_join( dirname($filepath), $data['file'] );
     204        if ( 'full' != $size && ( $data = image_get_intermediate_size($post_id, $size) ) ) {
     205            $filepath = apply_filters('load_image_to_edit_filesystempath', path_join( dirname($filepath), $data['file'] ), $post_id, $size);
     206        }
    206207    } elseif ( WP_Http_Fopen::test() ) {
    207         $filepath = wp_get_attachment_url($post_id);
     208        $filepath = apply_filters('load_image_to_edit_attachmenturl', wp_get_attachment_url($post_id) , $post_id, $size);
    208209    }
    209210
Note: See TracChangeset for help on using the changeset viewer.