class-metabox-keyword-synonyms-config.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin\Metabox
  6. */
  7. /**
  8. * Button to show the premium upsell.
  9. */
  10. class WPSEO_Metabox_Keyword_Synonyms_Config {
  11. /**
  12. * Enqueues the translations necessary for the synonyms modal + button
  13. *
  14. * @return void
  15. */
  16. public function enqueue_translations() {
  17. $keyword_synonyms_modal_config = array(
  18. 'openButtonIcon' => '',
  19. 'intl' => array(
  20. 'open' => '+ ' . __( 'Add synonyms', 'wordpress-seo' ),
  21. 'modalAriaLabel' =>
  22. /* translators: %s expands to 'Yoast SEO Premium'. */
  23. sprintf( __( 'Get %s now!', 'wordpress-seo' ), 'Yoast SEO Premium' ),
  24. 'heading' =>
  25. /* translators: %s expands to 'Yoast SEO Premium'. */
  26. sprintf( __( 'Get %s now!', 'wordpress-seo' ), 'Yoast SEO Premium' ),
  27. ),
  28. 'classes' => array(
  29. 'openButton' => 'wpseo-keyword-synonyms button-link',
  30. ),
  31. 'content' => 'KeywordSynonyms',
  32. );
  33. $translations = new WPSEO_Keyword_Synonyms_Modal();
  34. $translations->enqueue_translations();
  35. Yoast_Modal::add( $keyword_synonyms_modal_config );
  36. }
  37. }