WPSEO_Config_Field_Profile_URL_YouTube
Class WPSEO_Config_Field_Profile_URL_YouTube.
Defined (1)
The class is defined in the following location(s).
- /admin/config-ui/fields/class-field-profile-url-youtube.php
- class WPSEO_Config_Field_Profile_URL_YouTube extends WPSEO_Config_Field {
- /**
- * WPSEO_Config_Field_Profile_URL_YouTube constructor.
- */
- public function __construct() {
- parent::__construct( 'profileUrlYouTube', 'Input' );
- $this->set_property( 'label', __( 'YouTube URL', 'wordpress-seo' ) );
- $this->set_property( 'pattern', '^https:\/\/www\.youtube\.com\/([^/]+)$' );
- }
- /**
- * Set adapter
- *
- * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on.
- */
- public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) {
- $adapter->add_yoast_lookup( $this->get_identifier(), 'wpseo_social', 'youtube_url' );
- }
- }