Commit dc44e1ac authored by lucha's avatar lucha
Browse files

[auto] Theme: thematic 1.0.4

parent 23ad0db4
......@@ -226,8 +226,8 @@ function thematic_comment_form_args( $post_id = null ) {
$fields = array(
'author' => '<div id="form-section-author" class="form-section"><div class="form-label">' . '<label for="author">' . __( 'Name', 'thematic' ) . '</label> ' . ( $req ? '<span class="required">' . _x( '*', 'denotes required field', 'thematic' ) . '</span>' : '' ) . '</div>' . '<div class="form-input">' . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . ' maxlength="20" tabindex="3"' . $aria_req . ' /></div></div><!-- #form-section-author .form-section -->',
'email' => '<div id="form-section-email" class="form-section"><div class="form-label"><label for="email">' . __( 'Email', 'thematic' ) . '</label> ' . ( $req ? '<span class="required">' . _x( '*', 'denotes required field', 'thematic' ) . '</span>' : '' ) . '</div><div class="form-input">' . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" maxlength="50" tabindex="4"' . $aria_req . ' /></div></div><!-- #form-section-email .form-section -->',
'url' => '<div id="form-section-url" class="form-section"><div class="form-label"><label for="url">' . __( 'Website', 'thematic' ) . '</label></div>' . '<div class="form-input"><input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="50" tabindex="5" /></div></div><!-- #form-section-url .form-section -->',
'email' => '<div id="form-section-email" class="form-section"><div class="form-label"><label for="email">' . __( 'Email', 'thematic' ) . '</label> ' . ( $req ? '<span class="required">' . _x( '*', 'denotes required field', 'thematic' ) . '</span>' : '' ) . '</div><div class="form-input">' . '<input id="email" name="email" type="email" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" maxlength="50" tabindex="4"' . $aria_req . ' /></div></div><!-- #form-section-email .form-section -->',
'url' => '<div id="form-section-url" class="form-section"><div class="form-label"><label for="url">' . __( 'Website', 'thematic' ) . '</label></div>' . '<div class="form-input"><input id="url" name="url" type="url" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="50" tabindex="5" /></div></div><!-- #form-section-url .form-section -->',
);
......
......@@ -910,10 +910,13 @@ if (function_exists('childtheme_override_postheader_posttitle')) {
* Filter: thematic_postheader_posttitle
*/
function thematic_postheader_posttitle() {
$posttitle = "\n\n\t\t\t\t\t";
if ( !$title_content = get_the_title() )
$title_content = '<a href="' . get_permalink() . '">' . _x('(Untitled)', 'Default title for untitled posts', 'thematic') . '</a>';
if (is_single() || is_page()) {
$posttitle .= '<h1 class="entry-title">' . get_the_title() . "</h1>\n";
$posttitle .= '<h1 class="entry-title">' . $title_content . "</h1>\n";
} elseif (is_404()) {
$posttitle .= '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
} else {
......@@ -921,7 +924,8 @@ if (function_exists('childtheme_override_postheader_posttitle')) {
$posttitle .= sprintf('<a href="%s" title="%s" rel="bookmark">%s</a>',
apply_filters('the_permalink', get_permalink()),
sprintf( esc_attr__('Permalink to %s', 'thematic'), the_title_attribute( 'echo=0' ) ),
get_the_title());
$title_content
);
$posttitle .= "</h2>\n";
}
......@@ -1147,6 +1151,7 @@ if (function_exists('childtheme_override_content')) {
}
}
} elseif ( strtolower($thematic_content_length) == 'none') {
$post= '';
} else {
$post = get_the_content( thematic_more_text() );
$post = apply_filters('the_content', $post);
......@@ -1198,10 +1203,10 @@ if (function_exists('childtheme_override_category_archives')) {
<li id="category-archives" class="content-column">
<h2><?php _e('Archives by Category', 'thematic') ?></h2>
<ul>
<?php wp_list_categories(array('optioncount' => true,
'feed' => 'RSS',
'title_li' => '',
'show_count' => true)); ?>
<?php wp_list_categories( array ( 'feed' => 'RSS',
'title_li' => '',
'show_count' => true ) );
?>
</ul>
</li>
<?php }
......@@ -1660,7 +1665,7 @@ if (function_exists('childtheme_override_postfooter_postconnect')) {
__('Trackback URL', 'thematic'))
);
} elseif ((comments_open()) && !(pings_open())) { /* Only comments open */
$postconnect = sprintf( __('Trackbacks are closed, but you can %1$spost a comment%2$s.', '1s and 2s are the a href link wrappers, do not reverse them', 'thematic'), sprintf('<a class="comment-link" title="%s" href="#respond">', esc_attr__('Post a comment', 'thematic')), '</a>');
$postconnect = sprintf( _x('Trackbacks are closed, but you can %1$spost a comment%2$s.', '1s and 2s are the a href link wrappers, do not reverse them', 'thematic'), sprintf('<a class="comment-link" title="%s" href="#respond">', esc_attr__('Post a comment', 'thematic')), '</a>');
} elseif (!(comments_open()) && !(pings_open())) { /* Comments and trackbacks closed */
$postconnect = __('Both comments and trackbacks are currently closed.', 'thematic');
}
......
......@@ -6,53 +6,22 @@
* @subpackage DynamicClasses
*/
if ( function_exists( 'childtheme_override_body' ) ) {
/**
* @ignore
*/function thematic_body() {
childtheme_override_body();
}
} else {
/**
* @ignore
*/function thematic_body() {
thematic_bodyopen();
}
}
/**
* thematic_bodyopen function
*/
function thematic_bodyopen() {
if ( apply_filters( 'thematic_show_bodyclass',TRUE ) ) {
// Creating the body class
echo '<body ';
body_class();
echo '>' . "\n\n";
} else {
echo '<body>' . "\n\n";
}
}
if ( function_exists( 'childtheme_override_body_class' ) ) {
_deprecated_function( 'childtheme_override_body_class', '1.0.1.3','filter body_class()' );
/**
* @ignore
*/function thematic_body_class() {
*/
function thematic_body_class() {
childtheme_override_body_class();
}
} else {
/**
* Generates semantic classes for BODY element
*
* @param bool $print (default: true)
* @param array $c body classes
*/
function thematic_body_class( $c ) {
_deprecated_function( 'thematic_body_class', '1.0.1.3', 'filter body_class()' );
global $wp_query, $current_user, $blog_id, $post, $taxonomy;
$c = array();
if ( apply_filters('thematic_show_bc_wordpress', TRUE ) ) {
// It's surely a WordPress blog, right?
......@@ -293,7 +262,7 @@ if ( function_exists( 'childtheme_override_body_class' ) ) {
$c[] = 'search-paged-' . $page;
}
// Paged classes; for page x = 1 For all post types
} elseif ( strpos( $post->post_content, '<!--nextpage-->') ) {
} elseif ( preg_match( '/<!--nextpage(.*?)-->/', $post->post_content ) ) {
if ( thematic_is_custom_post_type() ) {
$c[] = str_replace( '_','-',$post->post_type ) . '-paged-1';
} elseif (is_page()) {
......@@ -309,15 +278,22 @@ if ( function_exists( 'childtheme_override_body_class' ) ) {
}
}
// Add Legacy Body Classes to body_class()
if ( current_theme_supports ( 'thematic_legacy_body_class' ) ) {
add_filter( 'body_class', 'thematic_body_class', 20 );
/**
* Add thematic body classes if child theme activates it
*/
function thematic_activate_body_classes() {
if ( current_theme_supports ( 'thematic_legacy_body_class' ) ) {
add_filter( 'body_class', 'thematic_body_class', 20 );
}
// Add browser CSS class to the end (queuing through priority) of the body classes
if ( apply_filters( 'thematic_show_bc_browser', TRUE ) ) {
add_filter( 'body_class', 'thematic_browser_class_names', 30 );
}
}
add_action( 'init', 'thematic_activate_body_classes' );
// Add browser CSS class to the end (queuing through priority) of the body classes
if ( apply_filters( 'thematic_show_bc_browser', TRUE ) ) {
add_filter( 'body_class', 'thematic_browser_class_names', 30 );
}
/**
* thematic_browser_class_names function.
......@@ -413,10 +389,10 @@ function thematic_browser_class_names($classes) {
if (function_exists('childtheme_override_post_class')) {
_deprecated_function( 'childtheme_override_post_class', '1.0.1.3', 'filter post_class()' );
/**
* @ignore
*/function thematic_post_class() {
*/
function thematic_post_class() {
childtheme_override_post_class();
}
} else {
......@@ -424,12 +400,14 @@ if (function_exists('childtheme_override_post_class')) {
* Generates semantic classes for each post DIV element
*/
function thematic_post_class( $c ) {
_deprecated_function( 'thematic_post_class', '1.0.1.3', 'filter post_class()' );
global $post, $thematic_post_alt, $thematic_content_length, $taxonomy;
// hentry for hAtom compliace, gets 'alt' for every other post DIV, describes the post type and p[n]
$c = array( 'hentry', "p$thematic_post_alt", str_replace( '_', '-', $post->post_type) , $post->post_status );
$c[] = 'hentry';
$c[] = "p$thematic_post_alt";
$c[] = str_replace( '_', '-', $post->post_type );
$c[] = $post->post_status ;
// Author for the post queried
$c[] = 'author-' . sanitize_title_with_dashes( strtolower( get_the_author_meta( 'user_login' ) ) );
......@@ -463,34 +441,26 @@ if (function_exists('childtheme_override_post_class')) {
}
}
// For posts displayed as full content
if ($thematic_content_length == 'full')
$c[] = 'is-full';
$thematic_excerpt_more = preg_match( '/<!--more(.*?)-->/', $post->post_content );
// For posts displayed as excerpts
if ($thematic_content_length == 'excerpt') {
if ( $thematic_content_length == 'excerpt' || ( !is_single() && $thematic_excerpt_more ) ) {
$c[] = 'is-excerpt';
if ( has_excerpt() && !preg_match( '/<!--more(.*?)?-->/', $post->post_content ) ) {
if ( has_excerpt() ) {
// For wp-admin Write Page generated excerpts
$c[] = 'custom-excerpt';
} elseif ( $thematic_excerpt_more ) {
// For more tag
$c[] = 'moretag-excerpt';
} else {
// For automatically generated excerpts
// For auto generated excerpts
$c[] = 'auto-excerpt';
}
// For posts displayed as full content
} elseif ( $thematic_content_length == 'full' ) {
$c[] = 'is-full';
}
// For single posts that had a wp-admin Write Page generated excerpt
if ( has_excerpt() && is_single() )
$c[] = 'has-excerpt';
// For posts using more tag
if ( preg_match( '/<!--more(.*?)?-->/', $post->post_content ) ) {
if ( !is_single() ) {
$c[] = 'wp-teaser';
} elseif ( is_single() ) {
$c[] = 'has-teaser';
}
}
// For posts with comments open or closed
if ( comments_open() ) {
......@@ -528,9 +498,16 @@ if (function_exists('childtheme_override_post_class')) {
return array_unique(apply_filters( 'thematic_post_class', $c )); // Available filter: thematic_post_class
}
}
if ( current_theme_supports ( 'thematic_legacy_post_class' ) ) {
add_filter( 'post_class', 'thematic_post_class', 20 );
/**
* Add thematic post classes if child theme activates it
*/
function thematic_activate_post_classes() {
if ( current_theme_supports ( 'thematic_legacy_post_class' ) ) {
add_filter( 'post_class', 'thematic_post_class', 20 );
}
}
add_action( 'init', 'thematic_activate_post_classes' );
/**
* Define the num val for 'alt' classes (in post DIV and comment LI)
......
......@@ -499,10 +499,34 @@ function thematic_add_menuclass($ulclass) {
}
if ( function_exists( 'childtheme_override_body' ) ) {
/**
* @ignore
*/
function thematic_body() {
childtheme_override_body();
}
} else {
/**
* Creates the body tag
*/
function thematic_body() {
if ( apply_filters( 'thematic_show_bodyclass',TRUE ) ) {
// Creating the body class
echo '<body ';
body_class();
echo '>' . "\n\n";
} else {
echo '<body>' . "\n\n";
}
}
}
/**
* Register action hook: thematic_before
*
* Located in header.php, just after the opening body tag, before anything else.
* Located in header.php, just after the body tag, before anything else.
*/
function thematic_before() {
do_action( 'thematic_before' );
......
......@@ -11,7 +11,6 @@
* @package ThematicCoreLibrary
* @subpackage Shortcodes
*
* @TODO: remove all references to deprecated function, get_theme_data()
*/
......@@ -75,13 +74,8 @@ add_shortcode('the-year', 'thematic_shortcode_year');
* Display the name of the parent theme.
*/
function thematic_shortcode_theme_name() {
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme( 'thematic' );
return $frameworkData->display( 'Name', false );
} else {
$frameworkData = get_theme_data( get_template_directory() . '/style.css' );
return $frameworkData['Title'];
}
$frameworkData = wp_get_theme( 'thematic' );
return $frameworkData->display( 'Name', false );
}
add_shortcode('theme-name', 'thematic_shortcode_theme_name');
......@@ -90,13 +84,8 @@ add_shortcode('theme-name', 'thematic_shortcode_theme_name');
* Display the name of the parent theme author.
*/
function thematic_shortcode_theme_author() {
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme( 'thematic' );
return $frameworkData->display( 'Author', false );
} else {
$frameworkData = get_theme_data( get_template_directory() . '/style.css' );
return $frameworkData['Author'];
}
$frameworkData = wp_get_theme( 'thematic' );
return $frameworkData->display( 'Author', false );
}
add_shortcode('theme-author', 'thematic_shortcode_theme_author');
......@@ -105,13 +94,8 @@ add_shortcode('theme-author', 'thematic_shortcode_theme_author');
* Display the URI of the parent theme.
*/
function thematic_shortcode_theme_uri() {
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme( 'thematic' );
return $frameworkData->display( 'ThemeURI', false );
} else {
$frameworkData = get_theme_data( get_template_directory() . '/style.css' );
return $frameworkData['URI'];
}
$frameworkData = wp_get_theme( 'thematic' );
return $frameworkData->display( 'ThemeURI', false );
}
add_shortcode('theme-uri', 'thematic_shortcode_theme_uri');
......@@ -120,13 +104,8 @@ add_shortcode('theme-uri', 'thematic_shortcode_theme_uri');
* Display the version no. of the parent theme.
*/
function thematic_shortcode_theme_version() {
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme( 'thematic' );
return trim( $frameworkData->display('Version', false));
} else {
$frameworkData = get_theme_data( get_template_directory() . '/style.css' );
return trim( $frameworkData['Version'] );
}
$frameworkData = wp_get_theme( 'thematic' );
return trim( $frameworkData->display('Version', false));
}
add_shortcode('theme-version', 'thematic_shortcode_theme_version');
......@@ -136,13 +115,8 @@ add_shortcode('theme-version', 'thematic_shortcode_theme_version');
* Display the name of the child theme.
*/
function thematic_shortcode_child_name() {
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme();
return $frameworkData->display( 'Name', false );
} else {
$frameworkData = get_theme_data( get_stylesheet_directory() . '/style.css' );
return $frameworkData['Title'];
}
$frameworkData = wp_get_theme();
return $frameworkData->display( 'Name', false );
}
add_shortcode('child-name', 'thematic_shortcode_child_name');
......@@ -151,13 +125,8 @@ add_shortcode('child-name', 'thematic_shortcode_child_name');
* Display the name of the child theme author.
*/
function thematic_shortcode_child_author() {
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme();
return $frameworkData->display( 'Author', false );
} else {
$frameworkData = get_theme_data( get_stylesheet_directory() . '/style.css' );
return $frameworkData['Author'];
}
$frameworkData = wp_get_theme();
return $frameworkData->display( 'Author', false );
}
add_shortcode('child-author', 'thematic_shortcode_child_author');
......@@ -166,13 +135,8 @@ add_shortcode('child-author', 'thematic_shortcode_child_author');
* Display the URI of the child theme.
*/
function thematic_shortcode_child_uri() {
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme();
return $frameworkData->display( 'ThemeURI', false );
} else {
$frameworkData = get_theme_data( get_stylesheet_directory() . '/style.css' );
return $frameworkData['URI'];
}
$frameworkData = wp_get_theme();
return $frameworkData->display( 'ThemeURI', false );
}
add_shortcode('child-uri', 'thematic_shortcode_child_uri');
......@@ -182,12 +146,7 @@ add_shortcode('child-uri', 'thematic_shortcode_child_uri');
*
*/
function thematic_shortcode_child_version() {
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme();
return trim( $frameworkData->display('Version', false));
} else {
$frameworkData = get_theme_data( get_stylesheet_directory() . '/style.css' );
return trim( $frameworkData['Version'] );
}
$frameworkData = wp_get_theme();
return trim( $frameworkData->display('Version', false));
}
add_shortcode('child-version', 'thematic_shortcode_child_version');
......@@ -188,7 +188,6 @@ add_action( 'admin_menu', 'thematic_opt_add_page' );
* Override: childtheme_override_opt_page_help <br>
*
* @since Thematic 1.0
* @todo remove conditional compatibilty WP version > 3.3 and remove fallback to 3.2
*/
if (function_exists('childtheme_override_opt_page_help')) {
function thematic_opt_page_help() {
......@@ -212,43 +211,16 @@ if (function_exists('childtheme_override_opt_page_help')) {
$help = apply_filters ( 'thematic_theme_opt_help_txt', $help );
if ( method_exists( $screen, 'add_help_tab' ) ) {
// WordPress 3.3
$screen->add_help_tab( array( 'title' => __( 'Overview', 'thematic' ), 'id' => 'theme-opt-help', 'content' => $help, ) );
$screen->set_help_sidebar( $sidebar );
$screen->add_help_tab( array( 'title' => __( 'Overview', 'thematic' ), 'id' => 'theme-opt-help', 'content' => $help, ) );
$screen->set_help_sidebar( $sidebar );
} else {
thematic_legacy_help();
}
}
}
/**
* Adds a settings section to display legacy help text and theme links
*
* @since Thematic 1.0
* @todo remove Legacy help when two point relases of WP have occurred after 3.3
*/
function thematic_legacy_help() {
add_settings_section ('thematic_opt_help_section', '', 'thematic_do_legacy_help_section', 'thematic_opt_page');
}
/**
* Renders the legacy help text and theme links
*
* @since Thematic 1.0
* @todo remove Legacy help when two point relases of WP have occurred after 3.3
*/
function thematic_do_legacy_help_section() {
echo '<p>'. sprintf ( _x( 'For more information about this theme, %1$svisit ThematicTheme.com%2$s', '%1$s and %2$s are <a> tags', 'thematic') , '<a href="http://thematictheme.com">', '</a>') . ' ' . sprintf ( _x( 'Please visit the %1$sThematicTheme.com Forums%2$s if you have any questions about Thematic.', '%1$s and %2$s are <a> tags', 'thematic'), '<a href="http://thematictheme.com/forums/">', '</a>' ) .'</p>' ;
}
/**
* Renders the them options page
*
* @since Thematic 1.0
* @todo: remove get_current_theme()
*/
function thematic_do_opt_page() { ?>
......@@ -256,12 +228,8 @@ function thematic_do_opt_page() { ?>
<?php screen_icon(); ?>
<?php
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme();
$theme = $frameworkData->display( 'Name', false );
} else {
$theme = get_current_theme();
}
$frameworkData = wp_get_theme();
$theme = $frameworkData->display( 'Name', false );
?>
<h2><?php printf( _x( '%s Theme Options', '{$current theme} Theme Options', 'thematic' ), $theme ); ?></h2>
......@@ -337,19 +305,14 @@ function thematic_do_footer_opt() {
* Renders Leagcy Options elements
*
* @since Thematic 1.0
* @todo: remove get_current_theme()
*/
function thematic_do_legacy_opt() {
?>
<input id="thm_legacy_opt" type="checkbox" value="1" name="thematic_theme_opt[del_legacy_opt]" <?php checked( thematic_get_theme_opt('del_legacy_opt'), 1 ); ?> />
<?php
if ( function_exists( 'wp_get_theme' ) ) {
$frameworkData = wp_get_theme();
$theme = $frameworkData->display( 'Name', false );
} else {
$theme = get_current_theme();
}
?>
<label for="thm_legacy_opt"><?php printf( _x( '%s Theme Options have been upgraded to an improved format. Remove the legacy options from the database.', '{$current theme} Theme Options', 'thematic' ), $theme ); ?></label>
......@@ -367,8 +330,8 @@ function thematic_do_legacy_opt() {
* @since Thematic 1.0
*/
if (function_exists('childtheme_override_validate_opt')) {
function thematic_thematic_validate_opt() {
childtheme_override_validate_opt();
function thematic_validate_opt($input) {
childtheme_override_validate_opt($input);
}
} else {
function thematic_validate_opt($input){
......@@ -377,10 +340,10 @@ if (function_exists('childtheme_override_validate_opt')) {
// Index Insert position must be a non-negative number
if ( !is_numeric( $input['index_insert'] ) || $input['index_insert'] < 0 ) {
add_settings_error(
'thematic_theme_opt',
'thematic_insert_opt',
__('The index insert position value must be a number equal to or greater than zero. This setting has been reverted to the previous value.', 'thematic' ),
'error'
'thematic_theme_opt',
'thematic_insert_opt',
__('The index insert position value must be a number equal to or greater than zero. This setting has been reverted to the previous value.', 'thematic' ),
'error'
);
} else {
// A sanitize numeric value to ensure a whole number
......
# Translation of Thematic 1.0.3 in Catalan
# This file is distributed under the same license as the Thematic 1.0.3 package.
# Translation of Thematic 1.0.3.x in Catalan
# This file is distributed under the same license as the Thematic 1.0.3.x package.
msgid ""
msgstr ""
"PO-Revision-Date: 2012-10-22 09:59:21+0000\n"
"PO-Revision-Date: 2013-03-05 17:46:44+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: GlotPress/0.1\n"
"Project-Id-Version: Thematic 1.0.3\n"
"Project-Id-Version: Thematic 1.0.3.x\n"
#: library/extensions/content-extensions.php:916
msgctxt "Default title for untitled posts"
msgid "(Untitled)"
msgstr ""
#: library/extensions/content-extensions.php:1667
msgctxt "1s and 2s are the a href link wrappers, do not reverse them"
msgid "Trackbacks are closed, but you can %1$spost a comment%2$s."
msgstr ""
#: archives.php:20 template-page-blog.php:22
msgid "The template %s"
......@@ -75,7 +85,7 @@ msgid "Post Comment"
msgstr "Publicar comentari"
#: library/extensions/comments-extensions.php:228
#: library/legacy/deprecated.php:357
#: library/legacy/deprecated.php:365
msgid "Name"
msgstr "Nom"
......@@ -86,17 +96,17 @@ msgid "*"
msgstr "*"
#: library/extensions/comments-extensions.php:229
#: library/legacy/deprecated.php:362
#: library/legacy/deprecated.php:370
msgid "Email"
msgstr "Email"
#: library/extensions/comments-extensions.php:230
#: library/legacy/deprecated.php:367
#: library/legacy/deprecated.php:375
msgid "Website"
msgstr "Website"
#: library/extensions/comments-extensions.php:238