WPSEO_Config_Field_Site_Type

Class WPSEO_Config_Field_Site_Type.

Defined (1)

The class is defined in the following location(s).

/admin/config-ui/fields/class-field-site-type.php  
  1. class WPSEO_Config_Field_Site_Type extends WPSEO_Config_Field_Choice { 
  2.  
  3. /** 
  4. * WPSEO_Config_Field_Site_Type constructor. 
  5. */ 
  6. public function __construct() { 
  7. parent::__construct( 'siteType' ); 
  8.  
  9. /** translators: %1$s resolves to the home_url of the blog. */ 
  10. $this->set_property( 'label', sprintf( __( 'What kind of site is %1$s?', 'wordpress-seo' ), get_home_url() ) ); 
  11.  
  12. $this->add_choice( 'blog', __( 'Blog', 'wordpress-seo' ) ); 
  13. $this->add_choice( 'shop', __( 'Webshop', 'wordpress-seo' ) ); 
  14. $this->add_choice( 'news', __( 'News site', 'wordpress-seo' ) ); 
  15. $this->add_choice( 'smallBusiness', __( 'Small business site', 'wordpress-seo' ) ); 
  16. $this->add_choice( 'corporateOther', __( 'Other corporate site', 'wordpress-seo' ) ); 
  17. $this->add_choice( 'personalOther', __( 'Other personal site', 'wordpress-seo' ) ); 
  18.  
  19. /** 
  20. * Set adapter 
  21. * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. 
  22. */ 
  23. public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { 
  24. $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo', 'site_type' );