Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
noblogs-wp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
39
Issues
39
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
noblogs-wp
Commits
bad092f3
Commit
bad092f3
authored
Jul 25, 2015
by
ale
Committed by
lucha
Oct 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[auto] Theme: twentyeleven 2.1
parent
6dd93f3e
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
165 additions
and
119 deletions
+165
-119
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
+1
-1
wp-content/themes/twentyeleven/content-aside.php
wp-content/themes/twentyeleven/content-aside.php
+1
-1
wp-content/themes/twentyeleven/content-gallery.php
wp-content/themes/twentyeleven/content-gallery.php
+2
-2
wp-content/themes/twentyeleven/content-image.php
wp-content/themes/twentyeleven/content-image.php
+2
-2
wp-content/themes/twentyeleven/content-link.php
wp-content/themes/twentyeleven/content-link.php
+1
-1
wp-content/themes/twentyeleven/content-status.php
wp-content/themes/twentyeleven/content-status.php
+1
-1
wp-content/themes/twentyeleven/functions.php
wp-content/themes/twentyeleven/functions.php
+24
-21
wp-content/themes/twentyeleven/header.php
wp-content/themes/twentyeleven/header.php
+2
-2
wp-content/themes/twentyeleven/image.php
wp-content/themes/twentyeleven/image.php
+1
-1
wp-content/themes/twentyeleven/inc/theme-customizer.js
wp-content/themes/twentyeleven/inc/theme-customizer.js
+18
-0
wp-content/themes/twentyeleven/inc/theme-options.php
wp-content/themes/twentyeleven/inc/theme-options.php
+12
-11
wp-content/themes/twentyeleven/inc/widgets.php
wp-content/themes/twentyeleven/inc/widgets.php
+25
-25
wp-content/themes/twentyeleven/index.php
wp-content/themes/twentyeleven/index.php
+2
-2
wp-content/themes/twentyeleven/languages/twentyeleven.pot
wp-content/themes/twentyeleven/languages/twentyeleven.pot
+32
-30
wp-content/themes/twentyeleven/showcase.php
wp-content/themes/twentyeleven/showcase.php
+8
-8
wp-content/themes/twentyeleven/style.css
wp-content/themes/twentyeleven/style.css
+30
-8
No files found.
wp-content/themes/twentyeleven/404.php
View file @
bad092f3
...
...
@@ -34,7 +34,7 @@ get_header(); ?>
<?php
/* translators: %1$s: smilie */
$archive_content
=
'<p>'
.
sprintf
(
__
(
'Try looking in the monthly archives. %1$s'
,
'twentyeleven'
),
convert_smilies
(
':)'
)
)
.
'</p>'
;
the_widget
(
'WP_Widget_Archives'
,
array
(
'count'
=>
0
,
'dropdown'
=>
1
),
array
(
'after_title'
=>
'</h2>'
.
$archive_content
)
);
the_widget
(
'WP_Widget_Archives'
,
array
(
'count'
=>
0
,
'dropdown'
=>
1
),
array
(
'after_title'
=>
'</h2>'
.
$archive_content
)
);
?>
<?php
the_widget
(
'WP_Widget_Tag_Cloud'
);
?>
...
...
wp-content/themes/twentyeleven/archive.php
View file @
bad092f3
...
...
@@ -5,7 +5,7 @@
* 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.
*
* @link http://codex.wordpress.org/Template_Hierarchy
* @link http
s
://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
@@ -69,4 +69,4 @@ get_header(); ?>
</section>
<!-- #primary -->
<?php
get_sidebar
();
?>
<?php
get_footer
();
?>
\ No newline at end of file
<?php
get_footer
();
?>
wp-content/themes/twentyeleven/author.php
View file @
bad092f3
...
...
@@ -26,7 +26,7 @@ get_header(); ?>
?>
<header
class=
"page-header"
>
<h1
class=
"page-title author"
>
<?php
printf
(
__
(
'Author Archives: %s'
,
'twentyeleven'
),
'<span class="vcard"><a class="url fn n" href="'
.
esc_url
(
get_author_posts_url
(
get_the_author_meta
(
"ID"
)
)
)
.
'" title="'
.
esc_attr
(
get_the_author
()
)
.
'" rel="me">'
.
get_the_author
()
.
'</a></span>'
);
?>
</h1>
<h1
class=
"page-title author"
>
<?php
printf
(
__
(
'Author Archives: %s'
,
'twentyeleven'
),
'<span class="vcard"><a class="url fn n" href="'
.
esc_url
(
get_author_posts_url
(
get_the_author_meta
(
'ID'
)
)
)
.
'" title="'
.
esc_attr
(
get_the_author
()
)
.
'" rel="me">'
.
get_the_author
()
.
'</a></span>'
);
?>
</h1>
</header>
<?php
...
...
wp-content/themes/twentyeleven/content-aside.php
View file @
bad092f3
...
...
@@ -4,7 +4,7 @@
*
* Used on index and archive pages.
*
* @link http://codex.wordpress.org/Post_Formats
* @link http
s
://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-gallery.php
View file @
bad092f3
...
...
@@ -4,7 +4,7 @@
*
* Used on index and archive pages.
*
* @link http://codex.wordpress.org/Post_Formats
* @link http
s
://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
@@ -36,7 +36,7 @@
$images
=
twentyeleven_get_gallery_images
();
if
(
$images
)
:
$total_images
=
count
(
$images
);
$image
=
array_shif
t
(
$images
);
$image
=
rese
t
(
$images
);
?>
<figure
class=
"gallery-thumb"
>
<a
href=
"
<?php
the_permalink
();
?>
"
>
<?php
echo
wp_get_attachment_image
(
$image
,
'thumbnail'
);
?>
</a>
...
...
wp-content/themes/twentyeleven/content-image.php
View file @
bad092f3
...
...
@@ -4,7 +4,7 @@
*
* Used on index and archive pages.
*
* @link http://codex.wordpress.org/Post_Formats
* @link http
s
://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
@@ -20,7 +20,7 @@
<?php
if
(
comments_open
()
&&
!
post_password_required
()
)
:
?>
<div
class=
"comments-link"
>
<?php
comments_popup_link
(
'<span class="leave-reply">'
.
__
(
"Reply"
,
'twentyeleven'
)
.
'</span>'
,
_x
(
'1'
,
'comments number'
,
'twentyeleven'
),
_x
(
'%'
,
'comments number'
,
'twentyeleven'
)
);
?>
<?php
comments_popup_link
(
'<span class="leave-reply">'
.
__
(
'Reply'
,
'twentyeleven'
)
.
'</span>'
,
_x
(
'1'
,
'comments number'
,
'twentyeleven'
),
_x
(
'%'
,
'comments number'
,
'twentyeleven'
)
);
?>
</div>
<?php
endif
;
?>
</header>
<!-- .entry-header -->
...
...
wp-content/themes/twentyeleven/content-link.php
View file @
bad092f3
...
...
@@ -4,7 +4,7 @@
*
* Used on index and archive pages
*
* @link http://codex.wordpress.org/Post_Formats
* @link http
s
://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/content-status.php
View file @
bad092f3
...
...
@@ -4,7 +4,7 @@
*
* Used on index and archive pages
*
* @link http://codex.wordpress.org/Post_Formats
* @link http
s
://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
wp-content/themes/twentyeleven/functions.php
View file @
bad092f3
...
...
@@ -9,8 +9,8 @@
* The first function, twentyeleven_setup(), sets up the theme by registering support
* for various features in WordPress, such as post thumbnails, navigation menus, and the like.
*
* When using a child theme (see http://codex.wordpress.org/Theme_Development and
* http://codex.wordpress.org/Child_Themes), you can override certain functions
* When using a child theme (see http
s
://codex.wordpress.org/Theme_Development and
* http
s
://codex.wordpress.org/Child_Themes), you can override certain functions
* (those wrapped in a function_exists() call) by defining them first in your child theme's
* functions.php file. The child theme's functions.php file is included before the parent
* theme's file, so the child theme functions would be used.
...
...
@@ -31,7 +31,7 @@
* }
* </code>
*
* For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
* For more information on hooks, actions, and filters, see http
s
://codex.wordpress.org/Plugin_API.
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
@@ -251,7 +251,7 @@ function twentyeleven_header_style() {
?>
#site-title
,
#site-description
{
position
:
absolute
!important
;
position
:
absolute
;
clip
:
rect
(
1px
1px
1px
1px
);
/* IE6, IE7 */
clip
:
rect
(
1px
,
1px
,
1px
,
1px
);
}
...
...
@@ -261,7 +261,7 @@ function twentyeleven_header_style() {
?>
#site-title
a
,
#site-description
{
color
:
#
<?php
echo
$text_color
;
?>
!important
;
color
:
#
<?php
echo
$text_color
;
?>
;
}
<?php
endif
;
?>
</style>
...
...
@@ -332,14 +332,14 @@ function twentyeleven_admin_header_image() { ?>
<?php
$color
=
get_header_textcolor
();
$image
=
get_header_image
();
if
(
$color
&&
$color
!=
'blank'
)
$style
=
' style="color:#'
.
$color
.
'"'
;
else
$style
=
' style="display:none"'
;
$style
=
'display: none;'
;
if
(
$color
&&
$color
!=
'blank'
)
{
$style
=
'color: #'
.
$color
.
';'
;
}
?>
<h1
class=
"displaying-header-text"
><a
id=
"name"
<?php
echo
$style
;
?>
onclick=
"return false;"
href=
"
<?php
echo
esc_url
(
home_url
(
'/'
)
);
?>
"
>
<?php
bloginfo
(
'name'
);
?>
</a></h1>
<div
id=
"desc"
class=
"displaying-header-text"
<?php
echo
$style
;
?>
>
<?php
bloginfo
(
'description'
);
?>
</div>
<?php
if
(
$image
)
:
?>
<h1
class=
"displaying-header-text"
><a
id=
"name"
style=
"
<?php
echo
esc_attr
(
$style
);
?>
"
onclick=
"return false;"
href=
"
<?php
echo
esc_url
(
home_url
(
'/'
)
);
?>
"
tabindex=
"-1
"
>
<?php
bloginfo
(
'name'
);
?>
</a></h1>
<div
id=
"desc"
class=
"displaying-header-text"
style=
"
<?php
echo
esc_attr
(
$style
);
?>
"
>
<?php
bloginfo
(
'description'
);
?>
</div>
<?php
if
(
$image
)
:
?>
<img
src=
"
<?php
echo
esc_url
(
$image
);
?>
"
alt=
""
/>
<?php
endif
;
?>
</div>
...
...
@@ -390,7 +390,10 @@ endif; // twentyeleven_continue_reading_link
* @return The filtered Read More text.
*/
function
twentyeleven_auto_excerpt_more
(
$more
)
{
return
' …'
.
twentyeleven_continue_reading_link
();
if
(
!
is_admin
()
)
{
return
' …'
.
twentyeleven_continue_reading_link
();
}
return
$more
;
}
add_filter
(
'excerpt_more'
,
'twentyeleven_auto_excerpt_more'
);
...
...
@@ -406,7 +409,7 @@ add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
* @return string The filtered "Continue Reading" link.
*/
function
twentyeleven_custom_excerpt_more
(
$output
)
{
if
(
has_excerpt
()
&&
!
is_attachment
()
)
{
if
(
has_excerpt
()
&&
!
is_attachment
()
&&
!
is_admin
()
)
{
$output
.
=
twentyeleven_continue_reading_link
();
}
return
$output
;
...
...
@@ -443,7 +446,7 @@ function twentyeleven_widgets_init() {
'name'
=>
__
(
'Main Sidebar'
,
'twentyeleven'
),
'id'
=>
'sidebar-1'
,
'before_widget'
=>
'<aside id="%1$s" class="widget %2$s">'
,
'after_widget'
=>
"</aside>"
,
'after_widget'
=>
'</aside>'
,
'before_title'
=>
'<h3 class="widget-title">'
,
'after_title'
=>
'</h3>'
,
)
);
...
...
@@ -453,7 +456,7 @@ function twentyeleven_widgets_init() {
'id'
=>
'sidebar-2'
,
'description'
=>
__
(
'The sidebar for the optional Showcase Template'
,
'twentyeleven'
),
'before_widget'
=>
'<aside id="%1$s" class="widget %2$s">'
,
'after_widget'
=>
"</aside>"
,
'after_widget'
=>
'</aside>'
,
'before_title'
=>
'<h3 class="widget-title">'
,
'after_title'
=>
'</h3>'
,
)
);
...
...
@@ -463,7 +466,7 @@ function twentyeleven_widgets_init() {
'id'
=>
'sidebar-3'
,
'description'
=>
__
(
'An optional widget area for your site footer'
,
'twentyeleven'
),
'before_widget'
=>
'<aside id="%1$s" class="widget %2$s">'
,
'after_widget'
=>
"</aside>"
,
'after_widget'
=>
'</aside>'
,
'before_title'
=>
'<h3 class="widget-title">'
,
'after_title'
=>
'</h3>'
,
)
);
...
...
@@ -473,7 +476,7 @@ function twentyeleven_widgets_init() {
'id'
=>
'sidebar-4'
,
'description'
=>
__
(
'An optional widget area for your site footer'
,
'twentyeleven'
),
'before_widget'
=>
'<aside id="%1$s" class="widget %2$s">'
,
'after_widget'
=>
"</aside>"
,
'after_widget'
=>
'</aside>'
,
'before_title'
=>
'<h3 class="widget-title">'
,
'after_title'
=>
'</h3>'
,
)
);
...
...
@@ -483,7 +486,7 @@ function twentyeleven_widgets_init() {
'id'
=>
'sidebar-5'
,
'description'
=>
__
(
'An optional widget area for your site footer'
,
'twentyeleven'
),
'before_widget'
=>
'<aside id="%1$s" class="widget %2$s">'
,
'after_widget'
=>
"</aside>"
,
'after_widget'
=>
'</aside>'
,
'before_title'
=>
'<h3 class="widget-title">'
,
'after_title'
=>
'</h3>'
,
)
);
...
...
@@ -578,7 +581,7 @@ function twentyeleven_footer_sidebar_class() {
}
if
(
$class
)
echo
'class="'
.
$class
.
'"'
;
echo
'class="'
.
esc_attr
(
$class
)
.
'"'
;
}
if
(
!
function_exists
(
'twentyeleven_comment'
)
)
:
...
...
@@ -714,7 +717,7 @@ function twentyeleven_get_gallery_images() {
if
(
function_exists
(
'get_post_galleries'
)
)
{
$galleries
=
get_post_galleries
(
get_the_ID
(),
false
);
if
(
isset
(
$galleries
[
0
][
'ids'
]
)
)
$images
=
explode
(
','
,
$galleries
[
0
][
'ids'
]
);
$images
=
explode
(
','
,
$galleries
[
0
][
'ids'
]
);
}
else
{
$pattern
=
get_shortcode_regex
();
preg_match
(
"/
$pattern
/s"
,
get_the_content
(),
$match
);
...
...
wp-content/themes/twentyeleven/header.php
View file @
bad092f3
...
...
@@ -40,7 +40,7 @@
// Add a page number if necessary:
if
(
(
$paged
>=
2
||
$page
>=
2
)
&&
!
is_404
()
)
echo
' | '
.
sprintf
(
__
(
'Page %s'
,
'twentyeleven'
),
max
(
$paged
,
$page
)
);
echo
esc_html
(
' | '
.
sprintf
(
__
(
'Page %s'
,
'twentyeleven'
),
max
(
$paged
,
$page
)
)
);
?>
</title>
<link
rel=
"profile"
href=
"http://gmpg.org/xfn/11"
/>
...
...
@@ -111,7 +111,7 @@
$header_image_height
=
HEADER_IMAGE_HEIGHT
;
}
?>
<img
src=
"
<?php
header_image
();
?>
"
width=
"
<?php
echo
$header_image_width
;
?>
"
height=
"
<?php
echo
$header_image_height
;
?>
"
alt=
"
"
/>
<img
src=
"
<?php
header_image
();
?>
"
width=
"
<?php
echo
esc_attr
(
$header_image_width
);
?>
"
height=
"
<?php
echo
esc_attr
(
$header_image_height
);
?>
"
alt=
"
<?php
echo
esc_attr
(
get_bloginfo
(
'name'
,
'display'
)
);
?>
"
/>
<?php
endif
;
// end check for featured image or standard header ?>
</
a
>
<?
php
endif
;
// end check for removed header image ?>
...
...
wp-content/themes/twentyeleven/image.php
View file @
bad092f3
...
...
@@ -66,7 +66,7 @@ get_header(); ?>
$next_attachment_url
=
get_attachment_link
(
$attachments
[
$k
]
->
ID
);
else
// or get the URL of the first image attachment
$next_attachment_url
=
get_attachment_link
(
$attachments
[
0
]
->
ID
);
$next_attachment_url
=
get_attachment_link
(
$attachments
[
0
]
->
ID
);
}
else
{
// or, if there's only 1 image, get the URL of the image
$next_attachment_url
=
wp_get_attachment_url
();
...
...
wp-content/themes/twentyeleven/inc/theme-customizer.js
View file @
bad092f3
...
...
@@ -9,4 +9,22 @@
$
(
'
#site-description
'
).
text
(
to
);
}
);
}
);
// Header text color
wp
.
customize
(
'
header_textcolor
'
,
function
(
value
)
{
value
.
bind
(
function
(
to
)
{
if
(
'
blank
'
===
to
)
{
$
(
'
#site-title, #site-title a, #site-description
'
).
css
(
{
'
clip
'
:
'
rect(1px, 1px, 1px, 1px)
'
,
'
position
'
:
'
absolute
'
}
);
}
else
{
$
(
'
#site-title, #site-title a, #site-description
'
).
css
(
{
'
clip
'
:
'
auto
'
,
'
color
'
:
to
,
'
position
'
:
'
relative
'
}
);
}
}
);
}
);
}
)(
jQuery
);
\ No newline at end of file
wp-content/themes/twentyeleven/inc/theme-options.php
View file @
bad092f3
...
...
@@ -117,7 +117,7 @@ function twentyeleven_theme_options_help() {
'<p>'
.
__
(
'Remember to click "Save Changes" to save any changes you have made to the theme options.'
,
'twentyeleven'
)
.
'</p>'
;
$sidebar
=
'<p><strong>'
.
__
(
'For more information:'
,
'twentyeleven'
)
.
'</strong></p>'
.
'<p>'
.
__
(
'<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>'
,
'twentyeleven'
)
.
'</p>'
.
'<p>'
.
__
(
'<a href="http
s
://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>'
,
'twentyeleven'
)
.
'</p>'
.
'<p>'
.
__
(
'<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>'
,
'twentyeleven'
)
.
'</p>'
;
$screen
=
get_current_screen
();
...
...
@@ -218,7 +218,7 @@ function twentyeleven_get_default_theme_options() {
);
if
(
is_rtl
()
)
$default_theme_options
[
'theme_layout'
]
=
'sidebar-content'
;
$default_theme_options
[
'theme_layout'
]
=
'sidebar-content'
;
/**
* Filter the Twenty Eleven default options.
...
...
@@ -277,7 +277,7 @@ function twentyeleven_settings_field_color_scheme() {
<input
type=
"hidden"
id=
"default-color-
<?php
echo
esc_attr
(
$scheme
[
'value'
]
);
?>
"
value=
"
<?php
echo
esc_attr
(
$scheme
[
'default_link_color'
]
);
?>
"
/>
<span>
<img
src=
"
<?php
echo
esc_url
(
$scheme
[
'thumbnail'
]
);
?>
"
width=
"136"
height=
"122"
alt=
""
/>
<?php
echo
$scheme
[
'label'
]
;
?>
<?php
echo
esc_html
(
$scheme
[
'label'
]
)
;
?>
</span>
</label>
</div>
...
...
@@ -316,7 +316,7 @@ function twentyeleven_settings_field_layout() {
<input
type=
"radio"
name=
"twentyeleven_theme_options[theme_layout]"
value=
"
<?php
echo
esc_attr
(
$layout
[
'value'
]
);
?>
"
<?php
checked
(
$options
[
'theme_layout'
],
$layout
[
'value'
]
);
?>
/>
<span>
<img
src=
"
<?php
echo
esc_url
(
$layout
[
'thumbnail'
]
);
?>
"
width=
"136"
height=
"122"
alt=
""
/>
<?php
echo
$layout
[
'label'
]
;
?>
<?php
echo
esc_html
(
$layout
[
'label'
]
)
;
?>
</span>
</label>
</div>
...
...
@@ -499,15 +499,16 @@ function twentyeleven_layout_classes( $existing_classes ) {
add_filter
(
'body_class'
,
'twentyeleven_layout_classes'
);
/**
* Implements Twenty Eleven theme options into
Theme
Customizer
* Implements Twenty Eleven theme options into Customizer
*
* @since Twenty Eleven 1.3
*
* @param object $wp_customize
Theme
Customizer object.
* @param object $wp_customize Customizer object.
*/
function
twentyeleven_customize_register
(
$wp_customize
)
{
$wp_customize
->
get_setting
(
'blogname'
)
->
transport
=
'postMessage'
;
$wp_customize
->
get_setting
(
'blogdescription'
)
->
transport
=
'postMessage'
;
$wp_customize
->
get_setting
(
'header_textcolor'
)
->
transport
=
'postMessage'
;
$options
=
twentyeleven_get_theme_options
();
$defaults
=
twentyeleven_get_default_theme_options
();
...
...
@@ -533,7 +534,7 @@ function twentyeleven_customize_register( $wp_customize ) {
'priority'
=>
5
,
)
);
// Link Color (added to Color Scheme section in
Theme
Customizer)
// Link Color (added to Color Scheme section in Customizer)
$wp_customize
->
add_setting
(
'twentyeleven_theme_options[link_color]'
,
array
(
'default'
=>
twentyeleven_get_default_link_color
(
$options
[
'color_scheme'
]
),
'type'
=>
'option'
,
...
...
@@ -562,7 +563,7 @@ function twentyeleven_customize_register( $wp_customize ) {
$layouts
=
twentyeleven_layouts
();
$choices
=
array
();
foreach
(
$layouts
as
$layout
)
{
$choices
[
$layout
[
'value'
]
]
=
$layout
[
'label'
];
$choices
[
$layout
[
'value'
]
]
=
$layout
[
'label'
];
}
$wp_customize
->
add_control
(
'twentyeleven_theme_options[theme_layout]'
,
array
(
...
...
@@ -574,13 +575,13 @@ function twentyeleven_customize_register( $wp_customize ) {
add_action
(
'customize_register'
,
'twentyeleven_customize_register'
);
/**
* Bind JS handlers to make
Theme
Customizer preview reload changes asynchronously.
* Bind JS handlers to make Customizer preview reload changes asynchronously.
*
* Used with blogname and blogdescription.
*
* @since Twenty Eleven 1.3
*/
function
twentyeleven_customize_preview_js
()
{
wp_enqueue_script
(
'twentyeleven-customizer'
,
get_template_directory_uri
()
.
'/inc/theme-customizer.js'
,
array
(
'customize-preview'
),
'201
20523
'
,
true
);
wp_enqueue_script
(
'twentyeleven-customizer'
,
get_template_directory_uri
()
.
'/inc/theme-customizer.js'
,
array
(
'customize-preview'
),
'201
50401
'
,
true
);
}
add_action
(
'customize_preview_init'
,
'twentyeleven_customize_preview_js'
);
\ No newline at end of file
add_action
(
'customize_preview_init'
,
'twentyeleven_customize_preview_js'
);
wp-content/themes/twentyeleven/inc/widgets.php
View file @
bad092f3
...
...
@@ -4,7 +4,7 @@
*
* Handles displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven.
*
* @link http://codex.wordpress.org/Widgets_API#Developing_Widgets
* @link http
s
://codex.wordpress.org/Widgets_API#Developing_Widgets
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
@@ -22,9 +22,9 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
$this
->
WP_Widget
(
'widget_twentyeleven_ephemera'
,
__
(
'Twenty Eleven Ephemera'
,
'twentyeleven'
),
$widget_ops
);
$this
->
alt_option_name
=
'widget_twentyeleven_ephemera'
;
add_action
(
'save_post'
,
array
(
&
$this
,
'flush_widget_cache'
)
);
add_action
(
'deleted_post'
,
array
(
&
$this
,
'flush_widget_cache'
)
);
add_action
(
'switch_theme'
,
array
(
&
$this
,
'flush_widget_cache'
)
);
add_action
(
'save_post'
,
array
(
&
$this
,
'flush_widget_cache'
)
);
add_action
(
'deleted_post'
,
array
(
&
$this
,
'flush_widget_cache'
)
);
add_action
(
'switch_theme'
,
array
(
&
$this
,
'flush_widget_cache'
)
);
}
/**
...
...
@@ -38,14 +38,14 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
function
widget
(
$args
,
$instance
)
{
$cache
=
wp_cache_get
(
'widget_twentyeleven_ephemera'
,
'widget'
);
if
(
!
is_array
(
$cache
)
)
if
(
!
is_array
(
$cache
)
)
$cache
=
array
();
if
(
!
isset
(
$args
[
'widget_id'
]
)
)
$args
[
'widget_id'
]
=
null
;
if
(
isset
(
$cache
[
$args
[
'widget_id'
]
]
)
)
{
echo
$cache
[
$args
[
'widget_id'
]
];
if
(
isset
(
$cache
[
$args
[
'widget_id'
]
]
)
)
{
echo
$cache
[
$args
[
'widget_id'
]
];
return
;
}
...
...
@@ -53,25 +53,25 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
extract
(
$args
,
EXTR_SKIP
);
/** This filter is documented in wp-includes/default-widgets.php */
$
title
=
apply_filters
(
'widget_title'
,
empty
(
$instance
[
'title'
]
)
?
__
(
'Ephemera'
,
'twentyeleven'
)
:
$instance
[
'title'
],
$instance
,
$this
->
id_base
);
$
args
[
'title'
]
=
apply_filters
(
'widget_title'
,
empty
(
$instance
[
'title'
]
)
?
__
(
'Ephemera'
,
'twentyeleven'
)
:
$instance
[
'title'
],
$instance
,
$this
->
id_base
);
if
(
!
isset
(
$instance
[
'number'
]
)
)
$instance
[
'number'
]
=
'10'
;
if
(
!
$
number
=
absint
(
$instance
[
'number'
]
)
)
$number
=
10
;
if
(
!
$
args
[
'number'
]
=
absint
(
$instance
[
'number'
]
)
)
$args
[
'number'
]
=
10
;
$ephemera_args
=
array
(
'order'
=>
'DESC'
,
'posts_per_page'
=>
$
number
,
'no_found_rows'
=>
true
,
'post_status'
=>
'publish'
,
'post__not_in'
=>
get_option
(
'sticky_posts'
),
'tax_query'
=>
array
(
'order'
=>
'DESC'
,
'posts_per_page'
=>
$
args
[
'number'
]
,
'no_found_rows'
=>
true
,
'post_status'
=>
'publish'
,
'post__not_in'
=>
get_option
(
'sticky_posts'
),
'tax_query'
=>
array
(
array
(
'taxonomy'
=>
'post_format'
,
'terms'
=>
array
(
'post-format-aside'
,
'post-format-link'
,
'post-format-status'
,
'post-format-quote'
),
'field'
=>
'slug'
,
'terms'
=>
array
(
'post-format-aside'
,
'post-format-link'
,
'post-format-status'
,
'post-format-quote'
),
'field'
=>
'slug'
,
'operator'
=>
'IN'
,
),
),
...
...
@@ -79,10 +79,10 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
$ephemera
=
new
WP_Query
(
$ephemera_args
);
if
(
$ephemera
->
have_posts
()
)
:
echo
$
before_widget
;
echo
$
before_title
;
echo
$
title
;
// Can set this with a widget option, or omit altogether
echo
$a
fter_title
;
echo
$
args
[
'before_widget'
]
;
echo
$
args
[
'before_title'
]
;
echo
$
args
[
'title'
];
echo
$a
rgs
[
'after_title'
]
;
?>
<ol>
<?php
while
(
$ephemera
->
have_posts
()
)
:
$ephemera
->
the_post
();
?>
...
...
@@ -111,7 +111,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
</ol>
<?php
echo
$a
fter_widget
;
echo
$a
rgs
[
'after_widget'
]
;
// Reset the post globals as this query will have stomped on it
wp_reset_postdata
();
...
...
@@ -119,7 +119,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
// end check for ephemeral posts
endif
;
$cache
[
$args
[
'widget_id'
]
]
=
ob_get_flush
();
$cache
[
$args
[
'widget_id'
]
]
=
ob_get_flush
();
wp_cache_set
(
'widget_twentyeleven_ephemera'
,
$cache
,
'widget'
);
}
...
...
@@ -171,4 +171,4 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
<input
id=
"
<?php
echo
esc_attr
(
$this
->
get_field_id
(
'number'
)
);
?>
"
name=
"
<?php
echo
esc_attr
(
$this
->
get_field_name
(
'number'
)
);
?>
"
type=
"text"
value=
"
<?php
echo
esc_attr
(
$number
);
?>
"
size=
"3"
/></p>
<?php
}
}
\ No newline at end of file
}
wp-content/themes/twentyeleven/index.php
View file @
bad092f3
...
...
@@ -6,7 +6,7 @@
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
* Learn more: http
s
://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Eleven
...
...
@@ -49,4 +49,4 @@ get_header(); ?>
</div>
<!-- #primary -->
<?php
get_sidebar
();
?>
<?php
get_footer
();
?>
\ No newline at end of file
<?php
get_footer
();
?>
wp-content/themes/twentyeleven/languages/twentyeleven.pot
View file @
bad092f3
# Copyright (C) 201
4
the WordPress team
# Copyright (C) 201
5
the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Eleven
1.9
\n"
"Report-Msgid-Bugs-To: http://wordpress.org/
tags
/twentyeleven\n"
"POT-Creation-Date: 201
4-09-03 00:45:45
+00:00\n"
"Project-Id-Version: Twenty Eleven
2.1
\n"
"Report-Msgid-Bugs-To: http://wordpress.org/
support/theme
/twentyeleven\n"
"POT-Creation-Date: 201
5-04-21 12:33:58
+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 201
4
-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 201
5
-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
...
...
@@ -162,7 +162,7 @@ msgstr ""
#: content-aside.php:46 content-featured.php:45 content-gallery.php:88
#: content-image.php:70 content-intro.php:19 content-link.php:46
#: content-page.php:21 content-quote.php:72 content-single.php:52
#: content-status.php:59 content.php:82 functions.php:60
6 functions.php:634
#: content-status.php:59 content.php:82 functions.php:60
9 functions.php:637
#: image.php:41
msgid "Edit"
msgstr ""
...
...
@@ -223,7 +223,7 @@ msgid ""
"\" rel=\"author\">%6$s</a></span></span>"
msgstr ""
#: content-image.php:41 functions.php:67
2
#: content-image.php:41 functions.php:67
5
msgid "View all posts by %s"
msgstr ""
...
...
@@ -266,8 +266,6 @@ msgstr ""
msgid "Featured"
msgstr ""
#. #-#-#-#-# twentyeleven.pot (Twenty Eleven 1.9) #-#-#-#-#
#. Author URI of the plugin/theme
#: footer.php:28
msgid "http://wordpress.org/"
msgstr ""
...
...
@@ -324,69 +322,69 @@ msgstr ""
msgid "Hanoi Plant"
msgstr ""
#: functions.php:44
3
#: functions.php:44
6
msgid "Main Sidebar"
msgstr ""
#: functions.php:45
2
#: functions.php:45
5
msgid "Showcase Sidebar"
msgstr ""
#: functions.php:45
4
#: functions.php:45
7
msgid "The sidebar for the optional Showcase Template"
msgstr ""
#: functions.php:46
2
#: functions.php:46
5
msgid "Footer Area One"
msgstr ""
#: functions.php:46
4 functions.php:474 functions.php:484
#: functions.php:46
7 functions.php:477 functions.php:487
msgid "An optional widget area for your site footer"
msgstr ""
#: functions.php:47
2
#: functions.php:47
5
msgid "Footer Area Two"
msgstr ""
#: functions.php:48
2
#: functions.php:48
5
msgid "Footer Area Three"
msgstr ""
#: functions.php:50
6
single.php:18
#: functions.php:50
9
single.php:18
msgid "Post navigation"
msgstr ""
#: functions.php:5
07
#: functions.php:5
10