class-field-company-name.php 756 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin\Configurator
  6. */
  7. /**
  8. * Class WPSEO_Config_Field_Company_Name
  9. */
  10. class WPSEO_Config_Field_Company_Name extends WPSEO_Config_Field {
  11. /**
  12. * WPSEO_Config_Field_Company_Name constructor.
  13. */
  14. public function __construct() {
  15. parent::__construct( 'publishingEntityCompanyName', 'Input' );
  16. $this->set_property( 'label', __( 'The name of the company', 'wordpress-seo' ) );
  17. $this->set_requires( 'publishingEntityType', 'company' );
  18. }
  19. /**
  20. * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on.
  21. */
  22. public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) {
  23. $adapter->add_option_lookup( $this->get_identifier(), 'company_name' );
  24. }
  25. }