summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2019-01-01 22:18:11 -0500
committerAnthony G. Basile <blueness@gentoo.org>2019-01-01 22:18:11 -0500
commit018bd442ec1e04ba78a6628763414eb60b359398 (patch)
tree448cde462397af33e5a964ba5d0803b73c65040e /plugins/jetpack/modules/shortcodes/archives.php
parentUpdate easy-table 1.8 (diff)
downloadblogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.tar.gz
blogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.tar.bz2
blogs-gentoo-018bd442ec1e04ba78a6628763414eb60b359398.zip
Update jetpack 6.8.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/archives.php')
-rw-r--r--plugins/jetpack/modules/shortcodes/archives.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/plugins/jetpack/modules/shortcodes/archives.php b/plugins/jetpack/modules/shortcodes/archives.php
index 9ebd7f6e..173bbbb1 100644
--- a/plugins/jetpack/modules/shortcodes/archives.php
+++ b/plugins/jetpack/modules/shortcodes/archives.php
@@ -46,15 +46,17 @@ function archives_shortcode( $atts ) {
$after = wp_kses( $attr['after'], $allowedposttags );
// Get the archives
- $archives = wp_get_archives( array(
- 'type' => $attr['type'],
- 'limit' => $limit,
- 'format' => $attr['format'],
- 'echo' => false,
- 'show_post_count' => $showcount,
- 'before' => $before,
- 'after' => $after,
- ) );
+ $archives = wp_get_archives(
+ array(
+ 'type' => $attr['type'],
+ 'limit' => $limit,
+ 'format' => $attr['format'],
+ 'echo' => false,
+ 'show_post_count' => $showcount,
+ 'before' => $before,
+ 'after' => $after,
+ )
+ );
if ( 'asc' === $attr['order'] ) {
$archives = implode( "\n", array_reverse( explode( "\n", $archives ) ) );
@@ -63,9 +65,9 @@ function archives_shortcode( $atts ) {
// Check to see if there are any archives
if ( empty( $archives ) ) {
$archives = '<p>' . __( 'Your blog does not currently have any published posts.', 'jetpack' ) . '</p>';
- } else if ( 'option' === $attr['format'] ) {
+ } elseif ( 'option' === $attr['format'] ) {
$archives = '<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"><option value="' . get_permalink() . '">--</option>' . $archives . '</select>';
- } else if ( 'html' === $attr['format'] ) {
+ } elseif ( 'html' === $attr['format'] ) {
$archives = '<ul>' . $archives . '</ul>';
}