WordPress.org

Ready to get started?Download WordPress

Forums

prevent url values (2 posts)

  1. cannon303
    Member
    Posted 2 years ago #

    Hi does anyone know if there is a way to easily write a function to stop certain url values from being created? I've got a separate database and need to prevent the user in the wordpress control panel from creating a page url that could clash.

    So for instance, let's say I've got a page: http://www.mysite.com/admin which is outside of wordpress and handles certain database connections and functionality to my other non wordpress database, I would therefore want to make sure that the user of the wordpress control panel couldn't inadvertently create a page that ended up with the url of http://www.mysite.com/admin. Or is there another way? I guess I may need to think outside the box on this one. However I want to steer away from plugins so will need to write this function as I want to future proof it.

    thanks for your help

  2. s_ha_dum
    Member
    Posted 2 years ago #

    There are several post add/edit hooks you could use. Just kill the add/edit if some of the values clash.

Topic Closed

This topic has been closed to new replies.

About this Topic