| @@ -15,10 +15,10 @@ | ||
| 15 | 15 | * |
| 16 | 16 | * @return void |
| 17 | 17 | */ |
| 18 | 18 | public function __construct() { |
| 19 | - add_action( 'transition_post_status', array( &$this, 'transition_post_status' ), 10, 3 ); | |
| 20 | - add_action( 'delete_post', array( &$this, 'delete_post' ) ); | |
| 19 | + add_action( 'transition_post_status', [ &$this, 'transition_post_status' ], 10, 3 ); | |
| 20 | + add_action( 'delete_post', [ &$this, 'delete_post' ] ); | |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Determine the title. |
| @@ -67,14 +67,14 @@ | ||
| 67 | 67 | return; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | $this->insert( |
| 71 | - array( | |
| 71 | + [ | |
| 72 | 72 | 'object' => 'post', |
| 73 | 73 | 'object_id' => $post->ID, |
| 74 | 74 | 'action' => $action, |
| 75 | 75 | 'object_name' => $this->_draft_or_post_title( $post->ID ), |
| 76 | - ) | |
| 76 | + ] | |
| 77 | 77 | ); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
| @@ -88,9 +88,9 @@ | ||
| 88 | 88 | return; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $post = get_post( $post_id ); |
| 92 | - if ( in_array( $post->post_status, array( 'auto-draft', 'inherit' ) ) ) { | |
| 92 | + if ( in_array( $post->post_status, [ 'auto-draft', 'inherit' ] ) ) { | |
| 93 | 93 | return; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | // Skip for menu items. |
| @@ -98,13 +98,13 @@ | ||
| 98 | 98 | return; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | $this->insert( |
| 102 | - array( | |
| 102 | + [ | |
| 103 | 103 | 'object' => 'post', |
| 104 | 104 | 'object_id' => $post->ID, |
| 105 | 105 | 'action' => 'deleted', |
| 106 | 106 | 'object_name' => $this->_draft_or_post_title( $post->ID ), |
| 107 | - ) | |
| 107 | + ] | |
| 108 | 108 | ); |
| 109 | 109 | } |
| 110 | 110 | } |