Changeset 2841 for sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
- Timestamp:
- 03/29/2016 01:42:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r2840 r2841 649 649 */ 650 650 public function log_status_changes( $new_status, $old_status, $post ) { 651 $statues = WordCamp_Loader::get_post_statuses(); 652 653 if ( $new_status === $old_status ) { 651 if ( $new_status === $old_status || $new_status == 'auto-draft' ) { 654 652 return; 655 653 } … … 658 656 return; 659 657 } 658 659 $old_status = get_post_status_object( $old_status ); 660 $new_status = get_post_status_object( $new_status ); 660 661 661 662 add_post_meta( $post->ID, '_status_change', array( 662 663 'timestamp' => time(), 663 664 'user_id' => get_current_user_id(), 664 'message' => sprintf( '%s -> %s', $statues[ $old_status ], $statues[ $new_status ]),665 'message' => sprintf( '%s → %s', $old_status->label, $new_status->label ), 665 666 ) ); 666 667 }
Note: See TracChangeset
for help on using the changeset viewer.