Make WordPress Core

Changeset 13952


Ignore:
Timestamp:
04/02/2010 11:54:56 PM (15 years ago)
Author:
nacin
Message:

Allow methods to be used as a callback in wp_unique_filename(). fixes #12824 props aaroncampbell.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r13911 r13952  
    22102210
    22112211    // Increment the file number until we have a unique file to save in $dir. Use $override['unique_filename_callback'] if supplied.
    2212     if ( $unique_filename_callback && function_exists( $unique_filename_callback ) ) {
     2212    if ( $unique_filename_callback && is_callable( $unique_filename_callback ) ) {
    22132213        $filename = $unique_filename_callback( $dir, $name );
    22142214    } else {
Note: See TracChangeset for help on using the changeset viewer.