Media tab filters

Description

Add or modify media tabs title or label using following filters.

Filter to change media option tab label.

 add_filter( 'rtm_gallery_option_label','rtmedia_option_text_callback',10 ,1 );
 function rtmedia_option_text_callback( $option_txt ) {
 	$option_txt = 'Media Option';
 	return $option_txt;
 }

Filter to change media upload tab title attribute text.

 add_filter( 'rtm_gallery_upload_title_label','rtm_gallery_upload_title_label_callback',10,1 );
 function rtm_gallery_upload_title_label_callback( $album ) {
 	return 'Publish media';
 }

Filter to change media upload tab label text.

add_filter( 'rtm_gallery_upload_label','rtm_gallery_upload_label_callback',10,1 );
 function rtm_gallery_upload_label_callback( $album ) {
 	return 'Upload new media';
 }

Since media tabs for Non logged in user is different because of permission so in order to change media tabs text we have two filters.

  • rtm_album_upload_title_label
  • rtm_album_upload_label

rtm_album_upload_title_label

Filter to change media upload tab label for Non logged in user.

add_filter( 'rtm_album_upload_title_label','rtm_album_upload_title_label_callback',10,1 );
 function rtm_album_upload_title_label_callback( $album ) {
 	return 'Upload new media';
 }

rtm_album_upload_label

Filter to change media upload tab label for Non logged in user.

add_filter( 'rtm_album_upload_label','rtm_album_upload_label_callback',10,1 );
 function rtm_album_upload_label_callback( $album ) {
 	return 'Upload new media';
 }