Changeset 4389 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
- Timestamp:
- 11/21/2016 05:16:50 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php
r4346 r4389 122 122 // Bump last updated if the version has changed. 123 123 if ( !isset( $headers->Version ) || $headers->Version != get_post_meta( $plugin->ID, 'version', true ) ) { 124 $plugin->override_modified_date = true;125 124 $plugin->post_modified = $plugin->post_modified_gmt = current_time( 'mysql' ); 126 125 } … … 402 401 403 402 /** 404 * Filters `wp_insert_post()` to allow a custom modified date to be specified. 403 * Filters `wp_insert_post()` to respect the presented data. 404 * This function overrides `wp_insert_post()`s constant updating of 405 * the post_modified fields. 405 406 * 406 407 * @param array $data The data to be inserted into the database. … … 410 411 */ 411 412 public function filter_wp_insert_post_data( $data, $postarr ) { 412 if ( !empty( $postarr['override_modified_date'] )) {413 if ( 'plugin' === $postarr['post_type'] ) { 413 414 $data['post_modified'] = $postarr['post_modified']; 414 415 $data['post_modified_gmt'] = $postarr['post_modified_gmt'];
Note: See TracChangeset
for help on using the changeset viewer.