Support » Plugins » Version Safe Category Checking

  • srp0uk


    Hi all, what is the best version safe way of checking that a category exists and then maybe inserting a new category from within a plugin?

    I have read that using the API to do this is the best way, the function category_exists() – there is just one problem with this though.

    This is in the admin functions, and so when the plugin is triggered by a ‘normal’ surfer, the admin functions havent been called and relevant permissions arent set, so I get the error message Fatal error: Call to undefined function: category_exists()

    So, do I need to write entirely new functions, one for version 2.3 and one for 2.2 and lower, or is there another API function that I have overlooked?


  • The topic ‘Version Safe Category Checking’ is closed to new replies.