Medias liked by


#1

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


#2

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.


#3

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


#4

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.


#5

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


#6

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";  
}

#7

So kind as usual, great assistance


#8

Hi Rico,

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


#9

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


#10

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;  
}

#11

Doesn’t work…


#12

Hi Rico,

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


#13