Table Of Contents

Filter: media upload title & icon

Table Of Contents
Hook
peepso_filter_video_action_icon
peepso_filter_video_action_text
peepso_filter_audio_action_icon
peepso_filter_audio_action_text

 

Plugin PeepSo Audio & Video
Since 2.0.0
Status Active
Args
string

Description #

When users upload video and audio files, the resulting activity title contains an action text, icon and user-entered title. The action text and icon are customizable with these four filters.

Modify the CSS of the icons to change the icon or hide it completely: peepso_filter_video_action_icon – modifies the CSS class of the video icon peepso_filter_audio_action_icon – modifies the CSS class of the audio icon

Modify the action text or disable it (with an empty string) peepso_filter_video_action_text – modifies the action text on a video post peepso_filter_audio_action_text – modifies the action text on an audio post

Examples #

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// change icon on post containing a video upload
add_filter('peepso_filter_video_action_icon', function($icon){
    return 'ps-icon-youtube-play';
});

// change action text on post containing a video upload
add_filter('peepso_filter_video_action_text', function($action){
    return __('shared a video', 'peepso-core');
});

// change icon on post containing an audio upload
add_filter('peepso_filter_audio_action_icon', function($icon){
    return 'ps-icon-headphones';
});

// change action text on post containing an audio upload
add_filter('peepso_filter_audio_action_text', function($action){
    return __('shared a song', 'peepso-core');
});

What are your feelings
Updated on Sep 22, 2023