Filter
rpress_use_35_media_ui
On this page
Filters whether the admin uses the WordPress 3.5+ media modal for settings upload fields.
The value is localized to the admin script as rpress_vars.new_media_ui. The settings upload button script uses the media modal when the value is the string '1' and falls back to the legacy Thickbox uploader otherwise. It is retained for backward compatibility and rarely needs changing.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$use_media_ui | int | 1 to use the media modal. Defaults to 1. |
Return value#
int. 1 to use the media modal, any other value to use the legacy uploader.
Example#
function my_use_media_ui( $use_media_ui ) {
return 1;
}
add_filter( 'rpress_use_35_media_ui', 'my_use_media_ui' );
Source#
Applied in:
includes/admin/class-rp-admin-assets.php(line 356), inRP_Admin_Assets::admin_scripts()
Was this page helpful?
