WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
класс не описан

WPSEO_File_Size_Exception{} Yoast 1.0

Represents named methods for exceptions.

Хуков нет.

Возвращает

Null. Ничего.

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

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

Методы

  1. externally_hosted( $file_url )
  2. unknown_error( $file_url )

Код WPSEO_File_Size_Exception{} Yoast 15.1.1

<?php
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 );
	}
}