Changeset 2994 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
- Timestamp:
- 04/21/2016 07:41:53 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php
r2982 r2994 31 31 32 32 add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) ); 33 add_action( 'save_post_plugin', array( $this, 'save_plugin_post' ) , 10, 2);33 add_action( 'save_post_plugin', array( $this, 'save_plugin_post' ) ); 34 34 35 35 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); … … 158 158 /** 159 159 * Filter the query in wp-admin to list only plugins relevant to the current user. 160 * 161 * @param \WP_Query $query 160 162 */ 161 163 public function pre_get_posts( $query ) { 162 global $wpdb;163 164 if ( ! $query->is_main_query() ) { 164 165 return; … … 186 187 * 187 188 * @ignore 189 * 190 * @param string $where WHERE clause. 191 * @return string 188 192 */ 189 193 public function pre_get_posts_sql_name_or_user( $where ) { … … 224 228 * @param array $post_states An array of post display states. 225 229 * @param \WP_Post $post The current post object. 230 * @return array 226 231 */ 227 232 public function post_states( $post_states, $post ) { … … 310 315 * 311 316 * @param int $post_id The post_id being updated. 312 * @param \WP_Post $post The WP_Post object being updated. 313 */ 314 public function save_plugin_post( $post_id, $post ) { 317 */ 318 public function save_plugin_post( $post_id ) { 315 319 // Save meta information 316 320 if ( isset( $_POST['tested_with'] ) && isset( $_POST['hidden_tested_with'] ) && $_POST['tested_with'] != $_POST['hidden_tested_with'] ) { … … 471 475 ); 472 476 473 if ( $comment_auto_approved ) {477 if ( $comment_auto_approved && isset( $parent ) ) { 474 478 $response['supplemental']['parent_approved'] = $parent->comment_ID; 475 479 $response['supplemental']['parent_post_id'] = $parent->comment_post_ID;
Note: See TracChangeset
for help on using the changeset viewer.