rss-content.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin\Views\Rss
  6. *
  7. * @uses Yoast_Form $yform Form object.
  8. */
  9. $textarea_atts = [
  10. 'cols' => '50',
  11. 'rows' => '5',
  12. ];
  13. $yform->textarea( 'rssbefore', __( 'Content to put before each post in the feed', 'wordpress-seo' ), $textarea_atts );
  14. $yform->textarea( 'rssafter', __( 'Content to put after each post in the feed', 'wordpress-seo' ), $textarea_atts );
  15. $rss_variables_help = new WPSEO_Admin_Help_Panel(
  16. 'search-appearance-rss-variables',
  17. __( 'Learn more about the available variables', 'wordpress-seo' ),
  18. __( 'You can use the following variables within the content, they will be replaced by the value on the right.', 'wordpress-seo' ),
  19. 'has-wrapper'
  20. );
  21. echo '<h2 class="help-button-inline">' . esc_html__( 'Available variables', 'wordpress-seo' ) . $rss_variables_help->get_button_html() . '</h2>';
  22. echo $rss_variables_help->get_panel_html();
  23. ?>
  24. <table class="wpseo yoast_help yoast-table-scrollable">
  25. <thead>
  26. <tr>
  27. <th scope="col"><?php esc_html_e( 'Variable', 'wordpress-seo' ); ?></th>
  28. <th scope="col"><?php esc_html_e( 'Description', 'wordpress-seo' ); ?></th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <tr>
  33. <td class="yoast-variable-name">%%AUTHORLINK%%</td>
  34. <td class="yoast-variable-desc"><?php esc_html_e( 'A link to the archive for the post author, with the authors name as anchor text.', 'wordpress-seo' ); ?></td>
  35. </tr>
  36. <tr>
  37. <td class="yoast-variable-name">%%POSTLINK%%</td>
  38. <td class="yoast-variable-desc"><?php esc_html_e( 'A link to the post, with the title as anchor text.', 'wordpress-seo' ); ?></td>
  39. </tr>
  40. <tr>
  41. <td class="yoast-variable-name">%%BLOGLINK%%</td>
  42. <td class="yoast-variable-desc"><?php esc_html_e( "A link to your site, with your site's name as anchor text.", 'wordpress-seo' ); ?></td>
  43. </tr>
  44. <tr>
  45. <td class="yoast-variable-name">%%BLOGDESCLINK%%</td>
  46. <td class="yoast-variable-desc"><?php esc_html_e( "A link to your site, with your site's name and description as anchor text.", 'wordpress-seo' ); ?></td>
  47. </tr>
  48. </tbody>
  49. </table>