wppaste
WordPress

wp_unique_filename( string $dir, string $filename, callable $unique_filename_callback = null ): string

Since
2.5.0
Source
wp-includes/functions.php:2553
Gets a filename that is sanitized and unique for the given directory.

Description

If the filename is not unique, then a number will be added to the filename before the extension, and will continue adding numbers until the filename is unique.

The callback function allows the caller to use their own method to create unique file names. If defined, the callback should take three arguments:

  • directory, base filename, and extension - and return a unique filename.

Compatibility

WordPress
since 2.5.0
PHP
7.4–8.6-dev
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.

Parameters

$dirstring
Directory.
$filenamestring
File name.
$unique_filename_callbackcallableoptional
Callback. Default null.Default: null

Return value

string
New filename, if given wasn't unique.

Performance profile

How much work a call to wp_unique_filename() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.

Cost class
Heavy

Reads or writes the filesystem via file_exists().

Scaling
Scales with input

The body loops, so the work grows with what you pass in.

Instructions
71–181

Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 323.

Plugin surface
2 hooks

Third-party callbacks on 'pre_wp_unique_filename_file_list', 'wp_unique_filename' run inside this call, and their cost is not bounded by anything here.

Called by
8

8 places in core call this, so the cost is paid more often than your own code shows.

What it touches

  • hookthird-party callbacksapply_filters()called directly
  • filesystemfilesystem accessfile_exists()called directly

Further down the call graph this can also reach option, cache, serialize, query and transient. Those are the worst case, several calls deep and usually down an error path, not what a normal call pays.

What one call costs · 200 distinct outcomes

One number would be a lie: the work depends on which branch runs. These are every distinct cost wp_unique_filename() can have, taken from its control-flow graph on PHP 8.5.

WhenInstructionsCalls it makes
$name !== false && !file_exists() && !$lc_ext71–74sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), apply_filters()
$name !== false && !file_exists() && $lc_ext77–81sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), apply_filters()
$name !== false && !file_exists() && !$lc_ext78–83sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext81–82sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), apply_filters()
$name !== false && !file_exists() && $lc_ext84–90sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext87–89sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext88–91sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files)94–101sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext94–98sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && empty($output_formats[$mime_type]) && empty($output_formats)95–105sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files)99–106sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files)100–107sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), apply_filters()
188 further outcomes, up to 181 instructions
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files)100–108sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), apply_filters()
$name !== false && !file_exists() && $lc_ext && empty($output_formats[$mime_type]) && empty($output_formats)101–112sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && empty($output_formats[$mime_type]) && empty($output_formats)102–114sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext104–117sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names()104–106sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files)104–109sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && empty($output_formats[$mime_type]) && empty($output_formats)105–113sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files)105–112sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files)105–113sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files)106–114sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()107–111sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && empty($output_formats[$mime_type]) && empty($output_formats)108–121sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names()109–111sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files)109–114sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names()110–112sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext110–124sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names()110–113sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files)110–115sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files)110–116sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), apply_filters()
$name !== false && !file_exists() && !$lc_ext111–126sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && empty($output_formats[$mime_type]) && empty($output_formats)111–120sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files)111–119sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && empty($output_formats[$mime_type]) && empty($output_formats)112–122sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()113–118sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()114–120sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext114–125sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names()114sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names()115–117sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names()115–118sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files)115–120sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files)115–121sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()116–123sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names()116–119sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files)116–122sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()117–119sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext117–133sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)118–132sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && empty($output_formats[$mime_type]) && empty($output_formats)118–129sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names()119sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()120–127sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names()120sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext120–132sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names()120–121sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext121–134sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names()121–124sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files)121–127sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()122–130sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()123–132sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)123–137sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()123–126sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)124–138sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)124–139sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()124–128sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names()125sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names()125–126sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()126–131sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names()126–127sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files)127–144sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext127–141sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)128–137sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)128–140sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)129–143sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()129–139sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)129–144sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()130–138sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)130–145sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()130–135sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names()131–132sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files)132–149sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()132–138sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)133–142sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files)133–150sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files)133–151sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()133–140sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)133–145sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)134–143sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)134–144sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)134–146sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)134–147sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()135–143sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)135–150sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()136–144sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()136–145sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names()137–149sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files)137–152sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)138–145sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files)138–155sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files)138–156sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()139–150sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)139–148sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)139–149sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files)139–157sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)139–151sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()139–147sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)139–152sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()140–143sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()140–146sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)140–150sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)140–153sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()141–149sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()141–150sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names()142–154sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()142–151sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files)142–157sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names()143–155sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names()143–156sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)143–150sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files)143–158sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files)143–159sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()144–155sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)144–151sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)144–152sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files)144–162sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()145–148sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()145–156sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()145–157sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()145–151sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)145–155sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats)145–158sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()146–149sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()146–150sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()146–152sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()146–153sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names()147–157sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()147–156sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names()148–160sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names()148–161sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files)148–163sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files)148–164sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()149–155sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()149–158sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names()149–162sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)149–156sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)149–157sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files)149–165sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()150–151sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()150–161sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()150–162sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)150–158sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()151–154sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()151–155sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()151–163sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()151–157sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()151–158sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()152–156sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names()152–162sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()152–159sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names()153–163sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names()153–164sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()154–160sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()154–163sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names()154–167sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files)154–170sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()155–161sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()155–162sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()155–156sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()155–164sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()155–165sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats)155–163sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()156–157sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()156–158sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()156–168sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()157–161sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()157–164sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names()158–168sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names()158–169sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()159–163sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names()159–170sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()160–166sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()160–167sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()160–169sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()160–170sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()161–168sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()161–162sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()161–163sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()161–171sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()162–164sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()164–168sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names()164–175sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()165–169sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()165–170sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()166–173sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && !empty($alt_filenames) && $i && !_wp_check_alternate_file_names()166–176sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && empty($output_formats[$mime_type]) && empty($output_formats) && !empty($alt_filenames) && !_wp_check_alternate_file_names()167–169sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && !$lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()170–174sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files !== null && !empty($files) && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()170–175sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()171–176sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()
$name !== false && $value && $lc_ext !== false && !file_exists() && $lc_ext && is_dir() && $dir && $files === null && !empty($files) && $i && !_wp_check_existing_file_names() && !empty($alt_filenames) && !_wp_check_alternate_file_names()176–181sanitize_file_name(), pathinfo(), pathinfo(), pathinfo(), wp_check_filetype(), wp_get_upload_dir(), strtolower(), trailingslashit(), preg_quote(), file_exists(), file_exists(), is_dir(), apply_filters(), scandir(), array_diff(), _wp_check_existing_file_names(), wp_get_image_editor_output_format(), array_intersect(), array_diff(), _wp_check_alternate_file_names(), apply_filters()

