Spell out duplicate hook locations.

props DrewAPicture.
fixes #25658.

Built from https://develop.svn.wordpress.org/trunk@25868


git-svn-id: http://core.svn.wordpress.org/trunk@25780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin
2013-10-22 17:22:11 +00:00
parent 6d97f53134
commit 74488bdcb0
39 changed files with 89 additions and 62 deletions

View File

@@ -712,7 +712,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
if ( ! $image || is_wp_error( $image ) )
wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
//duplicate_hook
/** This filter is documented in wp-admin/custom-header.php */
$image = apply_filters( 'wp_create_file_in_uploads', $image, $attachment_id ); // For replication
$url = str_replace(basename($url), basename($image), $url);
@@ -854,7 +854,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
if ( ! $cropped || is_wp_error( $cropped ) )
wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
//duplicate_hook
/** This filter is documented in wp-admin/custom-header.php */
$cropped = apply_filters( 'wp_create_file_in_uploads', $cropped, $attachment_id ); // For replication
$parent = get_post($attachment_id);
@@ -887,12 +887,18 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
// cleanup
$medium = str_replace( basename( $original ), 'midsize-' . basename( $original ), $original );
if ( file_exists( $medium ) ) {
//duplicate_hook
/**
* Filter the path of the file to delete.
*
* @since 2.1.0
*
* @param string $medium Path to the file to delete.
*/
@unlink( apply_filters( 'wp_delete_file', $medium ) );
}
if ( empty( $_POST['create-new-attachment'] ) && empty( $_POST['skip-cropping'] ) ) {
//duplicate_hook
/** This filter is documented in wp-admin/custom-header.php */
@unlink( apply_filters( 'wp_delete_file', $original ) );
}