WYSIJA_help_links

The MailPoet Newsletters WYSIJA help links class.

Defined (1)

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

/helpers/links.php  
  1. class WYSIJA_help_links extends WYSIJA_object { 
  2.  
  3. /** 
  4. * Render a typical link 
  5. * @param type $html_content 
  6. * @param type $link 
  7. * @param string $max_link_length if the link exceeds to max_link_length, cut it off 
  8. * @param string $sub_string_length if the link exceeds to max_link_length, cut it off and keep a substring of $sub_string_length characters 
  9. * @param boolean $is_full_link if true, show full link, if no, show truncated link 
  10. * @param string $default_html if this is defined, we will use this value instead. 
  11. * @return < a > rendered tag 
  12. */ 
  13. public function render_link($html_content, $link, $max_link_length = 50, $sub_string_length = 15, $is_full_link = false, $default_html = NULL) { 
  14. if (!empty($default_html) && is_string($default_html)) 
  15. return $default_html; 
  16. $link = $link; // not in use 
  17. $helper_licence = WYSIJA::get('licence', 'helper'); 
  18. $url_checkout = $helper_licence->get_url_checkout('count_click_stats'); 
  19. $html_content.= str_replace( 
  20. array('[link]', '[/link]'),  
  21. array('<a title="'.__('Get Premium now', WYSIJA).'" target="_blank" href="'.$url_checkout.'">', '</a>'),  
  22. __("Get [link]MailPoet Premium[/link] to see the link.", WYSIJA)); 
  23. return $html_content; 
  24.  
  25. /** 
  26. * render a link to detailed subsubscriber page, useful for edit or stats 
  27. * @param int $user_id 
  28. * @return full link to detailed subscriber page 
  29. */ 
  30. public function detailed_subscriber($user_id) { 
  31. return 'admin.php?page=wysija_subscribers&id='.(int)$user_id.'&action=edit';