Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/exceptions.tar

class-file-size-exception.php000066600000002102151126535320012245 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin\Exceptions
 */

/**
 * Represents named methods for exceptions.
 */
class WPSEO_File_Size_Exception extends Exception {

	/**
	 * Gets the exception for an externally hosted file.
	 *
	 * @param string $file_url The file url.
	 *
	 * @return WPSEO_File_Size_Exception Instance of the exception.
	 */
	public static function externally_hosted( $file_url ) {
		$message = sprintf(
			/* translators: %1$s expands to the requested url */
			__( 'Cannot get the size of %1$s because it is hosted externally.', 'wordpress-seo' ),
			$file_url
		);

		return new self( $message );
	}

	/**
	 * Gets the exception for when a unknown error occurs.
	 *
	 * @param string $file_url The file url.
	 *
	 * @return WPSEO_File_Size_Exception Instance of the exception.
	 */
	public static function unknown_error( $file_url ) {
		$message = sprintf(
			/* translators: %1$s expands to the requested url */
			__( 'Cannot get the size of %1$s because of unknown reasons.', 'wordpress-seo' ),
			$file_url
		);

		return new self( $message );
	}
}
addon-installation/user-cannot-activate-plugins-exception.php000066600000000276151130633000020551 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Addon_Installation;

use Exception;

/**
 * Class User_Cannot_Activate_Plugins
 */
class User_Cannot_Activate_Plugins_Exception extends Exception {}
addon-installation/addon-already-installed-exception.php000066600000000276151130633000017517 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Addon_Installation;

use Exception;

/**
 * Class Addon_Already_Installed_Exception
 */
class Addon_Already_Installed_Exception extends Exception {}
addon-installation/addon-activation-error-exception.php000066600000000274151130633000017407 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Addon_Installation;

use Exception;

/**
 * Class Addon_Activation_Error_Exception
 */
class Addon_Activation_Error_Exception extends Exception {}
addon-installation/user-cannot-install-plugins-exception.php000066600000000306151130633000020411 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Addon_Installation;

use Exception;

/**
 * Class User_Cannot_Install_Plugins_Exception
 */
class User_Cannot_Install_Plugins_Exception extends Exception {}
addon-installation/addon-installation-error-exception.php000066600000000266151130633000017750 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Addon_Installation;

use Exception;

/**
 * Class Addon_Installation_Error
 */
class Addon_Installation_Error_Exception extends Exception {}
importing/aioseo-validation-exception.php000066600000000653151130633000014670 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Importing;

use Exception;

/**
 * Class Aioseo_Validation_Exception
 */
class Aioseo_Validation_Exception extends Exception {

	/**
	 * Exception that is thrown whenever validation of the
	 * AIOSEO data structure has failed.
	 */
	public function __construct() {
		parent::__construct( \esc_html__( 'The validation of the AIOSEO data structure has failed.', 'wordpress-seo' ) );
	}
}
indexable/indexable-exception.php000066600000000244151130633000013133 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

use Exception;

/**
 * Class Indexable_Exception
 */
abstract class Indexable_Exception extends Exception {

}
indexable/not-built-exception.php000066600000001057151130633000013120 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

/**
 * Class Not_Built_Exception
 */
class Not_Built_Exception extends Indexable_Exception {

	/**
	 * Creates an exception that should be thrown when an indexable
	 * was not built because of an invalid object id.
	 *
	 * @param int $object_id The invalid object id.
	 *
	 * @return Not_Built_Exception The exception.
	 */
	public static function invalid_object_id( $object_id ) {
		return new Not_Built_Exception(
			"Indexable was not built because it had an invalid object id of $object_id."
		);
	}
}
indexable/source-exception.php000066600000000231151130633000012474 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

/**
 * Class Indexable_Source_Exception
 */
class Source_Exception extends Indexable_Exception {

}
indexable/invalid-term-exception.php000066600000001353151130633010013576 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

/**
 * Exception that can be thrown whenever a term is considered invalid by WordPress
 * within the context of the indexables.
 */
class Invalid_Term_Exception extends Source_Exception {

	/**
	 * Exception that can be thrown whenever a term is considered invalid by WordPress
	 * within the context of the indexables.
	 *
	 * @param string $reason The reason given by WordPress why the term is invalid.
	 */
	public function __construct( $reason ) {
		parent::__construct(
			\sprintf(
				/* translators: %s is the reason given by WordPress. */
				\esc_html__( 'The term is considered invalid. The following reason was given by WordPress: %s', 'wordpress-seo' ),
				$reason
			)
		);
	}
}
indexable/post-not-built-exception.php000066600000002222151130633010014077 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

