rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -16,7 +16,7 @@ class Author_Not_Built_Exception extends Not_Built_Exception {
* @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(
return new self(
'Indexable for author with id ' . $user_id . ' is not being built, since author archives are not indexed for users without posts.'
);
}
@@ -30,7 +30,7 @@ class Author_Not_Built_Exception extends Not_Built_Exception {
* @return Author_Not_Built_Exception The exception.
*/
public static function author_archives_are_disabled( $user_id ) {
return new Author_Not_Built_Exception(
return new self(
'Indexable for author with id ' . $user_id . ' is not being built, since author archives are disabled.'
);
}
@@ -44,7 +44,7 @@ class Author_Not_Built_Exception extends Not_Built_Exception {
* @return Author_Not_Built_Exception The exception.
*/
public static function author_not_built_because_of_filter( $user_id ) {
return new Author_Not_Built_Exception(
return new self(
'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.'
);
}

View File

@@ -16,7 +16,7 @@ class Not_Built_Exception extends Indexable_Exception {
* @return Not_Built_Exception The exception.
*/
public static function invalid_object_id( $object_id ) {
return new Not_Built_Exception(
return new self(
"Indexable was not built because it had an invalid object id of $object_id."
);
}

View File

@@ -17,7 +17,7 @@ class Post_Not_Built_Exception extends Not_Built_Exception {
*/
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 ) );
return new self( \sprintf( \__( 'The post %s could not be indexed because it does not meet indexing requirements.', 'wordpress-seo' ), $post_id ) );
}
/**
@@ -29,6 +29,6 @@ class Post_Not_Built_Exception extends Not_Built_Exception {
*/
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 ) );
return new self( \sprintf( \__( 'The post %s could not be indexed because it\'s post type is excluded from indexing.', 'wordpress-seo' ), $post_id ) );
}
}

View File

@@ -17,6 +17,6 @@ class Post_Type_Not_Built_Exception extends Not_Built_Exception {
*/
public static function because_not_indexable( $post_type ) {
/* translators: %s: expands to the post type */
return new Post_Type_Not_Built_Exception( \sprintf( \__( 'The post type %s could not be indexed because it does not meet indexing requirements.', 'wordpress-seo' ), $post_type ) );
return new self( \sprintf( \__( 'The post type %s could not be indexed because it does not meet indexing requirements.', 'wordpress-seo' ), $post_type ) );
}
}

View File

@@ -17,6 +17,6 @@ class Term_Not_Built_Exception extends Not_Built_Exception {
*/
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 ) );
return new self( \sprintf( \__( 'The term %s could not be built because it\'s not indexable.', 'wordpress-seo' ), $term_id ) );
}
}