Changeset 9333 for trunk/wp-includes/general-template.php
- Timestamp:
- 10/24/2008 08:47:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r9243 r9333 740 740 $where = apply_filters('getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r ); 741 741 $join = apply_filters('getarchives_join', "", $r); 742 743 $output = ''; 742 744 743 745 if ( 'monthly' == $type ) { … … 759 761 if ( $show_post_count ) 760 762 $after = ' ('.$arcresult->posts.')' . $afterafter; 761 $output = get_archives_link($url, $text, $format, $before, $after); 762 if ( $echo ) 763 echo $output; 764 else 765 return $output; 763 $output .= get_archives_link($url, $text, $format, $before, $after); 766 764 } 767 765 } … … 784 782 if ($show_post_count) 785 783 $after = ' ('.$arcresult->posts.')' . $afterafter; 786 $output = get_archives_link($url, $text, $format, $before, $after); 787 if ( $echo ) 788 echo $output; 789 else 790 return $output; 784 $output .= get_archives_link($url, $text, $format, $before, $after); 791 785 } 792 786 } … … 810 804 if ($show_post_count) 811 805 $after = ' ('.$arcresult->posts.')'.$afterafter; 812 $output = get_archives_link($url, $text, $format, $before, $after); 813 if ( $echo ) 814 echo $output; 815 else 816 return $output; 806 $output .= get_archives_link($url, $text, $format, $before, $after); 817 807 } 818 808 } … … 843 833 if ($show_post_count) 844 834 $after = ' ('.$arcresult->posts.')'.$afterafter; 845 $output = get_archives_link($url, $text, $format, $before, $after); 846 if ( $echo ) 847 echo $output; 848 else 849 return $output; 835 $output .= get_archives_link($url, $text, $format, $before, $after); 850 836 } 851 837 } 852 838 } 853 839 } elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) { 854 ('alpha' == $type) ? $orderby = "post_title ASC " : $orderby ="post_date DESC ";840 $orderby = ('alpha' == $type) ? "post_title ASC " : "post_date DESC "; 855 841 $query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit"; 856 842 $key = md5($query); … … 872 858 else 873 859 $text = $arcresult->ID; 874 $output = get_archives_link($url, $text, $format, $before, $after); 875 if ( $echo ) 876 echo $output; 877 else 878 return $output; 860 $output .= get_archives_link($url, $text, $format, $before, $after); 879 861 } 880 862 } 881 863 } 882 864 } 865 if ( $echo ) 866 echo $output; 867 else 868 return $output; 883 869 } 884 870
Note: See TracChangeset
for help on using the changeset viewer.