This body has more branch combinations than are worth enumerating, so the table covers the outcomes found first rather than every one that exists.

Across PHP versions

PHPCompiledExecutedBranchesNotes
8.6-dev32371–18135
8.532371–18135
8.432371–1813534 fewer instructions than PHP 8.3
8.335771–18835
8.235771–18835
8.135771–188351 fewer instruction than PHP 7.4
7.435871–18935

An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.

Hooks and filters fired · 2

2 hooks fire while wp_unique_filename() runs, in this order:

  1. apply_filters( pre_wp_unique_filename_file_list )filterline 2673 (+120 into the body)

    Filters the file list used for calculating a unique filename for a newly added file.

  2. apply_filters( wp_unique_filename )filterline 2797 (+244 into the body)

    Filters the result when generating a unique file name.

Uses · 11

Used by · 8

Source code

function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) {	// Sanitize the file name before we begin processing.	$filename = sanitize_file_name( $filename );	$ext2     = null; 	// Initialize vars used in the wp_unique_filename filter.	$number        = '';	$alt_filenames = array(); 	// Separate the filename into a name and extension.	$ext  = pathinfo( $filename, PATHINFO_EXTENSION );	$name = pathinfo( $filename, PATHINFO_BASENAME ); 	if ( $ext ) {		$ext = '.' . $ext;	} 	// Edge case: if file is named '.ext', treat as an empty name.	if ( $name === $ext ) {		$name = '';	} 	/*	 * Increment the file number until we have a unique file to save in $dir.	 * Use callback if supplied.	 */	if ( $unique_filename_callback && is_callable( $unique_filename_callback ) ) {		$filename = call_user_func( $unique_filename_callback, $dir, $name, $ext );	} else {		$fname = pathinfo( $filename, PATHINFO_FILENAME ); 		// Always append a number to file names that can potentially match image sub-size file names.		if ( $fname && preg_match( '/-(?:\d+x\d+|scaled|rotated)$/', $fname ) ) {			$number = 1; 			// At this point the file name may not be unique. This is tested below and the $number is incremented.			$filename = str_replace( "{$fname}{$ext}", "{$fname}-{$number}{$ext}", $filename );		} 		/*		 * Get the mime type. Uploaded files were already checked with wp_check_filetype_and_ext()		 * in _wp_handle_upload(). Using wp_check_filetype() would be sufficient here.		 */		$file_type = wp_check_filetype( $filename );		$mime_type = $file_type['type']; 		$is_image    = ( ! empty( $mime_type ) && str_starts_with( $mime_type, 'image/' ) );		$upload_dir  = wp_get_upload_dir();		$lc_filename = null; 		$lc_ext = strtolower( $ext );		$_dir   = trailingslashit( $dir ); 		/*		 * If the extension is uppercase add an alternate file name with lowercase extension.		 * Both need to be tested for uniqueness as the extension will be changed to lowercase		 * for better compatibility with different filesystems. Fixes an inconsistency in WP < 2.9		 * where uppercase extensions were allowed but image sub-sizes were created with		 * lowercase extensions.		 */		if ( $ext && $lc_ext !== $ext ) {			$lc_filename = preg_replace( '|' . preg_quote( $ext ) . '$|', $lc_ext, $filename );		} 		/*		 * Increment the number added to the file name if there are any files in $dir		 * whose names match one of the possible name variations.		 */		while ( file_exists( $_dir . $filename ) || ( $lc_filename && file_exists( $_dir . $lc_filename ) ) ) {			$new_number = (int) $number + 1; 			if ( $lc_filename ) {				$lc_filename = str_replace(					array( "-{$number}{$lc_ext}", "{$number}{$lc_ext}" ),					"-{$new_number}{$lc_ext}",					$lc_filename				);			} 			if ( '' === "{$number}{$ext}" ) {

Changelog

Introduced in 2.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.