WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

#53178 closed enhancement (duplicate)

Add a hook (action) to validate the post before it is inserted into the database

Reported by: lazhar007 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

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
// 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

Change History (1)

#1 @SergeyBiryukov
5 months ago

  • Description modified (diff)
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the ticket, we're already tracking this enhancement in #15230.

Note: See TracTickets for help on using tickets.