Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#36597 closed defect (bug) (duplicate)

Remove post_modified and post_modified_gmt variables from wp_insert_post inline documentation

Reported by: 5um17's profile 5um17 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: Posts, Post Types Keywords:
Focuses: docs Cc:

Description

$post_modified and $post_modified_gmt variables are inactive when passed in wp_insert_post because wp_insert_post using current_time

if ( $update || '0000-00-00 00:00:00' == $post_date ) {
        $post_modified     = current_time( 'mysql' );
        $post_modified_gmt = current_time( 'mysql', 1 );
} else {
        $post_modified     = $post_date;
        $post_modified_gmt = $post_date_gmt;
}

So the inline documentation needs to be updated which leading to confusions!

Attachments (1)

36597.patch (1.0 KB) - added by 5um17 9 years ago.
Patch after removing inline variables doc

Download all attachments as: .zip

Change History (2)

@5um17
9 years ago

Patch after removing inline variables doc

#1 @swissspidy
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version set to 4.2

Hey there

Thanks for the patch! Would you mind uploading it to #36595, where this issue is already being discussed? There we can also discuss alternate solutions, like explicitly allowing to override post_modified and thus making the docs valid.

Note: See TracTickets for help on using tickets.