WordPress.org

Make WordPress Core

Changeset 27397


Ignore:
Timestamp:
03/04/2014 08:06:14 PM (6 years ago)
Author:
nacin
Message:

Rename maybe_regenerate_attachment_metadata() to wp_maybe_generate_attachment_metadata(), to match wp_generate_attachment_metadata().

fixes #26825.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r27396 r27397  
    25632563
    25642564/**
    2565  * If an attachment is missing its metadata, try to regenerate it
     2565 * If an attachment is missing its metadata, try to generate it.
    25662566 *
    25672567 * @since 3.9.0
     
    25692569 * @param post $attachment Post object.
    25702570 */
    2571 function maybe_regenerate_attachment_metadata( $attachment ) {
     2571function wp_maybe_generate_attachment_metadata( $attachment ) {
    25722572    if ( empty( $attachment ) || ( empty( $attachment->ID ) || ! $attachment_id = (int) $attachment->ID ) ) {
    25732573        return;
     
    25782578    if ( empty( $meta ) && file_exists( $file ) ) {
    25792579        $_meta = get_post_meta( $attachment_id );
    2580         $regeneration_lock = 'wp_regenerating_' . $attachment_id;
     2580        $regeneration_lock = 'wp_generating_att_' . $attachment_id;
    25812581        if ( ! array_key_exists( '_wp_attachment_metadata', $_meta ) && ! get_transient( $regeneration_lock ) ) {
    25822582            set_transient( $regeneration_lock, $file );
Note: See TracChangeset for help on using the changeset viewer.