class-field-company-or-person.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin\Configurator
  6. */
  7. /**
  8. * Class WPSEO_Config_Field_Company_Or_Person.
  9. */
  10. class WPSEO_Config_Field_Company_Or_Person extends WPSEO_Config_Field_Choice {
  11. /**
  12. * WPSEO_Config_Field_Company_Or_Person constructor.
  13. */
  14. public function __construct() {
  15. parent::__construct( 'publishingEntityType' );
  16. $this->set_property( 'label', __( 'Does your site represent a person or an organization?', 'wordpress-seo' ) );
  17. $this->set_property( 'description', __( 'This information will be used in Google\'s Knowledge Graph Card, the big block of information you see on the right side of the search results.', 'wordpress-seo' ) );
  18. $this->add_choice( 'company', __( 'Organization', 'wordpress-seo' ) );
  19. $this->add_choice( 'person', __( 'Person', 'wordpress-seo' ) );
  20. }
  21. /**
  22. * Sets the adapter.
  23. *
  24. * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on.
  25. */
  26. public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) {
  27. $adapter->add_option_lookup( $this->get_identifier(), 'company_or_person' );
  28. }
  29. }