PageRenderTime 19ms CodeModel.GetById 10ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/wordpress-seo/admin/config-ui/components/class-component-configuration-choices.php

https://bitbucket.org/carloskikea/helpet
PHP | 98 lines | 54 code | 8 blank | 36 comment | 0 complexity | 70555997c12a379fc36c2bab1842cb0a MD5 | raw file
 1<?php
 2/**
 3 * WPSEO plugin file.
 4 *
 5 * @package WPSEO\Admin\ConfigurationUI
 6 */
 7
 8/**
 9 * Represents the configuration choices component.
10 */
11class WPSEO_Config_Component_Configuration_Choices implements WPSEO_Config_Component {
12
13	/**
14	 * Gets the component identifier.
15	 *
16	 * @return string
17	 */
18	public function get_identifier() {
19		return 'ConfigurationChoices';
20	}
21
22	/**
23	 * Gets the field.
24	 *
25	 * @return WPSEO_Config_Field
26	 */
27	public function get_field() {
28		$field = new WPSEO_Config_Field_Configuration_Choices();
29
30		$field->set_property( 'label', sprintf(
31			/* translators: %s expands to 'Yoast SEO'. */
32			__( 'Please choose the %s configuration of your liking:', 'wordpress-seo' ), 'Yoast SEO' )
33		);
34
35		$field->add_choice(
36			sprintf(
37				/* translators: %s expands to 'Yoast SEO'. */
38				__( 'Configure %s in a few steps', 'wordpress-seo' ),
39				'Yoast SEO'
40			),
41			sprintf(
42				/* translators: %1$s expands to 'Yoast SEO'. */
43				__( 'Welcome to the %1$s configuration wizard. In a few simple steps we\'ll help you configure your SEO settings to match your website\'s needs! %1$s will take care of all the technical optimizations your site needs.', 'wordpress-seo' ),
44				'Yoast SEO'
45			),
46			array(
47				'type'   => 'primary',
48				'label'  => sprintf(
49					/* translators: %s expands to 'Yoast SEO'. */
50					__( 'Configure %s', 'wordpress-seo' ), 'Yoast SEO'
51				),
52				'action' => 'nextStep',
53			),
54			plugin_dir_url( WPSEO_FILE ) . '/images/Yoast_SEO_Icon.svg'
55		);
56		$field->add_choice(
57			sprintf(
58				/* translators: %s expands to 'Yoast SEO'. */
59				__( 'Let us set up %s for you', 'wordpress-seo' ), 'Yoast SEO'
60			),
61			sprintf(
62				/* translators: %1$s expands to 'Yoast SEO', %2$s expands to 'Yoast SEO Premium'. */
63				__( 'While we strive to make setting up %1$s as easy as possible, we understand it can still be daunting. If you would rather have us set up %1$s for you (and get a copy of %2$s in the process), order a %1$s configuration service and sit back while we configure your site.', 'wordpress-seo' ),
64				'Yoast SEO',
65				'Yoast SEO Premium'
66			),
67			array(
68				'type'   => 'secondary',
69				'label'  => __( 'Configuration service', 'wordpress-seo' ),
70				'action' => 'followURL',
71				'url'    => WPSEO_Shortlinker::get( 'https://yoa.st/wizard-configuration-upsell' ),
72			),
73			plugin_dir_url( WPSEO_FILE ) . 'images/yoast-configuration-icon.svg'
74		);
75
76		return $field;
77	}
78
79	/**
80	 * Get the data for the field.
81	 *
82	 * @return array
83	 */
84	public function get_data() {
85		return array();
86	}
87
88	/**
89	 * Save data
90	 *
91	 * @param array $data Data containing changes.
92	 *
93	 * @return bool
94	 */
95	public function set_data( $data ) {
96		return true;
97	}
98}