From 7d24be9c97c9c4f3c7427796385c24e064dda974 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Sun, 30 Mar 2014 12:00:47 -0700 Subject: [PATCH] _s: Resolve merge conflicts from master branch. This also retains `$all_the_cool_cats` for some flavor. It has been around since the initial fork of Toolbox and makes people smile: https://twitter.com/TheFrosty/status/449581069231071232 --- inc/template-tags.php | 14 ++++--- languages/_s.pot | 95 +++++++++++++++---------------------------- 2 files changed, 42 insertions(+), 67 deletions(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index 7ef8192..6ca1f8f 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -99,19 +99,23 @@ endif; * Returns true if a blog has more than 1 category. */ function _s_categorized_blog() { - if ( false === ( $categories = get_transient( '_s_categories' ) ) ) { + if ( false === ( $all_the_cool_cats = get_transient( '_s_categories' ) ) ) { // Create an array of all the categories that are attached to posts. - $categories = get_categories( array( + $all_the_cool_cats = get_categories( array( + 'fields' => 'ids', 'hide_empty' => 1, + + // We only need to know if there is more than one category. + 'number' => 2, ) ); // Count the number of categories that are attached to the posts. - $categories = count( $categories ); + $all_the_cool_cats = count( $all_the_cool_cats ); - set_transient( '_s_categories', $categories ); + set_transient( '_s_categories', $all_the_cool_cats ); } - if ( '1' != $categories ) { + if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so _s_categorized_blog should return true. return true; } else { diff --git a/languages/_s.pot b/languages/_s.pot index dfe4104..4f6173b 100644 --- a/languages/_s.pot +++ b/languages/_s.pot @@ -1,14 +1,14 @@ -# Copyright (C) 2013 Automattic +# Copyright (C) 2014 Automattic # This file is distributed under the GNU General Public License v2 or later. msgid "" msgstr "" "Project-Id-Version: _s 1.0-wpcom\n" "Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n" -"POT-Creation-Date: 2013-12-19 02:31:31+00:00\n" +"POT-Creation-Date: 2014-03-30 17:37:52+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -31,92 +31,92 @@ msgstr "" msgid "Try looking in the monthly archives. %1$s" msgstr "" -#: archive.php:31 +#: archive.php:27 msgid "Author: %s" msgstr "" -#: archive.php:39 +#: archive.php:30 msgid "Day: %s" msgstr "" -#: archive.php:42 +#: archive.php:33 msgid "Month: %s" msgstr "" -#: archive.php:42 +#: archive.php:33 msgctxt "monthly archives date format" msgid "F Y" msgstr "" -#: archive.php:45 +#: archive.php:36 msgid "Year: %s" msgstr "" -#: archive.php:45 +#: archive.php:36 msgctxt "yearly archives date format" msgid "Y" msgstr "" -#: archive.php:48 +#: archive.php:39 msgid "Asides" msgstr "" -#: archive.php:51 +#: archive.php:42 msgid "Galleries" msgstr "" -#: archive.php:54 +#: archive.php:45 msgid "Images" msgstr "" -#: archive.php:57 +#: archive.php:48 msgid "Videos" msgstr "" -#: archive.php:60 +#: archive.php:51 msgid "Quotes" msgstr "" -#: archive.php:63 +#: archive.php:54 msgid "Links" msgstr "" -#: archive.php:66 +#: archive.php:57 msgid "Statuses" msgstr "" -#: archive.php:69 +#: archive.php:60 msgid "Audios" msgstr "" -#: archive.php:72 +#: archive.php:63 msgid "Chats" msgstr "" -#: archive.php:75 sidebar.php:17 +#: archive.php:66 sidebar.php:16 msgid "Archives" msgstr "" -#: comments.php:30 +#: comments.php:28 msgctxt "comments title" msgid "One thought on “%2$s”" msgid_plural "%1$s thoughts on “%2$s”" msgstr[0] "" msgstr[1] "" -#: comments.php:37 comments.php:57 +#: comments.php:35 comments.php:52 msgid "Comment navigation" msgstr "" -#: comments.php:38 comments.php:58 +#: comments.php:36 comments.php:53 msgid "← Older Comments" msgstr "" -#: comments.php:39 comments.php:59 +#: comments.php:37 comments.php:54 msgid "Newer Comments →" msgstr "" -#: comments.php:69 +#: comments.php:64 msgid "Comments are closed." msgstr "" @@ -146,7 +146,6 @@ msgid "Pages:" msgstr "" #: content-page.php:23 content-single.php:60 content.php:61 -#: inc/template-tags.php:81 inc/template-tags.php:100 msgid "Edit" msgstr "" @@ -201,11 +200,15 @@ msgstr "" msgid "% Comments" msgstr "" -#: footer.php:16 +#: footer.php:15 +msgid "http://wordpress.org/" +msgstr "" + +#: footer.php:15 msgid "Proudly powered by %s" msgstr "" -#: footer.php:18 +#: footer.php:17 msgid "Theme: %1$s by %2$s." msgstr "" @@ -213,7 +216,7 @@ msgstr "" msgid "Primary Menu" msgstr "" -#: functions.php:65 +#: functions.php:73 msgid "Sidebar" msgstr "" @@ -255,24 +258,7 @@ msgctxt "Next post link" msgid "%title " msgstr "" -#: inc/template-tags.php:81 -msgid "Pingback:" -msgstr "" - -#: inc/template-tags.php:91 -msgid "%s says:" -msgstr "" - -#: inc/template-tags.php:97 -msgctxt "1: date, 2: time" -msgid "%1$s at %2$s" -msgstr "" - -#: inc/template-tags.php:104 -msgid "Your comment is awaiting moderation." -msgstr "" - -#: inc/template-tags.php:145 +#: inc/template-tags.php:85 msgid "" "Posted on %1$s by " "%2$s" @@ -282,22 +268,7 @@ msgstr "" msgid "Search Results for: %s" msgstr "" -#: searchform.php:10 -msgctxt "label" -msgid "Search for:" -msgstr "" - -#: searchform.php:11 -msgctxt "placeholder" -msgid "Search …" -msgstr "" - -#: searchform.php:13 -msgctxt "submit button" -msgid "Search" -msgstr "" - -#: sidebar.php:24 +#: sidebar.php:23 msgid "Meta" msgstr ""