Changeset 21921 for trunk/wp-includes/post.php
- Timestamp:
- 09/19/2012 09:43:35 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r21847 r21921 2634 2634 $post_date = current_time('mysql'); 2635 2635 2636 // validate the date 2637 $mm = substr( $post_date, 5, 2 ); 2638 $jj = substr( $post_date, 8, 2 ); 2639 $aa = substr( $post_date, 0, 4 ); 2640 $valid_date = apply_filters( 'wp_insert_post_validate_date', checkdate( $mm, $jj, $aa ), $post_date ); 2641 if ( !$valid_date ) { 2642 return new WP_Error( 'invalid_date', __( 'Woops, the provided date is invalid.' ) ); 2643 } 2644 2636 2645 if ( empty($post_date_gmt) || '0000-00-00 00:00:00' == $post_date_gmt ) { 2637 2646 if ( !in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) )
Note: See TracChangeset
for help on using the changeset viewer.