[wp-trac] [WordPress Trac] #53178: Add a hook (action) to validate the post before it is inserted into the database

WordPress Trac noreply at wordpress.org
Tue May 11 03:30:04 UTC 2021


#53178: Add a hook (action) to validate the post before it is inserted into the
database
-------------------------------+------------------------------
 Reporter:  lazhar007          |       Owner:  (none)
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by lazhar007):

 Replying to [ticket:53178 lazhar007]:
 > Hello,
 > I looked in the community for a solution to validate the post-types
 before being inserted into the database to decide whether to continue or
 interrupt the saving but no luck
 > that's why I wish you to add a hook action in post.php in ligne 4093
 > {{{#!php
 > <?php
 >// validate the data before it is inserted into the database
 >do_action( 'wp_insert_post_data_validation', $data,$postarr);
 > }}}
 >
 > Thank you for answering me in advance

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53178#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list