Adding custom property to Custom Post Type object
-
In the custom theme framework I am developing, I need to associate specialized data with a custom post type upon it’s creation for retrieval at a later time. I was using the custom post type property “description” to store the data in, since it’s not really used for anything. However, this seemed hackish to me, since the data I was storing is not really a description of the post type. It dawned on me that I could just create a new property that was more aptly named for the information that I was wanting to store during the creation of the post type. I tried it out, and it works without issue.
My question is: is there any reason not to use a custom property, and stick with description? I get that this could be a problem if the WordPress team added a property of the same name at some point, but I find this highly unlikely.
Any thoughts?
The topic ‘Adding custom property to Custom Post Type object’ is closed to new replies.