customisation

Hooks

– This article requires web developer skills and is not covered by our support.

Settings

Solid Post Likes uses Carbon Fields for managing the plugin settings: https://docs.carbonfields.net/#/quickstart

This is the file that manages the settings: views/SolidPostLikesAdmin.php

Carbon Fields provides the following hooks: https://docs.carbonfields.net/#/advanced-topics/php-hooks

Like Button

The like button has two filters you can use to add output before and after the button:

before_oacs_spl_buttonafter_oacs_spl_button

Example usage:

function oacs_before_my_likes($before_content) 
    {
        $before_content = "Sometimes you need something prior.";
        return $before_content;
    }
add_filter ('before_oacs_spl_button', 'oacs_before_my_likes', 10);

function oacs_after_my_likes($after_content) 
    {
        $after_content = "Sometimes you need something in hindsight.";
        return $after_content;
    }
add_filter ('after_oacs_spl_button', 'oacs_after_my_likes', 10);

Result:

Translation / String customisation

Solid Post Likes provides a language file via the: languages folder. We like using Loco Translate for editing them.

Link: https://wordpress.org/plugins/loco-translate/

If you want to customise certain terms in your language you can edit the language file for you language and save these edits using the System localtion Loco offers you.

Scroll to Top