I’ve never installed an mu plugin before, and when I copied the following code, here’s what I get when attempting to login:
Parse error: syntax error, unexpected ‘’ (T_NS_SEPARATOR), expecting identifier (T_STRING) in /home/downlin4/public_html/wp-content/mu-plugins/s2-hacks.php on line 10
Here’s the code I installed with a slight modification to the if, then, else logic:
<?php
/*
Plugin Name: s2-hacks
Description: This is just a test.
Author:
Version: 1.0
Author URI:
*/
function kts_text_context_changes( $translated, $original, $context, $domain ) {
if ( $domain == 's2member' && $context == 's2member-front' ) {
if ( $original == ‘My Account' ) {
$translated = ‘Affiliate Dashboard';
}
}
return $translated; // return modified text
}
add_filter( 'gettext_with_context', 'kts_text_context_changes', 10, 4 );
?>
Any suggestions as to what I am doing wrong?
Thanks!