WordPress.org

Make WordPress Core

Ticket #19121: 19121.2.diff

File 19121.2.diff, 732 bytes (added by swissspidy, 5 years ago)
  • src/wp-includes/functions.php

    diff --git src/wp-includes/functions.php src/wp-includes/functions.php
    index be01132..c908287 100644
    function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) 
    19931993                }
    19941994        }
    19951995
    1996         return $filename;
     1996        /**
     1997         * Filter the filename.
     1998         *
     1999         * @since 4.5.0
     2000         *
     2001         * @param  string   $filename                 File name.
     2002         * @param  string   $ext                      File extension.
     2003         * @param  string   $dir                      Directory.
     2004         * @param  callable $unique_filename_callback Callback. Default null.
     2005         */
     2006        return apply_filters( 'wp_unique_filename', $filename, $ext, $dir, $unique_filename_callback );
    19972007}
    19982008
    19992009/**