Advertisement
Guest User

comic press copyright

a guest
May 16th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. <?php
  2.  
  3. if (!function_exists('comicpress_copyright_text')) {
  4. function comicpress_copyright_text() {
  5. $output = "<p class=\"copyright-info\">\r\n";
  6. $output .= comicpress_copyright_info();
  7. $output .= "<span class=\"footer-pipe\">|</span> ";
  8. $output .= __('Powered by','comicpress') . " <a href=\"http://wordpress.org/\">WordPress</a> " . __('with','comicpress'). " <a href=\"http://frumph.net\">ComicPress</a>\r\n";
  9. $output .= comicpress_hosted_on();
  10. $output .= "<span class=\"footer-subscribe\">";
  11. $output .= "<span class=\"footer-pipe\">|</span> ";
  12. $output .= "Subscribe: <a href=\"" . get_bloginfo('rss2_url') ."\">RSS</a>\r\n";
  13. $output .= "</span>\r\n";
  14. if (!comicpress_themeinfo('disable_scroll_to_top')) {
  15. $output .= "<span class=\"footer-uptotop\">";
  16. $output .= "<span class=\"footer-pipe\">|</span> ";
  17. $output .= "<a href=\"#outside\" onclick=\"scrollup(); return false;\">".__('Back to Top &uarr;','comicpress')."</a>";
  18. $output .="</span>\r\n";
  19. }
  20. $output .= "</p>\r\n";
  21. echo apply_filters('comicpress_copyright_text', $output);
  22. }
  23. }
  24.  
  25. if (!function_exists('comicpress_hosted_on')) {
  26. function comicpress_hosted_on() {
  27. if (is_multisite()) {
  28. $current_site = get_current_site();
  29. if (!isset($current_site->site_name)) {
  30. $site_name = ucfirst( $current_site->domain );
  31. } else {
  32. $site_name = $current_site->site_name;
  33. }
  34. $output = "<span class=\"copyright-pipe\">|</span> ";
  35. $output .= __('Hosted on','comicpress') . ' <a href="http://'. $current_site->domain. $current_site->path. '">'. $site_name. '</a> ';
  36. return apply_filters('comicpress_hosted_on', $output);
  37. }
  38. }
  39. }
  40.  
  41. if (!function_exists('comicpress_copyright_info')) {
  42. function comicpress_copyright_info() {
  43. $copyright_name = comicpress_themeinfo('copyright_name');
  44. if (empty($copyright_name)) $copyright_name = get_bloginfo('name');
  45. $copyright_url = comicpress_themeinfo('copyright_url');
  46. if (empty($copyright_url)) $copyright_url = home_url();
  47. $copyright = __('&copy;', 'comicpress'). comicpress_copyright_dates() . ' ' . apply_filters('comicpress_copyright_info_name', '<a href="'.$copyright_url.'">' . $copyright_name . '</a>') . ' ';
  48. return apply_filters('comicpress_copyright_info', $copyright);
  49. }
  50. }
  51.  
  52. if (!function_exists('comicpress_copyright_dates')) {
  53. function comicpress_copyright_dates() {
  54. global $wpdb;
  55. $copyright_dates = $wpdb->get_results("
  56. SELECT
  57. YEAR(min(post_date_gmt)) AS firstdate,
  58. YEAR(max(post_date_gmt)) AS lastdate
  59. FROM
  60. $wpdb->posts
  61. WHERE
  62. post_status = 'publish'
  63. ");
  64. $output = '';
  65. if ($copyright_dates) {
  66. $copyright = $copyright_dates[0]->firstdate;
  67. if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {
  68. $copyright .= '-' . $copyright_dates[0]->lastdate;
  69. }
  70. $output = $copyright;
  71. }
  72. return apply_filters('comicpress_copyright_dates', $output);
  73. }
  74. }
  75.  
  76. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement