[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 12:51:37 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: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version:
Severity: normal | Resolution: duplicate
Keywords: | Focuses:
-------------------------------+------------------------
Changes (by SergeyBiryukov):
* status: new => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Old description:
> 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 4100
> {{{#!php
> <?php
> do_action( 'wp_insert_post_data_validation', $post);
> }}}
>
> Thank you for answering me in advance
New description:
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 4100
{{{#!php
<?php
// validate the data before it is inserted into the database
do_action( 'wp_insert_post_data_validation', $post);
}}}
Thank you for answering me in advance
--
Comment:
Hi there, welcome to WordPress Trac!
Thanks for the ticket, we're already tracking this enhancement in #15230.
--
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