js-templates-primary-term.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin
  6. */
  7. if ( ! defined( 'WPSEO_VERSION' ) ) {
  8. header( 'Status: 403 Forbidden' );
  9. header( 'HTTP/1.1 403 Forbidden' );
  10. exit();
  11. }
  12. ?>
  13. <script type="text/html" id="tmpl-primary-term-ui">
  14. <?php
  15. printf(
  16. '<button type="button" class="wpseo-make-primary-term" aria-label="%1$s">%2$s</button>',
  17. esc_attr( sprintf(
  18. /* translators: accessibility text. %1$s expands to the term title, %2$s to the taxonomy title. */
  19. __( 'Make %1$s primary %2$s', 'wordpress-seo' ),
  20. '{{data.term}}',
  21. '{{data.taxonomy.title}}'
  22. ) ),
  23. esc_html__( 'Make primary', 'wordpress-seo' )
  24. );
  25. ?>
  26. <span class="wpseo-is-primary-term" aria-hidden="true"><?php esc_html_e( 'Primary', 'wordpress-seo' ); ?></span>
  27. </script>
  28. <script type="text/html" id="tmpl-primary-term-screen-reader">
  29. <span class="screen-reader-text wpseo-primary-category-label"><?php
  30. printf(
  31. /* translators: %s is the taxonomy title. This will be shown to screenreaders */
  32. '(' . esc_html__( 'Primary %s', 'wordpress-seo' ) . ')',
  33. '{{data.taxonomy.title}}'
  34. );
  35. ?></span>
  36. </script>