Make WordPress Core

Opened 5 years ago

Closed 5 years 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:
Priority: normal Milestone:
Component: Posts, Post Types Version:
Severity: normal Keywords:
Cc: Focuses:

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 years ago

  • Description modified (diff)
  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → 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.