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

WPSEO_Config_Field_Site_Type{} Yoast 1.0

Class WPSEO_Config_Field_Site_Type.

Хуков нет.

Возвращает

Null. Ничего.

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

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

Методы

  1. __construct()
  2. set_adapter( WPSEO_Configuration_Options_Adapter $adapter )

Код WPSEO_Config_Field_Site_Type{} Yoast 15.1.1

<?php
class WPSEO_Config_Field_Site_Type extends WPSEO_Config_Field_Choice {

	/**
	 * WPSEO_Config_Field_Site_Type constructor.
	 */
	public function __construct() {
		parent::__construct( 'siteType' );

		/* translators: %1$s resolves to the home_url of the blog. */
		$this->set_property( 'label', sprintf( __( 'What does the site %1$s represent?', 'wordpress-seo' ), get_home_url() ) );

		$this->add_choice( 'blog', __( 'A blog', 'wordpress-seo' ) );
		$this->add_choice( 'shop', __( 'An online shop', 'wordpress-seo' ) );
		$this->add_choice( 'news', __( 'A news channel', 'wordpress-seo' ) );
		$this->add_choice( 'smallBusiness', __( 'A small offline business', 'wordpress-seo' ) );
		$this->add_choice( 'corporate', __( 'A corporation', 'wordpress-seo' ) );
		$this->add_choice( 'portfolio', __( 'A portfolio', 'wordpress-seo' ) );
		$this->add_choice( 'other', __( 'Something else', 'wordpress-seo' ) );
	}

	/**
	 * Set adapter.
	 *
	 * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on.
	 */
	public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) {
		$adapter->add_option_lookup( $this->get_identifier(), 'site_type' );
	}
}