From 73a077d32b91741648ec6753bfbf883e093bed9f Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 4 Mar 2014 20:06:14 +0000 Subject: [PATCH] Rename maybe_regenerate_attachment_metadata() to wp_maybe_generate_attachment_metadata(), to match wp_generate_attachment_metadata(). fixes #26825. git-svn-id: https://develop.svn.wordpress.org/trunk@27397 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index ee3debf10d..23e0721efa 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -2562,13 +2562,13 @@ function get_post_gallery_images( $post = 0 ) { } /** - * If an attachment is missing its metadata, try to regenerate it + * If an attachment is missing its metadata, try to generate it. * * @since 3.9.0 * * @param post $attachment Post object. */ -function maybe_regenerate_attachment_metadata( $attachment ) { +function wp_maybe_generate_attachment_metadata( $attachment ) { if ( empty( $attachment ) || ( empty( $attachment->ID ) || ! $attachment_id = (int) $attachment->ID ) ) { return; } @@ -2577,7 +2577,7 @@ function maybe_regenerate_attachment_metadata( $attachment ) { $meta = wp_get_attachment_metadata( $attachment_id ); if ( empty( $meta ) && file_exists( $file ) ) { $_meta = get_post_meta( $attachment_id ); - $regeneration_lock = 'wp_regenerating_' . $attachment_id; + $regeneration_lock = 'wp_generating_att_' . $attachment_id; if ( ! array_key_exists( '_wp_attachment_metadata', $_meta ) && ! get_transient( $regeneration_lock ) ) { set_transient( $regeneration_lock, $file ); wp_update_attachment_metadata( $attachment_id, wp_generate_attachment_metadata( $attachment_id, $file ) );