Metabox_Add_Keyword_Tab

Tab to add a keyword to analyze.

Defined (1)

The class is defined in the following location(s).

/admin/metabox/class-metabox-add-keyword-tab.php  
  1. class Metabox_Add_Keyword_Tab implements WPSEO_Metabox_Tab { 
  2.  
  3. /** 
  4. * Returns a button because a link is inappropriate here 
  5. * @return string 
  6. */ 
  7. public function link() { 
  8.  
  9. // Ensure thickbox is enqueued. 
  10. add_thickbox(); 
  11.  
  12. ob_start(); 
  13. ?> 
  14. <li class="wpseo-tab-add-keyword"> 
  15. <button type="button" class="wpseo-add-keyword button">+ <?php _e( 'Add keyword', 'wordpress-seo' ); ?></button> 
  16. </li> 
  17.  
  18. <?php 
  19. $popup_title = __( 'Want to add more than one keyword?', 'wordpress-seo' ); 
  20. /** translators: %1$s: expands to 'Yoast SEO Premium', %2$s: links to Yoast SEO Premium plugin page. */ 
  21. $popup_content = '<p>' . sprintf( __( 'Great news: you can, with %1$s!', 'wordpress-seo' ),  
  22. '<a href="https://yoa.st/pe-premium-page">Yoast SEO Premium</a>',  
  23. 'yoast.com' ) . '</p>'; 
  24. $popup_content .= '<p>' . __( 'Other benefits of Yoast SEO Premium for you:', 'wordpress-seo' ) . '</p>'; 
  25. $popup_content .= '<ul>'; 
  26. $popup_content .= '<li>' . __( '<strong>No more dead links</strong>: easy redirect manager', 'wordpress-seo' ) . '</li>'; 
  27. $popup_content .= '<li><strong>' . __( 'Superfast internal linking suggestions', 'wordpress-seo' ) . '</strong></li>'; 
  28. $popup_content .= '<li>' . __( '<strong>Social media preview</strong>: Facebook & Twitter', 'wordpress-seo' ) . '</li>'; 
  29. $popup_content .= '<li><strong>' . __( '24/7 support', 'wordpress-seo' ) . '</strong></li>'; 
  30. $popup_content .= '<li><strong>' . __( 'No ads!', 'wordpress-seo' ) . '</strong></li>'; 
  31. $popup_content .= '</ul>'; 
  32. $premium_popup = new WPSEO_Premium_Popup( 'add-keyword', 'h1', $popup_title, $popup_content ); 
  33. echo $premium_popup->get_premium_message(); 
  34.  
  35. return ob_get_clean(); 
  36.  
  37. /** 
  38. * Returns an empty string because this tab has no content 
  39. * @return string 
  40. */ 
  41. public function content() { 
  42. return '';