PageRenderTime 62ms CodeModel.GetById 57ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/wp-content/plugins/wordpress-seo/admin/config-ui/fields/class-field-company-logo.php

https://bitbucket.org/carloskikea/helpet
PHP | 30 lines | 11 code | 5 blank | 14 comment | 0 complexity | 2cd08792a36faaec727ec4c3f7fa72a7 MD5 | raw file
 1<?php
 2/**
 3 * WPSEO plugin file.
 4 *
 5 * @package WPSEO\Admin\Configurator
 6 */
 7
 8/**
 9 * Class WPSEO_Config_Field_Company_Logo
10 */
11class WPSEO_Config_Field_Company_Logo extends WPSEO_Config_Field {
12
13	/**
14	 * WPSEO_Config_Field_Company_Logo constructor.
15	 */
16	public function __construct() {
17		parent::__construct( 'publishingEntityCompanyLogo', 'MediaUpload' );
18
19		$this->set_property( 'label', __( 'Provide an image of the company logo', 'wordpress-seo' ) );
20
21		$this->set_requires( 'publishingEntityType', 'company' );
22	}
23
24	/**
25	 * @param WPSEO_Configuration_Options_Adapter $adapter Adapter to register lookup on.
26	 */
27	public function set_adapter( WPSEO_Configuration_Options_Adapter $adapter ) {
28		$adapter->add_option_lookup( $this->get_identifier(), 'company_logo' );
29	}
30}