lucaazori
Member
Posted 1 year ago #
Hi, i`m new with wordpress, in the installation, i have the following error:
Fatal error: Call to undefined function is_admin() in C:\wamp\www\wordpress\wp-admin\includes\comment.php on line 162
i realize that the function is_admin does not exist in <strong>functions.php</strong> file, but how can i add this function ? whats its code??
thx in advance :)
is_admin is a default WordPress function - so it's possible you may need to download WordPress again and overwrite the files.
lucaazori
Member
Posted 1 year ago #
thx, please how can i know the version of my wordpress to download it again, or it does not matter ??
lucaazori
Member
Posted 1 year ago #
i would ask where should the source code of is_admin() function be ??
also, i have downloaded the version 3.0.4 and i didn`t find this function the overwrite it in mine :( please help
If this is a new install, simply re-upload a fresh copy of WordPress 3.0.4.
lucaazori
Member
Posted 1 year ago #
i check it, and i found the source code of the function:
in /wp-admin/load-scripts.php -> line 68:
function is_admin() {return true;}'
in /wp-admin/load-styles.php -> line 68:
<code>function is_admin() {return true;}</code>
and in /wp-includes/load.php -> line 572:
function is_admin() {
if ( defined( 'WP_ADMIN' ) )
return WP_ADMIN;
return false;
}`
so!! it look strange to me that the function is UNDEFINED :(
If it's not defined on your install, then something's wrong. Seriously. Redownload the whole wordpress install and copy it to your server. Something did not get uploaded correctly the first time.