Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
noblogs-wp
Commits
17ba8b70
Commit
17ba8b70
authored
Sep 05, 2014
by
lucha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[auto] Theme: twentyeleven 1.9
parent
dc44e1ac
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
521 additions
and
271 deletions
+521
-271
wp-content/themes/twentyeleven/404.php
wp-content/themes/twentyeleven/404.php
+1
-1
wp-content/themes/twentyeleven/archive.php
wp-content/themes/twentyeleven/archive.php
+2
-2
wp-content/themes/twentyeleven/author.php
wp-content/themes/twentyeleven/author.php
+20
-8
wp-content/themes/twentyeleven/category.php
wp-content/themes/twentyeleven/category.php
+12
-3
wp-content/themes/twentyeleven/comments.php
wp-content/themes/twentyeleven/comments.php
+7
-4
wp-content/themes/twentyeleven/content-aside.php
wp-content/themes/twentyeleven/content-aside.php
+4
-2
wp-content/themes/twentyeleven/content-featured.php
wp-content/themes/twentyeleven/content-featured.php
+1
-1
wp-content/themes/twentyeleven/content-gallery.php
wp-content/themes/twentyeleven/content-gallery.php
+4
-2
wp-content/themes/twentyeleven/content-image.php
wp-content/themes/twentyeleven/content-image.php
+4
-2
wp-content/themes/twentyeleven/content-intro.php
wp-content/themes/twentyeleven/content-intro.php
+1
-1
wp-content/themes/twentyeleven/content-link.php
wp-content/themes/twentyeleven/content-link.php
+4
-2
wp-content/themes/twentyeleven/content-page.php
wp-content/themes/twentyeleven/content-page.php
+1
-1
wp-content/themes/twentyeleven/content-quote.php
wp-content/themes/twentyeleven/content-quote.php
+1
-1
wp-content/themes/twentyeleven/content-single.php
wp-content/themes/twentyeleven/content-single.php
+4
-1
wp-content/themes/twentyeleven/content-status.php
wp-content/themes/twentyeleven/content-status.php
+17
-3
wp-content/themes/twentyeleven/content.php
wp-content/themes/twentyeleven/content.php
+1
-1
wp-content/themes/twentyeleven/footer.php
wp-content/themes/twentyeleven/footer.php
+3
-2
wp-content/themes/twentyeleven/functions.php
wp-content/themes/twentyeleven/functions.php
+107
-39
wp-content/themes/twentyeleven/header.php
wp-content/themes/twentyeleven/header.php
+22
-16
wp-content/themes/twentyeleven/image.php
wp-content/themes/twentyeleven/image.php
+11
-3
wp-content/themes/twentyeleven/inc/theme-options.php
wp-content/themes/twentyeleven/inc/theme-options.php
+79
-24
wp-content/themes/twentyeleven/inc/widgets.php
wp-content/themes/twentyeleven/inc/widgets.php
+23
-6
wp-content/themes/twentyeleven/index.php
wp-content/themes/twentyeleven/index.php
+1
-1
wp-content/themes/twentyeleven/js/html5.js
wp-content/themes/twentyeleven/js/html5.js
+7
-5
wp-content/themes/twentyeleven/languages/twentyeleven.pot
wp-content/themes/twentyeleven/languages/twentyeleven.pot
+118
-118
wp-content/themes/twentyeleven/page.php
wp-content/themes/twentyeleven/page.php
+1
-1
wp-content/themes/twentyeleven/screenshot.png
wp-content/themes/twentyeleven/screenshot.png
+0
-0
wp-content/themes/twentyeleven/search.php
wp-content/themes/twentyeleven/search.php
+5
-3
wp-content/themes/twentyeleven/searchform.php
wp-content/themes/twentyeleven/searchform.php
+1
-1
wp-content/themes/twentyeleven/showcase.php
wp-content/themes/twentyeleven/showcase.php
+7
-6
wp-content/themes/twentyeleven/sidebar-footer.php
wp-content/themes/twentyeleven/sidebar-footer.php
+3
-2
wp-content/themes/twentyeleven/sidebar-page.php
wp-content/themes/twentyeleven/sidebar-page.php
+2
-1
wp-content/themes/twentyeleven/sidebar.php
wp-content/themes/twentyeleven/sidebar.php
+1
-1
wp-content/themes/twentyeleven/single.php
wp-content/themes/twentyeleven/single.php
+1
-1
wp-content/themes/twentyeleven/style.css
wp-content/themes/twentyeleven/style.css
+31
-2
wp-content/themes/twentyeleven/tag.php
wp-content/themes/twentyeleven/tag.php
+14
-4
No files found.
wp-content/themes/twentyeleven/404.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying 404 pages (Not Found)
.
* Template for displaying 404 pages (Not Found)
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/archive.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying Archive pages
.
* Template for displaying Archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
*
Learn more:
http://codex.wordpress.org/Template_Hierarchy
*
@link
http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/author.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying Author Archive pages
.
* Template for displaying Author Archive pages
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
@@ -15,11 +15,12 @@ get_header(); ?>
<?php
if
(
have_posts
()
)
:
?>
<?php
/* Queue the first post, that way we know
* what author we're dealing with (if that is the case).
/*
* Queue the first post, that way we know what author
* we're dealing with (if that is the case).
*
* We reset this later so we can run the loop
*
properly
with a call to rewind_posts().
* We reset this later so we can run the loop
properly
* with a call to rewind_posts().
*/
the_post
();
?>
...
...
@@ -29,7 +30,8 @@ get_header(); ?>
</header>
<?php
/* Since we called the_post() above, we need to
/*
* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
...
...
@@ -43,7 +45,16 @@ get_header(); ?>
if
(
get_the_author_meta
(
'description'
)
)
:
?>
<div
id=
"author-info"
>
<div
id=
"author-avatar"
>
<?php
echo
get_avatar
(
get_the_author_meta
(
'user_email'
),
apply_filters
(
'twentyeleven_author_bio_avatar_size'
,
60
)
);
?>
<?php
/**
* Filter the Twenty Eleven author bio avatar size.
*
* @since Twenty Eleven 1.0
*
* @param int The height and width avatar dimension in pixels. Default 60.
*/
echo
get_avatar
(
get_the_author_meta
(
'user_email'
),
apply_filters
(
'twentyeleven_author_bio_avatar_size'
,
60
)
);
?>
</div>
<!-- #author-avatar -->
<div
id=
"author-description"
>
<h2>
<?php
printf
(
__
(
'About %s'
,
'twentyeleven'
),
get_the_author
()
);
?>
</h2>
...
...
@@ -56,7 +67,8 @@ get_header(); ?>
<?php
while
(
have_posts
()
)
:
the_post
();
?>
<?php
/* Include the Post-Format-specific template for the content.
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
...
...
wp-content/themes/twentyeleven/category.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying Category Archive pages
.
* Template for displaying Category Archive pages
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
@@ -21,8 +21,16 @@ get_header(); ?>
<?php
$category_description
=
category_description
();
if
(
!
empty
(
$category_description
)
)
if
(
!
empty
(
$category_description
)
)
{
/**
* Filter the default Twenty Eleven category description.
*
* @since Twenty Eleven 1.0
*
* @param string The default category description HTML.
*/
echo
apply_filters
(
'category_archive_meta'
,
'<div class="category-archive-meta">'
.
$category_description
.
'</div>'
);
}
?>
</header>
...
...
@@ -32,7 +40,8 @@ get_header(); ?>
<?php
while
(
have_posts
()
)
:
the_post
();
?>
<?php
/* Include the Post-Format-specific template for the content.
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
...
...
wp-content/themes/twentyeleven/comments.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying Comments
.
* Template for displaying Comments
*
* The area of the page that contains both current comments
* and the comment form. The actual display of comments is
...
...
@@ -17,7 +17,8 @@
<p
class=
"nopassword"
>
<?php
_e
(
'This post is password protected. Enter the password to view any comments.'
,
'twentyeleven'
);
?>
</p>
</div>
<!-- #comments -->
<?php
/* Stop the rest of comments.php from being processed,
/*
* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
*/
...
...
@@ -45,7 +46,8 @@
<
ol
class
=
"commentlist"
>
<?
php
/* Loop through and list the comments. Tell wp_list_comments()
/*
* Loop through and list the comments. Tell wp_list_comments()
* to use twentyeleven_comment() to format the comments.
* If you want to overload this in a child theme then you can
* define twentyeleven_comment() and that will be used instead.
...
...
@@ -64,7 +66,8 @@
<?php
endif
;
// check for comment navigation ?>
<?
php
/* If there are no comments and comments are closed, let's leave a little note, shall we?
/*
* If there are no comments and comments are closed, let's leave a little note, shall we?
* But we only want the note on posts and pages that had comments in the first place.
*/
if
(
!
comments_open
()
&&
get_comments_number
()
)
:
?>
...
...
wp-content/themes/twentyeleven/content-aside.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying posts in the Aside Post Format
on index and archive pages
* Template for displaying posts in the Aside Post Format
*
* Learn more: http://codex.wordpress.org/Post_Formats
* Used on index and archive pages.
*
* @link http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-featured.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying content featured in the showcase.php page template
* Template for displaying content featured in the showcase.php page template
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-gallery.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying posts in the Gallery Post Format
on index and archive pages
* Template for displaying posts in the Gallery Post Format
*
* Learn more: http://codex.wordpress.org/Post_Formats
* Used on index and archive pages.
*
* @link http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-image.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying posts in the Image Post Format
on index and archive pages
* Template for displaying posts in the Image Post Format
*
* Learn more: http://codex.wordpress.org/Post_Formats
* Used on index and archive pages.
*
* @link http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-intro.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying page content in the showcase.php page template
* Template for displaying page content in the showcase.php page template
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-link.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying posts in the Link Post Format
on index and archive pages
* Template for displaying posts in the Link Post Format
*
* Learn more: http://codex.wordpress.org/Post_Formats
* Used on index and archive pages
*
* @link http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-page.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate used for displaying page content in page.php
* Template used for displaying page content in page.php
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-quote.php
View file @
17ba8b70
<?php
/**
* T
he default t
emplate for displaying content
* Template for displaying content
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-single.php
View file @
17ba8b70
...
...
@@ -54,7 +54,10 @@
<?php
if
(
get_the_author_meta
(
'description'
)
&&
(
!
function_exists
(
'is_multi_author'
)
||
is_multi_author
()
)
)
:
// If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
<
div
id
=
"author-info"
>
<
div
id
=
"author-avatar"
>
<?
php
echo
get_avatar
(
get_the_author_meta
(
'user_email'
),
apply_filters
(
'twentyeleven_author_bio_avatar_size'
,
68
)
);
?>
<?
php
/** This filter is documented in author.php */
echo
get_avatar
(
get_the_author_meta
(
'user_email'
),
apply_filters
(
'twentyeleven_author_bio_avatar_size'
,
68
)
);
?>
</div>
<!-- #author-avatar -->
<div
id=
"author-description"
>
<h2>
<?php
printf
(
__
(
'About %s'
,
'twentyeleven'
),
get_the_author
()
);
?>
</h2>
...
...
wp-content/themes/twentyeleven/content-status.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying posts in the Status Post Format
on index and archive pages
* Template for displaying posts in the Status Post Format
*
* Learn more: http://codex.wordpress.org/Post_Formats
* Used on index and archive pages
*
* @link http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
...
...
@@ -29,7 +32,18 @@
</div>
<!-- .entry-summary -->
<?php
else
:
?>
<div
class=
"entry-content"
>
<div
class=
"avatar"
>
<?php
echo
get_avatar
(
get_the_author_meta
(
'ID'
),
apply_filters
(
'twentyeleven_status_avatar'
,
'65'
)
);
?>
</div>
<div
class=
"avatar"
>
<?php
/**
* Filter the Twenty Eleven status avatar size.
*
* @since Twenty Eleven 1.0
*
* @param int The height and width avatar dimensions in pixels. Default 65.
*/
echo
get_avatar
(
get_the_author_meta
(
'ID'
),
apply_filters
(
'twentyeleven_status_avatar'
,
65
)
);
?>
</div>
<?php
the_content
(
__
(
'Continue reading <span class="meta-nav">→</span>'
,
'twentyeleven'
)
);
?>
<?php
wp_link_pages
(
array
(
'before'
=>
'<div class="page-link"><span>'
.
__
(
'Pages:'
,
'twentyeleven'
)
.
'</span>'
,
'after'
=>
'</div>'
)
);
?>
...
...
wp-content/themes/twentyeleven/content.php
View file @
17ba8b70
<?php
/**
* T
he default t
emplate for displaying content
* Template for displaying content
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/footer.php
View file @
17ba8b70
<?php
/**
* T
he t
emplate for displaying the footer
.
* Template for displaying the footer
*
* Contains the closing of the id=main div and all content after
*
...
...
@@ -15,7 +15,8 @@
<footer
id=
"colophon"
role=
"contentinfo"
>
<?php
/* A sidebar in the footer? Yep. You can can customize
/*
* A sidebar in the footer? Yep. You can can customize
* your footer with three columns of widgets.
*/
if
(
!
is_404
()
)
...
...
wp-content/themes/twentyeleven/functions.php
View file @
17ba8b70
...
...
@@ -38,20 +38,18 @@
* @since Twenty Eleven 1.0
*/
/**
* Set the content width based on the theme's design and stylesheet.
*/
// Set the content width based on the theme's design and stylesheet.
if
(
!
isset
(
$content_width
)
)
$content_width
=
584
;
/*
*
/*
* Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run.
*/
add_action
(
'after_setup_theme'
,
'twentyeleven_setup'
);
if
(
!
function_exists
(
'twentyeleven_setup'
)
)
:
/**
* Set
s
up theme defaults and registers support for various WordPress features.
* Set up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
...
...
@@ -60,22 +58,24 @@ if ( ! function_exists( 'twentyeleven_setup' ) ):
* To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's
* functions.php file.
*
* @uses load_theme_textdomain() For translation/localization support.
* @uses add_editor_style() To style the visual editor.
* @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers
* and backgrounds, and post formats.
* @uses register_nav_menus() To add support for navigation menus.
* @uses load_theme_textdomain()
For translation/localization support.
* @uses add_editor_style()
To style the visual editor.
* @uses add_theme_support()
To add support for post thumbnails, automatic feed links, custom headers
*
and backgrounds, and post formats.
* @uses register_nav_menus()
To add support for navigation menus.
* @uses register_default_headers() To register the default custom header images provided with the theme.
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
* @uses set_post_thumbnail_size()
To set a custom post thumbnail size.
*
* @since Twenty Eleven 1.0
*/
function
twentyeleven_setup
()
{
/* Make Twenty Eleven available for translation.
/*
* Make Twenty Eleven available for translation.
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Twenty Eleven, use a find and replace
* to change 'twentyeleven' to the name of your theme in all the template files.
* If you're building a theme based on Twenty Eleven, use
* a find and replace to change 'twentyeleven' to the name
* of your theme in all the template files.
*/
load_theme_textdomain
(
'twentyeleven'
,
get_template_directory
()
.
'/languages'
);
...
...
@@ -105,8 +105,10 @@ function twentyeleven_setup() {
// Add support for custom backgrounds.
add_theme_support
(
'custom-background'
,
array
(
// Let WordPress know what our default background color is.
// This is dependent on our current color scheme.
/*
* Let WordPress know what our default background color is.
* This is dependent on our current color scheme.
*/
'default-color'
=>
$default_background_color
,
)
);
...
...
@@ -118,7 +120,21 @@ function twentyeleven_setup() {
// The default header text color.
'default-text-color'
=>
'000'
,
// The height and width of our custom header.
/**
* Filter the Twenty Eleven default header image width.
*
* @since Twenty Eleven 1.0
*
* @param int The default header image width in pixels. Default 1000.
*/
'width'
=>
apply_filters
(
'twentyeleven_header_image_width'
,
1000
),
/**
* Filter the Twenty Eleven default header image height.
*
* @since Twenty Eleven 1.0
*
* @param int The default header image height in pixels. Default 288.
*/
'height'
=>
apply_filters
(
'twentyeleven_header_image_height'
,
288
),
// Support flexible heights.
'flex-height'
=>
true
,
...
...
@@ -144,13 +160,17 @@ function twentyeleven_setup() {
add_custom_background
();
}
// We'll be using post thumbnails for custom header images on posts and pages.
// We want them to be the size of the header image that we just defined
// Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
/*
* We'll be using post thumbnails for custom header images on posts and pages.
* We want them to be the size of the header image that we just defined.
* Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
*/
set_post_thumbnail_size
(
$custom_header_support
[
'width'
],
$custom_header_support
[
'height'
],
true
);
// Add Twenty Eleven's custom image sizes.
// Used for large feature (header) images.
/*
* Add Twenty Eleven's custom image sizes.
* Used for large feature (header) images.
*/
add_image_size
(
'large-feature'
,
$custom_header_support
[
'width'
],
$custom_header_support
[
'height'
],
true
);
// Used for featured posts if a large-feature doesn't exist.
add_image_size
(
'small-feature'
,
500
,
300
);
...
...
@@ -211,7 +231,7 @@ endif; // twentyeleven_setup
if
(
!
function_exists
(
'twentyeleven_header_style'
)
)
:
/**
* Styles the header image and text displayed on the blog
* Styles the header image and text displayed on the blog
.
*
* @since Twenty Eleven 1.0
*/
...
...
@@ -327,10 +347,16 @@ function twentyeleven_admin_header_image() { ?>
endif
;
// twentyeleven_admin_header_image
/**
* Set
s
the post excerpt length to 40 words.
* Set the post excerpt length to 40 words.
*
* To override this length in a child theme, remove the filter and add your own
* function tied to the excerpt_length filter hook.
* To override this length in a child theme, remove
* the filter and add your own function tied to
* the excerpt_length filter hook.
*
* @since Twenty Eleven 1.0
*
* @param int $length The number of excerpt characters.
* @return int The filtered number of characters.
*/
function
twentyeleven_excerpt_length
(
$length
)
{
return
40
;
...
...
@@ -339,7 +365,11 @@ add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
if
(
!
function_exists
(
'twentyeleven_continue_reading_link'
)
)
:
/**
* Returns a "Continue Reading" link for excerpts
* Return a "Continue Reading" link for excerpts
*
* @since Twenty Eleven 1.0
*
* @return string The "Continue Reading" HTML link.
*/
function
twentyeleven_continue_reading_link
()
{
return
' <a href="'
.
esc_url
(
get_permalink
()
)
.
'">'
.
__
(
'Continue reading <span class="meta-nav">→</span>'
,
'twentyeleven'
)
.
'</a>'
;
...
...
@@ -347,10 +377,17 @@ function twentyeleven_continue_reading_link() {
endif
;
// twentyeleven_continue_reading_link
/**
* Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
* Replace "[...]" in the Read More link with an ellipsis.
*
* The "[...]" is appended to automatically generated excerpts.
*
* To override this in a child theme, remove the filter and add your own
* function tied to the excerpt_more filter hook.
*
* @since Twenty Eleven 1.0
*
* @param string $more The Read More text.
* @return The filtered Read More text.
*/
function
twentyeleven_auto_excerpt_more
(
$more
)
{
return
' …'
.
twentyeleven_continue_reading_link
();
...
...
@@ -358,10 +395,15 @@ function twentyeleven_auto_excerpt_more( $more ) {
add_filter
(
'excerpt_more'
,
'twentyeleven_auto_excerpt_more'
);
/**
* Add
s
a pretty "Continue Reading" link to custom post excerpts.
* Add a pretty "Continue Reading" link to custom post excerpts.
*
* To override this link in a child theme, remove the filter and add your own
* function tied to the get_the_excerpt filter hook.
*
* @since Twenty Eleven 1.0
*
* @param string $output The "Continue Reading" link.
* @return string The filtered "Continue Reading" link.
*/
function
twentyeleven_custom_excerpt_more
(
$output
)
{
if
(
has_excerpt
()
&&
!
is_attachment
()
)
{
...
...
@@ -372,7 +414,12 @@ function twentyeleven_custom_excerpt_more( $output ) {
add_filter
(
'get_the_excerpt'
,
'twentyeleven_custom_excerpt_more'
);
/**
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
* Show a home link for the wp_nav_menu() fallback, wp_page_menu().
*
* @since Twenty Eleven 1.0
*
* @param array $args The page menu arguments. @see wp_page_menu()
* @return array The filtered page menu arguments.
*/
function
twentyeleven_page_menu_args
(
$args
)
{
if
(
!
isset
(
$args
[
'show_home'
]
)
)
...
...
@@ -382,7 +429,9 @@ function twentyeleven_page_menu_args( $args ) {
add_filter
(
'wp_page_menu_args'
,
'twentyeleven_page_menu_args'
);
/**
* Register our sidebars and widgetized areas. Also register the default Epherma widget.
* Register sidebars and widgetized areas.
*
* Also register the default Epherma widget.
*
* @since Twenty Eleven 1.0
*/
...
...
@@ -443,7 +492,11 @@ add_action( 'widgets_init', 'twentyeleven_widgets_init' );
if
(
!
function_exists
(
'twentyeleven_content_nav'
)
)
:
/**
* Display navigation to next/previous pages when applicable
* Display navigation to next/previous pages when applicable.
*
* @since Twenty Eleven 1.0
*
* @param string $html_id The HTML id attribute.
*/
function
twentyeleven_content_nav
(
$html_id
)
{
global
$wp_query
;
...
...
@@ -462,9 +515,11 @@ endif; // twentyeleven_content_nav
* Return the first link from the post content. If none found, the
* post permalink is used as a fallback.
*
* @since Twenty Eleven 1.0
*
* @uses get_url_in_content() to get the first URL from the post content.
*
* @return string
* @return string
The first link.
*/
function
twentyeleven_get_first_url
()
{
$content
=
get_the_content
();
...
...
@@ -473,6 +528,7 @@ function twentyeleven_get_first_url() {
if
(
!
$has_url
)
$has_url
=
twentyeleven_url_grabber
();
/** This filter is documented in wp-includes/link-template.php */
return
(
$has_url
)
?
$has_url
:
apply_filters
(
'the_permalink'
,
get_permalink
()
);
}
...
...
@@ -480,6 +536,7 @@ function twentyeleven_get_first_url() {
* Return the URL for the first link found in the post content.
*
* @since Twenty Eleven 1.0
*
* @return string|bool URL or false when no link is present.
*/
function
twentyeleven_url_grabber
()
{
...
...
@@ -490,7 +547,9 @@ function twentyeleven_url_grabber() {
}
/**
* Count the number of footer sidebars to enable dynamic classes for the footer
* Count the number of footer sidebars to enable dynamic classes for the footer.
*
* @since Twenty Eleven 1.0
*/
function
twentyeleven_footer_sidebar_class
()
{
$count
=
0
;
...
...
@@ -532,6 +591,10 @@ if ( ! function_exists( 'twentyeleven_comment' ) ) :
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since Twenty Eleven 1.0
*
* @param object $comment The comment object.
* @param array $args An array of comment arguments. @see get_comment_reply_link()
* @param int $depth The depth of the comment.
*/
function
twentyeleven_comment
(
$comment
,
$args
,
$depth
)
{
$GLOBALS
[
'comment'
]
=
$comment
;
...
...
@@ -593,7 +656,8 @@ endif; // ends check for twentyeleven_comment()
if
(
!
function_exists
(
'twentyeleven_posted_on'
)
)
:
/**
* Prints HTML with meta information for the current post-date/time and author.
* Print HTML with meta information for the current post-date/time and author.
*
* Create your own twentyeleven_posted_on to override in a child theme
*
* @since Twenty Eleven 1.0
...
...
@@ -612,11 +676,15 @@ function twentyeleven_posted_on() {
endif
;
/**
* Adds two classes to the array of body classes.
* Add two classes to the array of body classes.
*
* The first is if the site has only had one author with published posts.
* The second is if a singular post being displayed
*
* @since Twenty Eleven 1.0
*
* @param array $classes Existing body classes.
* @return array The filtered array of body classes.
*/