Change default media tab redirection

rtMedia sets the tab All as a default opening tab when we select the Media tab.

Default tab for profile media

default-tab-for-profile-media

If you wish to keep the opening tab different than the All for the user profile then you will need to use filter named rtmedia_media_tab_slug.

Here is the sample code to replace the default tab with Album tab. You can place this code to your theme’s functions.php file :

add_filter('rtmedia_media_tab_slug', 'custom_rtmedia_default_media_slug', 5, 1);
function custom_rtmedia_default_media_slug( $mediaslug ){
    $mediaslug = RTMEDIA_MEDIA_SLUG . "/".RTMEDIA_ALBUM_SLUG;
    return $mediaslug;
}

default-tab-for-profile-media

Default tab for BuddyPress group media

Use the filter rtmedia_group_media_tab_slug to change default tab for BuddyPress group media.

Here is the sample code to replace the default tab with Album tab for BuddyPress group media. You can place this code to your theme’s functions.php file :

add_filter('rtmedia_group_media_tab_slug', 'custom_rtmedia_default_group_media_tab_slug', 5, 1);
function custom_rtmedia_default_group_media_tab_slug( $mediaslug ){
    $mediaslug = RTMEDIA_MEDIA_SLUG . "/".RTMEDIA_ALBUM_SLUG;
    return $mediaslug;
}

NOTE: You can find other rtMedia Defined Constants here – rtMedia Defined Constants