- rtmedia_query_media_type_filter
- rtm_get_user_favlists
- rtm_favlist_js_strings
- rtm_no_media_in_favlist_message
- rtm_new_favlist_name
- rtm_add_media_select_favlist_label
- rtm_add_media_create_favlist_label
- rtm_add_media_your_favlists_label
- rtm_gallery_create_favlist_label
- rtm_create_favlist_popup_title
- rtm_create_favlist_popup_button
- rtm_edit_favlist_option_lable
- rtm_delete_favlist_option_lable
- rtmedia_favlist_actions
description
- ####rtmedia_query_media_type_filter *** Filter is use to modify media types to be display in favlist.
This example will allow to display only music in favlist.
add_filter( 'rtmedia_query_media_type_filter', 'rtm_query_media_type_filter' );
function rtm_query_media_type_filter( $filter_type ) {
if ( isset( $filter_type['value'] ) ) {
$filter_type['value'] = array( 'music' );
}
return $filter_type;
}
add_filter( 'rtm_get_user_favlists', 'rtmedia_get_user_favlists', 10, 2 );
function rtmedia_get_user_favlists( $favlists, $user_id ) {
error_log( var_export( $favlists, true ) );
return $favlists;
}
add_filter( 'rtm_favlist_js_strings', 'rtmedia_favlist_js_msgs', 10, 1 );
function rtmedia_favlist_js_msgs( $messages ) {
$messages['rtmedia_favlist_created_msg'] = 'Favlist Album created successfully.';
$messages['rtmedia_favlist_creation_error_msg'] = 'Something went wrong While creating the Favlist Album. Please try again.';
return $messages;
}
- ####rtm_no_media_in_favlist_message *** Filter is use to modify no media found. message in edit favlist panel.
add_filter( 'rtm_no_media_in_favlist_message', 'rtmedia_no_media_in_favlist_message', 10, 1 );
function rtmedia_no_media_in_favlist_message ( $message ) {
return 'No media found in current favlist Album.';
}
add_filter( 'rtm_new_favlist_name' , 'rtmedia_new_favlist_name' );
function rtmedia_new_favlist_name( $name ) {
if ( '' == $name ) {
$name = 'My Favlist';
} else {
$name = 'rt-'. $name;
}
return $name;
}
add_filter( 'rtm_add_media_select_favlist_label', 'rtmedia_add_media_select_favlist_title', 10, 1 );
function rtmedia_add_media_create_favlist_label( $label ) {
return 'To New Favlist Album';
}
add_filter( 'rtm_add_media_create_favlist_label', 'rtmedia_add_media_create_favlist_title', 10, 1 );
function rtmedia_add_create_create_favlist_label( $label ) {
return 'Add Favlist Album';
}
- ####rtm_add_media_your_favlists_label *** Filter to modify Add to Favlist lable in option tab while viewing media.
add_filter( 'rtm_add_media_your_favlists_label', 'rtmedia_add_media_your_favlists_label' );
function rtmedia_add_media_your_favlists_label( $label ) {
return 'favlists Album';
}
add_filter( 'rtm_gallery_create_favlist_label', 'rtmedia_add_media_create_favlist_label', 10, 1 );
function rtmedia_add_media_create_favlist_label( $label ) {
return 'Add Favlist Album';
}
add_filter( 'rtm_create_favlist_popup_title', 'rtmedia_create_favlist_popup_title', 10, 1 );
function rtmedia_create_favlist_popup_title( $title ) {
return 'Create your Favlist Album';
}
- ####rtm_create_favlist_popup_button *** Filter to modify Create Button lable in create new favlist popup.
add_filter( 'rtm_create_favlist_popup_button', 'rtmedia_create_favlist_popup_button', 10, 1 );
function rtmedia_create_favlist_popup_button( $title ) {
return 'Add Favlist';
}
- ####rtm_edit_favlist_option_lable *** Filter to modify Edit lable in option tab while viewing Favlist.
add_filter( 'rtm_edit_favlist_option_lable', 'rtmedia_edit_favlist_option_lable' );
function rtmedia_edit_favlist_option_lable( $edit_lable ) {
return 'Edit Favlist Album';
}
- ####rtm_delete_favlist_option_lable *** Filter to modify Delete lable in option tab while viewing Favlist.
add_filter( 'rtm_delete_favlist_option_lable', 'rtmedia_delete_favlist_option_lable' );
function rtmedia_delete_favlist_option_lable( $delete_lable ) {
return 'Delete Favlist Album';
}