/**
 * Exception that is thrown whenever a post could not be built
 * in the context of the indexables.
 */
class Post_Not_Built_Exception extends Not_Built_Exception {

	/**
	 * Throws an exception if the post is not indexable.
	 *
	 * @param int $post_id ID of the post.
	 *
	 * @throws Post_Not_Built_Exception When the post is not indexable.
	 */
	public static function because_not_indexable( $post_id ) {
		/* translators: %s: expands to the post id */
		return new Post_Not_Built_Exception( sprintf( __( 'The post %s could not be indexed because it does not meet indexing requirements.', 'wordpress-seo' ), $post_id ) );
	}

	/**
	 * Throws an exception if the post type is excluded from indexing.
	 *
	 * @param int $post_id ID of the post.
	 *
	 * @throws Post_Not_Built_Exception When the post type is excluded.
	 */
	public static function because_post_type_excluded( $post_id ) {
		/* translators: %s: expands to the post id */
		return new Post_Not_Built_Exception( sprintf( __( 'The post %s could not be indexed because it\'s post type is excluded from indexing.', 'wordpress-seo' ), $post_id ) );
	}
}
indexable/post-not-found-exception.php000066600000000703151130633010014075 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

/**
 * Exception that is thrown whenever a post could not be found
 * in the context of the indexables.
 */
class Post_Not_Found_Exception extends Source_Exception {

	/**
	 * Exception that is thrown whenever a post could not be found
	 * in the context of the indexables.
	 */
	public function __construct() {
		parent::__construct( \__( 'The post could not be found.', 'wordpress-seo' ) );
	}
}
indexable/term-not-built-exception.php000066600000001225151130633010014063 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

/**
 * Exception that is thrown whenever a term could not be built
 * in the context of the indexables.
 */
class Term_Not_Built_Exception extends Not_Built_Exception {

	/**
	 * Throws an exception if the term is not indexable.
	 *
	 * @param int $term_id ID of the term.
	 *
	 * @throws Term_Not_Built_Exception When the term is not built.
	 */
	public static function because_not_indexable( $term_id ) {
		/* translators: %s: expands to the term id */
		return new Term_Not_Built_Exception( sprintf( __( 'The term %s could not be built because it\'s not indexable.', 'wordpress-seo' ), $term_id ) );
	}
}
indexable/term-not-found-exception.php000066600000000703151130633010014057 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

/**
 * Exception that is thrown whenever a term could not be found
 * in the context of the indexables.
 */
class Term_Not_Found_Exception extends Source_Exception {

	/**
	 * Exception that is thrown whenever a term could not be found
	 * in the context of the indexables.
	 */
	public function __construct() {
		parent::__construct( \__( 'The term could not be found.', 'wordpress-seo' ) );
	}
}
indexable/author-not-built-exception.php000066600000003243151130633010014420 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\Indexable;

/**
 * For when an author indexable is not being built.
 */
class Author_Not_Built_Exception extends Not_Built_Exception {

	/**
	 * Named constructor for creating an Author_Not_Built_Exception
	 * when author archives are disabled for users without posts.
	 *
	 * @param string $user_id The user id.
	 *
	 * @return Author_Not_Built_Exception The exception.
	 */
	public static function author_archives_are_not_indexed_for_users_without_posts( $user_id ) {
		return new Author_Not_Built_Exception(
			'Indexable for author with id ' . $user_id . ' is not being built, since author archives are not indexed for users without posts.'
		);
	}

	/**
	 * Named constructor for creating an Author_Not_Built_Exception
	 * when author archives are disabled.
	 *
	 * @param string $user_id The user id.
	 *
	 * @return Author_Not_Built_Exception The exception.
	 */
	public static function author_archives_are_disabled( $user_id ) {
		return new Author_Not_Built_Exception(
			'Indexable for author with id ' . $user_id . ' is not being built, since author archives are disabled.'
		);
	}

