Skip to content
Docs
Get RestroPress

Filter

rpress_use_35_media_ui

Updated
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#

ParameterTypeDescription
$use_media_uiint1 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), in RP_Admin_Assets::admin_scripts()
Was this page helpful?