| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/exceptions.tar |
class-file-size-exception.php 0000666 00000002102 15112653532 0012245 0 ustar 00 <?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.php 0000666 00000000276 15113063300 0020551 0 ustar 00 <?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.php 0000666 00000000276 15113063300 0017517 0 ustar 00 <?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.php 0000666 00000000274 15113063300 0017407 0 ustar 00 <?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.php 0000666 00000000306 15113063300 0020411 0 ustar 00 <?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.php 0000666 00000000266 15113063300 0017750 0 ustar 00 <?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.php 0000666 00000000653 15113063300 0014670 0 ustar 00 <?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.php 0000666 00000000244 15113063300 0013133 0 ustar 00 <?php
namespace Yoast\WP\SEO\Exceptions\Indexable;
use Exception;
/**
* Class Indexable_Exception
*/
abstract class Indexable_Exception extends Exception {
}
indexable/not-built-exception.php 0000666 00000001057 15113063300 0013120 0 ustar 00 <?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.php 0000666 00000000231 15113063300 0012474 0 ustar 00 <?php
namespace Yoast\WP\SEO\Exceptions\Indexable;
/**
* Class Indexable_Source_Exception
*/
class Source_Exception extends Indexable_Exception {
}
indexable/invalid-term-exception.php 0000666 00000001353 15113063301 0013576 0 ustar 00 <?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.php 0000666 00000002222 15113063301 0014077 0 ustar 00 <?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.php 0000666 00000000703 15113063301 0014075 0 ustar 00 <?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.php 0000666 00000001225 15113063301 0014063 0 ustar 00 <?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.php 0000666 00000000703 15113063301 0014057 0 ustar 00 <?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.php 0000666 00000003243 15113063301 0014420 0 ustar 00 <?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.php 0000666 00000001271 15113063301 0010202 0 ustar 00 <?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.php 0000666 00000001340 15113063301 0014625 0 ustar 00 <?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.php 0000666 00000000474 15113063301 0014152 0 ustar 00 <?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.php 0000666 00000000665 15113063301 0014720 0 ustar 00 <?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.php 0000666 00000001107 15113063301 0014556 0 ustar 00 <?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.php 0000666 00000000273 15113155210 0014273 0 ustar 00 <?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.php 0000666 00000000327 15113155210 0014454 0 ustar 00 <?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/.htaccess 0000666 00000000424 15114365727 0007501 0 ustar 00 <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>