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. $field->set_property( 'label', sprintf( 
  18. /** translators: %s expands to 'Yoast SEO'. */ 
  19. __( 'Please choose the %s configuration of your liking:', 'wordpress-seo' ), 'Yoast SEO' ) 
  20. ); 
  21.  
  22. $field->add_choice( 
  23. sprintf( 
  24. /** translators: %s expands to 'Yoast SEO'. */ 
  25. __( 'Configure %s in a few steps', 'wordpress-seo' ),  
  26. 'Yoast SEO' 
  27. ),  
  28. sprintf( 
  29. /** translators: %1$s expands to 'Yoast SEO'. */ 
  30. __( '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' ),  
  31. 'Yoast SEO' 
  32. ),  
  33. array( 
  34. 'type' => 'primary',  
  35. 'label' => sprintf( 
  36. /** translators: %s expands to 'Yoast SEO'. */ 
  37. __( 'Configure %s', 'wordpress-seo' ), 'Yoast SEO' 
  38. ),  
  39. 'action' => 'nextStep',  
  40. ),  
  41. plugin_dir_url( WPSEO_FILE ) . '/images/Yoast_SEO_Icon.svg' 
  42. ); 
  43. $field->add_choice( 
  44. sprintf( 
  45. /** translators: %s expands to 'Yoast SEO'. */ 
  46. __( 'Let us set up %s for you', 'wordpress-seo' ), 'Yoast SEO' 
  47. ),  
  48. sprintf( 
  49. /** translators: %1$s expands to 'Yoast SEO', %2$s expands to 'Yoast SEO Premium'. */ 
  50. __( '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' ),  
  51. 'Yoast SEO',  
  52. 'Yoast SEO Premium' 
  53. ),  
  54. array( 
  55. 'type' => 'secondary',  
  56. 'label' => __( 'Configuration service', 'wordpress-seo' ),  
  57. 'action' => 'followURL',  
  58. 'url' => 'https://yoa.st/wizard-configuration-upsell',  
  59. ),  
  60. plugin_dir_url( WPSEO_FILE ) . 'images/yoast-configuration-icon.svg' 
  61. ); 
  62.  
  63. return $field; 
  64.  
  65. /** 
  66. * Get the data for the field. 
  67. * @return array 
  68. */ 
  69. public function get_data() { 
  70. return array(); 
  71.  
  72. /** 
  73. * Save data 
  74. * @param array $data Data containing changes. 
  75. * @return bool 
  76. */ 
  77. public function set_data( $data ) { 
  78. return true;