upload_post_params
Filter HookDescription
Filters the media upload post parameters.Hook Information
File Location |
wp-admin/includes/media.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2168 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$post_params
|
An array of media upload parameters used by Plupload. |
Usage Examples
Basic Usage
<?php
// Hook into upload_post_params
add_filter('upload_post_params', 'my_custom_filter', 10, 1);
function my_custom_filter($post_params) {
// Your custom filtering logic here
return $post_params;
}
Source Code Context
wp-admin/includes/media.php:2168
- How this hook is used in WordPress core
<?php
2163 * @since 3.1.0 As 'swfupload_post_params'
2164 * @since 3.3.0
2165 *
2166 * @param array $post_params An array of media upload parameters used by Plupload.
2167 */
2168 $post_params = apply_filters( 'upload_post_params', $post_params );
2169
2170 /*
2171 * Since 4.9 the `runtimes` setting is hardcoded in our version of Plupload to `html5,html4`,
2172 * and the `flash_swf_url` and `silverlight_xap_url` are not used.
2173 */
PHP Documentation
<?php
/**
* Filters the media upload post parameters.
*
* @since 3.1.0 As 'swfupload_post_params'
* @since 3.3.0
*
* @param array $post_params An array of media upload parameters used by Plupload.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/media.php
Related Hooks
Related hooks will be displayed here in future updates.