PluginProbe
Patchstack – WordPress & Plugins Security / 2.2.7
Patchstack – WordPress & Plugins Security v2.2.7
2.3.7 trunk 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.2 2.1.20 2.1.21 2.1.22 2.1.23 2.1.24 2.1.25 2.1.3 2.1.4 2.1.5 2.1.6 All 49 releases
← All changes | includes/events/posts.php +7 -7 2.1.212.2.7 View file →
@@ -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 }