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

  1. <?php 
  2. /** 
  3. * @package WPSEO\Admin\ConfigurationUI 
  4. */ 
  5.  
  6. /** 
  7. * Class WPSEO_Config_Field_Profile_URL_Instagram 
  8. */ 
  9. class WPSEO_Config_Field_Profile_URL_Instagram extends WPSEO_Config_Field { 
  10.  
  11. /** 
  12. * WPSEO_Config_Field_Profile_URL_Instagram constructor. 
  13. */ 
  14. public function __construct() { 
  15. parent::__construct( 'profileUrlInstagram', 'Input' ); 
  16.  
  17. $this->set_property( 'label', __( 'Instagram URL', 'wordpress-seo' ) ); 
  18. $this->set_property( 'pattern', '^https:\/\/www\.instagram\.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', 'instagram_url' ); 
.