You appear to be a bot. Output may be restricted
Description
Extends the Jetpack options array with details including site constraints, WordPress and Jetpack versions, and plugins using the Jetpack connection.
Usage
Abstract_Jetpack_Site::after_render_options( $options );
Parameters
- $options
- ( array ) required – an array of the Jetpack options.
Returns
void
Source
File name: jetpack/sal/class.json-api-site-jetpack-base.php
Lines:
1 to 42 of 42
public function after_render_options( &$options ) { $options['jetpack_version'] = $this->get_jetpack_version(); $main_network_site = $this->main_network_site(); if ( $main_network_site ) { $options['main_network_site'] = (string) rtrim( $main_network_site, '/' ); } $active_modules = Jetpack_Options::get_option( 'active_modules' ); if ( is_array( $active_modules ) ) { $options['active_modules'] = (array) array_values( $active_modules ); } $options['software_version'] = (string) $this->wp_version(); $options['max_upload_size'] = $this->max_upload_size(); $options['wp_memory_limit'] = $this->wp_memory_limit(); $options['wp_max_memory_limit'] = $this->wp_max_memory_limit(); // Sites have to prove that they are not main_network site. // If the sync happends right then we should be able to see that we are not dealing with a network site. $options['is_multi_network'] = (bool) $this->is_main_network(); $options['is_multi_site'] = (bool) $this->is_multisite(); $file_mod_disabled_reasons = array_keys( array_filter( array( 'automatic_updater_disabled' => (bool) $this->get_constant( 'AUTOMATIC_UPDATER_DISABLED' ), // WP AUTO UPDATE CORE defaults to minor, '1' if true and '0' if set to false. 'wp_auto_update_core_disabled' => ! ( (bool) $this->get_constant( 'WP_AUTO_UPDATE_CORE' ) ), 'is_version_controlled' => (bool) $this->is_version_controlled(), // By default we assume that site does have system write access if the value is not set yet. 'has_no_file_system_write_access' => ! (bool) $this->file_system_write_access(), 'disallow_file_mods' => (bool) $this->get_constant( 'DISALLOW_FILE_MODS' ), ) ) ); $options['file_mod_disabled'] = empty( $file_mod_disabled_reasons ) ? false : $file_mod_disabled_reasons; $options['jetpack_connection_active_plugins'] = $this->get_connection_active_plugins(); }