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

    example.com/wp-content/plugins/YOUR_PLUGIN/options.php

    and not..

    example.com/wp-admin/admin.php?YOUR_PLUGIN/options.php
    or
    example.com/wp-admin/admin.php?options.php

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

    Thread Starter Frank Goossens

    (@futtta)

    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.