Skip to content

Instantly share code, notes, and snippets.

@BurlesonBrad
Last active December 16, 2018 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BurlesonBrad/e44dfdc82333042c2be6dafb257303fc to your computer and use it in GitHub Desktop.
Save BurlesonBrad/e44dfdc82333042c2be6dafb257303fc to your computer and use it in GitHub Desktop.
Changing Text in LIfterLMS
<?php
/**
* Plugin Name: Lift The Text
* Plugin URI: https://yourmom.com
* Description: Engage Maverick | ENGAGE! Make a conversation with your customer and customize EVERY piece of Text!
* Version: 1
* Author: Brad
* Author URI: https://yourmom.com
* Requires at least: 4.9.6
* Tested up to: 5.0-alpha-43049
**/
add_filter( 'gettext', 'bkg_text_strings', 99, 3 );
function bkg_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Login' :
$translated_text = __( 'Members Only Login', 'lifterlms' );
break;
}
switch ( $translated_text ) {
case 'Register' :
$translated_text = __( 'First Time Registration', 'lifterlms' );
break;
}
switch ( $translated_text ) {
case 'Billing Information' :
$translated_text = __( 'Your Information', 'lifterlms' );
break;
}
switch ( $translated_text ) {
case 'Payment Details' :
$translated_text = __( 'Card or PayPal', 'lifterlms' );
break;
}
switch ( $translated_text ) {
case 'Buy Now' :
$translated_text = __( 'CLICK HERE and Lets Get To Work', 'lifterlms' );
break;
}
switch ( $translated_text ) {
case 'Order Summary' :
$translated_text = __( 'Your Summary', 'lifterlms' );
break;
}
switch ( $translated_text ) {
case 'FREE' :
$translated_text = __( 'Included', 'lifterlms' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'bkg_text_strings', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment