Yoast\WP\SEO\Exceptions\Indexable

Term_Not_Built_Exception{}Yoast 1.0

Exception that is thrown whenever a term could not be built in the context of the indexables.

Хуков нет.

Использование

$Term_Not_Built_Exception = new Term_Not_Built_Exception();
// use class methods

Методы

  1. public static because_not_indexable( $term_id )

Код Term_Not_Built_Exception{} Yoast 24.1

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.
	 *
	 * @return Term_Not_Built_Exception
	 */
	public static function because_not_indexable( $term_id ) {
		/* translators: %s: expands to the term id */
		return new self( \sprintf( \__( 'The term %s could not be built because it\'s not indexable.', 'wordpress-seo' ), $term_id ) );
	}
}