rtmedia_like_label_text & rtmedia_like_undo_label_text

To set icons for “Like” and “Unlike” text, add the below code snippet in your theme’s functions.php file.

class RTMedia_Like_Change_Text {

    // Variable for like image.
    private static $like_image;

    // Variable for unlike image.
    private static $unlike_image;

    public function __construct() {
        self::$like_image = '<img src="http://cdn.shopify.com/s/files/1/1052/8468/t/4/assets/heart_icon2-15.png" />';
        self::$unlike_image = '<img src="https://cdn6.giltcdn.com/images/share/uploads/0000/0005/0526/505264777/icon.png" />';

        // Set icon for like and unlike(initially).
        add_filter( 'rtmedia_like_label_text', array( $this, 'set_icon_for_like' ) );

        // Set icon for Unlike when unlike is clicked.
        add_filter( 'rtmedia_like_undo_label_text', array( $this, 'set_icon_for_unlike' ) );

    public static function set_icon_for_like( $like_text ) {
        switch ( strtolower( $like_text ) ) {
            case 'like':
                $like_text = self::$like_image;

            case 'unlike';
                $like_text = self::$unlike_image;
        return $like_text;

    public static function set_icon_for_unlike() {
        return self::$unlike_image;

new RTMedia_Like_Change_Text();


Below are the screenshots which show how it would look after adding the above code snippet.

When the user likes a media:


When the user unlikes a media: