richardshepherd / twentytenfive Goto Github PK
View Code? Open in Web Editor NEWUpdates the WordPress TwentyTen theme to HTML5
Home Page: http://twentytenfive.com
License: GNU General Public License v2.0
Updates the WordPress TwentyTen theme to HTML5
Home Page: http://twentytenfive.com
License: GNU General Public License v2.0
Please Create a demo site of Twenty Ten Five and add the same in official site, so users who download them can be confident of it before.
The align attribute of the caption shortcode is never applied to the class of the figure element.
As a workaround I implemented the following in my child theme:
/* FIX TWENTY TEN FIVE CAPTION IMAGE ALIGNMENTS */
/**
add_action('init', 'fix_ttf_shortcodes');
function fix_ttf_shortcodes(){
remove_shortcode('twentyten_img_caption_shortcode');
remove_shortcode('twentyten_img_caption_shortcode');
add_shortcode('wp_caption', 'fixed_twentyten_img_caption_shortcode');
add_shortcode('caption', 'fixed_twentyten_img_caption_shortcode');
}
function fixed_twentyten_img_caption_shortcode($attr, $content = null) {
extract(shortcode_atts(array(
'id' => '',
'align' => 'alignnone',
'width' => '',
'caption' => ''
), $attr));
if ( 1 > (int) $width || empty($caption) )
return $content;
if ( $id ) $idtag = 'id="' . esc_attr($id) . '" ';
$align = 'class="' . esc_attr($align) . '" ';
return '<figure ' . $idtag . $align . 'aria-describedby="figcaption_' . $id . '" style="width: ' . (10 + (int) $width) . 'px">'
. do_shortcode( $content ) . '
/* */
To fix Twenty Ten Five directly just add the shortcode's align attribute inside a class attribute for the figure element. Like this:
$align = 'class="' . esc_attr($align) . '" ';
return '<figure ' . $idtag . $align . 'aria-describedby="figcaption_' . $id . '" style="width: ' . (10 + (int) $width) . 'px">'
. do_shortcode( $content ) . '
Let me know if my fix brakes something else, it didn't for me:P
On my test server I am seeing the following errors. Yes I know this only show when in Debug Mode, but it would be nice get these notices suppressed.
Notice: Undefined variable: new_defaults in /var/www/wordpress/wp-content/themes/twentytenfive/comments.php on line 77 Notice: Undefined variable: commenter in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 594 Notice: Undefined variable: aria_req in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 594 Notice: Undefined variable: commenter in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 597 Notice: Undefined variable: aria_req in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 597 Notice: Undefined variable: commenter in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 600
Hi,
date is not filled correctly "c"
get_the_date('Y-m-d') is working.
Thanks,
Sylvia Egger
$commenter and $aria_req are not defined : https://github.com/richardshepherd/TwentyTenFive/blob/master/functions.php#L573
It would be great to have all text in variables, especially placeholder text.
So I could made a german text file in the future.
Thanks.
Hello
I just found this and looks great !
I think there is no update in the two years. May I know if you have any plan to update it accordingly for newer WordPress versions?
Thanks
twentytenfive_comments()
$aria_req for email and author is not filled even when it is required
$aria_req = ( $req ? " aria-required='true'" : '' ); is working
Thanks ...
The base functions currently being used for TwentyTen Five are from TwentyTen v1.0. Current TwentyTen functions are at v1.2 and contain new functionality (ie - Formats)
aria-describedby="figcaption is too much for screenreader usage.
So alternative text of the image is read or title, figcaption via aria and the caption - mostly the same text. I think aria-describedby is too much in this case.
Thanks.
In header.php there is markup in a noscript element that says "you need to turn JavaScript on to use this site". The url it points to 404's - http://turnjavascripton.com
But there should be no JavaScript requirement to view content on a blog. It should display content to users with JS off, without a "warning" or prompting them to turn it on.
The edits to the functions.php file build after of the twentyten base, but as the additions are not conditional, redeclaring them in any child theme creates PHP errors.
Discovered when I tried to edit the twentyten_posted_on tag and received an error because it was being called twice. When I looked in the functions.php files I discovered the twentyten_posted_on being called conditionally on line 441 and unconditionally on line 561 of the TwentyTen Five theme. The call on line 561 directly conflicts with any call from a child theme.
This is a huge problem if you intend this theme as a starter theme, as child themes are forced to use TwentyTen Five functions rather than their own.
Hi Richard,
I've installed the theme on a fresh Wordpress 3.0.5 and I get
Fatal error: Call to undefined function has_post_thumbnail() ~/TwentyTenFive/header.php on line 76
I fixed it in my env by adding add_theme_support( 'post-thumbnails' ); to functions.php
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.