• 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 ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Anonymous User

    (@anonymized-3085)

    is_admin is a default WordPress function – so it’s possible you may need to download WordPress again and overwrite the files.

    Thread Starter lucaazori

    (@lucaazori)

    thx, please how can i know the version of my wordpress to download it again, or it does not matter ??

    Thread Starter lucaazori

    (@lucaazori)

    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.

    Thread Starter lucaazori

    (@lucaazori)

    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 ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘undefined function is_admin()’ is closed to new replies.