custom-post-type-ui icon indicating copy to clipboard operation
custom-post-type-ui copied to clipboard

Move post type description $_POST checking outside of cptui_update_post_type

Open tw2113 opened this issue 4 months ago • 1 comments

We have cptui_update_post_type() which is a standard PHP function outside of a class. In one spot, we reference $_POST, which is getting a complaint about nonce checks.

Let's move our setting of the description value to a dedicated function that WILL check nonce values before plucking out of $_POST.

This would allow for our standard function to still be technically usable if really desired externally, even with it marked internal.

Alternatively, should we exit early in this function, if not admin and/or add nonce checks afterall? Even if we check for nonces and admin before we invoke ourselves?

tw2113 avatar Jul 30 '25 20:07 tw2113