I tried to insert code into my customizer_class.php file in Wordpress. I got code from this page: http://vibethemes.com/documentation/wplms/knowledge-base/removing-instructors-profile-link-from-name-in-course-page/ and saved my file with the code.
However the code didn't work. I deleted the code and updated the file. However I got this error:
Parse error: syntax error, unexpected 'return' (T_RETURN), expecting function (T_FUNCTION)
Now practically all of my website refused to work and spits back the above error on nearly every page I access. I can't even log in as admin on my Wordpress website due to this error.
Here is the code that I have right now with the code I originally tried to put in removed.
<?php
if(!class_exists('WPLMS_Customizer_Plugin_Class'))
{
class WPLMS_Customizer_Plugin_Class // We'll use this just to avoid function name conflicts
{
public function __construct(){
add_filter('wplms_course_nav_menu',array($this,'wplms_course_nav_menu'));
} // END public function __construct
public function activate(){
// ADD Custom Code which you want to run when the plugin is activated
}
public function deactivate(){
// ADD Custom Code which you want to run when the plugin is de-activated
}
// ADD custom Code in clas
function wplms_course_nav_menu($menu_array){
$units = bp_course_get_curriculum_units(get_the_ID());
if(!is_Array($units) || !count($units)){
unset($menu_array['curriculum']);
}
return $menu_array;
}
} // END class WPLMS_Customizer_Class
} // END if(!class_exists('WPLMS_Customizer_Class'))
?>
I think that I might have deleted necessary code when removing the ineffective extra code but I have no clue what the original file looked like. Even if I can find what it looked like, WP admin is not functioning due to the error so fixing it is difficult.