Soliloquy Documentation

Documentation, Reference Materials, and Tutorials for Soliloquy

White Label Soliloquy

White labeling is a popular thing to do in WordPress, especially when you are making custom websites for clients. Soliloquy allows you to white label strings so that you can turn it into whatever ‘custom’ solution your client needs.

Using the code below, I have turned Soliloquy into a generic “slider” type plugin. All of the strings have been modified to say “Slider” instead of “Soliloquy” where appropriate. Feel free to edit these customizations to fit your own projects. The list of strings below is pretty exhaustive and should cover any instances of the word “Soliloquy” in the plugin.

Add the following code to your active theme’s functions.php file and edit as you require to white label Soliloquy.

add_filter( 'soliloquy_whitelabel', '__return_false' );
add_filter( 'gettext', 'tgm_soliloquy_whitelabel', 10, 3 );
function tgm_soliloquy_whitelabel( $translated_text, $source_text, $domain ) {
    
    // If not in the admin, return the default string.
    if ( ! is_admin() ) {
        return $translated_text;
    }
 
    if ( strpos( $source_text, 'Soliloquy Slider' ) !== false ) {
        return str_replace( 'Soliloquy Slider', 'Slider', $translated_text );
    }

    if ( strpos( $source_text, 'Soliloquy Sliders' ) !== false ) {
        return str_replace( 'Soliloquy Sliders', 'Sliders', $translated_text );
    }

    if ( strpos( $source_text, 'Soliloquy slider' ) !== false ) {
        return str_replace( 'Soliloquy slider', 'slider', $translated_text );
    }

    if ( strpos( $source_text, 'Soliloquy' ) !== false ) {
        return str_replace( 'Soliloquy', 'Slider', $translated_text );
    }
    
    return $translated_text;
    
}
[i]
[i]