Changeset 49845
- Timestamp:
- 12/20/2020 04:13:23 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r49616 r49845 726 726 * @param string[] $file Reference to a single element of `$_FILES`. 727 727 * Call the function once for each uploaded file. 728 * @param string[]|false $overrides An associative array of names => values 729 * to override default variables. Default false. 728 * @param array|false $overrides { 729 * An array of override parameters for this file, or boolean false if none are provided. 730 * 731 * @type callable $upload_error_handler Function to call when there is an error during the upload process. 732 * @see wp_handle_upload_error(). 733 * @type callable $unique_filename_callback Function to call when determining a unique file name for the file. 734 * @see wp_unique_filename(). 735 * @type string[] $upload_error_strings The strings that describe the error indicated in 736 * `$_FILES[{form field}]['error']`. 737 * @type bool $test_form Whether to test that the `$_POST['action]` parameter is as expected. 738 * @type bool $test_size Whether to test that the file size is greater than zero bytes. 739 * @type bool $test_type Whether to test that the mime type of the file is as expected. 740 * @type string[] $mimes Array of allowed mime types keyed by their file extension regex. 741 * } 730 742 * @param string $time Time formatted in 'yyyy/mm'. 731 743 * @param string $action Expected value for `$_POST['action']`. … … 746 758 * 747 759 * The dynamic portion of the hook name, `$action`, refers to the post action. 760 * Possible filter names include: 761 * 762 * - `wp_handle_sideload_prefilter` 763 * - `wp_handle_upload_prefilter` 748 764 * 749 765 * @since 2.9.0 as 'wp_handle_upload_prefilter'. 750 766 * @since 4.0.0 Converted to a dynamic hook with `$action`. 751 767 * 752 * @param string[] $file An array of data for a single file.768 * @param string[] $file An array of data for the file. Reference to a single element of `$_FILES`. 753 769 */ 754 770 $file = apply_filters( "{$action}_prefilter", $file ); 771 772 /** 773 * Filters the override parameters for a file before it is uploaded to WordPress. 774 * 775 * The dynamic portion of the hook name, `$action`, refers to the post action. 776 * Possible filter names include: 777 * 778 * - `wp_handle_sideload_overrides` 779 * - `wp_handle_upload_overrides` 780 * 781 * @since 5.7.0 782 * 783 * @param array|false $overrides An array of override parameters for this file. Boolean false if none are 784 * provided. @see _wp_handle_upload(). 785 * @param string[] $file An array of data for the file. Reference to a single element of `$_FILES`. 786 */ 787 $overrides = apply_filters( "{$action}_overrides", $overrides, $file ); 755 788 756 789 // You may define your own function and pass the name in $overrides['upload_error_handler']. -
trunk/src/wp-admin/includes/media.php
r49384 r49845 431 431 * @since 5.3.0 The `$post_id` parameter was made optional. 432 432 * 433 * @param array $file_array Array similar toa `$_FILES` upload array.433 * @param array $file_array Array that represents a `$_FILES` upload array. 434 434 * @param int $post_id Optional. The post ID the media is associated with. 435 435 * @param string $desc Optional. Description of the side-loaded file. Default null. -
trunk/src/wp-includes/functions.php
r49790 r49845 2792 2792 * 2793 2793 * @param string $filename File name or path. 2794 * @param string[] $mimes Optional. Array of mime types keyed by their file extension regex.2794 * @param string[] $mimes Optional. Array of allowed mime types keyed by their file extension regex. 2795 2795 * @return array { 2796 2796 * Values for the extension and mime type. … … 2834 2834 * @param string $filename The name of the file (may differ from $file due to $file being 2835 2835 * in a tmp directory). 2836 * @param string[] $mimes Optional. Array of mime types keyed by their file extension regex.2836 * @param string[] $mimes Optional. Array of allowed mime types keyed by their file extension regex. 2837 2837 * @return array { 2838 2838 * Values for the extension, mime type, and corrected filename.
Note: See TracChangeset
for help on using the changeset viewer.