class-yoast-columns.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin
  6. */
  7. /**
  8. * Represents the yoast columns.
  9. */
  10. class WPSEO_Yoast_Columns implements WPSEO_WordPress_Integration {
  11. /**
  12. * Registers all hooks to WordPress.
  13. */
  14. public function register_hooks() {
  15. add_action( 'load-edit.php', [ $this, 'add_help_tab' ] );
  16. }
  17. /**
  18. * Adds the help tab to the help center for current screen.
  19. */
  20. public function add_help_tab() {
  21. $screen = get_current_screen();
  22. $screen->add_help_tab(
  23. [
  24. /* translators: %s expands to Yoast */
  25. 'title' => sprintf( __( '%s Columns', 'wordpress-seo' ), 'Yoast' ),
  26. 'id' => 'yst-columns',
  27. 'content' => sprintf(
  28. /* translators: %1$s: Yoast SEO, %2$s: Link to article about content analysis, %3$s: Anchor closing, %4$s: Link to article about text links, %5$s: Emphasis open tag, %6$s: Emphasis close tag */
  29. '<p>' . __( '%1$s adds several columns to this page. We\'ve written an article about %2$show to use the SEO score and Readability score%3$s. The links columns show the number of articles on this site linking %5$sto%6$s this article and the number of URLs linked %5$sfrom%6$s this article. Learn more about %4$show to use these features to improve your internal linking%3$s, which greatly enhances your SEO.', 'wordpress-seo' ) . '</p>',
  30. 'Yoast SEO',
  31. '<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/16p' ) . '">',
  32. '</a>',
  33. '<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/16q' ) . '">',
  34. '<em>',
  35. '</em>'
  36. ),
  37. 'priority' => 15,
  38. ]
  39. );
  40. }
  41. }