true ]; try { array_push($issues, ...self::_check_file_system_permissions()); } catch (Exception $e) { array_push($issues, self::_format_issue( 'APPLICATION_ERROR', [ 'message' => $e->getMessage() ], 'error' )); } if (count($issues) > 0) { $response['issues'] = $issues; } // Determine final status for the check self::_determine_check_status($response); return $response; } /** * Get a collection of error messages for current step * * @return array * @access private * @static * * @version 7.0.0 */ private static function _get_message_templates() { return [ 'WRITABLE_FILE_SYSTEM' => __( 'Detected potentially writable file system', 'advanced-access-manager' ) ]; } /** * Detect empty roles * * @return array * * @access private * @static * * @version 7.0.0 */ private static function _check_file_system_permissions() { $response = []; if (!defined('DISALLOW_FILE_EDIT') || !constant('DISALLOW_FILE_EDIT') || !wp_is_file_mod_allowed('capability_edit_themes') ) { array_push($response, self::_format_issue( 'WRITABLE_FILE_SYSTEM', [], 'warning' )); } return $response; } }