	/**
	 * Named constructor for creating an Author_Not_Build_Exception
	 * when an author is excluded because of the `'wpseo_should_build_and_save_user_indexable'` filter.
	 *
	 * @param string $user_id The user id.
	 *
	 * @return Author_Not_Built_Exception The exception.
	 */
	public static function author_not_built_because_of_filter( $user_id ) {
		return new Author_Not_Built_Exception(
			'Indexable for author with id ' . $user_id . ' is not being built, since it is excluded because of the \'wpseo_should_build_and_save_user_indexable\' filter.'
		);
	}
}
missing-method.php000066600000001271151130633010010202 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions;

use Exception;

/**
 * Exception to use when a method does not exist.
 */
class Missing_Method extends Exception {

	/**
	 * Creates exception for a method that does not exist in a class.
	 *
	 * @param string $method     The method that does not exist.
	 * @param string $class_name The class name.
	 *
	 * @return static Instance of the exception.
	 */
	public static function for_class( $method, $class_name ) {
		return new static(
			\sprintf(
				/* translators: %1$s expands to the method name. %2$s expands to the class name */
				\__( 'Method %1$s() does not exist in class %2$s', 'wordpress-seo' ),
				$method,
				$class_name
			)
		);
	}
}
oauth/authentication-failed-exception.php000066600000001340151130633010014625 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\OAuth;

use Exception;

/**
 * Class Authentication_Failed_Exception
 */
class Authentication_Failed_Exception extends Exception {

	/**
	 * Authentication_Failed_Exception constructor.
	 *
	 * @param Exception $original_exception The original exception.
	 */
	public function __construct( Exception $original_exception ) {
		parent::__construct( 'Authentication failed', 401, $original_exception );
	}

	/**
	 * Returns a formatted response object.
	 *
	 * @return object The response object.
	 */
	public function get_response() {
		return (object) [
			'tokens' => [],
			'error'  => $this->getMessage() . ': ' . $this->getPrevious()->getMessage(),
			'status' => $this->getCode(),
		];
	}
}
oauth/tokens/empty-token-exception.php000066600000000474151130633010014152 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\OAuth\Tokens;

use Exception;

/**
 * Class Empty_Token_Exception
 */
class Empty_Token_Exception extends Exception {

	/**
	 * Empty_Token_Exception constructor.
	 */
	public function __construct() {
		parent::__construct( 'Token usage failed. Token is empty.', 400 );
	}
}
oauth/tokens/empty-property-exception.php000066600000000665151130633010014720 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\OAuth\Tokens;

use Exception;

/**
 * Class Empty_Property_Exception
 */
class Empty_Property_Exception extends Exception {

	/**
	 * Empty_Property_Exception constructor.
	 *
	 * @param string $property The property that is empty.
	 */
	public function __construct( $property ) {
		parent::__construct( \sprintf( 'Token creation failed. Property `%s` cannot be empty.', $property ), 400 );
	}
}
oauth/tokens/failed-storage-exception.php000066600000001107151130633010014556 0ustar00<?php

namespace Yoast\WP\SEO\Exceptions\OAuth\Tokens;

use Exception;

/**
 * Class Failed_Storage_Exception
 */
class Failed_Storage_Exception extends Exception {

	const DEFAULT_MESSAGE = 'Token storing failed. Please try again.';

	/**
	 * Failed_Storage_Exception constructor.
	 *
	 * @param string $reason The reason why token storage failed. Optional.
	 */
	public function __construct( $reason = '' ) {
		$message = ( $reason ) ? \sprintf( 'Token storing failed. Reason: %s. Please try again', $reason ) : self::DEFAULT_MESSAGE;

		parent::__construct( $message, 500 );
	}
}
class-myyoast-bad-request-exception.php000066600000000273151131552100014273 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Internals
 */

/**
 * Class WPSEO_MyYoast_Bad_Request_Exception.
 */
class WPSEO_MyYoast_Bad_Request_Exception extends Exception {

}
class-myyoast-invalid-json-exception.php000066600000000327151131552100014454 0ustar00<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Internals
 */

/**
 * Class WPSEO_MyYoast_Invalid_JSON_Exception.
 */
class WPSEO_MyYoast_Invalid_JSON_Exception extends WPSEO_MyYoast_Bad_Request_Exception {

}
oauth/.htaccess000066600000000424151143657270007501 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>oauth/tokens/.htaccess000066600000000424151143657270011004 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>indexable/.htaccess000066600000000424151143657270010314 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>.htaccess000066600000000424151143657270006361 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>addon-installation/.htaccess000066600000000424151143657270012145 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>importing/.htaccess000066600000000424151143657270010371 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>