'postbypost', 'limit' => '', 'format' => 'html', 'showcount' => false, 'before' => '', 'after' => '', 'order' => 'desc', ); extract( shortcode_atts( $default_atts, $attr, 'archives' ) ); if ( ! in_array( $type, array( 'yearly', 'monthly', 'daily', 'weekly', 'postbypost' ) ) ) $type = 'postbypost'; if ( ! in_array( $format, array( 'html', 'option', 'custom' ) ) ) $format = 'html'; if ( '' != $limit ) { $limit = ( int ) $limit; // A Limit of 0 makes no sense so revert back to the default. if ( 0 == $limit ) { $limit = ''; } } $showcount = ( bool ) $showcount; $before = wp_kses( $before, $allowedposttags ); $after = wp_kses( $after, $allowedposttags ); // Get the archives $archives = wp_get_archives( array( 'type' => $type, 'limit' => $limit, 'format' => $format, 'echo' => false, 'show_post_count' => $showcount, 'before' => $before, 'after' => $after ) ); if ( 'asc' == $order ) $archives = implode( "\n", array_reverse( explode( "\n", $archives ) ) ); // Check to see if there are any archives if ( empty( $archives ) ) $archives = '
' . __( 'Your blog does not currently have any published posts.' , 'jetpack' ) . '
'; elseif ( 'option' == $format ) $archives = ""; elseif ( 'html' == $format ) $archives = '