Changeset 42679 for trunk/src/wp-admin/includes/file.php
- Timestamp:
- 02/09/2018 05:25:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r42678 r42679 123 123 * @since 4.9.0 Added the `$exclusions` parameter. 124 124 * 125 * @param string $folderOptional. Full path to folder. Default empty.126 * @param int $levelsOptional. Levels of folders to follow, Default 100 (PHP Loop limit).127 * @param array$exclusions Optional. List of folders and files to skip.128 * @return bool| array False on failure, Else array of files125 * @param string $folder Optional. Full path to folder. Default empty. 126 * @param int $levels Optional. Levels of folders to follow, Default 100 (PHP Loop limit). 127 * @param string[] $exclusions Optional. List of folders and files to skip. 128 * @return bool|string[] False on failure, else array of files. 129 129 */ 130 130 function list_files( $folder = '', $levels = 100, $exclusions = array() ) { … … 176 176 * @since 4.9.0 177 177 * 178 * @param string $plugin P lugin.179 * @return array File extensions.178 * @param string $plugin Path to the main plugin file from plugins directory. 179 * @return string[] Array of editable file extensions. 180 180 */ 181 181 function wp_get_plugin_file_editable_extensions( $plugin ) { … … 222 222 * @since 4.9.0 Added the `$plugin` parameter. 223 223 * 224 * @param string $plugin Plugin file.225 * @param array $editable_extensions An array of editable plugin file extensions.224 * @param string[] $editable_extensions An array of editable plugin file extensions. 225 * @param string $plugin Path to the main plugin file from plugins directory. 226 226 */ 227 227 $editable_extensions = (array) apply_filters( 'editable_extensions', $editable_extensions, $plugin ); … … 233 233 * Get list of file extensions that are editable for a given theme. 234 234 * 235 * @param WP_Theme $theme Theme .236 * @return array File extensions.235 * @param WP_Theme $theme Theme object. 236 * @return string[] Array of editable file extensions. 237 237 */ 238 238 function wp_get_theme_file_editable_extensions( $theme ) { … … 278 278 * @since 4.4.0 279 279 * 280 * @param array $default_types List of file types. Default types include 'php' and 'css'.280 * @param string[] $default_types List of allowed file types. 281 281 * @param WP_Theme $theme The current Theme object. 282 282 */ … … 338 338 * @since 4.9.0 339 339 * 340 * @param array$args {340 * @param string[] $args { 341 341 * Args. Note that all of the arg values are already unslashed. They are, however, 342 342 * coming straight from `$_POST` and are not validated or sanitized in any way. … … 663 663 * @since 1.5.0 664 664 * 665 * @param string $file File the user is attempting to edit.666 * @param array $allowed_files Optional. Array of allowed files to edit, $filemust match an entry exactly.667 * @return string| null665 * @param string $file File the user is attempting to edit. 666 * @param string[] $allowed_files Optional. Array of allowed files to edit. `$file` must match an entry exactly. 667 * @return string|void Returns the file name on success, dies on failure. 668 668 */ 669 669 function validate_file_to_edit( $file, $allowed_files = array() ) { … … 695 695 * @see wp_handle_upload_error 696 696 * 697 * @param array $file Reference to a single element of $_FILES. Call the function once for each uploaded file.698 * @param array|false $overrides An associative array of names => values to override default variables. Default false.699 * @param string $time Time formatted in 'yyyy/mm'.700 * @param string $action Expected value for $_POST['action'].701 * @return arrayOn success, returns an associative array of file attributes. On failure, returns702 * $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ).697 * @param string[] $file Reference to a single element of `$_FILES`. Call the function once for each uploaded file. 698 * @param string[]|false $overrides An associative array of names => values to override default variables. Default false. 699 * @param string $time Time formatted in 'yyyy/mm'. 700 * @param string $action Expected value for `$_POST['action']`. 701 * @return string[] On success, returns an associative array of file attributes. On failure, returns 702 * `$overrides['upload_error_handler'](&$file, $message )` or `array( 'error'=>$message )`. 703 703 */ 704 704 function _wp_handle_upload( &$file, $overrides, $time, $action ) { … … 718 718 * @since 4.0.0 Converted to a dynamic hook with `$action`. 719 719 * 720 * @param array$file An array of data for a single file.720 * @param string[] $file An array of data for a single file. 721 721 */ 722 722 $file = apply_filters( "{$action}_prefilter", $file );
Note: See TracChangeset
for help on using the changeset viewer.