• Resolved brad_wp

    (@brad_wp)


    Ive just updated my WP installation but am getting the following error when trying to access admin:

    Fatal error: Call to undefined function wp_unslash() in …/public_html/wp-admin/menu.php on line 153

    Looking at Line 153 it appars might be something to do with custom theme but thats a guess.

    $customize_url = add_query_arg( 'return', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'customize.php' );

    The front-end of the site still works fine and shows the admin bar as im logged in, although icons are missing.

    Line 150 to 170 is below

    $menu[60] = array( __('Appearance'), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
    	$submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' );
    
    	$customize_url = add_query_arg( 'return', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'customize.php' );
    	$submenu['themes.php'][6] = array( __( 'Customize' ), 'customize', $customize_url, '', 'hide-if-no-customize' );
    
    	if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
    		$submenu['themes.php'][10] = array(__( 'Menus' ), 'edit_theme_options', 'nav-menus.php');
    	}
    
    	if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize') ) {
    		$customize_header_url = add_query_arg( 'autofocus[control]', 'header_image', $customize_url );
    		$submenu['themes.php'][15] = array( __( 'Header' ), $appearance_cap, $customize_header_url, '', 'hide-if-no-customize' );
    	}
    
    	if ( current_theme_supports( 'custom-background' ) && current_user_can( 'customize') ) {
    		$customize_background_url = add_query_arg( 'autofocus[control]', 'background_image', $customize_url );
    		$submenu['themes.php'][20] = array( __( 'Background' ), $appearance_cap, $customize_background_url, '', 'hide-if-no-customize' );
    	}
    
    	unset( $customize_url );

Viewing 1 replies (of 1 total)
  • Thread Starter brad_wp

    (@brad_wp)

    Update: FIXED
    This is what i did, it may work for you.

    Back up the website
    Complelty delete the website and upload a fresh Wordprss
    Update your wp-config files
    Upload your template you were using from your back up
    And do the same for any other plugins or files with photos in etc that are in a fresh install

    this worked for me, good luck!

Viewing 1 replies (of 1 total)
  • The topic ‘Fatel Error on upgrade’ is closed to new replies.