Changeset 2925
- Timestamp:
- 04/11/2016 06:15:06 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r2924 r2925 26 26 add_filter( 'the_content', array( $this, 'filter_post_content_to_correct_page' ), 1 ); 27 27 add_filter( 'rest_api_allowed_post_types', array( $this, 'filter_allowed_post_types' ) ); 28 add_filter( 'pre_update_option_jetpack_options', array( $this, 'filter_jetpack_options' ), 10, 2 ); 28 29 29 30 add_filter( 'map_meta_cap', array( __NAMESPACE__ . '\Capabilities', 'map_meta_cap' ), 10, 4 ); … … 379 380 380 381 /** 382 * Filter for pre_update_option_jetpack_options to ensure CPT posts are seen as public and searchable by TP 383 * 384 * @param mixed $new_value 385 * @param mixed $old_value 386 * @return mixed 387 */ 388 public function filter_jetpack_options( $new_value, $old_value ) { 389 if ( is_array($new_value) && array_key_exists( 'public', $new_value ) ) 390 $new_value['public'] = 1; 391 392 return $new_value; 393 } 394 395 /** 381 396 * Returns an array of pages based on section comments in the content. 382 397 *
Note: See TracChangeset
for help on using the changeset viewer.