Medias liked by

May you give me the path of the file to change, in personal profile, the text “Medias liked by…” in “Photos liked by…”. Thanks a lot

Hi Rico,
yes you can change that without changing rtMedia files using filters.

Use rtmedia_my_likes_media_page_title filter to show title when you yourself visits your liked media page.

Use rtmedia_user_likes_media_page_title filter to show title when some other user visits your liked media page.

Sorry, maybe I didn’t be clar, I simply want to change the word “Medias” with “Photos”, can you provide me the path? Thanks a lot

Hi Rico,

From this file -> rtmedia-pro/app/main/controllers/media/RTMediaProUserLikes.php, line no. 83 you can change that title.

I gave you filters because in every update of rtMedia-PRO above file will rewritten and all the changes made by you will be vanished which won’t happen if you use above filters.

Can you please tell me how to use the filter? I’m sorry…

Hi Rico,

please check below code.

add_filter( 'rtmedia_my_likes_media_page_title', 'custom_rtmedia_my_likes_media_page_title', 99, 1);  

function custom_rtmedia_my_likes_media_page_title( $title ){  
	return "your title here";  
}  

add_filter( 'rtmedia_user_likes_media_page_title', 'custom_rtmedia_user_likes_media_page_title', 99, 1);  

function custom_rtmedia_user_likes_media_page_title( $title ){  
	return "your title here";  
}

So kind as usual, great assistance

Hi Rico,

I am glad to know that your issue is fixed :slight_smile:

Ritesh, just realized that using:

add_filter( ‘rtmedia_my_likes_media_page_title’, ‘custom_rtmedia_my_likes_media_page_title’, 99, 1);

function custom_rtmedia_my_likes_media_page_title( $title ){
return “Photos liked by me”;
}

add_filter( ‘rtmedia_user_likes_media_page_title’, ‘custom_rtmedia_user_likes_media_page_title’, 99, 1);

function custom_rtmedia_user_likes_media_page_title( $title ){
return “Photos liked by”;
}

I don’t see the username in user’s profiles

Hi Rico,

I thought you just want to do search and replace in that filter.

Please check following code.

function custom_rtmedia_user_likes_media_page_title( $title ){  
        global $media_query_clone;  
	$user = get_userdata ( $media_query_clone['context_id'] );  
        return “Photos liked by ”.$user->user_nicename;  
}

Doesn’t work…

Hi Rico,

We have checked above code on our side again and is working fine.