Guest User

Untitled

a guest
Jan 19th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. function no_link_title($cut_at = '') {
  2. $buffy = '';
  3. $buffy .= '<h3 class="entry-title td-module-title">';
  4.  
  5. //see if we have to cut the title and if we have the title lenght in the panel for ex: td_module_6__title_excerpt
  6. if ($cut_at != '') {
  7. //cut at the hard coded size
  8. $buffy .= td_util::excerpt($this->title, $cut_at, 'show_shortcodes');
  9.  
  10. } else {
  11. $current_module_class = get_class($this);
  12.  
  13. //see if we have a default setting for this module, and if so only apply it if we don't get other things form theme panel.
  14. if (td_api_module::_helper_check_excerpt_title($current_module_class)) {
  15. $db_title_excerpt = td_util::get_option($current_module_class . '_title_excerpt');
  16. if ($db_title_excerpt != '') {
  17. //cut from the database settings
  18. $buffy .= td_util::excerpt($this->title, $db_title_excerpt, 'show_shortcodes');
  19. } else {
  20. //cut at the default size
  21. $module_api = td_api_module::get_by_id($current_module_class);
  22. $buffy .= td_util::excerpt($this->title, $module_api['excerpt_title'], 'show_shortcodes');
  23. }
  24. } else {
  25. /**
  26. * no $cut_at provided and no setting in td_config -> return the full title
  27. * @see td_global::$modules_list
  28. */
  29. $buffy .= $this->title;
  30. }
  31.  
  32. }
  33. $buffy .= '</h3>';
  34. return $buffy;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment