Changeset 3382 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
- Timestamp:
- 06/16/2016 07:55:34 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
r3250 r3382 25 25 */ 26 26 private function __construct() { 27 add_action( 'transition_post_status', array( $this, 'record_status_change' ), 11, 3 ); 28 27 29 add_action( 'approved_plugin', array( $this, 'approved' ), 10, 2 ); 28 30 add_action( 'rejected_plugin', array( $this, 'rejected' ), 10, 2 ); … … 63 65 'back_link' => true, 64 66 ) ); 67 } 68 69 /** 70 * Records the time a plugin was transitioned into a specific status. 71 * 72 * @param string $new_status New post status. 73 * @param string $old_status Old post status. 74 * @param \WP_Post $post Post object. 75 */ 76 public function record_status_change( $new_status, $old_status, $post ) { 77 if ( 'plugin' === $post->post_type ) { 78 update_post_meta( $post->ID, "_{$new_status}", strtotime( $post->post_modified_gmt ) ); 79 } 65 80 } 66 81
Note: See TracChangeset
for help on using the changeset viewer.