Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove invalid legend tag for w3c validator happiness #53

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
130 changes: 65 additions & 65 deletions functions.php
Expand Up @@ -218,7 +218,7 @@ function the_bootstrap_register_scripts_styles() {


if ( ! is_admin() ) { if ( ! is_admin() ) {
$theme_version = _the_bootstrap_version(); $theme_version = _the_bootstrap_version();
$bootswatch_version = '2.2.1'; $bootswatch_version = '2.2.1';
$protocol = is_ssl() ? 'https' : 'http'; $protocol = is_ssl() ? 'https' : 'http';
$suffix = ( defined( 'SCRIPT_DEBUG' ) AND SCRIPT_DEBUG ) ? '' : '.min'; $suffix = ( defined( 'SCRIPT_DEBUG' ) AND SCRIPT_DEBUG ) ? '' : '.min';


Expand Down Expand Up @@ -248,68 +248,68 @@ function the_bootstrap_register_scripts_styles() {
case 'twitter-bootstrap': case 'twitter-bootstrap':
wp_register_style( 'twitter-bootstrap', get_template_directory_uri() . "/css/bootstrap{$suffix}.css", array(), '2.1.1' ); wp_register_style( 'twitter-bootstrap', get_template_directory_uri() . "/css/bootstrap{$suffix}.css", array(), '2.1.1' );
break; break;

case 'amelia-bootstrap': case 'amelia-bootstrap':
wp_register_style( 'amelia-lobster-font', "$protocol://fonts.googleapis.com/css?family=Lobster", array(), null ); wp_register_style( 'amelia-lobster-font', "$protocol://fonts.googleapis.com/css?family=Lobster", array(), null );
wp_register_style( 'amelia-cabin-font', "$protocol://fonts.googleapis.com/css?family=Cabin:400,700", array(), null ); wp_register_style( 'amelia-cabin-font', "$protocol://fonts.googleapis.com/css?family=Cabin:400,700", array(), null );
wp_register_style( 'amelia-bootstrap', get_template_directory_uri() . "/css/amelia{$suffix}.css", array( 'amelia-lobster-font', 'amelia-cabin-font' ), $bootswatch_version ); wp_register_style( 'amelia-bootstrap', get_template_directory_uri() . "/css/amelia{$suffix}.css", array( 'amelia-lobster-font', 'amelia-cabin-font' ), $bootswatch_version );
break; break;

case 'cerulean-bootstrap': case 'cerulean-bootstrap':
wp_register_style( 'cerulean-telex-font', "$protocol://fonts.googleapis.com/css?family=Telex", array(), null ); wp_register_style( 'cerulean-telex-font', "$protocol://fonts.googleapis.com/css?family=Telex", array(), null );
wp_register_style( 'cerulean-bootstrap', get_template_directory_uri() . "/css/cerulean{$suffix}.css", array( 'cerulean-telex-font' ), $bootswatch_version ); wp_register_style( 'cerulean-bootstrap', get_template_directory_uri() . "/css/cerulean{$suffix}.css", array( 'cerulean-telex-font' ), $bootswatch_version );
break; break;

case 'cyborg-bootstrap': case 'cyborg-bootstrap':
wp_register_style( 'cyborg-droid-sans-font', "$protocol://fonts.googleapis.com/css?family=Droid+Sans:400,700", array(), null ); wp_register_style( 'cyborg-droid-sans-font', "$protocol://fonts.googleapis.com/css?family=Droid+Sans:400,700", array(), null );
wp_register_style( 'cyborg-bootstrap', get_template_directory_uri() . "/css/cyborg{$suffix}.css", array( 'cyborg-droid-sans-font' ), $bootswatch_version ); wp_register_style( 'cyborg-bootstrap', get_template_directory_uri() . "/css/cyborg{$suffix}.css", array( 'cyborg-droid-sans-font' ), $bootswatch_version );
break; break;

case 'journal-bootstrap': case 'journal-bootstrap':
wp_register_style( 'journal-news-cycle-font', "$protocol://fonts.googleapis.com/css?family=News+Cycle:400,700", array(), null ); wp_register_style( 'journal-news-cycle-font', "$protocol://fonts.googleapis.com/css?family=News+Cycle:400,700", array(), null );
wp_register_style( 'journal-bootstrap', get_template_directory_uri() . "/css/journal{$suffix}.css", array( 'journal-news-cycle-font' ), $bootswatch_version ); wp_register_style( 'journal-bootstrap', get_template_directory_uri() . "/css/journal{$suffix}.css", array( 'journal-news-cycle-font' ), $bootswatch_version );
break; break;

case 'readable-bootstrap': case 'readable-bootstrap':
wp_register_style( 'readable-bootstrap', get_template_directory_uri() . "/css/readable{$suffix}.css", array(), $bootswatch_version ); wp_register_style( 'readable-bootstrap', get_template_directory_uri() . "/css/readable{$suffix}.css", array(), $bootswatch_version );
break; break;

case 'simplex-bootstrap': case 'simplex-bootstrap':
wp_register_style( 'simplex-josefin-sans-font', "$protocol://fonts.googleapis.com/css?family=Josefin+Sans:300,400,700", array(), null ); wp_register_style( 'simplex-josefin-sans-font', "$protocol://fonts.googleapis.com/css?family=Josefin+Sans:300,400,700", array(), null );
wp_register_style( 'simplex-bootstrap', get_template_directory_uri() . "/css/simplex{$suffix}.css", array( 'simplex-josefin-sans-font' ), $bootswatch_version ); wp_register_style( 'simplex-bootstrap', get_template_directory_uri() . "/css/simplex{$suffix}.css", array( 'simplex-josefin-sans-font' ), $bootswatch_version );
break; break;

case 'slate-bootstrap': case 'slate-bootstrap':
wp_register_style( 'slate-bootstrap', get_template_directory_uri() . "/css/slate{$suffix}.css", array(), $bootswatch_version ); wp_register_style( 'slate-bootstrap', get_template_directory_uri() . "/css/slate{$suffix}.css", array(), $bootswatch_version );
break; break;

case 'spacelab-bootstrap': case 'spacelab-bootstrap':
wp_register_style( 'spacelab-muli-font', "$protocol://fonts.googleapis.com/css?family=Muli", array(), null ); wp_register_style( 'spacelab-muli-font', "$protocol://fonts.googleapis.com/css?family=Muli", array(), null );
wp_register_style( 'spacelab-bootstrap', get_template_directory_uri() . "/css/spacelab{$suffix}.css", array( 'spacelab-muli-font' ), $bootswatch_version ); wp_register_style( 'spacelab-bootstrap', get_template_directory_uri() . "/css/spacelab{$suffix}.css", array( 'spacelab-muli-font' ), $bootswatch_version );
break; break;

case 'spruce-bootstrap': case 'spruce-bootstrap':
wp_register_style( 'spruce-josefin-slab-font', "$protocol://fonts.googleapis.com/css?family=Josefin+Slab:400,700", array(), null ); wp_register_style( 'spruce-josefin-slab-font', "$protocol://fonts.googleapis.com/css?family=Josefin+Slab:400,700", array(), null );
wp_register_style( 'spruce-bootstrap', get_template_directory_uri() . "/css/spruce{$suffix}.css", array( 'spruce-josefin-slab-font' ), $bootswatch_version ); wp_register_style( 'spruce-bootstrap', get_template_directory_uri() . "/css/spruce{$suffix}.css", array( 'spruce-josefin-slab-font' ), $bootswatch_version );
break; break;

case 'superhero-bootstrap': case 'superhero-bootstrap':
wp_register_style( 'superhero-oswald-font', "$protocol://fonts.googleapis.com/css?family=Oswald", array(), null ); wp_register_style( 'superhero-oswald-font', "$protocol://fonts.googleapis.com/css?family=Oswald", array(), null );
wp_register_style( 'superhero-noticia-text-font', "$protocol://fonts.googleapis.com/css?family=Noticia+Text", array(), null ); wp_register_style( 'superhero-noticia-text-font', "$protocol://fonts.googleapis.com/css?family=Noticia+Text", array(), null );
wp_register_style( 'superhero-bootstrap', get_template_directory_uri() . "/css/superhero{$suffix}.css", array( 'superhero-oswald-font', 'superhero-noticia-text-font' ), $bootswatch_version ); wp_register_style( 'superhero-bootstrap', get_template_directory_uri() . "/css/superhero{$suffix}.css", array( 'superhero-oswald-font', 'superhero-noticia-text-font' ), $bootswatch_version );
break; break;

case 'united-bootstrap': case 'united-bootstrap':
wp_register_style( 'united-ubuntu-font', "$protocol://fonts.googleapis.com/css?family=Ubuntu", array(), null ); wp_register_style( 'united-ubuntu-font', "$protocol://fonts.googleapis.com/css?family=Ubuntu", array(), null );
wp_register_style( 'united-bootstrap', get_template_directory_uri() . "/css/united{$suffix}.css", array( 'united-ubuntu-font' ), $bootswatch_version ); wp_register_style( 'united-bootstrap', get_template_directory_uri() . "/css/united{$suffix}.css", array( 'united-ubuntu-font' ), $bootswatch_version );
break; break;
} }


wp_enqueue_style( wp_enqueue_style(
'twitter-bootstrap-responsive', 'twitter-bootstrap-responsive',
get_template_directory_uri() . "/css/bootstrap-responsive{$suffix}.css", get_template_directory_uri() . "/css/bootstrap-responsive{$suffix}.css",
array( the_bootstrap_options()->bootswatch ), array( the_bootstrap_options()->bootswatch ),
'2.1.1' '2.1.1'
); );


wp_register_style( wp_register_style(
Expand Down Expand Up @@ -625,8 +625,8 @@ function the_bootstrap_comment_form_defaults( $defaults ) {
'comment_notes_before' => '', 'comment_notes_before' => '',
'comment_notes_after' => '<div class="form-allowed-tags control-group"><label class="control-label">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'the-bootstrap' ), '</label><div class="controls"><pre>' . allowed_tags() . '</pre></div>' ) . '</div> 'comment_notes_after' => '<div class="form-allowed-tags control-group"><label class="control-label">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'the-bootstrap' ), '</label><div class="controls"><pre>' . allowed_tags() . '</pre></div>' ) . '</div>
<div class="form-actions">', <div class="form-actions">',
'title_reply' => '<legend>' . __( 'Leave a reply', 'the-bootstrap' ) . '</legend>', 'title_reply' => '<span class="legend">' . __( 'Leave a reply', 'the-bootstrap' ) . '</span>',
'title_reply_to' => '<legend>' . __( 'Leave a reply to %s', 'the-bootstrap' ). '</legend>', 'title_reply_to' => '<span class="legend">' . __( 'Leave a reply to %s', 'the-bootstrap' ). '</span>',
'must_log_in' => '<div class="must-log-in control-group controls">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.', 'the-bootstrap' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '</div>', 'must_log_in' => '<div class="must-log-in control-group controls">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.', 'the-bootstrap' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '</div>',
'logged_in_as' => '<div class="logged-in-as control-group controls">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'the-bootstrap' ), admin_url( 'profile.php' ), wp_get_current_user()->display_name, wp_logout_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '</div>', 'logged_in_as' => '<div class="logged-in-as control-group controls">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'the-bootstrap' ), admin_url( 'profile.php' ), wp_get_current_user()->display_name, wp_logout_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '</div>',
), $defaults ); ), $defaults );
Expand Down Expand Up @@ -1039,7 +1039,7 @@ function the_bootstrap_img_caption_shortcode( $empty, $attr, $content ) {
* @return string The Bootstrap password form * @return string The Bootstrap password form
*/ */
function the_bootstrap_the_password_form( $form ) { function the_bootstrap_the_password_form( $form ) {
return '<form class="post-password-form form-horizontal" action="' . add_query_arg( array( 'action' => 'postpass' ), home_url( 'wp-login.php' ) ) . '" method="post"><legend>'. __( 'This post is password protected. To view it please enter your password below:', 'the-bootstrap' ) . '</legend><div class="control-group"><label class="control-label" for="post-password-' . get_the_ID() . '">' . __( 'Password:', 'the-bootstrap' ) .'</label><div class="controls"><input name="post_password" id="post-password-' . get_the_ID() . '" type="password" size="20" /></div></div><div class="form-actions"><button type="submit" class="post-password-submit submit btn btn-primary">' . __( 'Submit', 'the-bootstrap' ) . '</button></div></form>'; return '<form class="post-password-form form-horizontal" action="' . add_query_arg( array( 'action' => 'postpass' ), home_url( 'wp-login.php' ) ) . '" method="post"><p class="post-password-legend">'. __( 'This post is password protected. To view it please enter your password below:', 'the-bootstrap' ) . '</p><div class="control-group"><label class="control-label" for="post-password-' . get_the_ID() . '">' . __( 'Password:', 'the-bootstrap' ) .'</label><div class="controls"><input name="post_password" id="post-password-' . get_the_ID() . '" type="password" size="20" /></div></div><div class="form-actions"><button type="submit" class="post-password-submit submit btn btn-primary">' . __( 'Submit', 'the-bootstrap' ) . '</button></div></form>';
} }
add_filter( 'the_password_form', 'the_bootstrap_the_password_form' ); add_filter( 'the_password_form', 'the_bootstrap_the_password_form' );


Expand Down Expand Up @@ -1089,7 +1089,7 @@ function the_bootstrap_widget_categories_dropdown_args( $args ) {
function the_bootstrap_image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) { function the_bootstrap_image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) {
global $content_width; global $content_width;
list( $src, $width, $height ) = wp_get_attachment_image_src( $id, $size ); list( $src, $width, $height ) = wp_get_attachment_image_src( $id, $size );
$center = ( 'center' == $align AND $width < $content_width ) ? ' attachment-table': ''; $center = ( 'center' == $align AND $width < $content_width ) ? ' attachment-table': '';


if ( $url ) { if ( $url ) {
$html = str_replace( '<a ', '<a class="clear thumbnail align'. $align . $center .'" ', $html ); $html = str_replace( '<a ', '<a class="clear thumbnail align'. $align . $center .'" ', $html );
Expand Down
18 changes: 17 additions & 1 deletion style.css
Expand Up @@ -77,6 +77,18 @@ body > .container {
margin: 0 20px 0 0; margin: 0 20px 0 0;
} }


.legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 20px;
font-size: 21px;
line-height: 40px;
color: #333333;
border: 0;
border-bottom: 1px solid #e5e5e5;
}

.block { .block {
display: block; display: block;
} }
Expand Down Expand Up @@ -129,8 +141,12 @@ article.page {
word-wrap: break-word; word-wrap: break-word;
} }


.post-password-form legend { .post-password-legend {
font-size: inherit; font-size: inherit;
padding-bottom:10px;
border-bottom:1px solid #e5e5e5;
line-height:40px;
margin-bottom:20px;
} }


.entry-content .twitter-tweet-rendered { .entry-content .twitter-tweet-rendered {
Expand Down