/admin/config-ui/fields/class-field-profile-url-facebook.php

  1. <?php 
  2. /** 
  3. * @package WPSEO\Admin\ConfigurationUI 
  4. */ 
  5.  
  6. /** 
  7. * Class WPSEO_Config_Field_Profile_URL_Facebook 
  8. */ 
  9. class WPSEO_Config_Field_Profile_URL_Facebook extends WPSEO_Config_Field { 
  10.  
  11. /** 
  12. * WPSEO_Config_Field_Profile_URL_Facebook constructor. 
  13. */ 
  14. public function __construct() { 
  15. parent::__construct( 'profileUrlFacebook', 'Input' ); 
  16.  
  17. $this->set_property( 'label', __( 'Facebook Page URL', 'wordpress-seo' ) ); 
  18. $this->set_property( 'pattern', '^https:\/\/www\.facebook\.com\/([^/]+)\/$' ); 
  19.  
  20. /** 
  21. * Set adapter 
  22. * 
  23. * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on. 
  24. */ 
  25. public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) { 
  26. $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'facebook_site' ); 
.