Description
Show or hide rtMedia uploader based on some conditions
Example
/**
* Display rtMedia uploader depending whether $flag is set or not.
*
* @param bool $flag True to show uploader, False to hide.
*
* @return bool True to show uploader, False to hide.
*/
function tmp_rtm_before_rtmedia_uploader_display_callback( $flag ) {
// modify $flag based on some conditions.
return $flag;
}
add_filter( 'before_rtmedia_uploader_display', 'tmp_rtm_before_rtmedia_uploader_display_callback' );