Forums

Admin Panel additions (5 posts)

  1. zeeg
    Member
    Posted 7 years ago #

    I'm not sure if this is intended, but when I had my plugin named xgallery.php and I added a hook to include the "xgallery.php" in wp-admin/ to the Manage tab, it error'd because it was the same name, it tried reloading the plugin file, it worked fine once i made it xgallery-options.php in the wp-admin/ and changed the link in the hook

  2. Ryan Boren
    WordPress Dev
    Posted 7 years ago #

    Doing it all in one file requires some special handling. function_exists() must be used to avoid defining the functions twice.

  3. zeeg
    Member
    Posted 7 years ago #

    No thats not the thing, I had wp-admin/xgallery.php and wp-content/plugins/xgallery.php, when I set the plugin file to add xgallery.php to the admin menu, and i clicked it, it tried loading up the plugins/xgallery.php instead of the wp-admin/xgallery.php

  4. Ryan Boren
    WordPress Dev
    Posted 7 years ago #

    All plugins and plugin pages must be in the plugins directory or a subdirectory thereof. You can create an xgallery subdirectory in plugins/ and put xgallery.php and xgallery-admin.php in there.

  5. zeeg
    Member
    Posted 7 years ago #

    ooo didnt know it could load from there :)
    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.