• I’m trying to use the following code to remove the Links menu from my WordPress admin, and I’m receiving the following error:

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/frugal9/public_html/wp-content/themes/thesis_18/custom/functions/admin.php on line 32

    function remove_menu_items() {
      global $menu;
      $restricted = array(__('Links'));
      end ($menu);
      while (prev($menu)){
        $value = explode(' ',$menu[key($menu)][0]);
        if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){
          unset($menu[key($menu)]);}
        }
      }
    
    add_action('admin_menu', 'remove_menu_items');

    Where is the error in this code? Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Unexpected T_CONSTANT_ENCAPSED_STRING’ is closed to new replies.