Changeset 2994 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.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/class-plugin-directory.php
r2991 r2994 1 1 <?php 2 2 namespace WordPressdotorg\Plugin_Directory; 3 use WordPressdotorg\Plugin_Directory\Admin\Customizations; 3 4 4 5 /** … … 26 27 add_filter( 'the_content', array( $this, 'filter_post_content_to_correct_page' ), 1 ); 27 28 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);29 add_filter( 'pre_update_option_jetpack_options', array( $this, 'filter_jetpack_options' ) ); 29 30 30 31 add_filter( 'map_meta_cap', array( __NAMESPACE__ . '\Capabilities', 'map_meta_cap' ), 10, 4 ); … … 39 40 // Cannot be included on `admin_init` to allow access to menu hooks 40 41 if ( defined( 'WP_ADMIN' ) && WP_ADMIN ) { 41 Admin\Customizations::instance();42 Customizations::instance(); 42 43 43 44 add_action( 'transition_post_status', array( __NAMESPACE__ . '\Admin\Status_Transitions', 'instance' ) ); … … 200 201 * Setting up the site requires setting up the theme and proper 201 202 * rewrite permastructs. 202 *203 * @global \WP_Rewrite $wp_rewrite WordPress rewrite component.204 203 */ 205 204 public function activate() { 205 206 /** 207 * @var \WP_Rewrite $wp_rewrite WordPress rewrite component. 208 */ 206 209 global $wp_rewrite; 207 210 … … 220 223 } 221 224 222 // Enable the WordPress.org Plugin Repo Theme. 225 /** 226 * Enable the WordPress.org Plugin Repo Theme. 227 * 228 * @var \WP_Theme $theme 229 */ 223 230 foreach ( wp_get_themes() as $theme ) { 224 231 if ( $theme->get( 'Name' ) === 'WordPress.org Plugins' ) { … … 398 405 * 399 406 * @param mixed $new_value 400 * @param mixed $old_value401 407 * @return mixed 402 408 */ 403 public function filter_jetpack_options( $new_value , $old_value) {404 if ( is_array( $new_value) && array_key_exists( 'public', $new_value ) )409 public function filter_jetpack_options( $new_value ) { 410 if ( is_array( $new_value ) && array_key_exists( 'public', $new_value ) ) 405 411 $new_value['public'] = 1; 406 412
Note: See TracChangeset
for help on using the changeset viewer.