sidebar.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. /**
  3. * View for the banner sidebar.
  4. *
  5. * @package WPSEO\Admin\Views
  6. */
  7. $wpseo_plugin_dir_url = plugin_dir_url( WPSEO_FILE );
  8. $new_tab_message = WPSEO_Admin_Utils::get_new_tab_message();
  9. ?>
  10. <div class="wpseo_content_cell" id="sidebar-container">
  11. <div id="sidebar" class="yoast-sidebar">
  12. <div class="wpseo_content_cell_title yoast-sidebar__title">
  13. <?php
  14. /* translators: %1$s expands to Yoast */
  15. printf( esc_html__( '%1$s recommendations for you', 'wordpress-seo' ), 'Yoast' );
  16. ?>
  17. </div>
  18. <div class="yoast-sidebar__section">
  19. <h2>
  20. <?php
  21. /* translators: %s expands to Yoast SEO Premium */
  22. printf( esc_html__( 'Upgrade to %s', 'wordpress-seo' ), 'Yoast SEO Premium' );
  23. ?>
  24. </h2>
  25. <ul>
  26. <li>
  27. <strong><?php esc_html_e( 'Rank better with synonyms & related keyphrases', 'wordpress-seo' ); ?></strong>
  28. </li>
  29. <li>
  30. <strong><?php esc_html_e( 'Preview your page in Facebook and Twitter', 'wordpress-seo' ); ?></strong>
  31. </li>
  32. <li>
  33. <strong><?php esc_html_e( 'Get real-time suggestions for internal links', 'wordpress-seo' ); ?></strong>
  34. </li>
  35. <li><strong><?php esc_html_e( 'No more dead links a.k.a. 404 pages', 'wordpress-seo' ); ?></strong></li>
  36. <li><strong><?php esc_html_e( '24/7 email support', 'wordpress-seo' ); ?></strong></li>
  37. <li><strong><?php esc_html_e( 'No ads!', 'wordpress-seo' ); ?></strong></li>
  38. </ul>
  39. <a id="wpseo-premium-button" class="yoast-button-upsell"
  40. href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/jj' ); ?>" target="_blank">
  41. <?php
  42. /* translators: %s expands to Yoast SEO Premium */
  43. printf( esc_html__( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' );
  44. // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $new_tab_message is properly escaped.
  45. echo $new_tab_message;
  46. echo '<span aria-hidden="true" class="yoast-button-upsell__caret"></span>';
  47. ?>
  48. </a><br>
  49. </div>
  50. <div class="yoast-sidebar__product-list">
  51. <div class="yoast-sidebar__section">
  52. <h2>
  53. <?php
  54. /* translators: %s expands to Yoast SEO */
  55. printf( esc_html__( 'Extend %s', 'wordpress-seo' ), 'Yoast SEO' );
  56. ?>
  57. </h2>
  58. <div class="wp-clearfix">
  59. <p>
  60. <a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/jq' ); ?>" target="_blank">
  61. <img src="<?php echo esc_url( $wpseo_plugin_dir_url . 'images/local_plugin_assistant.svg' ); ?>"
  62. alt="">
  63. <strong>Be found on Google Maps!</strong>
  64. <?php
  65. // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $new_tab_message is properly escaped.
  66. echo $new_tab_message;
  67. ?>
  68. </a><br>
  69. <?php esc_html_e( 'Our Local SEO plugin will help you rank in Google Maps and local results.', 'wordpress-seo' ); ?>
  70. </p>
  71. </div>
  72. <div class="wp-clearfix">
  73. <p>
  74. <a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/jo' ); ?>" target="_blank">
  75. <img src="<?php echo esc_url( $wpseo_plugin_dir_url . 'images/video_plugin_assistant.svg' ); ?>"
  76. class="alignleft"
  77. alt="">
  78. <strong>Rank in Google Video</strong>
  79. <?php
  80. // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $new_tab_message is properly escaped.
  81. echo $new_tab_message;
  82. ?>
  83. </a><br>
  84. <?php esc_html_e( 'Make sure your videos rank and are easy to share with our Video SEO plugin.', 'wordpress-seo' ); ?>
  85. </p>
  86. </div>
  87. <div class="wp-clearfix">
  88. <p>
  89. <a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/jp' ); ?>" target="_blank">
  90. <img src="<?php echo esc_url( $wpseo_plugin_dir_url . 'images/woo_plugin_assistant.svg' ); ?>"
  91. alt="">
  92. <strong>WooCommerce SEO</strong>
  93. <?php
  94. // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $new_tab_message is properly escaped.
  95. echo $new_tab_message;
  96. ?>
  97. </a><br>
  98. <?php esc_html_e( 'Optimize your shop\'s SEO and sell more products!', 'wordpress-seo' ); ?>
  99. </p>
  100. </div>
  101. <div class="wp-clearfix">
  102. <p>
  103. <a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/jr' ); ?>" target="_blank">
  104. <img src="<?php echo esc_url( $wpseo_plugin_dir_url . 'images/news_plugin_assistant.svg' ); ?>"
  105. class="alignleft"
  106. alt="">
  107. <strong>Rank in Google News</strong>
  108. <?php
  109. // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $new_tab_message is properly escaped.
  110. echo $new_tab_message;
  111. ?>
  112. </a><br>
  113. <?php esc_html_e( 'Start to optimize your site for Google News traffic today!', 'wordpress-seo' ); ?>
  114. </p>
  115. </div>
  116. </div>
  117. </div>
  118. <div class="yoast-sidebar__section">
  119. <h2>
  120. <?php
  121. esc_html_e( 'Learn SEO', 'wordpress-seo' );
  122. ?>
  123. </h2>
  124. <p>
  125. <?php
  126. $url = WPSEO_Shortlinker::get( 'https://yoa.st/3t6' );
  127. /* translators: %1$s expands to Yoast SEO academy, which is a clickable link. */
  128. printf( esc_html__( 'Want to learn SEO from Team Yoast? Check out our %1$s!', 'wordpress-seo' ), '<a href="' . $url . '"><strong>Yoast SEO academy</strong></a>' );
  129. echo '<br/>';
  130. esc_html_e( 'We have both free and premium online courses to learn everything you need to know about SEO.', 'wordpress-seo' );
  131. ?>
  132. </p>
  133. <p>
  134. <a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/3t6' ); ?>" target="_blank"><?php
  135. /* translators: %1$s expands to Yoast SEO academy */
  136. printf( esc_html__( 'Check out %1$s', 'wordpress-seo' ), 'Yoast SEO academy' );
  137. ?></a>
  138. </p>
  139. </div>
  140. <div class="yoast-sidebar__section">
  141. <h2><?php esc_html_e( 'Remove these ads?', 'wordpress-seo' ); ?></h2>
  142. <p>
  143. <a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/jy' ); ?>" target="_blank">
  144. <?php
  145. /* translators: %s expands to Yoast SEO Premium */
  146. printf( esc_html__( 'Upgrade to %s', 'wordpress-seo' ), 'Yoast SEO Premium' );
  147. // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: $new_tab_message is properly escaped.
  148. echo $new_tab_message;
  149. ?>
  150. </a>
  151. </p>
  152. </div>
  153. </div>
  154. </div>