is_plugin_installed = true; } } /** * Sync others data. * * Get an array of available clones of this Child Sites. * * @param array $information Holder for available clones. * @param array $data Array of existing clones. * * @return array $information An array of available clones. */ public function sync_others_data( $information, $data = array() ) { if ( ! empty( $data['aam'] ) && class_exists( '\AAM_Service_SecurityAudit' ) ) { try { $aam_info = array(); // Get list of data point we would like to fetch. foreach ( $data['aam'] as $data_point ) { $method = 'fetch_' . $data_point; if ( method_exists( $this, $method ) ) { $aam_info[ $data_point ] = $this->{$method}(); } } $information['aam'] = $aam_info; } catch ( MainWP_Exception $e ) { // error! } } return $information; } /** * Get security audit score * * @return int|null * @access protected */ protected function fetch_security_score() { return get_option( AAM_Service_SecurityAudit::DB_SCOPE_OPTION, null ); } /** * Get report summary * * @return array * @access protected */ protected function fetch_issues_summary() { $result = array(); $report = get_option( AAM_Service_SecurityAudit::DB_OPTION, array() ); if ( is_array( $report ) ) { $result = array( 'error' => 0, 'notice' => 0, 'warning' => 0, 'critical' => 0, ); foreach ( $report as $group ) { foreach ( $group['issues'] as $issue ) { ++$result[ $issue['type'] ]; } } } return $result; } }