Fatal error: unable to update wp_is_mobile ()

I got this fatal error when I update wordpress to Newest today. I use only the corporate theme. Line 126 is the last line of code. Does anyone have an idea what this is? The theme has a responsive design.

http://themeforest.net/item/barely-corporate-responsive-wordpress-theme/93069?WT.ac=search_item&WT.seg_1=search_item&WT.z_author=ThemeBlvd

Fatal error: cannot update wp_is_mobile () (previously declared in / home / chilinbk / public _html / kunde / tkh / wp-includes / vars.php: 107) in / home / chilinbk / public_html / kunde / tkh / wp- includes / vars.php on line 126

if ( isset($is_mobile) )
    return $is_mobile;

if ( empty($_SERVER['HTTP_USER_AGENT']) ) {
    $is_mobile = false;
} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false // many mobile devices (all iPhone, iPad, etc.)
    || strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false
    || strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false
    || strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false
    || strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false
    || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) {
        $is_mobile = true;
} else {
    $is_mobile = false;
}

return $is_mobile;

}

+5
source share
4 answers

Got it!

wp-content\plugins\sitepress-multilingual-cms\sitepress.php

if ( function_exists('is_multisite') && is_multisite() ) {
    include_once( ABSPATH . WPINC . '/vars.php' );
}

/wp -includes/vars.php, ​​ wp_is_mobile(). WordPress vars.php .

WP 3.4 , vars.php . .

, wpml , WordPress.

, : 21-24 "wp-content\plugins\sitepress-multilingual-cms\sitepress.php"

, WPML .

+4

, , functions.php :

function wp_is_mobile() {
   // ... the code
}

, , , :

if (function_exists('wp_is_mobile')) {
    function wp_is_mobile() {
       // ... the code
    }
}

, 3.4.

, , . - . .

+1

. WPML, wrapping , WP ...

!

+1

, WPML 2.5.1 WP 3.4, , .

Fatal error: call to undefined function wp_is_mobile () in / home / MY _USERNAME / public_html / wp-includes / theme.php on line 1606

I do not know what to do next?

-------- found a job around ---------

As long as you do not connect WPML network plugins to the super-administrator when installing multisite WP, I do not get an error. Activate them yourself.

It would be nice if the network was activated. WPML says it is compatible with several types: http://wpml.org/documentation/support/multisite-support/

+1
source

All Articles