← All changes
|
jetpack_vendor/automattic/jetpack-sync/src/class-data-settings.php
+4
-6
13.7.2
→
16.3-a.5
View file →
| @@ -29,8 +29,9 @@ | ||
| 29 | 29 | 'home_url' => array( 'Automattic\\Jetpack\\Connection\\Urls', 'home_url' ), |
| 30 | 30 | 'get_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_plugins' ), |
| 31 | 31 | 'get_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_themes' ), |
| 32 | 32 | 'jetpack_connection_active_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_jetpack_connection_active_plugins' ), |
| 33 | + 'jetpack_package_versions' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_jetpack_package_versions' ), | |
| 33 | 34 | 'paused_plugins' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_plugins' ), |
| 34 | 35 | 'paused_themes' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_paused_themes' ), |
| 35 | 36 | 'timezone' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ), |
| 36 | 37 | 'wp_get_environment_type' => 'wp_get_environment_type', |
| @@ -35,8 +36,9 @@ | ||
| 35 | 36 | 'timezone' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_timezone' ), |
| 36 | 37 | 'wp_get_environment_type' => 'wp_get_environment_type', |
| 37 | 38 | 'wp_max_upload_size' => 'wp_max_upload_size', |
| 38 | 39 | 'wp_version' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'wp_version' ), |
| 40 | + 'jetpack_sync_active_modules' => array( 'Automattic\\Jetpack\\Sync\\Functions', 'get_jetpack_sync_active_modules' ), | |
| 39 | 41 | ), |
| 40 | 42 | 'jetpack_sync_constants_whitelist' => array( |
| 41 | 43 | 'ABSPATH', |
| 42 | 44 | 'ALTERNATE_WP_CRON', |
| @@ -72,12 +74,8 @@ | ||
| 72 | 74 | 'jetpack_sync_settings_dedicated_sync_enabled', |
| 73 | 75 | 'jetpack_sync_settings_custom_queue_table_enabled', |
| 74 | 76 | 'jetpack_sync_settings_wpcom_rest_api_enabled', |
| 75 | 77 | /** |
| 76 | - * Connection related options | |
| 77 | - */ | |
| 78 | - 'jetpack_package_versions', | |
| 79 | - /** | |
| 80 | 78 | * Generic site options |
| 81 | 79 | */ |
| 82 | 80 | 'blog_charset', |
| 83 | 81 | 'blog_public', |
| @@ -224,9 +222,9 @@ | ||
| 224 | 222 | * @param array $filters_settings The settings for the filters. |
| 225 | 223 | */ |
| 226 | 224 | private function add_filters_for_enabled_module( $module, $filters_settings ) { |
| 227 | 225 | $module_mapping = self::MODULE_FILTER_MAPPING; |
| 228 | - $filters_for_module = isset( $module_mapping[ $module ] ) ? $module_mapping[ $module ] : array(); | |
| 226 | + $filters_for_module = $module_mapping[ $module ] ?? array(); | |
| 229 | 227 | |
| 230 | 228 | foreach ( $filters_for_module as $filter ) { |
| 231 | 229 | if ( isset( $filters_settings[ $filter ] ) ) { |
| 232 | 230 | $this->add_custom_filter_setting( $filter, $filters_settings[ $filter ] ); |
| @@ -243,9 +241,9 @@ | ||
| 243 | 241 | * @param string $module The module name. |
| 244 | 242 | */ |
| 245 | 243 | private function add_filters_for_disabled_module( $module ) { |
| 246 | 244 | $module_mapping = self::MODULE_FILTER_MAPPING; |
| 247 | - $filters_for_module = isset( $module_mapping[ $module ] ) ? $module_mapping[ $module ] : array(); | |
| 245 | + $filters_for_module = $module_mapping[ $module ] ?? array(); | |
| 248 | 246 | |
| 249 | 247 | foreach ( $filters_for_module as $filter ) { |
| 250 | 248 | $this->add_custom_filter_setting( $filter, array() ); |
| 251 | 249 | } |