WPSEO_Config_Component_Suggestions

Represents the configuration suggestions component.

Defined (1)

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

/admin/config-ui/components/class-component-suggestions.php  
  1. class WPSEO_Config_Component_Suggestions implements WPSEO_Config_Component { 
  2.  
  3. /** 
  4. * Gets the component identifier. 
  5. * @return string 
  6. */ 
  7. public function get_identifier() { 
  8. return 'Suggestions'; 
  9.  
  10. /** 
  11. * Gets the field. 
  12. * @return WPSEO_Config_Field 
  13. */ 
  14. public function get_field() { 
  15. $field = new WPSEO_Config_Field_Suggestions(); 
  16.  
  17. // Only show Premium upsell when we are not inside a Premium install. 
  18. if ( ! defined( 'WPSEO_PREMIUM_PLUGIN_FILE' ) ) { 
  19. $field->add_suggestion( 
  20. /** translators: %s resolves to Yoast SEO Premium */ 
  21. sprintf( __( 'Outrank the competition with %s', 'wordpress-seo' ), 'Yoast SEO Premium' ),  
  22. /** translators: %1$s resolves to Yoast SEO Premium */ 
  23. sprintf( __( 'Do you want to outrank your competition? %1$s gives you awesome additional features that\'ll help you to set up your SEO strategy like a professional. Use the multiple focus keywords functionality, the redirect manager and our internal linking tool. %1$s will also give you access to premium support.', 'wordpress-seo' ), 'Yoast SEO Premium' ),  
  24. array( 
  25. 'label' => __( 'Upgrade to Premium', 'wordpress-seo' ),  
  26. 'type' => 'primary',  
  27. 'url' => 'https://yoa.st/wizard-suggestion-premium',  
  28. ),  
  29. 'https://yoa.st/video-yoast-seo-premium' 
  30. ); 
  31.  
  32. $field->add_suggestion( 
  33. __( 'Learn how to write copy that ranks', 'wordpress-seo' ),  
  34. /** translators: %1$s resolves to SEO copywriting training */ 
  35. sprintf( __( 'Do you want to learn how to write content that generates traffic? Check out our %1$s. We will help you to write awesome copy that will rank in the search engines. The %1$s covers all the main steps in SEO copywriting: from keyword research to publishing.', 'wordpress-seo' ), 'SEO copywriting training' ),  
  36. array( 
  37. 'label' => 'SEO copywriting training',  
  38. 'type' => 'link',  
  39. 'url' => 'https://yoa.st/configuration-wizard-copywrite-course-link',  
  40. ),  
  41. 'https://yoa.st/video-course-copywriting' 
  42. ); 
  43.  
  44. $field->add_suggestion( 
  45. /** translators: %1$s resolves to Yoast SEO, %2$s resolves to Yoast SEO plugin training */ 
  46. sprintf( __( 'Get the most out of %1$s with the %2$s', 'wordpress-seo' ), 'Yoast SEO', 'Yoast SEO plugin training' ),  
  47. /** translators: %1$s resolves to Yoast SEO */ 
  48. sprintf( __( 'Do you want to know all the ins and outs of the %1$s plugin? Do you want to learn all about our advanced settings? Want to be able to really get the most out of the %1$s plugin? Check out our %1$s plugin training and start outranking the competition!', 'wordpress-seo' ), 'Yoast SEO' ),  
  49. array( 
  50. 'label' => 'Yoast SEO plugin training',  
  51. 'type' => 'link',  
  52. 'url' => 'https://yoa.st/wizard-suggestion-plugin-course',  
  53. ),  
  54. 'https://yoa.st/video-plugin-course' 
  55. ); 
  56.  
  57. // When we are running in Yoast SEO Premium and don't have Local SEO installed, show Local SEO as suggestion. 
  58. if ( defined( 'WPSEO_PREMIUM_PLUGIN_FILE' ) && ! defined( 'WPSEO_LOCAL_FILE' ) ) { 
  59. $field->add_suggestion( 
  60. sprintf( __( 'Attract more customers near you', 'wordpress-seo' ), 'Yoast SEO', 'Yoast SEO plugin training' ),  
  61. /** translators: %1$s resolves to Local SEO */ 
  62. sprintf( __( 'If you want to outrank the competition in a specific town or region, check out our %1$s plugin! You*ll be able to easily insert Google maps, opening hours, contact information and a store locator. Besides that %1$s helps you to improve the usability of your contact page.', 'wordpress-seo' ), 'Local SEO' ),  
  63. array( 
  64. 'label' => 'Local SEO',  
  65. 'type' => 'link',  
  66. 'url' => 'https://yoa.st/wizard-suggestion-localseo',  
  67. ),  
  68. 'https://yoa.st/video-localseo' 
  69. ); 
  70.  
  71. return $field; 
  72.  
  73. /** 
  74. * Get the data for the field. 
  75. * @return array 
  76. */ 
  77. public function get_data() { 
  78. return array(); 
  79.  
  80. /** 
  81. * Save data 
  82. * @param array $data Data containing changes. 
  83. * @return bool 
  84. */ 
  85. public function set_data( $data ) { 
  86. return true;