WPSEO_Config_Component_Configuration_Choices

Represents the configuration choices component.

Defined (1)

The class is defined in the following location(s).

/admin/config-ui/components/class-component-configuration-choices.php  
  1. class WPSEO_Config_Component_Configuration_Choices implements WPSEO_Config_Component { 
  2.  
  3. /** 
  4. * Gets the component identifier. 
  5. * @return string 
  6. */ 
  7. public function get_identifier() { 
  8. return 'ConfigurationChoices'; 
  9.  
  10. /** 
  11. * Gets the field. 
  12. * @return WPSEO_Config_Field 
  13. */ 
  14. public function get_field() { 
  15. $field = new WPSEO_Config_Field_Configuration_Choices(); 
  16.  
  17. /** translators: %s resolves to Yoast SEO */ 
  18. $field->set_property( 'label', sprintf( __( 'Please choose the %s configuration of your liking:', 'wordpress-seo' ), 'Yoast SEO' ) ); 
  19.  
  20. $field->add_choice( 
  21. __( 'Configure Yoast SEO in a few steps', 'wordpress-seo' ),  
  22. sprintf( __( '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' ), 'Yoast SEO' ),  
  23. array( 
  24. 'type' => 'primary',  
  25. 'label' => sprintf( __( 'Configure %s', 'wordpress-seo' ), 'Yoast SEO' ),  
  26. 'action' => 'nextStep',  
  27. ),  
  28. plugin_dir_url( WPSEO_FILE ) . '/images/Yoast_SEO_Icon.svg' 
  29. ); 
  30. $field->add_choice( 
  31. __( 'Let us set up Yoast SEO for you', 'wordpress-seo' ),  
  32. sprintf( 
  33. __( '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' ),  
  34. 'Yoast SEO',  
  35. 'Yoast SEO Premium' 
  36. ),  
  37. array( 
  38. 'type' => 'secondary',  
  39. 'label' => __( 'Configuration service', 'wordpress-seo' ),  
  40. 'action' => 'followURL',  
  41. 'url' => 'https://yoa.st/wizard-configuration-upsell',  
  42. ),  
  43. plugin_dir_url( WPSEO_FILE ) . 'images/yoast-configuration-icon.svg' 
  44. ); 
  45.  
  46. return $field; 
  47.  
  48. /** 
  49. * Get the data for the field. 
  50. * @return array 
  51. */ 
  52. public function get_data() { 
  53. return array(); 
  54.  
  55. /** 
  56. * Save data 
  57. * @param array $data Data containing changes. 
  58. * @return bool 
  59. */ 
  60. public function set_data( $data ) { 
  61. return true;