Support » Plugins and Hacks » Hacks » Call to undefined function add_action()

Call to undefined function add_action()

Viewing 2 replies - 1 through 2 (of 2 total)
  • That’s usually what happens when the file is queried directly, and not loaded via WordPress, ie..

    The page was requested like this..


    and not..


    Depending on what your plugin page URL looks like, it may differ to the two above, but should illustrate the point nonetheless.

    Simple if( !function_exists( 'some_wordpress_function' ) ) die('Direct request message to show.'); should fix that for you ..

    thanks mark, i understand now. guess putting an empty index.html in place will prevent google & others to see directory contents (for those instances where webservers are not configured to disallow directory listing), so they won’t try to index the standalone options.php any more.

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