Plugin Directory

Changeset 826348


Ignore:
Timestamp:
12/21/2013 12:19:38 AM (12 years ago)
Author:
rob1n
Message:

Quick fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smarter-archives/trunk/smarter-archives.php

    r822290 r826348  
    2929    $archives = array();
    3030   
    31     if ( empty( $results ) )
    32         return $archives;
    33    
    34     foreach ( $results as $result ) {
    35         if ( !isset( $archives[$result->year] ) )
    36             $archives[$result->year] = array();
     31    if ( !empty( $results ) ) {
     32        foreach ( $results as $result ) {
     33            if ( !isset( $archives[$result->year] ) )
     34                $archives[$result->year] = array();
    3735       
    38         $archives[$result->year][$result->month] = $result->count;
     36            $archives[$result->year][$result->month] = $result->count;
     37        }
    3938    }
    4039   
     
    6564        $mode = 'output';
    6665   
    67     $order = strtoupper( $order );
    68     if ( $order != 'DESC' && $order != 'ASC' )
    69         $order = 'DESC';
    70    
    7166    $archives = get_smarter_archives();
    7267   
     
    7469        return '';
    7570   
     71    $order = strtoupper( $order );
    7672    if ( $order == 'ASC' )
    7773        ksort( $archives );
     
    136132    function wp_smart_archives( $args = '' )
    137133    {
    138         return smarter_archives($args);
     134        return smarter_archives( $args );
    139135    }
    140136   
Note: See TracChangeset for help on using the changeset viewer.