_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
This commit is contained in:
Konstantin Obenland 2014-03-30 12:00:47 -07:00
parent 87ca7b66ad
commit 7d24be9c97
2 changed files with 42 additions and 67 deletions

View File

@ -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 {

View File

@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 &ldquo;%2$s&rdquo;"
msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
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 "&larr; Older Comments"
msgstr ""
#: comments.php:39 comments.php:59
#: comments.php:37 comments.php:54
msgid "Newer Comments &rarr;"
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 <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: inc/template-tags.php:81
msgid "Pingback:"
msgstr ""
#: inc/template-tags.php:91
msgid "%s <span class=\"says\">says:</span>"
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 ""
"<span class=\"posted-on\">Posted on %1$s</span><span class=\"byline\"> by "
"%2$s</span>"
@ -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 &hellip;"
msgstr ""
#: searchform.php:13
msgctxt "submit button"
msgid "Search"
msgstr ""
#: sidebar.php:24
#: sidebar.php:23
msgid "Meta"
msgstr ""