PageRenderTime 16ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-profile-url-instagram.php

https://bitbucket.org/carloskikea/helpet
PHP | 31 lines | 11 code | 4 blank | 16 comment | 0 complexity | 5d0b0fa2f7c53b686114931719f74e7a MD5 | raw file
 1<?php
 2/**
 3 * WPSEO plugin file.
 4 *
 5 * @package WPSEO\Admin\ConfigurationUI
 6 */
 7
 8/**
 9 * Class WPSEO_Config_Field_Profile_URL_Instagram
10 */
11class WPSEO_Config_Field_Profile_URL_Instagram extends WPSEO_Config_Field {
12
13	/**
14	 * WPSEO_Config_Field_Profile_URL_Instagram constructor.
15	 */
16	public function __construct() {
17		parent::__construct( 'profileUrlInstagram', 'Input' );
18
19		$this->set_property( 'label', __( 'Instagram URL', 'wordpress-seo' ) );
20		$this->set_property( 'pattern', '^https:\/\/www\.instagram\.com\/([^/]+)\/$' );
21	}
22
23	/**
24	 * Set adapter
25	 *
26	 * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on.
27	 */
28	public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) {
29		$adapter->add_option_lookup( $this->get_identifier(), 'instagram_url' );
30	}
31}