PzILV LV :LVA0tILV 'zILV7LV :LV0tILV '|ILV@LV :LVA0tILV '}ILV`7LV :LV0tILV '~ILV08LV :LVA0tILV 'ILVLV :LV0tILV ' HLV HLVHLVeLV :LVA0tILV ' HLVHLVpHLV0jLV :LV0tILV ';LVPHLV0;LV LV :LVA0tILV ';LVHLV;LV6LV :LV0tILV ';LV HLV@;LV@ LV :LVA0tILV ';LV HLV;LV LV :LVILVpILV @pILVaILV ' @ILV1LVХHLVPHLVq `0ILVyj)x5 EmptyIteratorqPILVILV ILVLVhLVhLVILVLVILVɊLV :LVILV;6@ILV;LVILV)~LV :LVPILV ' 0ШILV;6@ILVД;LV0ILV 4LV :LVAPILV '@ 0ILV5@ILV;LVILV)~LV :LVPILV ' 00ILV87@ILV`;LVILV4LV :LVPILV ' 0ILVf6@ILV;LV@ILV3LV :LV1PILVILV@ p0ILVE emptyiteratorAILVJLV@@ILVwhêRecursiveTreeIterator0ILVILVILV LVhLVILV ILVILV'LVLVpILVɊLV :LVILV7@ILVILVpcLV :LVa0ILV ' JLV >ø7@PJLV ƅo7@source to validate. * @param string|null $key License key. * @param string $validation_type Validation type (local or network). * @param bool $force Force the validation. * * @return mixed */ public function validate_license( Resource $resource, string $key = null, string $validation_type = 'local', bool $force = false ) { /** @var Data */ $site_data = $this->container->get( Data::class ); $args = $resource->get_validation_args(); if ( ! empty( $key ) ) { $args['key'] = Utils\Sanitize::key( $key ); } $args['domain'] = $site_data->get_domain(); $args['stats'] = $site_data->get_stats(); $args['stats']['network']['network_activated'] = $resource->is_network_activated(); /** * Filter the license validation arguments. * * @since 1.0.0 * * @param array $args License validation arguments. */ $args = apply_filters( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/client_validate_license_args', $args ); $request_hash = $this->build_hash( $args ); $cache_key = 'stellarwp_uplink_validate_license_' . $request_hash; $results = $this->container->has( $cache_key ) ? $this->container->get( $cache_key ) : null; if ( $force || ! $results ) { $results = $this->post( 'license/validate', $args ); $this->container->bind( $cache_key, function() use ( $results ) { return $results; } ); } if ( $results !== null && ! is_object( $results ) ) { $results = null; } $results = new Validation_Response( $key, $validation_type, $results, $resource ); /** * Filter the license validation results. * * @since 1.0.0 * * @param Validation_Response $results License validation results. * @param array $args License validation arguments. */ return apply_filters( 'stellarwp/uplink/' . Config::get_hook_prefix() . '/client_validate_license', $results, $args ); } }