diff --git a/wp-content/themes/hybrid/404.php b/wp-content/themes/hybrid/404.php index c6f1139c91207d6e028e462bb8de25ed16f3a401..823762494836ab23827d526ba5b89fe6b9d0b89b 100644 --- a/wp-content/themes/hybrid/404.php +++ b/wp-content/themes/hybrid/404.php @@ -30,12 +30,12 @@ get_header(); // Loads the header.php template. ?> <div id="post-0" class="<?php hybrid_entry_class(); ?>"> - <h1 class="error-404-title entry-title"><?php _e( 'Not Found', hybrid_get_textdomain() ); ?></h1> + <h1 class="error-404-title entry-title"><?php _e( 'Not Found', 'hybrid' ); ?></h1> <div class="entry-content"> <p> - <?php printf( __( 'You tried going to %1$s, and it doesn\'t exist. All is not lost! You can search for what you\'re looking for.', hybrid_get_textdomain() ), '<code>' . home_url( esc_url( $_SERVER['REQUEST_URI'] ) ) . '</code>' ); ?> + <?php printf( __( 'You tried going to %1$s, and it doesn\'t exist. All is not lost! You can search for what you\'re looking for.', 'hybrid' ), '<code>' . home_url( esc_url( $_SERVER['REQUEST_URI'] ) ) . '</code>' ); ?> </p> <?php get_search_form(); // Loads the searchform.php template. ?> diff --git a/wp-content/themes/hybrid/attachment.php b/wp-content/themes/hybrid/attachment.php index b14a3d6ca6f4030ebf22dd3118dd721b527cfe17..948e5924c0296dd44bf4578c39c33c962e4b5689 100644 --- a/wp-content/themes/hybrid/attachment.php +++ b/wp-content/themes/hybrid/attachment.php @@ -37,14 +37,14 @@ get_header(); // Loads the header.php template. ?> <?php hybrid_attachment(); // Function for handling non-image attachments. ?> <p class="download"> - <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="enclosure" type="<?php echo get_post_mime_type(); ?>"><?php printf( __( 'Download "%1$s"', hybrid_get_textdomain() ), the_title( '<span class="fn">', '</span>', false) ); ?></a> + <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="enclosure" type="<?php echo get_post_mime_type(); ?>"><?php printf( __( 'Download "%1$s"', 'hybrid' ), the_title( '<span class="fn">', '</span>', false) ); ?></a> </p><!-- .download --> <?php endif; ?> - <?php the_content( sprintf( __( 'Continue reading %1$s', hybrid_get_textdomain() ), the_title( ' "', '"', false ) ) ); ?> + <?php the_content( sprintf( __( 'Continue reading %1$s', 'hybrid' ), the_title( ' "', '"', false ) ) ); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/comment.php b/wp-content/themes/hybrid/comment.php index f1b5a4b266e624455a850f3b0c05ca4d794a62d4..fdb870a375789ec4e9abc38c51b78dafdadeb4ac 100644 --- a/wp-content/themes/hybrid/comment.php +++ b/wp-content/themes/hybrid/comment.php @@ -19,7 +19,7 @@ <div class="comment-text"> <?php if ( '0' == $comment->comment_approved ) : ?> - <p class="alert moderation"><?php _e( 'Your comment is awaiting moderation.', hybrid_get_textdomain() ); ?></p> + <p class="alert moderation"><?php _e( 'Your comment is awaiting moderation.', 'hybrid' ); ?></p> <?php endif; ?> <?php comment_text( $comment->comment_ID ); ?> diff --git a/wp-content/themes/hybrid/comments.php b/wp-content/themes/hybrid/comments.php index 8b93d82c8ef43b47472326a72b5306f39541bc16..cb75cd5a150153291cf2c9099118207e900c0871 100644 --- a/wp-content/themes/hybrid/comments.php +++ b/wp-content/themes/hybrid/comments.php @@ -11,7 +11,7 @@ /* Kill the page if trying to access this template directly. */ if ( 'comments.php' == basename( $_SERVER['SCRIPT_FILENAME'] ) ) - die( __( 'Please do not load this page directly. Thanks!', hybrid_get_textdomain() ) ); + die( __( 'Please do not load this page directly. Thanks!', 'hybrid' ) ); /* If a post password is required or no comments are given and comments/pings are closed, return. */ if ( post_password_required() || ( !have_comments() && !comments_open() && !pings_open() ) ) @@ -24,7 +24,7 @@ if ( post_password_required() || ( !have_comments() && !comments_open() && !ping <div id="comments"> - <h3 id="comments-number" class="comments-header"><?php comments_number( sprintf( __( 'No responses to %1$s', hybrid_get_textdomain() ), the_title( '“', '”', false ) ), sprintf( __( 'One response to %1$s', hybrid_get_textdomain() ), the_title( '“', '”', false ) ), sprintf( __( '%1$s responses to %2$s', hybrid_get_textdomain() ), '%', the_title( '“', '”', false ) ) ); ?></h3> + <h3 id="comments-number" class="comments-header"><?php comments_number( sprintf( __( 'No responses to %1$s', 'hybrid' ), the_title( '“', '”', false ) ), sprintf( __( 'One response to %1$s', 'hybrid' ), the_title( '“', '”', false ) ), sprintf( __( '%1$s responses to %2$s', 'hybrid' ), '%', the_title( '“', '”', false ) ) ); ?></h3> <?php do_atomic( 'before_comment_list' ); // Before comment list hook ?> @@ -47,7 +47,7 @@ if ( post_password_required() || ( !have_comments() && !comments_open() && !ping <?php if ( pings_open() && !comments_open() ) : ?> <p class="comments-closed pings-open"> - <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', hybrid_get_textdomain() ), trackback_url( '0' ) ); ?> + <?php printf( __( 'Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'hybrid' ), trackback_url( '0' ) ); ?> </p><!-- .comments-closed .pings-open --> <?php endif; ?> diff --git a/wp-content/themes/hybrid/css/holy-grail-fluid.css b/wp-content/themes/hybrid/css/holy-grail-fluid.css index f6f4a47ddda30a3afb8fa725d2a0dd2caf736225..f74dc89a60975ac00822294398af3ce6b432d18c 100644 --- a/wp-content/themes/hybrid/css/holy-grail-fluid.css +++ b/wp-content/themes/hybrid/css/holy-grail-fluid.css @@ -1,5 +1,5 @@ -/** - * @deprecated 0.9.0 - This file is for backwards compatibility with the Hybrid parent theme. It will - * be removed in a future version. -*/ +/** + * @deprecated 0.9.0 - This file is for backwards compatibility with the Hybrid parent theme. It will + * be removed in a future version. +*/ body{min-width:600px}#container{overflow:hidden;padding-left:200px; padding-right:200px}.content,#primary,#secondary{position:relative;float:left;padding-bottom:20010px; margin-bottom:-20000px}.content{width:100%}#primary{width:200px; right:200px; margin-left:-100%}#secondary{width:200px; margin-right:-200px}#footer{clear:both}* html #secondary{left:200px} \ No newline at end of file diff --git a/wp-content/themes/hybrid/css/print.css b/wp-content/themes/hybrid/css/print.css index 326b7ff805bc54a867a4b93db5be29cebae6b83a..3c5a510166b30b20a4585f3de6897280c4a249be 100644 --- a/wp-content/themes/hybrid/css/print.css +++ b/wp-content/themes/hybrid/css/print.css @@ -2,4 +2,4 @@ * @deprecated 0.9.0 - This file is for backwards compatibility with the Hybrid parent theme. It will * be removed in a future version. */ -@import url('18px.css');body{font:11pt Cambria,Georgia,Times,'Times New Roman',serif}#body-container{margin:0 auto;padding:0}a,a:visited {color:#3C738C;text-decoration:none}h1,h2,h3,h4,h5,h6{font-family:Georgia,Times,"Times New Roman",serif;color:#444}.post ul{margin-left:27px}blockquote{overflow:hidden;font-style:italic;color:#444;margin:0 0 18px 0;padding:18px 18px 0 18px;border:1px solid #999;background:#ddd}blockquote em{font-style:normal}blockquote.pullquote{width:210px;margin-top:6px;margin-bottom:3px;padding:6px 9px;font-size:18px;text-align:center;color:#333;background:transparent;border-top:3px double #ccc;border-bottom:3px double #ccc}.pullquote p{margin:0}code{padding:0 3px;background:#eee}pre{overflow:auto;padding:9px;background:#eee;border:1px solid #ddd}pre code{padding:0;background:transparent}table{width:100%;background:#5F97B1;border:1px solid #eee}caption{font-size:.8em;font-style:italic;text-align:right;color:#666}td{padding:.3em;border:1px solid #35667c}tr{color:#fff;background:#3e7690}tr.alt,tr.even{background:#437f9b}th{padding:.3em;color:#fff;background:#274958;border:1px solid #35667c}td a,th a{font-weight:bold;color:#eee}.drop-cap{float:left;line-height:33px;margin-right:3px;font-size:42px;font-family:"Warnock Pro","Goudy Old Style",Palatino,"Book Antiqua",Cambria,Georgia,serif;color:#666}.note{padding:6px 9px;background:#eee;border:1px solid #ccc}.warning,.alert{padding:6px 9px;background:#fffbbc;border:1px solid #E6DB55}.error{padding:6px 9px;background:#ffebe8;border:1px solid #C00}.download{padding:6px 9px;background:#EDF2F4;border:1px solid #adbabf}.left,.alignleft{float:left;margin:0 18px 0 0}.right,.alignright{float:right;margin:0 0 0 18px}.center,.aligncenter{display:block;margin:0 auto 18px auto}.block,.alignnone{display:block;margin:0 0 18px 0}.clear{clear:both}span.pullquote{float:none;margin:0}img,a img{padding:5px}.post img{max-width:99%}img.wp-smiley{max-height:12px;margin:0;padding:0;border:none}.wp-caption{padding:6px 1px 0 1px;background:#eee;border:1px solid #ddd;text-align:center}.wp-caption .wp-caption-text{margin:0;padding:0 5px;text-align:right;font-size:.8em;color:#666}.wp-caption img{margin:0 auto;padding:0;border:1px solid #666}.gallery{display:block;text-align:center;margin-bottom:18px !important}.gallery img{border:1px solid #3c738c}.avatar{float:left;width:100px;height:100px;margin-right:18px;background:#3c738c;border:1px solid #999}.thumbnail{float:left;width:100px;height:100px;margin-right:18px;background:#3c738c}#container{margin:0;padding:0}#content{margin:0 auto;padding:0}a:link,a:visited{border-bottom:#999}.entry-title{margin:0 0 5px 0;padding:0}.byline{font-size:10pt;font-style:italic;padding-bottom:10px}.byline .separator{display:none}.entry-meta{font-size:10pt;font-style:italic;color:#333}#footer{padding-top:9px;font-size:9pt;color:#666;border-top:1px solid #eee}.edit{display:none}#footer .credit{display:none}.wp-pagenavi,.navigation-links{display:none}.breadcrumb{display:none}#header{display:none}#navigation{display:none}#primary{display:none}#secondary{display:none}#tertiary{display:none}#subsidiary{display:none}.utility{display:none}.widget{display:none}#comments-template{display:none}.query-count{display:none} \ No newline at end of file +@import url('18px.css');body{font:11pt Cambria,Georgia,Times,'Times New Roman',serif}#body-container{margin:0 auto;padding:0}a,a:visited {color:#3C738C;text-decoration:none}h1,h2,h3,h4,h5,h6{font-family:Georgia,Times,"Times New Roman",serif;color:#444}.post ul{margin-left:27px}blockquote{overflow:hidden;font-style:italic;color:#444;margin:0 0 18px 0;padding:18px 18px 0 18px;border:1px solid #999;background:#ddd}blockquote em{font-style:normal}blockquote.pullquote{width:210px;margin-top:6px;margin-bottom:3px;padding:6px 9px;font-size:18px;text-align:center;color:#333;background:transparent;border-top:3px double #ccc;border-bottom:3px double #ccc}.pullquote p{margin:0}code{padding:0 3px;background:#eee}pre{overflow:auto;padding:9px;background:#eee;border:1px solid #ddd}pre code{padding:0;background:transparent}table{width:100%;background:#5F97B1;border:1px solid #eee}caption{font-size:.8em;font-style:italic;text-align:right;color:#666}td{padding:.3em;border:1px solid #35667c}tr{color:#fff;background:#3e7690}tr.alt,tr.even{background:#437f9b}th{padding:.3em;color:#fff;background:#274958;border:1px solid #35667c}td a,th a{font-weight:bold;color:#eee}.drop-cap{float:left;line-height:33px;margin-right:3px;font-size:42px;font-family:"Warnock Pro","Goudy Old Style",Palatino,"Book Antiqua",Cambria,Georgia,serif;color:#666}.note{padding:6px 9px;background:#eee;border:1px solid #ccc}.warning,.alert{padding:6px 9px;background:#fffbbc;border:1px solid #E6DB55}.error{padding:6px 9px;background:#ffebe8;border:1px solid #C00}.download{padding:6px 9px;background:#EDF2F4;border:1px solid #adbabf}.left,.alignleft{float:left;margin:0 18px 0 0}.right,.alignright{float:right;margin:0 0 0 18px}.center,.aligncenter{display:block;margin:0 auto 18px auto}.block,.alignnone{display:block;margin:0 0 18px 0}.clear{clear:both}span.pullquote{float:none;margin:0}img,a img{padding:5px}.post img{max-width:99%}img.wp-smiley{max-height:12px;margin:0;padding:0;border:none}.wp-caption{padding:6px 1px 0 1px;background:#eee;border:1px solid #ddd;text-align:center}.wp-caption .wp-caption-text{margin:0;padding:0 5px;text-align:right;font-size:.8em;color:#666}.wp-caption img{margin:0 auto;padding:0;border:1px solid #666}.gallery{display:block;text-align:center;margin-bottom:18px !important}.gallery img{border:1px solid #3c738c}.avatar{float:left;width:100px;height:100px;margin-right:18px;background:#3c738c;border:1px solid #999}.thumbnail{float:left;width:100px;height:100px;margin-right:18px;background:#3c738c}#container{margin:0;padding:0}#content{margin:0 auto;padding:0}a:link,a:visited{border-bottom:#999}.entry-title{margin:0 0 5px 0;padding:0}.byline{font-size:10pt;font-style:italic;padding-bottom:10px}.byline .separator{display:none}.entry-meta{font-size:10pt;font-style:italic;color:#333}#footer{padding-top:9px;font-size:9pt;color:#666;border-top:1px solid #eee}.edit{display:none}#footer .credit{display:none}.wp-pagenavi,.navigation-links{display:none}.breadcrumbs{display:none}#header{display:none}#navigation{display:none}#primary{display:none}#secondary{display:none}#tertiary{display:none}#subsidiary{display:none}.utility{display:none}.widget{display:none}#comments-template{display:none}.query-count{display:none} \ No newline at end of file diff --git a/wp-content/themes/hybrid/css/screen.css b/wp-content/themes/hybrid/css/screen.css index 2d5a31919a6f31a3f3404c94f14a9c50ceda55d9..19f0983e37b2e945a7710fbcd616594c2065c7b1 100644 --- a/wp-content/themes/hybrid/css/screen.css +++ b/wp-content/themes/hybrid/css/screen.css @@ -1 +1 @@ -.sticky,.bypostauthor{}body{font:normal normal normal 15px/21px Georgia,Times,"Times New Roman",serif;color:#000}#body-container{margin:90px auto 21px auto}a{color:#21759b;text-decoration:none}a:visited{color:#551a8b}a:hover,a:active{color:#d54e21;text-decoration:underline}h1,h2,h3,h4,h5,h6{font-family:Arial,Verdana,sans-serif;color:#000;font-weight:bold}h1{font-size:24px}h2{font-size:21px}h3{font-size:19px}h4{font-size:17px}h5{font-size:15px}h6{font-size:13px}ul{list-style:square}blockquote{font-style:italic;color:#555}blockquote blockquote{color:#777}blockquote em{font-style:normal}pre{padding:9px;background:#f9f9f9;border:1px solid #ccc}code{padding:0 3px;background:#eee}pre code{background:transparent}table{width:100%;border-collapse:separate;border-top:1px solid #ccc;border-left:1px solid #ccc}caption{font-size:.9em;font-style:italic;text-align:right}td,th{padding:3px 6px;border-bottom:1px solid #ccc;border-right:1px solid #ccc}th{background:#eee}.drop-cap{float:left;margin:3px 3px 0 0;font:normal normal normal 47px/35px "Warnock Pro","Goudy Old Style",Palatino,"Book Antiqua",Georgia,serif;color:#333}.note{padding:6px 9px;background:#eee;border:1px solid #ccc}.warning,.alert{padding:6px 9px;background:#fffbbc;border:1px solid #E6DB55}.error{padding:6px 9px;background:#ffebe8;border:1px solid #C00}.download{padding:6px 9px;background:#e7f7d3;border:1px solid #6c3}.breadcrumb{margin:0 0 30px 0;font-size:.9em;font-style:italic;color:#666}.breadcrumb a{color:#111;text-decoration:none}.breadcrumb a:hover{color:#d54e21;text-decoration:underline}.hentry img{max-width:610px;height:auto;padding:4px;border:1px solid #ccc}.no-widgets .hentry img{max-width:950px}img.alignleft,img.alignright{margin-bottom:10px}.thumbnail{float:left;width:100px;height:100px;margin:5px 15px 10px 0}img.wp-smiley{max-width:12px;padding:0;background:transparent;border:none}.wp-caption{max-width:616px;margin-top:6px;padding:6px 1px 3px 1px;border:1px solid #ccc;text-align:center}.wp-caption .wp-caption-text{margin:0;padding:0 5px;text-align:right;font-size:.9em;font-style:italic;color:#666}.wp-caption img{max-width:604px;margin:0 auto;padding:0;border:1px solid #666}.no-widgets .wp-caption{max-width:956px}.no-widgets .wp-caption img{max-width:946px}.gallery img{border:1px solid #ccc}.avatar{float:left;width:100px;height:100px;margin:5px 15px 0 0;padding:4px;border:1px solid #ccc}#header{margin:0 0 40px 0}#site-title{font:normal normal bold 35px/35px Arial,Verdana,sans-serif;margin:0 0 10px 0}#site-title a{color:#000}#site-description{font:normal normal normal 16px/20px Georgia,Times,"Times New Roman",serif;margin:0;color:#666}#primary-menu,#navigation{overflow:visible;height:34px;margin:0 0 60px 0;z-index:100}#primary-menu li,#page-nav li{margin-right:15px}#primary-menu li li,#page-nav li li{margin-right:0}#primary-menu li a,#page-nav li a{padding:8px 15px 8px 15px;color:#111;background:#fff;border:1px solid #ccc}#primary-menu li:hover ul,#primary-menu li.sfHover ul,#page-nav li:hover ul,#page-nav li.sfHover ul{top:32px}#primary-menu li li a,#page-nav li li a{border-top:none;margin-right:0}#primary-menu li ul,#page-nav li ul{background:#fff;border-top:1px solid #ccc}#primary-menu li li:hover ul,#primary-menu li li.sfHover ul,#primary-menu li li li:hover ul,#primary-menu li li li.sfHover ul,#page-nav li li:hover ul,#page-nav li li.sfHover ul,#page-nav li li li:hover ul,#page-nav li li li.sfHover ul {top:-1px}#primary-menu li li li,#page-nav li li li{margin-left:-1px}#container{margin-bottom:21px}.content{margin:0 0 21px 0}.no-widgets .content,.page-template-no-widgets .content{width:960px}.hentry{overflow:hidden;margin:0 0 40px 0}.singular .hentry{margin:0}.loop-meta{overflow:hidden;margin:0 0 40px 0}.loop-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif}.entry-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif;margin:0 0 12px 0}.archive .entry-title,.search .entry-title{font-size:21px;margin:0 0 5px 0}.singular-page .entry-title,.singular-attachment .entry-title{margin:0 0 21px 0}.entry-title a{color:#000}.byline{margin:0 0 30px 0;font-style:italic;color:#666}.archive .byline,.search .byline{margin:0 0 5px 0}.entry-content{margin:0 0 10px 0}.entry-meta{clear:both;font-style:italic;color:#666}p.page-links,.comment-pagination{clear:both}.comment-pagination{margin-bottom:21px}p.page-links a,.comment-pagination .page-numbers{margin:0 3px;padding:3px 9px 3px 9px;border:1px solid #ccc}.navigation-links{margin-bottom:21px;font-style:italic}.navigation-links .previous{float:left;max-width:50%}.navigation-links .next{float:right;max-width:50%;text-align:right}.navigation-attachment{overflow:hidden}.widget{overflow:hidden;margin:0 0 15px 0;color:#464646}.widget a{color:#464646;text-decoration:underline}.widget a:hover{color:#d54e21;text-decoration:none}.widget-title{font-size:18px;color:#111}#utility-before-content,#utility-after-content,#utility-after-page,#utility-after-single{margin:0 0 21px 0;padding:20px 20px 0 20px;border:1px solid #ccc}#comments-template{clear:both}.comments-header{font-size:1.2em}.comments-closed{font-style:italic}ol.comment-list,ol.comment-list ol.children{list-style:none;margin:0 0 21px 0}li.comment,li li li.comment,li li li li li.comment,li li li li li li li.comment,li li li li li li li li li.comment,li.pingback,li.trackback{overflow:hidden;margin:0 0 21px 0;padding:21px 21px 0 21px;background:#fff;border:1px solid #ccc}li li.comment,li li li li.comment,li li li li li li.comment,li li li li li li li li.comment,li li li li li li li li li li.comment{background:#f9f9f9}#comments-template .avatar{width:40px;height:40px;float:left;margin-right:15px;padding:0;border:1px solid #666}.comment-meta{margin:10px 0 21px 0;font-size:13px;color:#666}.comment-author{font-size:15px;color:#000}.comment-reply-link,.permalink,.comment-edit-link{font-style:italic;color:#666}.comment-text{clear:left;margin:0 15px}.text-input{display:block;padding:3px 6px;width:97%}#comments-template label{font-size:.9em}textarea{width:98%}#submit{display:inline-block;margin-right:15px;padding:7px 15px 8px 15px;background:#fff;border:1px solid #ccc}#submit:hover{cursor:pointer;background:#f9f9f9}#footer-container{clear:both;margin:0 0 21px 0}#subsidiary{margin:0 0 21px 0}#footer{font-style:italic;color:#444}#footer .copyright{display:inline;float:left;margin-right:9px}.content{float:left;width:620px}#primary{float:right;width:300px}#secondary{clear:right;float:right;width:300px} \ No newline at end of file +.sticky,.bypostauthor{}body{font:normal normal normal 15px/21px Georgia,Times,"Times New Roman",serif;color:#000}#body-container{margin:90px auto 21px auto}a{color:#21759b;text-decoration:none}a:visited{color:#551a8b}a:hover,a:active{color:#d54e21;text-decoration:underline}h1,h2,h3,h4,h5,h6{font-family:Arial,Verdana,sans-serif;color:#000;font-weight:bold}h1{font-size:24px}h2{font-size:21px}h3{font-size:19px}h4{font-size:17px}h5{font-size:15px}h6{font-size:13px}ul{list-style:square}blockquote{font-style:italic;color:#555}blockquote blockquote{color:#777}blockquote em{font-style:normal}pre{padding:9px;background:#f9f9f9;border:1px solid #ccc}code{padding:0 3px;background:#eee}pre code{background:transparent}table{width:100%;border-collapse:separate;border-top:1px solid #ccc;border-left:1px solid #ccc}caption{font-size:.9em;font-style:italic;text-align:right}td,th{padding:3px 6px;border-bottom:1px solid #ccc;border-right:1px solid #ccc}th{background:#eee}.drop-cap{float:left;margin:3px 3px 0 0;font:normal normal normal 47px/35px "Warnock Pro","Goudy Old Style",Palatino,"Book Antiqua",Georgia,serif;color:#333}.note{padding:6px 9px;background:#eee;border:1px solid #ccc}.warning,.alert{padding:6px 9px;background:#fffbbc;border:1px solid #E6DB55}.error{padding:6px 9px;background:#ffebe8;border:1px solid #C00}.download{padding:6px 9px;background:#e7f7d3;border:1px solid #6c3}.breadcrumbs{margin:0 0 30px 0;font-size:.9em;font-style:italic;color:#666}.breadcrumbs a{color:#111;text-decoration:none}.breadcrumbs a:hover{color:#d54e21;text-decoration:underline}.hentry img{max-width:610px;height:auto;padding:4px;border:1px solid #ccc}.no-widgets .hentry img{max-width:950px}img.alignleft,img.alignright{margin-bottom:10px}.thumbnail{float:left;width:100px;height:100px;margin:5px 15px 10px 0}img.wp-smiley{max-width:12px;padding:0;background:transparent;border:none}.wp-caption{max-width:616px;margin-top:6px;padding:6px 1px 3px 1px;border:1px solid #ccc;text-align:center}.wp-caption .wp-caption-text{margin:0;padding:0 5px;text-align:right;font-size:.9em;font-style:italic;color:#666}.wp-caption img{max-width:604px;margin:0 auto;padding:0;border:1px solid #666}.no-widgets .wp-caption{max-width:956px}.no-widgets .wp-caption img{max-width:946px}.gallery img{border:1px solid #ccc}.avatar{float:left;width:100px;height:100px;margin:5px 15px 0 0;padding:4px;border:1px solid #ccc}#header{margin:0 0 40px 0}#site-title{font:normal normal bold 35px/35px Arial,Verdana,sans-serif;margin:0 0 10px 0}#site-title a{color:#000}#site-description{font:normal normal normal 16px/20px Georgia,Times,"Times New Roman",serif;margin:0;color:#666}#primary-menu,#navigation{overflow:visible;height:34px;margin:0 0 60px 0;z-index:100}#primary-menu li,#page-nav li{margin-right:15px}#primary-menu li li,#page-nav li li{margin-right:0}#primary-menu li a,#page-nav li a{padding:8px 15px 8px 15px;color:#111;background:#fff;border:1px solid #ccc}#primary-menu li:hover ul,#primary-menu li.sfHover ul,#page-nav li:hover ul,#page-nav li.sfHover ul{top:32px}#primary-menu li li a,#page-nav li li a{border-top:none;margin-right:0}#primary-menu li ul,#page-nav li ul{background:#fff;border-top:1px solid #ccc}#primary-menu li li:hover ul,#primary-menu li li.sfHover ul,#primary-menu li li li:hover ul,#primary-menu li li li.sfHover ul,#page-nav li li:hover ul,#page-nav li li.sfHover ul,#page-nav li li li:hover ul,#page-nav li li li.sfHover ul {top:-1px}#primary-menu li li li,#page-nav li li li{margin-left:-1px}#container{margin-bottom:21px}.content{margin:0 0 21px 0}.no-widgets .content,.page-template-no-widgets .content{width:960px}.hentry{overflow:hidden;margin:0 0 40px 0}.singular .hentry{margin:0}.loop-meta{overflow:hidden;margin:0 0 40px 0}.loop-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif}.entry-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif;margin:0 0 12px 0}.archive .entry-title,.search .entry-title{font-size:21px;margin:0 0 5px 0}.singular-page .entry-title,.singular-attachment .entry-title{margin:0 0 21px 0}.entry-title a{color:#000}.byline{margin:0 0 30px 0;font-style:italic;color:#666}.archive .byline,.search .byline{margin:0 0 5px 0}.entry-content{margin:0 0 10px 0}.entry-meta{clear:both;font-style:italic;color:#666}p.page-links,.comment-pagination{clear:both}.comment-pagination{margin-bottom:21px}p.page-links a,.comment-pagination .page-numbers{margin:0 3px;padding:3px 9px 3px 9px;border:1px solid #ccc}.navigation-links{margin-bottom:21px;font-style:italic}.navigation-links .previous{float:left;max-width:50%}.navigation-links .next{float:right;max-width:50%;text-align:right}.navigation-attachment{overflow:hidden}.widget{overflow:hidden;margin:0 0 15px 0;color:#464646}.widget a{color:#464646;text-decoration:underline}.widget a:hover{color:#d54e21;text-decoration:none}.widget-title{font-size:18px;color:#111}#utility-before-content,#utility-after-content,#utility-after-page,#utility-after-single{margin:0 0 21px 0;padding:20px 20px 0 20px;border:1px solid #ccc}#comments-template{clear:both}.comments-header{font-size:1.2em}.comments-closed{font-style:italic}ol.comment-list,ol.comment-list ol.children{list-style:none;margin:0 0 21px 0}li.comment,li li li.comment,li li li li li.comment,li li li li li li li.comment,li li li li li li li li li.comment,li.pingback,li.trackback{overflow:hidden;margin:0 0 21px 0;padding:21px 21px 0 21px;background:#fff;border:1px solid #ccc}li li.comment,li li li li.comment,li li li li li li.comment,li li li li li li li li.comment,li li li li li li li li li li.comment{background:#f9f9f9}#comments-template .avatar{width:40px;height:40px;float:left;margin-right:15px;padding:0;border:1px solid #666}.comment-meta{margin:10px 0 21px 0;font-size:13px;color:#666}.comment-author{font-size:15px;color:#000}.comment-reply-link,.permalink,.comment-edit-link{font-style:italic;color:#666}.comment-text{clear:left;margin:0 15px}.text-input{display:block;padding:3px 6px;width:97%}#comments-template label{font-size:.9em}textarea{width:98%}#submit{display:inline-block;margin-right:15px;padding:7px 15px 8px 15px;background:#fff;border:1px solid #ccc}#submit:hover{cursor:pointer;background:#f9f9f9}#footer-container{clear:both;margin:0 0 21px 0}#subsidiary{margin:0 0 21px 0}#footer{font-style:italic;color:#444}#footer .copyright{display:inline;float:left;margin-right:9px}.content{float:left;width:620px}#primary{float:right;width:300px}#secondary{clear:right;float:right;width:300px} \ No newline at end of file diff --git a/wp-content/themes/hybrid/docs/readme.html b/wp-content/themes/hybrid/docs/readme.html index 40950eb3e55fc36ba164b86c654c789f1bb6ad36..9b92922166edfd97a8c55d0b6b4180e7854aacac 100644 --- a/wp-content/themes/hybrid/docs/readme.html +++ b/wp-content/themes/hybrid/docs/readme.html @@ -95,7 +95,7 @@ <p>This theme is copyrighted to <a href="http://justintadlock.com" title="Justin Tadlock">Justin Tadlock</a> and <a href="http://themehybrid.com" title="Theme Hybrid">Theme Hybrid</a>.</p> -<p>2008 – 2011 © Justin Tadlock. All rights reserved.</p> +<p>2008 – 2012 © Justin Tadlock.</p> </body> </html> \ No newline at end of file diff --git a/wp-content/themes/hybrid/functions.php b/wp-content/themes/hybrid/functions.php index 28244ae85ae8cc654e0767710a334650d74b5daa..50576cf6834e027048f4ce0abc03a7cf28a3d4a0 100644 --- a/wp-content/themes/hybrid/functions.php +++ b/wp-content/themes/hybrid/functions.php @@ -9,8 +9,8 @@ * override parent theme features. Use a priority of 9 if wanting to run before the parent theme. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -20,16 +20,16 @@ * * @package Hybrid * @subpackage Functions - * @version 1.0.0 + * @version 1.1.0 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2008 - 2011, Justin Tadlock + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock * @link http://themehybrid.com/themes/hybrid * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Load the core theme framework. */ -require_once( trailingslashit( TEMPLATEPATH ) . 'library/hybrid.php' ); -$theme = new Hybrid(); +require_once( trailingslashit( get_template_directory() ) . 'library/hybrid.php' ); +new Hybrid(); /* Do theme setup on the 'after_setup_theme' hook. */ add_action( 'after_setup_theme', 'hybrid_theme_setup_theme' ); @@ -134,8 +134,8 @@ function hybrid_theme_register_sidebars() { register_sidebar( array( 'id' => 'widgets-template', - 'name' => __( 'Widgets Template', hybrid_get_textdomain() ), - 'description' => __( 'Used as the content of the Widgets page template.', hybrid_get_textdomain() ), + 'name' => __( 'Widgets Template', 'hybrid' ), + 'description' => __( 'Used as the content of the Widgets page template.', 'hybrid' ), 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', @@ -147,8 +147,8 @@ function hybrid_theme_register_sidebars() { register_sidebar( array( 'id' => 'error-404-template', - 'name' => __( '404 Template', hybrid_get_textdomain() ), - 'description' => __( 'Replaces the default 404 error page content.', hybrid_get_textdomain() ), + 'name' => __( '404 Template', 'hybrid' ), + 'description' => __( 'Replaces the default 404 error page content.', 'hybrid' ), 'before_widget' => '<div id="%1$s" class="widget %2$s widget-%2$s"><div class="widget-inside">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', @@ -224,7 +224,7 @@ function hybrid_byline() { $byline = ''; if ( 'post' == get_post_type() && 'link_category' !== get_query_var( 'taxonomy' ) ) - $byline = '<p class="byline">' . __( 'By [entry-author] on [entry-published] [entry-edit-link before=" | "]', hybrid_get_textdomain() ) . '</p>'; + $byline = '<p class="byline">' . __( 'By [entry-author] on [entry-published] [entry-edit-link before=" | "]', 'hybrid' ) . '</p>'; echo apply_atomic_shortcode( 'byline', $byline ); } @@ -239,7 +239,7 @@ function hybrid_entry_meta() { $meta = ''; if ( 'post' == get_post_type() ) - $meta = '<p class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms taxonomy="post_tag" before="| Tagged "] [entry-comments-link before="| "]', hybrid_get_textdomain() ) . '</p>'; + $meta = '<p class="entry-meta">' . __( '[entry-terms taxonomy="category" before="Posted in "] [entry-terms taxonomy="post_tag" before="| Tagged "] [entry-comments-link before="| "]', 'hybrid' ) . '</p>'; elseif ( is_page() && current_user_can( 'edit_page', get_the_ID() ) ) $meta = '<p class="entry-meta">[entry-edit-link]</p>'; @@ -275,7 +275,7 @@ function hybrid_footer_insert() { $footer_insert = hybrid_get_setting( 'footer_insert' ); if ( !empty( $footer_insert ) ) - echo '<div class="footer-insert">' . do_shortcode( $footer_insert ) . '</div>'; + echo '<div class="footer-content footer-insert">' . do_shortcode( $footer_insert ) . '</div>'; } /** diff --git a/wp-content/themes/hybrid/index.php b/wp-content/themes/hybrid/index.php index 44315f7dcfa81487f76d5a0dccc68bd72bcbb4fb..3ddb00c740cf080eba96bb0b32280fb7da2b9119 100644 --- a/wp-content/themes/hybrid/index.php +++ b/wp-content/themes/hybrid/index.php @@ -16,6 +16,8 @@ get_header(); // Loads the header.php template. ?> <?php do_atomic( 'before_content' ); // hybrid_before_content ?> + <?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template. ?> + <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>"> @@ -23,8 +25,8 @@ get_header(); // Loads the header.php template. ?> <?php do_atomic( 'before_entry' ); // hybrid_before_entry ?> <div class="entry-content"> - <?php the_content( sprintf( __( 'Continue reading %1$s', hybrid_get_textdomain() ), the_title( ' "', '"', false ) ) ); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php the_content( sprintf( __( 'Continue reading %1$s', 'hybrid' ), the_title( ' "', '"', false ) ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> <?php do_atomic( 'after_entry' ); // hybrid_after_entry ?> diff --git a/wp-content/themes/hybrid/languages/hybrid-en_EN.mo b/wp-content/themes/hybrid/languages/hybrid-en_EN.mo index 259ba528764d19478f6ba8f71b21b7f647cf5c30..d7547e79e76d32947e73afc2c6f80217a52fc5fc 100644 Binary files a/wp-content/themes/hybrid/languages/hybrid-en_EN.mo and b/wp-content/themes/hybrid/languages/hybrid-en_EN.mo differ diff --git a/wp-content/themes/hybrid/languages/hybrid-en_EN.po b/wp-content/themes/hybrid/languages/hybrid-en_EN.po index 156a7245ee28b832babd405abab3aeaca6be168c..74ae496461f721c9f6faa646068af711073a2188 100644 --- a/wp-content/themes/hybrid/languages/hybrid-en_EN.po +++ b/wp-content/themes/hybrid/languages/hybrid-en_EN.po @@ -1,1073 +1,1144 @@ -msgid "" -msgstr "" -"Project-Id-Version: Hybrid Theme Framework\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-09-15 14:38-0600\n" -"PO-Revision-Date: \n" -"Last-Translator: Justin Tadlock <justin@justintadlock.com>\n" -"Language-Team: <justin@justintadlock.com>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: English\n" -"X-Poedit-Country: UNITED STATES\n" -"X-Poedit-KeywordsList: _e;__;esc_attr_e;esc_attr__;esc_html_e;esc_html__\n" -"X-Poedit-Basepath: .\n" -"X-Poedit-SearchPath-0: .\n" -"X-Poedit-SearchPath-1: ..\n" - -#: ../404.php:33 -msgid "Not Found" -msgstr "" - -#: ../404.php:38 -#, php-format -msgid "You tried going to %1$s, and it doesn't exist. All is not lost! You can search for what you're looking for." -msgstr "" - -#: ../attachment.php:40 -#, php-format -msgid "Download "%1$s"" -msgstr "" - -#: ../attachment.php:45 -#: ../index.php:26 -#, php-format -msgid "Continue reading %1$s" -msgstr "" - -#: ../attachment.php:47 -#: ../index.php:27 -#: ../page-archives.php:51 -#: ../page-authors.php:56 -#: ../page-biography.php:65 -msgid "Pages:" -msgstr "" - -#: ../comment.php:22 -msgid "Your comment is awaiting moderation." -msgstr "" - -#: ../comments.php:14 -msgid "Please do not load this page directly. Thanks!" -msgstr "" - -#: ../comments.php:27 -#, php-format -msgid "No responses to %1$s" -msgstr "" - -#: ../comments.php:27 -#, php-format -msgid "One response to %1$s" -msgstr "" - -#: ../comments.php:27 -#, php-format -msgid "%1$s responses to %2$s" -msgstr "" - -#: ../comments.php:50 -#, php-format -msgid "Comments are closed, but <a href=\"%1$s\" title=\"Trackback URL for this post\">trackbacks</a> and pingbacks are open." -msgstr "" - -#: ../functions.php:137 -msgid "Widgets Template" -msgstr "" - -#: ../functions.php:138 -msgid "Used as the content of the Widgets page template." -msgstr "" - -#: ../functions.php:150 -msgid "404 Template" -msgstr "" - -#: ../functions.php:151 -msgid "Replaces the default 404 error page content." -msgstr "" - -#: ../functions.php:227 -msgid "By [entry-author] on [entry-published] [entry-edit-link before=\" | \"]" -msgstr "" - -#: ../functions.php:242 -msgid "[entry-terms taxonomy=\"category\" before=\"Posted in \"] [entry-terms taxonomy=\"post_tag\" before=\"| Tagged \"] [entry-comments-link before=\"| \"]" -msgstr "" - -#: ../loop-error.php:16 -msgid "Apologies, but no results were found." -msgstr "" - -#: ../loop-meta.php:83 -#, php-format -msgid "You are browsing the search results for "%1$s"" -msgstr "" - -#: ../loop-meta.php:92 -msgid "Archives by date" -msgstr "" - -#: ../loop-meta.php:96 -msgid "You are browsing the site archives by date." -msgstr "" - -#: ../loop-meta.php:120 -msgid "Archives" -msgstr "" - -#: ../loop-meta.php:124 -msgid "You are browsing the site archives." -msgstr "" - -#: ../loop-nav.php:17 -msgid "« Return to entry" -msgstr "" - -#: ../loop-nav.php:23 -#: ../loop-nav.php:31 -msgid "« Previous" -msgstr "" - -#: ../loop-nav.php:24 -#: ../loop-nav.php:31 -msgid "Next »" -msgstr "" - -#: ../page-archives.php:37 -msgid "Archives by category" -msgstr "" - -#: ../page-archives.php:40 -msgid "RSS" -msgstr "" - -#: ../page-archives.php:43 -msgid "Archives by month" -msgstr "" - -#: ../page-biography.php:41 -msgid "Nickname:" -msgstr "" - -#: ../page-biography.php:45 -msgid "Website:" -msgstr "" - -#: ../page-biography.php:49 -msgid "AIM:" -msgstr "" - -#: ../page-biography.php:49 -#: ../page-biography.php:53 -#: ../page-biography.php:57 -#, php-format -msgid "IM with %1$s" -msgstr "" - -#: ../page-biography.php:53 -msgid "Jabber:" -msgstr "" - -#: ../page-biography.php:57 -msgid "Yahoo:" -msgstr "" - -#: ../page-logged-in.php:52 -#, php-format -msgid "You must be <a href=\"%1$s\" title=\"Log in\">logged in</a> to view the content of this page." -msgstr "" - -#: ../page-logged-in.php:54 -#, php-format -msgid "If you're not currently a member, please take a moment to <a href=\"%1$s\" title=\"Register\">register</a>." -msgstr "" - -#: ../page-sitemap.php:30 -msgid "Feeds" -msgstr "" - -#: ../page-sitemap.php:33 -msgid "RDF/RSS 1.0 feed" -msgstr "" - -#: ../page-sitemap.php:33 -msgid "<acronym title=\"Resource Description Framework\">RDF</acronym> <acronym title=\"Really Simple Syndication\">RSS</acronym> 1.0 feed" -msgstr "" - -#: ../page-sitemap.php:34 -msgid "RSS 0.92 feed" -msgstr "" - -#: ../page-sitemap.php:34 -msgid "<acronym title=\"Really Simple Syndication\">RSS</acronym> 0.92 feed" -msgstr "" - -#: ../page-sitemap.php:35 -msgid "RSS 2.0 feed" -msgstr "" - -#: ../page-sitemap.php:35 -msgid "<acronym title=\"Really Simple Syndication\">RSS</acronym> 2.0 feed" -msgstr "" - -#: ../page-sitemap.php:36 -msgid "Atom feed" -msgstr "" - -#: ../page-sitemap.php:37 -msgid "Comments RSS 2.0 feed" -msgstr "" - -#: ../page-sitemap.php:37 -msgid "Comments <acronym title=\"Really Simple Syndication\">RSS</acronym> 2.0 feed" -msgstr "" - -#: ../page-sitemap.php:40 -msgid "Pages" -msgstr "" - -#: ../page-sitemap.php:46 -msgid "Category Archives" -msgstr "" - -#: ../page-sitemap.php:52 -msgid "Author Archives" -msgstr "" - -#: ../page-sitemap.php:58 -msgid "Yearly Archives" -msgstr "" - -#: ../page-sitemap.php:64 -msgid "Monthly Archives" -msgstr "" - -#: ../page-sitemap.php:70 -msgid "Weekly Archives" -msgstr "" - -#: ../page-sitemap.php:76 -msgid "Daily Archives" -msgstr "" - -#: ../page-sitemap.php:82 -msgid "Tag Archives" -msgstr "" - -#: ../page-sitemap.php:88 -msgid "Blog Posts" -msgstr "" - -#: ../page-widgets.php:26 -msgid "Edit" -msgstr "" - -#: ../searchform.php:18 -msgid "Search this site..." -msgstr "" - -#: ../searchform.php:19 -msgid "Search" -msgstr "" - -#: ../library/admin/meta-box-post-seo.php:30 -#, php-format -msgid "%s SEO" -msgstr "" - -#: ../library/admin/meta-box-post-seo.php:47 -msgid "Document Title:" -msgstr "" - -#: ../library/admin/meta-box-post-seo.php:53 -msgid "Meta Description:" -msgstr "" - -#: ../library/admin/meta-box-post-seo.php:59 -msgid "Meta Keywords:" -msgstr "" - -#: ../library/admin/meta-box-post-template.php:34 -#, php-format -msgid "%s Template" -msgstr "" - -#: ../library/admin/meta-box-post-template.php:66 -msgid "No templates exist for this post type." -msgstr "" - -#: ../library/admin/meta-box-theme-about.php:27 -#: ../library/admin/meta-box-theme-about.php:32 -#, php-format -msgid "About %1$s" -msgstr "" - -#: ../library/admin/meta-box-theme-about.php:62 -msgid "Theme:" -msgstr "" - -#: ../library/admin/meta-box-theme-about.php:70 -msgid "Version:" -msgstr "" - -#: ../library/admin/meta-box-theme-about.php:78 -msgid "Author:" -msgstr "" - -#: ../library/admin/meta-box-theme-about.php:86 -msgid "Description:" -msgstr "" - -#: ../library/admin/meta-box-theme-footer.php:24 -msgid "Footer settings" -msgstr "" - -#: ../library/admin/meta-box-theme-footer.php:37 -msgid "You can add custom <acronym title=\"Hypertext Markup Language\">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme." -msgstr "" - -#: ../library/admin/meta-box-theme-footer.php:46 -#, php-format -msgid "Shortcodes: %s" -msgstr "" - -#: ../library/admin/theme-settings.php:43 -#: ../library/admin/theme-settings.php:162 -#, php-format -msgid "%1$s Theme Settings" -msgstr "" - -#: ../library/admin/theme-settings.php:44 -msgid "Theme Settings" -msgstr "" - -#: ../library/admin/theme-settings.php:164 -msgid "Settings saved." -msgstr "" - -#: ../library/admin/theme-settings.php:180 -msgid "Update Settings" -msgstr "" - -#: ../library/admin/theme-settings.php:232 -msgid "Documentation" -msgstr "" - -#: ../library/admin/theme-settings.php:236 -msgid "Support" -msgstr "" - -#: ../library/classes/widget-archives.php:38 -msgid "An advanced widget that gives you total control over the output of your archives." -msgstr "" - -#: ../library/classes/widget-archives.php:89 -msgid "Select Year" -msgstr "" - -#: ../library/classes/widget-archives.php:92 -msgid "Select Month" -msgstr "" - -#: ../library/classes/widget-archives.php:95 -msgid "Select Week" -msgstr "" - -#: ../library/classes/widget-archives.php:98 -msgid "Select Day" -msgstr "" - -#: ../library/classes/widget-archives.php:101 -msgid "Select Post" -msgstr "" - -#: ../library/classes/widget-archives.php:163 -msgid "Alphabetical" -msgstr "" - -#: ../library/classes/widget-archives.php:163 -msgid "Daily" -msgstr "" - -#: ../library/classes/widget-archives.php:163 -msgid "Monthly" -msgstr "" - -#: ../library/classes/widget-archives.php:163 -msgid "Post By Post" -msgstr "" - -#: ../library/classes/widget-archives.php:163 -msgid "Weekly" -msgstr "" - -#: ../library/classes/widget-archives.php:163 -msgid "Yearly" -msgstr "" - -#: ../library/classes/widget-archives.php:166 -msgid "Custom" -msgstr "" - -#: ../library/classes/widget-archives.php:166 -msgid "HTML" -msgstr "" - -#: ../library/classes/widget-archives.php:166 -msgid "Option" -msgstr "" - -#: ../library/classes/widget-archives.php:171 -#: ../library/classes/widget-authors.php:165 -msgid "Title:" -msgstr "" - -#: ../library/classes/widget-archives.php:207 -#: ../library/classes/widget-authors.php:213 -msgid "Show post count?" -msgstr "" - -#: ../library/classes/widget-authors.php:47 -msgid "An advanced widget that gives you total control over the output of your author lists." -msgstr "" - -#: ../library/classes/widget-authors.php:59 -#: ../library/classes/widget-authors.php:141 -msgid "Authors" -msgstr "" - -#: ../library/classes/widget-authors.php:158 -msgid "Ascending" -msgstr "" - -#: ../library/classes/widget-authors.php:158 -msgid "Descending" -msgstr "" - -#: ../library/classes/widget-authors.php:159 -msgid "Display Name" -msgstr "" - -#: ../library/classes/widget-authors.php:159 -msgid "Email" -msgstr "" - -#: ../library/classes/widget-authors.php:159 -msgid "ID" -msgstr "" - -#: ../library/classes/widget-authors.php:159 -msgid "Nice Name" -msgstr "" - -#: ../library/classes/widget-authors.php:159 -msgid "Post Count" -msgstr "" - -#: ../library/classes/widget-authors.php:159 -msgid "Registered" -msgstr "" - -#: ../library/classes/widget-authors.php:159 -msgid "URL" -msgstr "" - -#: ../library/classes/widget-authors.php:159 -msgid "Login" -msgstr "" - -#: ../library/classes/widget-authors.php:191 -msgid "List" -msgstr "" - -#: ../library/classes/widget-authors.php:191 -msgid "None" -msgstr "" - -#: ../library/classes/widget-authors.php:209 -msgid "<acronym title=\"Hypertext Markup Language\">HTML</acronym>?" -msgstr "" - -#: ../library/classes/widget-authors.php:217 -msgid "Exclude admin?" -msgstr "" - -#: ../library/classes/widget-authors.php:221 -msgid "Show full name?" -msgstr "" - -#: ../library/classes/widget-authors.php:225 -msgid "Hide empty?" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:47 -msgid "An advanced widget that gives you total control over the output of your bookmarks (links)." -msgstr "" - -#: ../library/classes/widget-bookmarks.php:59 -#: ../library/classes/widget-bookmarks.php:158 -msgid "Bookmarks" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:189 -#: ../library/classes/widget-categories.php:194 -#: ../library/classes/widget-tags.php:191 -msgid "Count" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:189 -#: ../library/classes/widget-bookmarks.php:191 -#: ../library/classes/widget-categories.php:194 -#: ../library/classes/widget-tags.php:191 -msgid "Name" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:189 -#: ../library/classes/widget-categories.php:194 -#: ../library/classes/widget-pages.php:170 -msgid "Slug" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -msgid "Description" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -msgid "Length" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -msgid "Notes" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -msgid "Owner" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -#: ../library/classes/widget-tags.php:190 -msgid "Random" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -msgid "Rating" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -msgid "Rel" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -msgid "Target" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:191 -msgid "Updated" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:299 -msgid "Categorize?" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:303 -msgid "Show description?" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:307 -msgid "Hide invisible?" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:311 -msgid "Show rating?" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:315 -msgid "Show updated?" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:319 -msgid "Show images?" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:323 -msgid "Show name?" -msgstr "" - -#: ../library/classes/widget-bookmarks.php:327 -msgid "Show private?" -msgstr "" - -#: ../library/classes/widget-calendar.php:47 -msgid "An advanced widget that gives you total control over the output of your calendar." -msgstr "" - -#: ../library/classes/widget-calendar.php:59 -#: ../library/classes/widget-calendar.php:114 -msgid "Calendar" -msgstr "" - -#: ../library/classes/widget-calendar.php:128 -msgid "One-letter abbreviation?" -msgstr "" - -#: ../library/classes/widget-categories.php:47 -msgid "An advanced widget that gives you total control over the output of your category links." -msgstr "" - -#: ../library/classes/widget-categories.php:59 -#: ../library/classes/widget-categories.php:163 -msgid "Categories" -msgstr "" - -#: ../library/classes/widget-categories.php:194 -msgid "Term Group" -msgstr "" - -#: ../library/classes/widget-categories.php:195 -msgid "Atom" -msgstr "" - -#: ../library/classes/widget-categories.php:195 -msgid "RDF" -msgstr "" - -#: ../library/classes/widget-categories.php:195 -msgid "RSS 2.0" -msgstr "" - -#: ../library/classes/widget-categories.php:300 -#: ../library/classes/widget-pages.php:281 -msgid "Hierarchical?" -msgstr "" - -#: ../library/classes/widget-categories.php:304 -msgid "Use description?" -msgstr "" - -#: ../library/classes/widget-categories.php:308 -msgid "Show last update?" -msgstr "" - -#: ../library/classes/widget-categories.php:312 -msgid "Show count?" -msgstr "" - -#: ../library/classes/widget-nav-menu.php:46 -msgid "An advanced widget that gives you total control over the output of your menus." -msgstr "" - -#: ../library/classes/widget-nav-menu.php:58 -msgid "Navigation Menu" -msgstr "" - -#: ../library/classes/widget-nav-menu.php:132 -msgid "Navigation" -msgstr "" - -#: ../library/classes/widget-pages.php:41 -msgid "An advanced widget that gives you total control over the output of your page links." -msgstr "" - -#: ../library/classes/widget-pages.php:170 -msgid "Author" -msgstr "" - -#: ../library/classes/widget-pages.php:170 -msgid "Date" -msgstr "" - -#: ../library/classes/widget-pages.php:170 -msgid "Menu Order" -msgstr "" - -#: ../library/classes/widget-pages.php:170 -#: ../library/classes/widget-pages.php:171 -msgid "Modified" -msgstr "" - -#: ../library/classes/widget-pages.php:170 -msgid "Title" -msgstr "" - -#: ../library/classes/widget-pages.php:171 -msgid "Created" -msgstr "" - -#: ../library/classes/widget-search.php:47 -msgid "An advanced widget that gives you total control over the output of your search form." -msgstr "" - -#: ../library/classes/widget-search.php:158 -msgid "Search Label:" -msgstr "" - -#: ../library/classes/widget-search.php:162 -msgid "Search Text:" -msgstr "" - -#: ../library/classes/widget-search.php:169 -msgid "Search Submit:" -msgstr "" - -#: ../library/classes/widget-search.php:174 -msgid "Use theme's <code>searchform.php</code>?" -msgstr "" - -#: ../library/classes/widget-tags.php:47 -msgid "An advanced widget that gives you total control over the output of your tags." -msgstr "" - -#: ../library/classes/widget-tags.php:59 -#: ../library/classes/widget-tags.php:161 -msgid "Tags" -msgstr "" - -#: ../library/classes/widget-tags.php:188 -msgid "View" -msgstr "" - -#: ../library/classes/widget-tags.php:189 -msgid "Flat" -msgstr "" - -#: ../library/classes/widget-tags.php:305 -msgid "Pad counts?" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:44 -msgid "Browse:" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:47 -msgid "Home" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:295 -msgid "g:i a" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:298 -#, php-format -msgid "Minute %1$s" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:298 -msgid "i" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:301 -msgid "g a" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:312 -#: ../library/extensions/breadcrumb-trail.php:318 -#: ../library/extensions/breadcrumb-trail.php:323 -#: ../library/extensions/breadcrumb-trail.php:328 -#: ../library/extensions/breadcrumb-trail.php:393 -msgid "Y" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:313 -#: ../library/extensions/breadcrumb-trail.php:324 -#: ../library/extensions/breadcrumb-trail.php:397 -msgid "F" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:314 -#: ../library/extensions/breadcrumb-trail.php:401 -msgid "d" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:319 -#, php-format -msgid "Week %1$s" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:319 -msgid "W" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:335 -#, php-format -msgid "Search results for "%1$s"" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:339 -msgid "404 Not Found" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:397 -msgid "F Y" -msgstr "" - -#: ../library/extensions/breadcrumb-trail.php:401 -msgid "F j, Y" -msgstr "" - -#: ../library/extensions/custom-field-series.php:83 -msgid "Articles in this series" -msgstr "" - -#: ../library/extensions/custom-field-series.php:125 -msgid "Series" -msgstr "" - -#: ../library/extensions/post-stylesheets.php:115 -#, php-format -msgid "%s Stylesheet" -msgstr "" - -#: ../library/extensions/theme-layouts.php:201 -msgid "Default" -msgstr "" - -#: ../library/extensions/theme-layouts.php:202 -msgid "One Column" -msgstr "" - -#: ../library/extensions/theme-layouts.php:203 -msgid "Two Columns, Left" -msgstr "" - -#: ../library/extensions/theme-layouts.php:204 -msgid "Two Columns, Right" -msgstr "" - -#: ../library/extensions/theme-layouts.php:205 -msgid "Three Columns, Left" -msgstr "" - -#: ../library/extensions/theme-layouts.php:206 -msgid "Three Columns, Right" -msgstr "" - -#: ../library/extensions/theme-layouts.php:207 -msgid "Three Columns, Center" -msgstr "" - -#: ../library/extensions/theme-layouts.php:241 -#: ../library/extensions/theme-layouts.php:344 -msgid "Layout" -msgstr "" - -#: ../library/extensions/theme-layouts.php:272 -msgid "Layout is a theme-specific structure for the single view of the post." -msgstr "" - -#: ../library/functions/comments.php:163 -msgid "*" -msgstr "" - -#: ../library/functions/comments.php:170 -msgid "Website" -msgstr "" - -#: ../library/functions/comments.php:176 -msgid "Comment" -msgstr "" - -#: ../library/functions/comments.php:177 -#, php-format -msgid "You must be <a href=\"%1$s\" title=\"Log in\">logged in</a> to post a comment." -msgstr "" - -#: ../library/functions/comments.php:178 -#, php-format -msgid "Logged in as <a href=\"%1$s\" title=\"%2$s\">%2$s</a>." -msgstr "" - -#: ../library/functions/comments.php:178 -#: ../library/functions/shortcodes.php:114 -msgid "Log out of this account" -msgstr "" - -#: ../library/functions/comments.php:178 -msgid "Log out »" -msgstr "" - -#: ../library/functions/comments.php:183 -msgid "Leave a Reply" -msgstr "" - -#: ../library/functions/comments.php:184 -#, php-format -msgid "Leave a Reply to %s" -msgstr "" - -#: ../library/functions/comments.php:185 -msgid "Click here to cancel reply." -msgstr "" - -#: ../library/functions/comments.php:186 -msgid "Post Comment" -msgstr "" - -#: ../library/functions/context.php:392 -#: ../library/functions/context.php:398 -#: ../library/functions/context.php:401 -#: ../library/functions/context.php:407 -#: ../library/functions/context.php:410 -#, php-format -msgid "Archive for %1$s" -msgstr "" - -#: ../library/functions/context.php:395 -#, php-format -msgid "Archive for minute %1$s" -msgstr "" - -#: ../library/functions/context.php:401 -msgid "F jS, Y" -msgstr "" - -#: ../library/functions/context.php:404 -#, php-format -msgid "Archive for week %1$s of %2$s" -msgstr "" - -#: ../library/functions/context.php:429 -#, php-format -msgid "%1$s Page %2$s" -msgstr "" - -#: ../library/functions/core-seo.php:86 -#, php-format -msgid "Copyright (c) %1$s" -msgstr "" - -#: ../library/functions/core-seo.php:103 -#: ../library/functions/shortcodes.php:193 -#: ../library/functions/shortcodes.php:315 -msgid "l, F jS, Y, g:i a" -msgstr "" - -#: ../library/functions/deprecated.php:547 -#, php-format -msgid "<code>%1$s</code> — This function has been removed or replaced by another function." -msgstr "" - -#: ../library/functions/settings.php:70 -#: ../library/functions/settings.php:74 -msgid "Copyright © [the-year] [site-link]." -msgstr "" - -#: ../library/functions/settings.php:70 -msgid "Powered by [wp-link], [theme-link], and [child-link]." -msgstr "" - -#: ../library/functions/settings.php:74 -msgid "Powered by [wp-link] and [theme-link]." -msgstr "" - -#: ../library/functions/shortcodes.php:78 -msgid "Powered by WordPress, state-of-the-art semantic personal publishing platform" -msgstr "" - -#: ../library/functions/shortcodes.php:78 -msgid "WordPress" -msgstr "" - -#: ../library/functions/shortcodes.php:114 -msgid "Log out" -msgstr "" - -#: ../library/functions/shortcodes.php:116 -msgid "Log into this account" -msgstr "" - -#: ../library/functions/shortcodes.php:116 -msgid "Log in" -msgstr "" - -#: ../library/functions/shortcodes.php:129 -#, php-format -msgid "This page loaded in %1$s seconds with %2$s database queries." -msgstr "" - -#: ../library/functions/shortcodes.php:180 -#: ../library/functions/shortcodes.php:382 -#, php-format -msgid "Edit %1$s" -msgstr "" - -#: ../library/functions/shortcodes.php:208 -msgid "Leave a response" -msgstr "" - -#: ../library/functions/shortcodes.php:208 -#, php-format -msgid "%1$s Response" -msgstr "" - -#: ../library/functions/shortcodes.php:208 -#, php-format -msgid "%1$s Responses" -msgstr "" - -#: ../library/functions/shortcodes.php:215 -#: ../library/functions/shortcodes.php:217 -#: ../library/functions/shortcodes.php:219 -#, php-format -msgid "Comment on %1$s" -msgstr "" - -#: ../library/functions/shortcodes.php:278 -msgid "(Untitled)" -msgstr "" - -#: ../library/functions/shortcodes.php:295 -msgid "Shortlink" -msgstr "" - -#: ../library/functions/shortcodes.php:315 -#, php-format -msgid "%1$s at %2$s" -msgstr "" - -#: ../library/functions/shortcodes.php:362 -#, php-format -msgid "Permalink to comment %1$s" -msgstr "" - -#: ../library/functions/shortcodes.php:362 -msgid "Permalink" -msgstr "" - -#: ../library/functions/shortcodes.php:400 -msgid "Reply" -msgstr "" - -#: ../library/functions/shortcodes.php:401 -msgid "Log in to reply." -msgstr "" - -#: ../library/functions/sidebars.php:77 -msgid "The main (primary) widget area, most often used as a sidebar." -msgstr "" - -#: ../library/functions/sidebars.php:81 -msgid "The second most important widget area, most often used as a secondary sidebar." -msgstr "" - -#: ../library/functions/sidebars.php:85 -msgid "A widget area loaded in the footer of the site." -msgstr "" - -#: ../library/functions/sidebars.php:89 -msgid "Displayed within the site's header area." -msgstr "" - -#: ../library/functions/sidebars.php:93 -msgid "Loaded before the page's main content area." -msgstr "" - -#: ../library/functions/sidebars.php:97 -msgid "Loaded after the page's main content area." -msgstr "" - -#: ../library/functions/sidebars.php:101 -msgid "Loaded on singular post (page, attachment, etc.) views before the comments area." -msgstr "" - +msgid "" +msgstr "" +"Project-Id-Version: Hybrid WordPress Theme\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-08-23 19:18-0600\n" +"PO-Revision-Date: \n" +"Last-Translator: Justin Tadlock <justin@justintadlock.com>\n" +"Language-Team: <justin@justintadlock.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: English\n" +"X-Poedit-Country: UNITED STATES\n" +"X-Poedit-KeywordsList: _e;__;esc_attr_e;esc_attr__;esc_html_e;esc_html__;_x;_n;_x:1,2c;_n:1,2\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPath-1: ..\n" + +#: ../404.php:33 +msgid "Not Found" +msgstr "" + +#: ../404.php:38 +#, php-format +msgid "You tried going to %1$s, and it doesn't exist. All is not lost! You can search for what you're looking for." +msgstr "" + +#: ../attachment.php:40 +#, php-format +msgid "Download "%1$s"" +msgstr "" + +#: ../attachment.php:45 +#: ../index.php:28 +#, php-format +msgid "Continue reading %1$s" +msgstr "" + +#: ../attachment.php:47 +#: ../index.php:29 +#: ../page-archives.php:51 +#: ../page-authors.php:56 +#: ../page-biography.php:65 +msgid "Pages:" +msgstr "" + +#: ../comment.php:22 +msgid "Your comment is awaiting moderation." +msgstr "" + +#: ../comments.php:14 +msgid "Please do not load this page directly. Thanks!" +msgstr "" + +#: ../comments.php:27 +#, php-format +msgid "No responses to %1$s" +msgstr "" + +#: ../comments.php:27 +#, php-format +msgid "One response to %1$s" +msgstr "" + +#: ../comments.php:27 +#, php-format +msgid "%1$s responses to %2$s" +msgstr "" + +#: ../comments.php:50 +#, php-format +msgid "Comments are closed, but <a href=\"%1$s\" title=\"Trackback URL for this post\">trackbacks</a> and pingbacks are open." +msgstr "" + +#: ../functions.php:137 +msgid "Widgets Template" +msgstr "" + +#: ../functions.php:138 +msgid "Used as the content of the Widgets page template." +msgstr "" + +#: ../functions.php:150 +msgid "404 Template" +msgstr "" + +#: ../functions.php:151 +msgid "Replaces the default 404 error page content." +msgstr "" + +#: ../functions.php:227 +msgid "By [entry-author] on [entry-published] [entry-edit-link before=\" | \"]" +msgstr "" + +#: ../functions.php:242 +msgid "[entry-terms taxonomy=\"category\" before=\"Posted in \"] [entry-terms taxonomy=\"post_tag\" before=\"| Tagged \"] [entry-comments-link before=\"| \"]" +msgstr "" + +#: ../loop-error.php:16 +msgid "Apologies, but no results were found." +msgstr "" + +#: ../loop-meta.php:83 +#, php-format +msgid "You are browsing the search results for "%1$s"" +msgstr "" + +#: ../loop-meta.php:92 +msgid "Archives by date" +msgstr "" + +#: ../loop-meta.php:96 +msgid "You are browsing the site archives by date." +msgstr "" + +#: ../loop-meta.php:120 +msgid "Archives" +msgstr "" + +#: ../loop-meta.php:124 +msgid "You are browsing the site archives." +msgstr "" + +#: ../loop-nav.php:17 +msgid "« Return to entry" +msgstr "" + +#: ../loop-nav.php:23 +#: ../loop-nav.php:31 +msgid "« Previous" +msgstr "" + +#: ../loop-nav.php:24 +#: ../loop-nav.php:31 +msgid "Next »" +msgstr "" + +#: ../page-archives.php:37 +msgid "Archives by category" +msgstr "" + +#: ../page-archives.php:40 +msgid "RSS" +msgstr "" + +#: ../page-archives.php:43 +msgid "Archives by month" +msgstr "" + +#: ../page-biography.php:41 +msgid "Nickname:" +msgstr "" + +#: ../page-biography.php:45 +msgid "Website:" +msgstr "" + +#: ../page-biography.php:49 +msgid "AIM:" +msgstr "" + +#: ../page-biography.php:49 +#: ../page-biography.php:53 +#: ../page-biography.php:57 +#, php-format +msgid "IM with %1$s" +msgstr "" + +#: ../page-biography.php:53 +msgid "Jabber:" +msgstr "" + +#: ../page-biography.php:57 +msgid "Yahoo:" +msgstr "" + +#: ../page-logged-in.php:52 +#, php-format +msgid "You must be <a href=\"%1$s\" title=\"Log in\">logged in</a> to view the content of this page." +msgstr "" + +#: ../page-logged-in.php:54 +#, php-format +msgid "If you're not currently a member, please take a moment to <a href=\"%1$s\" title=\"Register\">register</a>." +msgstr "" + +#: ../page-sitemap.php:30 +msgid "Feeds" +msgstr "" + +#: ../page-sitemap.php:33 +msgid "RDF/RSS 1.0 feed" +msgstr "" + +#: ../page-sitemap.php:33 +msgid "<acronym title=\"Resource Description Framework\">RDF</acronym> <acronym title=\"Really Simple Syndication\">RSS</acronym> 1.0 feed" +msgstr "" + +#: ../page-sitemap.php:34 +msgid "RSS 0.92 feed" +msgstr "" + +#: ../page-sitemap.php:34 +msgid "<acronym title=\"Really Simple Syndication\">RSS</acronym> 0.92 feed" +msgstr "" + +#: ../page-sitemap.php:35 +msgid "RSS 2.0 feed" +msgstr "" + +#: ../page-sitemap.php:35 +msgid "<acronym title=\"Really Simple Syndication\">RSS</acronym> 2.0 feed" +msgstr "" + +#: ../page-sitemap.php:36 +msgid "Atom feed" +msgstr "" + +#: ../page-sitemap.php:37 +msgid "Comments RSS 2.0 feed" +msgstr "" + +#: ../page-sitemap.php:37 +msgid "Comments <acronym title=\"Really Simple Syndication\">RSS</acronym> 2.0 feed" +msgstr "" + +#: ../page-sitemap.php:40 +msgid "Pages" +msgstr "" + +#: ../page-sitemap.php:46 +msgid "Category Archives" +msgstr "" + +#: ../page-sitemap.php:52 +msgid "Author Archives" +msgstr "" + +#: ../page-sitemap.php:58 +msgid "Yearly Archives" +msgstr "" + +#: ../page-sitemap.php:64 +msgid "Monthly Archives" +msgstr "" + +#: ../page-sitemap.php:70 +msgid "Weekly Archives" +msgstr "" + +#: ../page-sitemap.php:76 +msgid "Daily Archives" +msgstr "" + +#: ../page-sitemap.php:82 +msgid "Tag Archives" +msgstr "" + +#: ../page-sitemap.php:88 +msgid "Blog Posts" +msgstr "" + +#: ../page-widgets.php:26 +msgid "Edit" +msgstr "" + +#: ../searchform.php:18 +msgid "Search this site..." +msgstr "" + +#: ../searchform.php:19 +msgid "Search" +msgstr "" + +#: ../library/admin/meta-box-post-seo.php:37 +msgid "SEO" +msgstr "" + +#: ../library/admin/meta-box-post-seo.php:70 +msgid "Document Title:" +msgstr "" + +#: ../library/admin/meta-box-post-seo.php:76 +msgid "Meta Description:" +msgstr "" + +#: ../library/admin/meta-box-post-seo.php:82 +msgid "Meta Keywords:" +msgstr "" + +#: ../library/admin/meta-box-post-template.php:36 +msgid "Template" +msgstr "" + +#: ../library/admin/meta-box-post-template.php:87 +msgid "No templates exist for this post type." +msgstr "" + +#: ../library/admin/meta-box-theme-about.php:31 +#: ../library/admin/meta-box-theme-about.php:36 +#, php-format +msgid "About %s" +msgstr "" + +#: ../library/admin/meta-box-theme-about.php:61 +msgid "Theme:" +msgstr "" + +#: ../library/admin/meta-box-theme-about.php:69 +msgid "Version:" +msgstr "" + +#: ../library/admin/meta-box-theme-about.php:77 +msgid "Author:" +msgstr "" + +#: ../library/admin/meta-box-theme-about.php:85 +msgid "Description:" +msgstr "" + +#: ../library/admin/meta-box-theme-footer.php:29 +msgid "Footer settings" +msgstr "" + +#: ../library/admin/meta-box-theme-footer.php:52 +msgid "You can add custom <acronym title=\"Hypertext Markup Language\">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme." +msgstr "" + +#: ../library/admin/theme-settings.php:47 +#: ../library/admin/theme-settings.php:171 +#, php-format +msgid "%s Theme Settings" +msgstr "" + +#: ../library/admin/theme-settings.php:48 +msgid "Theme Settings" +msgstr "" + +#: ../library/admin/theme-settings.php:172 +msgid "Customize" +msgstr "" + +#: ../library/admin/theme-settings.php:198 +msgid "Update Settings" +msgstr "" + +#: ../library/admin/theme-settings.php:255 +msgid "Documentation" +msgstr "" + +#: ../library/admin/theme-settings.php:259 +msgid "Support" +msgstr "" + +#: ../library/classes/widget-archives.php:32 +msgid "An advanced widget that gives you total control over the output of your archives." +msgstr "" + +#: ../library/classes/widget-archives.php:79 +msgid "Select Year" +msgstr "" + +#: ../library/classes/widget-archives.php:82 +msgid "Select Month" +msgstr "" + +#: ../library/classes/widget-archives.php:85 +msgid "Select Week" +msgstr "" + +#: ../library/classes/widget-archives.php:88 +msgid "Select Day" +msgstr "" + +#: ../library/classes/widget-archives.php:91 +msgid "Select Post" +msgstr "" + +#: ../library/classes/widget-archives.php:154 +msgid "Alphabetical" +msgstr "" + +#: ../library/classes/widget-archives.php:154 +msgid "Daily" +msgstr "" + +#: ../library/classes/widget-archives.php:154 +msgid "Monthly" +msgstr "" + +#: ../library/classes/widget-archives.php:154 +msgid "Post By Post" +msgstr "" + +#: ../library/classes/widget-archives.php:154 +msgid "Weekly" +msgstr "" + +#: ../library/classes/widget-archives.php:154 +msgid "Yearly" +msgstr "" + +#: ../library/classes/widget-archives.php:157 +msgid "Custom" +msgstr "" + +#: ../library/classes/widget-archives.php:157 +msgid "HTML" +msgstr "" + +#: ../library/classes/widget-archives.php:157 +msgid "Option" +msgstr "" + +#: ../library/classes/widget-archives.php:162 +msgid "Title:" +msgstr "" + +#: ../library/classes/widget-archives.php:198 +msgid "Show post count?" +msgstr "" + +#: ../library/classes/widget-authors.php:32 +msgid "An advanced widget that gives you total control over the output of your author lists." +msgstr "" + +#: ../library/classes/widget-authors.php:44 +#: ../library/classes/widget-authors.php:119 +msgid "Authors" +msgstr "" + +#: ../library/classes/widget-authors.php:136 +#: ../library/classes/widget-bookmarks.php:178 +#: ../library/classes/widget-bookmarks.php:180 +#: ../library/classes/widget-categories.php:162 +#: ../library/classes/widget-pages.php:148 +#: ../library/classes/widget-tags.php:173 +msgid "Ascending" +msgstr "" + +#: ../library/classes/widget-authors.php:136 +#: ../library/classes/widget-bookmarks.php:178 +#: ../library/classes/widget-bookmarks.php:180 +#: ../library/classes/widget-categories.php:162 +#: ../library/classes/widget-pages.php:148 +#: ../library/classes/widget-tags.php:173 +msgid "Descending" +msgstr "" + +#: ../library/classes/widget-authors.php:137 +msgid "Display Name" +msgstr "" + +#: ../library/classes/widget-authors.php:137 +msgid "Email" +msgstr "" + +#: ../library/classes/widget-authors.php:137 +#: ../library/classes/widget-bookmarks.php:179 +#: ../library/classes/widget-bookmarks.php:181 +#: ../library/classes/widget-categories.php:163 +#: ../library/classes/widget-pages.php:149 +msgid "ID" +msgstr "" + +#: ../library/classes/widget-authors.php:137 +msgid "Nice Name" +msgstr "" + +#: ../library/classes/widget-authors.php:137 +msgid "Post Count" +msgstr "" + +#: ../library/classes/widget-authors.php:137 +msgid "Registered" +msgstr "" + +#: ../library/classes/widget-authors.php:137 +#: ../library/classes/widget-bookmarks.php:181 +msgid "URL" +msgstr "" + +#: ../library/classes/widget-authors.php:137 +msgid "Login" +msgstr "" + +#: ../library/classes/widget-authors.php:169 +#: ../library/classes/widget-categories.php:161 +#: ../library/classes/widget-tags.php:172 +msgid "List" +msgstr "" + +#: ../library/classes/widget-authors.php:169 +#: ../library/classes/widget-categories.php:161 +msgid "None" +msgstr "" + +#: ../library/classes/widget-authors.php:187 +msgid "<acronym title=\"Hypertext Markup Language\">HTML</acronym>?" +msgstr "" + +#: ../library/classes/widget-authors.php:195 +msgid "Exclude admin?" +msgstr "" + +#: ../library/classes/widget-authors.php:199 +msgid "Show full name?" +msgstr "" + +#: ../library/classes/widget-authors.php:203 +#: ../library/classes/widget-categories.php:273 +#: ../library/classes/widget-tags.php:292 +msgid "Hide empty?" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:32 +msgid "An advanced widget that gives you total control over the output of your bookmarks (links)." +msgstr "" + +#: ../library/classes/widget-bookmarks.php:44 +#: ../library/classes/widget-bookmarks.php:85 +#: ../library/classes/widget-bookmarks.php:148 +msgid "Bookmarks" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:179 +#: ../library/classes/widget-categories.php:163 +#: ../library/classes/widget-tags.php:174 +msgid "Count" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:179 +#: ../library/classes/widget-bookmarks.php:181 +#: ../library/classes/widget-categories.php:163 +#: ../library/classes/widget-tags.php:174 +msgid "Name" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:179 +#: ../library/classes/widget-categories.php:163 +#: ../library/classes/widget-pages.php:149 +msgid "Slug" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +msgid "Description" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +msgid "Length" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +msgid "Notes" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +msgid "Owner" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +#: ../library/classes/widget-tags.php:173 +msgid "Random" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +msgid "Rating" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +msgid "Rel" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +msgid "Target" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:181 +msgid "Updated" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:289 +msgid "Categorize?" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:293 +msgid "Show description?" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:297 +msgid "Hide invisible?" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:301 +msgid "Show rating?" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:305 +msgid "Show updated?" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:309 +msgid "Show images?" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:313 +msgid "Show name?" +msgstr "" + +#: ../library/classes/widget-bookmarks.php:317 +msgid "Show private?" +msgstr "" + +#: ../library/classes/widget-calendar.php:32 +msgid "An advanced widget that gives you total control over the output of your calendar." +msgstr "" + +#: ../library/classes/widget-calendar.php:44 +#: ../library/classes/widget-calendar.php:99 +msgid "Calendar" +msgstr "" + +#: ../library/classes/widget-calendar.php:113 +msgid "One-letter abbreviation?" +msgstr "" + +#: ../library/classes/widget-categories.php:32 +msgid "An advanced widget that gives you total control over the output of your category links." +msgstr "" + +#: ../library/classes/widget-categories.php:44 +#: ../library/classes/widget-categories.php:133 +msgid "Categories" +msgstr "" + +#: ../library/classes/widget-categories.php:163 +msgid "Term Group" +msgstr "" + +#: ../library/classes/widget-categories.php:164 +msgid "Atom" +msgstr "" + +#: ../library/classes/widget-categories.php:164 +msgid "RDF" +msgstr "" + +#: ../library/classes/widget-categories.php:164 +msgid "RSS 2.0" +msgstr "" + +#: ../library/classes/widget-categories.php:261 +#: ../library/classes/widget-pages.php:256 +msgid "Hierarchical?" +msgstr "" + +#: ../library/classes/widget-categories.php:265 +msgid "Use description?" +msgstr "" + +#: ../library/classes/widget-categories.php:269 +msgid "Show count?" +msgstr "" + +#: ../library/classes/widget-nav-menu.php:32 +msgid "An advanced widget that gives you total control over the output of your menus." +msgstr "" + +#: ../library/classes/widget-nav-menu.php:44 +msgid "Navigation Menu" +msgstr "" + +#: ../library/classes/widget-nav-menu.php:109 +msgid "Navigation" +msgstr "" + +#: ../library/classes/widget-pages.php:32 +msgid "An advanced widget that gives you total control over the output of your page links." +msgstr "" + +#: ../library/classes/widget-pages.php:149 +msgid "Author" +msgstr "" + +#: ../library/classes/widget-pages.php:149 +msgid "Date" +msgstr "" + +#: ../library/classes/widget-pages.php:149 +msgid "Menu Order" +msgstr "" + +#: ../library/classes/widget-pages.php:149 +#: ../library/classes/widget-pages.php:150 +msgid "Modified" +msgstr "" + +#: ../library/classes/widget-pages.php:149 +msgid "Title" +msgstr "" + +#: ../library/classes/widget-pages.php:150 +msgid "Created" +msgstr "" + +#: ../library/classes/widget-search.php:33 +msgid "An advanced widget that gives you total control over the output of your search form." +msgstr "" + +#: ../library/classes/widget-search.php:147 +msgid "Search Label:" +msgstr "" + +#: ../library/classes/widget-search.php:151 +msgid "Search Text:" +msgstr "" + +#: ../library/classes/widget-search.php:158 +msgid "Search Submit:" +msgstr "" + +#: ../library/classes/widget-search.php:163 +msgid "Use theme's <code>searchform.php</code>?" +msgstr "" + +#: ../library/classes/widget-tags.php:32 +msgid "An advanced widget that gives you total control over the output of your tags." +msgstr "" + +#: ../library/classes/widget-tags.php:44 +#: ../library/classes/widget-tags.php:143 +msgid "Tags" +msgstr "" + +#: ../library/classes/widget-tags.php:171 +msgid "View" +msgstr "" + +#: ../library/classes/widget-tags.php:172 +msgid "Flat" +msgstr "" + +#: ../library/classes/widget-tags.php:288 +msgid "Pad counts?" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:44 +msgid "Browse:" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:47 +msgid "Home" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:301 +msgid "g:i a" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:304 +#, php-format +msgid "Minute %1$s" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:304 +msgid "i" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:307 +msgid "g a" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:318 +#: ../library/extensions/breadcrumb-trail.php:324 +#: ../library/extensions/breadcrumb-trail.php:329 +#: ../library/extensions/breadcrumb-trail.php:334 +#: ../library/extensions/breadcrumb-trail.php:521 +msgid "Y" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:319 +#: ../library/extensions/breadcrumb-trail.php:330 +#: ../library/extensions/breadcrumb-trail.php:525 +msgid "F" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:320 +#: ../library/extensions/breadcrumb-trail.php:529 +msgid "d" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:325 +#, php-format +msgid "Week %1$s" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:325 +msgid "W" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:341 +#, php-format +msgid "Search results for "%1$s"" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:345 +msgid "404 Not Found" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:414 +msgid "Split" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:418 +msgid "Merge" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:525 +msgid "F Y" +msgstr "" + +#: ../library/extensions/breadcrumb-trail.php:529 +msgid "F j, Y" +msgstr "" + +#: ../library/extensions/custom-field-series.php:86 +msgid "Articles in this series" +msgstr "" + +#: ../library/extensions/custom-field-series.php:212 +msgid "Series" +msgstr "" + +#: ../library/extensions/post-stylesheets.php:255 +msgid "Stylesheet" +msgstr "" + +#: ../library/extensions/theme-layouts.php:295 +msgid "Default" +msgstr "" + +#: ../library/extensions/theme-layouts.php:296 +msgid "One Column" +msgstr "" + +#: ../library/extensions/theme-layouts.php:297 +msgid "Two Columns, Left" +msgstr "" + +#: ../library/extensions/theme-layouts.php:298 +msgid "Two Columns, Right" +msgstr "" + +#: ../library/extensions/theme-layouts.php:299 +msgid "Three Columns, Left" +msgstr "" + +#: ../library/extensions/theme-layouts.php:300 +msgid "Three Columns, Right" +msgstr "" + +#: ../library/extensions/theme-layouts.php:301 +msgid "Three Columns, Center" +msgstr "" + +#: ../library/extensions/theme-layouts.php:377 +#: ../library/extensions/theme-layouts.php:485 +msgid "Layout" +msgstr "" + +#: ../library/extensions/theme-layouts.php:404 +msgid "Layout is a theme-specific structure for the single view of the post." +msgstr "" + +#: ../library/functions/comments.php:182 +msgid "*" +msgstr "" + +#: ../library/functions/comments.php:189 +msgid "Website" +msgstr "" + +#: ../library/functions/comments.php:195 +msgid "Comment" +msgstr "" + +#: ../library/functions/comments.php:196 +#, php-format +msgid "You must be <a href=\"%1$s\" title=\"Log in\">logged in</a> to post a comment." +msgstr "" + +#: ../library/functions/comments.php:197 +#, php-format +msgid "Logged in as <a href=\"%1$s\" title=\"%2$s\">%2$s</a>." +msgstr "" + +#: ../library/functions/comments.php:197 +msgid "Log out of this account" +msgstr "" + +#: ../library/functions/comments.php:197 +msgid "Log out »" +msgstr "" + +#: ../library/functions/comments.php:202 +msgid "Leave a Reply" +msgstr "" + +#: ../library/functions/comments.php:203 +#, php-format +msgid "Leave a Reply to %s" +msgstr "" + +#: ../library/functions/comments.php:204 +msgid "Click here to cancel reply." +msgstr "" + +#: ../library/functions/comments.php:205 +msgid "Post Comment" +msgstr "" + +#: ../library/functions/context.php:423 +#: ../library/functions/context.php:429 +#: ../library/functions/context.php:432 +#: ../library/functions/context.php:438 +#: ../library/functions/context.php:441 +#, php-format +msgid "Archive for %1$s" +msgstr "" + +#: ../library/functions/context.php:426 +#, php-format +msgid "Archive for minute %1$s" +msgstr "" + +#: ../library/functions/context.php:432 +msgid "F jS, Y" +msgstr "" + +#: ../library/functions/context.php:435 +#, php-format +msgid "Archive for week %1$s of %2$s" +msgstr "" + +#: ../library/functions/context.php:460 +#, php-format +msgid "%1$s Page %2$s" +msgstr "" + +#: ../library/functions/core-seo.php:93 +#, php-format +msgid "Copyright (c) %1$s" +msgstr "" + +#: ../library/functions/core-seo.php:112 +#: ../library/functions/shortcodes.php:218 +#: ../library/functions/shortcodes.php:373 +msgid "l, F jS, Y, g:i a" +msgstr "" + +#: ../library/functions/customize.php:63 +#: ../library/functions/customize.php:88 +msgid "Footer" +msgstr "" + +#: ../library/functions/deprecated.php:572 +#, php-format +msgid "<code>%1$s</code> — This function has been removed or replaced by another function." +msgstr "" + +#: ../library/functions/menus.php:38 +msgctxt "nav menu location" +msgid "Primary" +msgstr "" + +#: ../library/functions/menus.php:42 +msgctxt "nav menu location" +msgid "Secondary" +msgstr "" + +#: ../library/functions/menus.php:46 +msgctxt "nav menu location" +msgid "Subsidiary" +msgstr "" + +#: ../library/functions/settings.php:76 +#: ../library/functions/settings.php:80 +msgid "Copyright © [the-year] [site-link]." +msgstr "" + +#: ../library/functions/settings.php:76 +msgid "Powered by [wp-link], [theme-link], and [child-link]." +msgstr "" + +#: ../library/functions/settings.php:80 +msgid "Powered by [wp-link] and [theme-link]." +msgstr "" + +#: ../library/functions/shortcodes.php:93 +msgid "State-of-the-art semantic personal publishing platform" +msgstr "" + +#: ../library/functions/shortcodes.php:93 +msgid "WordPress" +msgstr "" + +#: ../library/functions/shortcodes.php:106 +#, php-format +msgid "%s WordPress Theme" +msgstr "" + +#: ../library/functions/shortcodes.php:134 +msgid "Log out" +msgstr "" + +#: ../library/functions/shortcodes.php:136 +msgid "Log in" +msgstr "" + +#: ../library/functions/shortcodes.php:151 +#, php-format +msgid "This page loaded in %1$s seconds with %2$s database queries." +msgstr "" + +#: ../library/functions/shortcodes.php:204 +#: ../library/functions/shortcodes.php:443 +#, php-format +msgid "Edit %1$s" +msgstr "" + +#: ../library/functions/shortcodes.php:234 +msgid "Leave a response" +msgstr "" + +#: ../library/functions/shortcodes.php:234 +#, php-format +msgid "%1$s Response" +msgstr "" + +#: ../library/functions/shortcodes.php:234 +#, php-format +msgid "%1$s Responses" +msgstr "" + +#: ../library/functions/shortcodes.php:241 +#: ../library/functions/shortcodes.php:243 +#: ../library/functions/shortcodes.php:245 +#, php-format +msgid "Comment on %1$s" +msgstr "" + +#: ../library/functions/shortcodes.php:305 +msgid "(Untitled)" +msgstr "" + +#: ../library/functions/shortcodes.php:321 +msgid "Shortlink" +msgstr "" + +#: ../library/functions/shortcodes.php:345 +#: ../library/functions/shortcodes.php:422 +msgid "Permalink" +msgstr "" + +#: ../library/functions/shortcodes.php:373 +#, php-format +msgid "%1$s at %2$s" +msgstr "" + +#: ../library/functions/shortcodes.php:422 +#, php-format +msgid "Permalink to comment %1$s" +msgstr "" + +#: ../library/functions/shortcodes.php:462 +msgid "Reply" +msgstr "" + +#: ../library/functions/shortcodes.php:463 +msgid "Log in to reply." +msgstr "" + +#: ../library/functions/sidebars.php:87 +msgctxt "sidebar" +msgid "Primary" +msgstr "" + +#: ../library/functions/sidebars.php:88 +msgid "The main (primary) widget area, most often used as a sidebar." +msgstr "" + +#: ../library/functions/sidebars.php:91 +msgctxt "sidebar" +msgid "Secondary" +msgstr "" + +#: ../library/functions/sidebars.php:92 +msgid "The second most important widget area, most often used as a secondary sidebar." +msgstr "" + +#: ../library/functions/sidebars.php:95 +msgctxt "sidebar" +msgid "Subsidiary" +msgstr "" + +#: ../library/functions/sidebars.php:96 +msgid "A widget area loaded in the footer of the site." +msgstr "" + +#: ../library/functions/sidebars.php:99 +msgctxt "sidebar" +msgid "Header" +msgstr "" + +#: ../library/functions/sidebars.php:100 +msgid "Displayed within the site's header area." +msgstr "" + +#: ../library/functions/sidebars.php:103 +msgctxt "sidebar" +msgid "Before Content" +msgstr "" + +#: ../library/functions/sidebars.php:104 +msgid "Loaded before the page's main content area." +msgstr "" + +#: ../library/functions/sidebars.php:107 +msgctxt "sidebar" +msgid "After Content" +msgstr "" + +#: ../library/functions/sidebars.php:108 +msgid "Loaded after the page's main content area." +msgstr "" + +#: ../library/functions/sidebars.php:111 +msgctxt "sidebar" +msgid "After Singular" +msgstr "" + +#: ../library/functions/sidebars.php:112 +msgid "Loaded on singular post (page, attachment, etc.) views before the comments area." +msgstr "" + diff --git a/wp-content/themes/hybrid/library/admin/admin.php b/wp-content/themes/hybrid/library/admin/admin.php index 3b2de180461b3fc1d30e81151470fe3ca3b09fd4..ba84ae235fa7547e0566d53c1ffaecedfdde458d 100644 --- a/wp-content/themes/hybrid/library/admin/admin.php +++ b/wp-content/themes/hybrid/library/admin/admin.php @@ -5,17 +5,22 @@ * * @package HybridCore * @subpackage Admin + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ -/* Add the admin init function to the 'admin_init' hook. */ -add_action( 'admin_init', 'hybrid_admin_init' ); +/* Add the admin setup function to the 'admin_menu' hook. */ +add_action( 'admin_menu', 'hybrid_admin_setup' ); /** - * Initializes any admin-related features needed for the framework. + * Sets up the adminstration functionality for the framework and themes. * - * @since 0.7.0 + * @since 1.3.0 + * @return void */ -function hybrid_admin_init() { +function hybrid_admin_setup() { /* Load the post meta boxes on the new post and edit post screens. */ add_action( 'load-post.php', 'hybrid_admin_load_post_meta_boxes' ); @@ -33,6 +38,7 @@ function hybrid_admin_init() { * the theme declares support for the feature. * * @since 1.2.0 + * @return void */ function hybrid_admin_load_post_meta_boxes() { @@ -48,6 +54,7 @@ function hybrid_admin_load_post_meta_boxes() { * registers it with WordPress. * * @since 1.2.0 + * @return void */ function hybrid_admin_register_styles() { wp_register_style( 'hybrid-core-admin', trailingslashit( HYBRID_CSS ) . 'admin.css', false, '20110512', 'screen' ); @@ -57,6 +64,7 @@ function hybrid_admin_register_styles() { * Loads the admin.css stylesheet for admin-related features. * * @since 1.2.0 + * @return void */ function hybrid_admin_enqueue_styles( $hook_suffix ) { @@ -71,54 +79,51 @@ function hybrid_admin_enqueue_styles( $hook_suffix ) { * page templates function because it doesn't allow for other types of templates. * * @since 0.7.0 - * @param array $args Arguments to check the templates against. + * @param string $post_type The name of the post type to get templates for. * @return array $post_templates The array of templates. */ -function hybrid_get_post_templates( $args = array() ) { - - /* Parse the arguments with the defaults. */ - $args = wp_parse_args( $args, array( 'label' => array( 'Post Template' ) ) ); +function hybrid_get_post_templates( $post_type = 'post' ) { - /* Get theme and templates variables. */ - $themes = get_themes(); - $theme = get_current_theme(); - $templates = $themes[$theme]['Template Files']; + /* Set up an empty post templates array. */ $post_templates = array(); - /* If there's an array of templates, loop through each template. */ - if ( is_array( $templates ) ) { + /* Get the post type object. */ + $post_type_object = get_post_type_object( $post_type ); - /* Set up a $base path that we'll use to remove from the file name. */ - $base = array( trailingslashit( get_template_directory() ), trailingslashit( get_stylesheet_directory() ) ); + /* Get the theme (parent theme if using a child theme) object. */ + $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); - /* Loop through the post templates. */ - foreach ( $templates as $template ) { + /* Get the theme PHP files one level deep. */ + $files = (array) $theme->get_files( 'php', 1 ); - /* Remove the base (parent/child theme path) from the template file name. */ - $basename = str_replace( $base, '', $template ); + /* If a child theme is active, get its files and merge with the parent theme files. */ + if ( is_child_theme() ) { + $child = wp_get_theme( get_stylesheet(), get_theme_root( get_stylesheet_directory() ) ); + $child_files = (array) $child->get_files( 'php', 1 ); + $files = array_merge( $files, $child_files ); + } - /* Get the template data. */ - $template_data = implode( '', file( $template ) ); + /* Loop through each of the PHP files and check if they are post templates. */ + foreach ( $files as $file => $path ) { - /* Make sure the name is set to an empty string. */ - $name = ''; + /* Get file data based on the post type singular name (e.g., "Post Template", "Book Template", etc.). */ + $headers = get_file_data( + $path, + array( + "{$post_type_object->name} Template" => "{$post_type_object->name} Template", + ) + ); - /* Loop through each of the potential labels and see if a match is found. */ - foreach ( $args['label'] as $label ) { - if ( preg_match( "|{$label}:(.*)$|mi", $template_data, $name ) ) { - $name = _cleanup_header_comment( $name[1] ); - break; - } - } + /* Continue loop if the header is empty. */ + if ( empty( $headers["{$post_type_object->name} Template"] ) ) + continue; - /* If a post template was found, add its name and file name to the $post_templates array. */ - if ( !empty( $name ) ) - $post_templates[trim( $name )] = $basename; - } + /* Add the PHP filename and template name to the array. */ + $post_templates[ $file ] = $headers["{$post_type_object->name} Template"]; } /* Return array of post templates. */ - return $post_templates; + return array_flip( $post_templates ); } ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/admin/meta-box-post-seo.php b/wp-content/themes/hybrid/library/admin/meta-box-post-seo.php index 31b4d26d0955bd84453073daeef0b9fd43c58e96..8fd510c1408922df266a407f0270da7046b343e2 100644 --- a/wp-content/themes/hybrid/library/admin/meta-box-post-seo.php +++ b/wp-content/themes/hybrid/library/admin/meta-box-post-seo.php @@ -7,10 +7,15 @@ * * @package HybridCore * @subpackage Admin + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Add the post SEO meta box on the 'add_meta_boxes' hook. */ -add_action( 'add_meta_boxes', 'hybrid_meta_box_post_add_seo' ); +add_action( 'add_meta_boxes', 'hybrid_meta_box_post_add_seo', 10, 2 ); +add_action( 'add_meta_boxes', 'hybrid_meta_box_post_remove_seo', 10, 2 ); /* Save the post SEO meta box data on the 'save_post' hook. */ add_action( 'save_post', 'hybrid_meta_box_post_save_seo', 10, 2 ); @@ -19,50 +24,66 @@ add_action( 'save_post', 'hybrid_meta_box_post_save_seo', 10, 2 ); * Adds the post SEO meta box for all public post types. * * @since 1.2.0 + * @param string $post_type The post type of the current post being edited. + * @param object $post The current post being edited. + * @return void */ -function hybrid_meta_box_post_add_seo() { +function hybrid_meta_box_post_add_seo( $post_type, $post ) { - /* Get all available public post types. */ - $post_types = get_post_types( array( 'public' => true ), 'objects' ); + $post_type_object = get_post_type_object( $post_type ); - /* Loop through each post type, adding the meta box for each type's post editor screen. */ - foreach ( $post_types as $type ) - add_meta_box( 'hybrid-core-post-seo', sprintf( __( '%s SEO', hybrid_get_textdomain() ), $type->labels->singular_name ), 'hybrid_meta_box_post_display_seo', $type->name, 'normal', 'high' ); + /* Only add meta box if current user can edit, add, or delete meta for the post. */ + if ( ( true === $post_type_object->public ) && ( current_user_can( 'edit_post_meta', $post->ID ) || current_user_can( 'add_post_meta', $post->ID ) || current_user_can( 'delete_post_meta', $post->ID ) ) ) + add_meta_box( 'hybrid-core-post-seo', __( 'SEO', 'hybrid-core' ), 'hybrid_meta_box_post_display_seo', $post_type, 'normal', 'high' ); +} + +/** + * Remove the meta box from some post types. + * + * @since 1.3.0 + * @param string $post_type The post type of the current post being edited. + * @param object $post The current post being edited. + * @return void + */ +function hybrid_meta_box_post_remove_seo( $post_type, $post ) { + + /* Removes post stylesheets support of the bbPress 'topic' post type. */ + if ( function_exists( 'bbp_get_topic_post_type' ) && bbp_get_topic_post_type() == $post_type ) + remove_meta_box( 'hybrid-core-post-seo', bbp_get_topic_post_type(), 'normal' ); + + /* Removes post stylesheets support of the bbPress 'reply' post type. */ + elseif ( function_exists( 'bbp_get_reply_post_type' ) && bbp_get_reply_post_type() == $post_type ) + remove_meta_box( 'hybrid-core-post-seo', bbp_get_reply_post_type(), 'normal' ); } /** * Displays the post SEO meta box. * * @since 1.2.0 + * @return void */ function hybrid_meta_box_post_display_seo( $object, $box ) { - $domain = hybrid_get_textdomain(); ?> - - <input type="hidden" name="hybrid-core-post-meta-box-seo" value="<?php echo wp_create_nonce( basename( __FILE__ ) ); ?>" /> - - <div class="hybrid-post-settings"> + wp_nonce_field( basename( __FILE__ ), 'hybrid-core-post-seo' ); ?> <p> - <label for="hybrid-document-title"><?php _e( 'Document Title:', $domain ); ?></label> + <label for="hybrid-document-title"><?php _e( 'Document Title:', 'hybrid-core' ); ?></label> <br /> <input type="text" name="hybrid-document-title" id="hybrid-document-title" value="<?php echo esc_attr( get_post_meta( $object->ID, 'Title', true ) ); ?>" size="30" tabindex="30" style="width: 99%;" /> </p> <p> - <label for="hybrid-meta-description"><?php _e( 'Meta Description:', $domain ); ?></label> + <label for="hybrid-meta-description"><?php _e( 'Meta Description:', 'hybrid-core' ); ?></label> <br /> <textarea name="hybrid-meta-description" id="hybrid-meta-description" cols="60" rows="2" tabindex="30" style="width: 99%;"><?php echo esc_textarea( get_post_meta( $object->ID, 'Description', true ) ); ?></textarea> </p> <p> - <label for="hybrid-meta-keywords"><?php _e( 'Meta Keywords:', $domain ); ?></label> + <label for="hybrid-meta-keywords"><?php _e( 'Meta Keywords:', 'hybrid-core' ); ?></label> <br /> <input type="text" name="hybrid-meta-keywords" id="hybrid-meta-keywords" value="<?php echo esc_attr( get_post_meta( $object->ID, 'Keywords', true ) ); ?>" size="30" tabindex="30" style="width: 99%;" /> </p> - - </div><!-- .form-table --><?php -} +<?php } /** * Saves the post SEO meta box settings as post metadata. @@ -76,20 +97,13 @@ function hybrid_meta_box_post_save_seo( $post_id, $post ) { $prefix = hybrid_get_prefix(); /* Verify the nonce before proceeding. */ - if ( !isset( $_POST['hybrid-core-post-meta-box-seo'] ) || !wp_verify_nonce( $_POST['hybrid-core-post-meta-box-seo'], basename( __FILE__ ) ) ) - return $post_id; - - /* Get the post type object. */ - $post_type = get_post_type_object( $post->post_type ); - - /* Check if the current user has permission to edit the post. */ - if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) + if ( !isset( $_POST['hybrid-core-post-seo'] ) || !wp_verify_nonce( $_POST['hybrid-core-post-seo'], basename( __FILE__ ) ) ) return $post_id; $meta = array( - 'Title' => strip_tags( $_POST['hybrid-document-title'] ), - 'Description' => strip_tags( $_POST['hybrid-meta-description'] ), - 'Keywords' => strip_tags( $_POST['hybrid-meta-keywords'] ) + 'Title' => $_POST['hybrid-document-title'], + 'Description' => $_POST['hybrid-meta-description'], + 'Keywords' => $_POST['hybrid-meta-keywords'] ); foreach ( $meta as $meta_key => $new_meta_value ) { @@ -97,17 +111,17 @@ function hybrid_meta_box_post_save_seo( $post_id, $post ) { /* Get the meta value of the custom field key. */ $meta_value = get_post_meta( $post_id, $meta_key, true ); + /* If there is no new meta value but an old value exists, delete it. */ + if ( current_user_can( 'delete_post_meta', $post_id, $meta_key ) && '' == $new_meta_value && $meta_value ) + delete_post_meta( $post_id, $meta_key, $meta_value ); + /* If a new meta value was added and there was no previous value, add it. */ - if ( $new_meta_value && '' == $meta_value ) + elseif ( current_user_can( 'add_post_meta', $post_id, $meta_key ) && $new_meta_value && '' == $meta_value ) add_post_meta( $post_id, $meta_key, $new_meta_value, true ); /* If the new meta value does not match the old value, update it. */ - elseif ( $new_meta_value && $new_meta_value != $meta_value ) + elseif ( current_user_can( 'edit_post_meta', $post_id, $meta_key ) && $new_meta_value && $new_meta_value != $meta_value ) update_post_meta( $post_id, $meta_key, $new_meta_value ); - - /* If there is no new meta value but an old value exists, delete it. */ - elseif ( '' == $new_meta_value && $meta_value ) - delete_post_meta( $post_id, $meta_key, $meta_value ); } } diff --git a/wp-content/themes/hybrid/library/admin/meta-box-post-template.php b/wp-content/themes/hybrid/library/admin/meta-box-post-template.php index bcdfdb64fbf9ea69cfb0e0a5cf3150460ebaacb1..bcbdbcfd638c0ea2c726148bfefe8a3f68cd9fc2 100644 --- a/wp-content/themes/hybrid/library/admin/meta-box-post-template.php +++ b/wp-content/themes/hybrid/library/admin/meta-box-post-template.php @@ -7,10 +7,15 @@ * * @package HybridCore * @subpackage Admin + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Add the post template meta box on the 'add_meta_boxes' hook. */ -add_action( 'add_meta_boxes', 'hybrid_meta_box_post_add_template' ); +add_action( 'add_meta_boxes', 'hybrid_meta_box_post_add_template', 10, 2 ); +add_action( 'add_meta_boxes', 'hybrid_meta_box_post_remove_template', 10, 2 ); /* Save the post template meta box data on the 'save_post' hook. */ add_action( 'save_post', 'hybrid_meta_box_post_save_template', 10, 2 ); @@ -20,39 +25,55 @@ add_action( 'save_post', 'hybrid_meta_box_post_save_template', 10, 2 ); * core already handles page templates. * * @since 1.2.0 + * @return void */ -function hybrid_meta_box_post_add_template() { +function hybrid_meta_box_post_add_template( $post_type, $post ) { - /* Get all available public post types. */ - $post_types = get_post_types( array( 'public' => true ), 'objects' ); + $post_type_object = get_post_type_object( $post_type ); - /* Loop through each post type, adding the meta box for each type's post editor screen. */ - foreach ( $post_types as $type ) { + /* Only add meta box if current user can edit, add, or delete meta for the post. */ + if ( ( true === $post_type_object->public ) && ( current_user_can( 'edit_post_meta', $post->ID ) || current_user_can( 'add_post_meta', $post->ID ) || current_user_can( 'delete_post_meta', $post->ID ) ) ) + add_meta_box( 'hybrid-core-post-template', __( 'Template', 'hybrid-core' ), 'hybrid_meta_box_post_display_template', $post_type, 'side', 'default' ); +} - /* Skip the 'page' post type because WordPress handles this by default. */ - if ( 'page' !== $type->name ) - add_meta_box( 'hybrid-core-post-template', sprintf( __( '%s Template', hybrid_get_textdomain() ), $type->labels->singular_name ), 'hybrid_meta_box_post_display_template', $type->name, 'side', 'default' ); - } +/** + * Remove the meta box from some post types. + * + * @since 1.3.0 + * @param string $post_type The post type of the current post being edited. + * @param object $post The current post being edited. + * @return void + */ +function hybrid_meta_box_post_remove_template( $post_type, $post ) { + + /* Removes meta box from pages since this is a built-in WordPress feature. */ + if ( 'page' == $post_type ) + remove_meta_box( 'hybrid-core-post-template', 'page', 'side' ); + + /* Removes meta box from the bbPress 'topic' post type. */ + elseif ( function_exists( 'bbp_get_topic_post_type' ) && bbp_get_topic_post_type() == $post_type ) + remove_meta_box( 'hybrid-core-post-template', bbp_get_topic_post_type(), 'side' ); + + /* Removes meta box from the bbPress 'reply' post type. */ + elseif ( function_exists( 'bbp_get_reply_post_type' ) && bbp_get_reply_post_type() == $post_type ) + remove_meta_box( 'hybrid-core-post-template', bbp_get_reply_post_type(), 'side' ); } /** * Displays the post template meta box. * * @since 1.2.0 + * @return void */ function hybrid_meta_box_post_display_template( $object, $box ) { /* Get the post type object. */ $post_type_object = get_post_type_object( $object->post_type ); - /* If the post type object returns a singular name or name. */ - if ( !empty( $post_type_object->labels->singular_name ) || !empty( $post_type_object->name ) ) { - - /* Get a list of available custom templates for the post type. */ - $templates = hybrid_get_post_templates( array( 'label' => array( "{$post_type_object->labels->singular_name} Template", "{$post_type_object->name} Template" ) ) ); - } ?> + /* Get a list of available custom templates for the post type. */ + $templates = hybrid_get_post_templates( $object->post_type ); - <input type="hidden" name="hybrid-core-post-meta-box-template" value="<?php echo wp_create_nonce( basename( __FILE__ ) ); ?>" /> + wp_nonce_field( basename( __FILE__ ), 'hybrid-core-post-meta-box-template' ); ?> <p> <?php if ( 0 != count( $templates ) ) { ?> @@ -63,7 +84,7 @@ function hybrid_meta_box_post_display_template( $object, $box ) { <?php } ?> </select> <?php } else { ?> - <?php _e( 'No templates exist for this post type.', hybrid_get_textdomain() ); ?> + <?php _e( 'No templates exist for this post type.', 'hybrid-core' ); ?> <?php } ?> </p> <?php @@ -75,6 +96,7 @@ function hybrid_meta_box_post_display_template( $object, $box ) { * @since 1.2.0 * @param int $post_id The ID of the current post being saved. * @param int $post The post object currently being saved. + * @return void|int */ function hybrid_meta_box_post_save_template( $post_id, $post ) { @@ -82,18 +104,12 @@ function hybrid_meta_box_post_save_template( $post_id, $post ) { if ( !isset( $_POST['hybrid-core-post-meta-box-template'] ) || !wp_verify_nonce( $_POST['hybrid-core-post-meta-box-template'], basename( __FILE__ ) ) ) return $post_id; - /* Get the post type object. */ - $post_type = get_post_type_object( $post->post_type ); - - /* Check if the current user has permission to edit the post. */ - if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) - return $post_id; - - /* Get the posted meta value. */ + /* Return here if the template is not set. There's a chance it won't be if the post type doesn't have any templates. */ if ( !isset( $_POST['hybrid-post-template'] ) ) return $post_id; - $new_meta_value = strip_tags( $_POST['hybrid-post-template'] ); + /* Get the posted meta value. */ + $new_meta_value = $_POST['hybrid-post-template']; /* Set the $meta_key variable based off the post type name. */ $meta_key = "_wp_{$post->post_type}_template"; @@ -101,17 +117,17 @@ function hybrid_meta_box_post_save_template( $post_id, $post ) { /* Get the meta value of the meta key. */ $meta_value = get_post_meta( $post_id, $meta_key, true ); + /* If there is no new meta value but an old value exists, delete it. */ + if ( current_user_can( 'delete_post_meta', $post_id ) && '' == $new_meta_value && $meta_value ) + delete_post_meta( $post_id, $meta_key, $meta_value ); + /* If a new meta value was added and there was no previous value, add it. */ - if ( $new_meta_value && '' == $meta_value ) + elseif ( current_user_can( 'add_post_meta', $post_id, $meta_key ) && $new_meta_value && '' == $meta_value ) add_post_meta( $post_id, $meta_key, $new_meta_value, true ); /* If the new meta value does not match the old value, update it. */ - elseif ( $new_meta_value && $new_meta_value != $meta_value ) + elseif ( current_user_can( 'edit_post_meta', $post_id ) && $new_meta_value && $new_meta_value != $meta_value ) update_post_meta( $post_id, $meta_key, $new_meta_value ); - - /* If there is no new meta value but an old value exists, delete it. */ - elseif ( '' == $new_meta_value && $meta_value ) - delete_post_meta( $post_id, $meta_key, $meta_value ); } ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/admin/meta-box-theme-about.php b/wp-content/themes/hybrid/library/admin/meta-box-theme-about.php index 90cd0a057ad2bfe7cb6d6a1e2cd222da82d07b4e..43d4eec478b789e1f687355a7ba62dcc0b18783f 100644 --- a/wp-content/themes/hybrid/library/admin/meta-box-theme-about.php +++ b/wp-content/themes/hybrid/library/admin/meta-box-theme-about.php @@ -1,11 +1,15 @@ <?php /** - * Creates a meta box for the theme settings page, which displays information about the theme. If a child theme - * is in use, an additional meta box will be added with its information. To use this feature, the theme must - * support the 'about' argument for 'hybrid-core-theme-settings' feature. + * Creates a meta box for the theme settings page, which displays information about the theme. If a child + * theme is in use, an additional meta box will be added with its information. To use this feature, the theme + * must support the 'about' argument for 'hybrid-core-theme-settings' feature. * * @package HybridCore * @subpackage Admin + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Create the about theme meta box on the 'add_meta_boxes' hook. */ @@ -15,21 +19,21 @@ add_action( 'add_meta_boxes', 'hybrid_meta_box_theme_add_about' ); * Adds the core about theme meta box to the theme settings page. * * @since 1.2.0 + * @return void */ function hybrid_meta_box_theme_add_about() { /* Get theme information. */ $prefix = hybrid_get_prefix(); - $domain = hybrid_get_textdomain(); - $theme_data = hybrid_get_theme_data(); + $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); /* Adds the About box for the parent theme. */ - add_meta_box( 'hybrid-core-about-theme', sprintf( __( 'About %1$s', $domain ), $theme_data['Title'] ), 'hybrid_meta_box_theme_display_about', hybrid_get_settings_page_name(), 'side', 'high' ); + add_meta_box( 'hybrid-core-about-theme', sprintf( __( 'About %s', 'hybrid-core' ), $theme->get( 'Name' ) ), 'hybrid_meta_box_theme_display_about', hybrid_get_settings_page_name(), 'side', 'high' ); /* If the user is using a child theme, add an About box for it. */ if ( is_child_theme() ) { - $child_data = hybrid_get_theme_data( 'stylesheet' ); - add_meta_box( 'hybrid-core-about-child', sprintf( __( 'About %1$s', $domain ), $child_data['Title'] ), 'hybrid_meta_box_theme_display_about', hybrid_get_settings_page_name(), 'side', 'high' ); + $child = wp_get_theme( get_stylesheet(), get_theme_root( get_stylesheet_directory() ) ); + add_meta_box( 'hybrid-core-about-child', sprintf( __( 'About %s', 'hybrid-core' ), $child->get( 'Name' ) ), 'hybrid_meta_box_theme_display_about', hybrid_get_settings_page_name(), 'side', 'high' ); } } @@ -39,54 +43,49 @@ function hybrid_meta_box_theme_add_about() { * will be called a second time. * * @since 1.2.0 - * @param $object Variable passed through the do_meta_boxes() call. + * @param object $object Variable passed through the do_meta_boxes() call. * @param array $box Specific information about the meta box being loaded. + * @return void */ function hybrid_meta_box_theme_display_about( $object, $box ) { /* Get theme information. */ $prefix = hybrid_get_prefix(); - $domain = hybrid_get_textdomain(); - /* Grab theme information for the parent theme. */ - if ( 'hybrid-core-about-theme' == $box['id'] ) - $theme_data = hybrid_get_theme_data(); - - /* Grab theme information for the child theme. */ - elseif ( 'hybrid-core-about-child' == $box['id'] ) - $theme_data = hybrid_get_theme_data( 'stylesheet' ); ?> + /* Grab theme information for the parent/child theme. */ + $theme = ( 'hybrid-core-about-child' == $box['id'] ) ? wp_get_theme( get_stylesheet(), get_theme_root( get_stylesheet_directory() ) ) : wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); ?> <table class="form-table"> <tr> <th> - <?php _e( 'Theme:', $domain ); ?> + <?php _e( 'Theme:', 'hybrid-core' ); ?> </th> <td> - <a href="<?php echo $theme_data['URI']; ?>" title="<?php echo $theme_data['Title']; ?>"><?php echo $theme_data['Title']; ?></a> + <a href="<?php echo esc_url( $theme->get( 'ThemeURI' ) ); ?>" title="<?php echo esc_attr( $theme->get( 'Name' ) ); ?>"><?php echo $theme->get( 'Name' ); ?></a> </td> </tr> <tr> <th> - <?php _e( 'Version:', $domain ); ?> + <?php _e( 'Version:', 'hybrid-core' ); ?> </th> <td> - <?php echo $theme_data['Version']; ?> + <?php echo $theme->get( 'Version' ); ?> </td> </tr> <tr> <th> - <?php _e( 'Author:', $domain ); ?> + <?php _e( 'Author:', 'hybrid-core' ); ?> </th> <td> - <?php echo $theme_data['Author']; ?> + <a href="<?php echo esc_url( $theme->get( 'AuthorURI' ) ); ?>" title="<?php echo esc_attr( $theme->get( 'Author' ) ); ?>"><?php echo $theme->get( 'Author' ); ?></a> </td> </tr> <tr> <th> - <?php _e( 'Description:', $domain ); ?> + <?php _e( 'Description:', 'hybrid-core' ); ?> </th> <td> - <?php echo $theme_data['Description']; ?> + <?php echo $theme->get( 'Description' ); ?> </td> </tr> </table><!-- .form-table --><?php diff --git a/wp-content/themes/hybrid/library/admin/meta-box-theme-footer.php b/wp-content/themes/hybrid/library/admin/meta-box-theme-footer.php index 2dbb1a560de5d32feb948775c4309aa3bd74d5ff..7a838514d4e780c710ecabb148d2889a4cfb4bca 100644 --- a/wp-content/themes/hybrid/library/admin/meta-box-theme-footer.php +++ b/wp-content/themes/hybrid/library/admin/meta-box-theme-footer.php @@ -6,6 +6,10 @@ * * @package HybridCore * @subpackage Admin + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Create the footer meta box on the 'add_meta_boxes' hook. */ @@ -18,35 +22,37 @@ add_filter( 'sanitize_option_' . hybrid_get_prefix() . '_theme_settings', 'hybri * Adds the core theme footer meta box to the theme settings page in the admin. * * @since 1.2.0 + * @return void */ function hybrid_meta_box_theme_add_footer() { - add_meta_box( 'hybrid-core-meta-box-footer', __( 'Footer settings', hybrid_get_textdomain() ), 'hybrid_meta_box_theme_display_footer', hybrid_get_settings_page_name(), 'normal', 'high' ); + add_meta_box( 'hybrid-core-footer', __( 'Footer settings', 'hybrid-core' ), 'hybrid_meta_box_theme_display_footer', hybrid_get_settings_page_name(), 'normal', 'high' ); } /** - * Creates a settings box that allows users to customize their footer. A basic textarea is given that - * allows HTML and shortcodes to be input. + * Creates a meta box that allows users to customize their footer. * * @since 1.2.0 + * @uses wp_editor() Creates an instance of the WordPress text/content editor. + * @return void */ function hybrid_meta_box_theme_display_footer() { - $domain = hybrid_get_textdomain(); ?> - <p> - <span class="description"><?php _e( 'You can add custom <acronym title="Hypertext Markup Language">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme.', $domain ); ?></span> - </p> + /* Add a textarea using the wp_editor() function to make it easier on users to add custom content. */ + wp_editor( + esc_textarea( hybrid_get_setting( 'footer_insert' ) ), // Editor content. + hybrid_settings_field_id( 'footer_insert' ), // Editor ID. + array( + 'tinymce' => false, // Don't use TinyMCE in a meta box. + 'textarea_name' => hybrid_settings_field_name( 'footer_insert' ) + ) + ); ?> <p> - <textarea id="<?php echo hybrid_settings_field_id( 'footer_insert' ); ?>" name="<?php echo hybrid_settings_field_name( 'footer_insert' ); ?>" cols="60" rows="5"><?php echo esc_textarea( hybrid_get_setting( 'footer_insert' ) ); ?></textarea> + <span class="description"><?php _e( 'You can add custom <acronym title="Hypertext Markup Language">HTML</acronym> and/or shortcodes, which will be automatically inserted into your theme.', 'hybrid-core' ); ?></span> </p> - <?php if ( current_theme_supports( 'hybrid-core-shortcodes' ) ) { ?> - <p> - <?php printf( __( 'Shortcodes: %s', $domain ), '<code>[the-year]</code>, <code>[site-link]</code>, <code>[wp-link]</code>, <code>[theme-link]</code>, <code>[child-link]</code>, <code>[loginout-link]</code>, <code>[query-counter]</code>' ); ?> - </p> - <?php } -} +<?php } /** * Saves the footer meta box settings by filtering the "sanitize_option_{$prefix}_theme_settings" hook. diff --git a/wp-content/themes/hybrid/library/admin/theme-settings.php b/wp-content/themes/hybrid/library/admin/theme-settings.php index 27fd878087bb38268c71ee89a93c24a8a792bc35..1c7da90268b25124e9954557deca62ccbade8ff7 100644 --- a/wp-content/themes/hybrid/library/admin/theme-settings.php +++ b/wp-content/themes/hybrid/library/admin/theme-settings.php @@ -11,6 +11,10 @@ * * @package HybridCore * @subpackage Admin + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Hook the settings page function to 'admin_menu'. */ @@ -22,14 +26,14 @@ add_action( 'admin_menu', 'hybrid_settings_page_init' ); * * @since 0.7.0 * @global string $hybrid The global theme object. + * @return void */ function hybrid_settings_page_init() { global $hybrid; /* Get theme information. */ - $theme = hybrid_get_theme_data(); + $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); $prefix = hybrid_get_prefix(); - $domain = hybrid_get_textdomain(); /* Register theme settings. */ register_setting( @@ -40,8 +44,8 @@ function hybrid_settings_page_init() { /* Create the theme settings page. */ $hybrid->settings_page = add_theme_page( - sprintf( esc_html__( '%1$s Theme Settings', $domain ), $theme['Name'] ), // Settings page name. - esc_html__( 'Theme Settings', $domain ), // Menu item name. + sprintf( esc_html__( '%s Theme Settings', 'hybrid-core' ), $theme->get( 'Name' ) ), // Settings page name. + esc_html__( 'Theme Settings', 'hybrid-core' ), // Menu item name. hybrid_settings_page_capability(), // Required capability. 'theme-settings', // Screen name. 'hybrid_settings_page' // Callback function. @@ -53,8 +57,8 @@ function hybrid_settings_page_init() { /* Filter the settings page capability so that it recognizes the 'edit_theme_options' cap. */ add_filter( "option_page_capability_{$prefix}_theme_settings", 'hybrid_settings_page_capability' ); - /* Add contextual help to the theme settings page. */ - add_contextual_help( $hybrid->settings_page, hybrid_settings_page_contextual_help() ); + /* Add help tabs to the theme settings page. */ + add_action( "load-{$hybrid->settings_page}", 'hybrid_settings_page_help' ); /* Load the theme settings meta boxes. */ add_action( "load-{$hybrid->settings_page}", 'hybrid_load_settings_page_meta_boxes' ); @@ -65,7 +69,7 @@ function hybrid_settings_page_init() { /* Load the JavaScript and stylesheets needed for the theme settings screen. */ add_action( 'admin_enqueue_scripts', 'hybrid_settings_page_enqueue_scripts' ); add_action( 'admin_enqueue_scripts', 'hybrid_settings_page_enqueue_styles' ); - add_action( "admin_head-{$hybrid->settings_page}", 'hybrid_settings_page_load_scripts' ); + add_action( "admin_footer-{$hybrid->settings_page}", 'hybrid_settings_page_load_scripts' ); } } @@ -73,6 +77,7 @@ function hybrid_settings_page_init() { * Returns the required capability for viewing and saving theme settings. * * @since 1.2.0 + * @return string */ function hybrid_settings_page_capability() { return apply_filters( hybrid_get_prefix() . '_settings_capability', 'edit_theme_options' ); @@ -82,6 +87,7 @@ function hybrid_settings_page_capability() { * Returns the theme settings page name/hook as a string. * * @since 1.2.0 + * @return string */ function hybrid_get_settings_page_name() { global $hybrid; @@ -96,10 +102,11 @@ function hybrid_get_settings_page_name() { * page in the admin. This way, they're not needlessly loading extra files. * * @since 1.2.0 + * @return void */ function hybrid_settings_page_add_meta_boxes() { - do_action( 'add_meta_boxes', hybrid_get_settings_page_name(), hybrid_get_theme_data() ); + do_action( 'add_meta_boxes', hybrid_get_settings_page_name() ); } /** @@ -107,6 +114,7 @@ function hybrid_settings_page_add_meta_boxes() { * merely loaded with this function. Meta boxes are only loaded if the feature is supported by the theme. * * @since 1.2.0 + * @return void */ function hybrid_load_settings_page_meta_boxes() { @@ -146,24 +154,28 @@ function hybrid_save_theme_settings( $settings ) { * meta boxes to be added to the page. * * @since 0.7.0 - * @global string $hybrid The global theme object. + * @return void */ function hybrid_settings_page() { /* Get the theme information. */ $prefix = hybrid_get_prefix(); - $domain = hybrid_get_textdomain(); - $theme_data = hybrid_get_theme_data(); ?> + $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); + + do_action( "{$prefix}_before_settings_page" ); ?> <div class="wrap"> <?php screen_icon(); ?> + <h2> + <?php printf( __( '%s Theme Settings', 'hybrid-core' ), $theme->get( 'Name' ) ); ?> + <a href="<?php echo admin_url( 'customize.php' ); ?>" class="add-new-h2"><?php esc_html_e( 'Customize', 'hybrid-core' ); ?></a> + </h2> + <?php settings_errors(); ?> - <h2><?php printf( __( '%1$s Theme Settings', $domain ), $theme_data['Name'] ); ?></h2> - - <?php if ( isset( $_GET['settings-updated'] ) && 'true' == esc_attr( $_GET['settings-updated'] ) ) echo '<div class="updated"><p><strong>' . __( 'Settings saved.', $domain ) . '</strong></p></div>'; ?> + <?php do_action( "{$prefix}_open_settings_page" ); ?> - <div id="poststuff"> + <div class="hybrid-core-settings-wrap"> <form method="post" action="options.php"> @@ -172,18 +184,28 @@ function hybrid_settings_page() { <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> <div class="metabox-holder"> - <div class="post-box-container column-1 normal"><?php do_meta_boxes( hybrid_get_settings_page_name(), 'normal', null ); ?></div> - <div class="post-box-container column-2 side"><?php do_meta_boxes( hybrid_get_settings_page_name(), 'side', null ); ?></div> - <div class="post-box-container column-3 advanced"><?php do_meta_boxes( hybrid_get_settings_page_name(), 'advanced', null ); ?></div> + <div class="post-box-container column-1 normal"> + <?php do_meta_boxes( hybrid_get_settings_page_name(), 'normal', null ); ?> + </div> + <div class="post-box-container column-2 side"> + <?php do_meta_boxes( hybrid_get_settings_page_name(), 'side', null ); ?> + </div> + <div class="post-box-container column-3 advanced"> + <?php do_meta_boxes( hybrid_get_settings_page_name(), 'advanced', null ); ?> + </div> </div> - <?php submit_button( esc_attr__( 'Update Settings', $domain ) ); ?> + <?php submit_button( esc_attr__( 'Update Settings', 'hybrid-core' ) ); ?> </form> - </div><!-- #poststuff --> + </div><!-- .hybrid-core-settings-wrap --> + + <?php do_action( "{$prefix}_close_settings_page" ); ?> </div><!-- .wrap --><?php + + do_action( "{$prefix}_after_settings_page" ); } /** @@ -191,6 +213,7 @@ function hybrid_settings_page() { * with the WordPress settings API. * * @since 1.0.0 + * @return string */ function hybrid_settings_field_id( $setting ) { return hybrid_get_prefix() . '_theme_settings-' . sanitize_html_class( $setting ); @@ -201,52 +224,59 @@ function hybrid_settings_field_id( $setting ) { * use with the WordPress settings API. * * @since 1.0.0 + * @return string */ function hybrid_settings_field_name( $setting ) { return hybrid_get_prefix() . "_theme_settings[{$setting}]"; } /** - * Returns text for the contextual help tab on the theme settings page in the admin. Theme authors can add - * a filter to the 'contextual_help' hook if they want to change the output of the help text. + * Adds a help tab to the theme settings screen if the theme has provided a 'Documentation URI' and/or + * 'Support URI'. Theme developers can add custom help tabs using get_current_screen()->add_help_tab(). * - * @since 1.2.0 - * @return string $help The contextual help text used on the theme settings page. + * @since 1.3.0 + * @return void */ -function hybrid_settings_page_contextual_help() { - - /* Set the $help variable to an empty string. */ - $help = ''; +function hybrid_settings_page_help() { /* Get the parent theme data. */ - $theme = hybrid_get_theme_data(); + $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); + $doc_uri = $theme->get( 'Documentation URI' ); + $support_uri = $theme->get( 'Support URI' ); /* If the theme has provided a documentation or support URI, add them to the help text. */ - if ( !empty( $theme['Documentation URI'] ) || !empty( $theme['Support URI'] ) ) { + if ( !empty( $doc_uri ) || !empty( $support_uri ) ) { /* Open an unordered list for the help text. */ $help = '<ul>'; /* Add the Documentation URI. */ - if ( !empty( $theme['Documentation URI'] ) ) - $help .= '<li><a href="' . esc_url( $theme['Documentation URI'] ) . '">' . __( 'Documentation', hybrid_get_textdomain() ) . '</a></li>'; + if ( !empty( $doc_uri ) ) + $help .= '<li><a href="' . esc_url( $doc_uri ) . '">' . __( 'Documentation', 'hybrid-core' ) . '</a></li>'; /* Add the Support URI. */ - if ( !empty( $theme['Support URI'] ) ) - $help .= '<li><a href="' . esc_url( $theme['Support URI'] ) . '">' . __( 'Support', hybrid_get_textdomain() ) . '</a></li>'; + if ( !empty( $support_uri ) ) + $help .= '<li><a href="' . esc_url( $support_uri ) . '">' . __( 'Support', 'hybrid-core' ) . '</a></li>'; /* Close the unordered list for the help text. */ $help .= '</ul>'; - } - /* Return the contextual help text for this screen. */ - return $help; + /* Add a help tab with links for documentation and support. */ + get_current_screen()->add_help_tab( + array( + 'id' => 'default', + 'title' => esc_attr( $theme->get( 'Name' ) ), + 'content' => $help + ) + ); + } } /** * Loads the required stylesheets for displaying the theme settings page in the WordPress admin. * * @since 1.2.0 + * @return void */ function hybrid_settings_page_enqueue_styles( $hook_suffix ) { @@ -261,20 +291,19 @@ function hybrid_settings_page_enqueue_styles( $hook_suffix ) { * * @since 1.2.0 * @param string $hook_suffix The current page being viewed. + * @return void */ function hybrid_settings_page_enqueue_scripts( $hook_suffix ) { - if ( $hook_suffix == hybrid_get_settings_page_name() ) { - wp_enqueue_script( 'common' ); - wp_enqueue_script( 'wp-lists' ); + if ( $hook_suffix == hybrid_get_settings_page_name() ) wp_enqueue_script( 'postbox' ); - } } /** * Loads the JavaScript required for toggling the meta boxes on the theme settings page. * * @since 0.7.0 + * @return void */ function hybrid_settings_page_load_scripts() { ?> <script type="text/javascript"> diff --git a/wp-content/themes/hybrid/library/classes/customize-control-textarea.php b/wp-content/themes/hybrid/library/classes/customize-control-textarea.php new file mode 100644 index 0000000000000000000000000000000000000000..5994a500fa9bef0661439bb13df2baa748a6a2b5 --- /dev/null +++ b/wp-content/themes/hybrid/library/classes/customize-control-textarea.php @@ -0,0 +1,43 @@ +<?php +/** + * The textarea customize control extends the WP_Customize_Control class. This class allows + * developers to create textarea settings within the WordPress theme customizer. + * + * @package Hybrid + * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + */ + +/** + * Textarea customize control class. + * + * @since 1.4.0 + */ +class Hybrid_Customize_Control_Textarea extends WP_Customize_Control { + + /** + * The type of customize control being rendered. + * + * @since 1.4.0 + */ + public $type = 'textarea'; + + /** + * Displays the textarea on the customize screen. + * + * @since 1.4.0 + */ + public function render_content() { ?> + <label> + <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> + <div class="customize-control-content"> + <textarea class="widefat" cols="45" rows="5" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea> + </div> + </label> + <?php } +} + +?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/classes/widget-archives.php b/wp-content/themes/hybrid/library/classes/widget-archives.php index 57369b531c4981624144dc77558f9640161a49bc..4c59866d373581ef1e28af983c5266722cdc1f38 100644 --- a/wp-content/themes/hybrid/library/classes/widget-archives.php +++ b/wp-content/themes/hybrid/library/classes/widget-archives.php @@ -6,36 +6,30 @@ * * @package Hybrid * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Archives widget class. * * @since 0.6.0 - * @link http://codex.wordpress.org/Template_Tags/wp_get_archives - * @link http://themehybrid.com/themes/hybrid/widgets */ class Hybrid_Widget_Archives extends WP_Widget { - /** - * Textdomain for the widget. - * @since 0.7.0 - */ - var $textdomain; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'archives', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your archives.', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your archives.', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -47,7 +41,7 @@ class Hybrid_Widget_Archives extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-archives', // $this->id_base - __( 'Archives', $this->textdomain ), // $this->name + __( 'Archives', 'hybrid-core' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); @@ -55,21 +49,17 @@ class Hybrid_Widget_Archives extends WP_Widget { /** * Outputs the widget based on the arguments input through the widget controls. + * * @since 0.6.0 */ - function widget( $args, $instance ) { - extract( $args ); - - /* Set up the arguments for wp_get_archives(). */ - $args = array( - 'type' => $instance['type'], - 'format' => $instance['format'], - 'before' => $instance['before'], - 'after' => $instance['after'], - 'show_post_count' => !empty( $instance['show_post_count'] ) ? true : false, - 'limit' => !empty( $instance['limit'] ) ? intval( $instance['limit'] ) : '', - 'echo' => false - ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); + + /* Set the $args for wp_get_archives() to the $instance array. */ + $args = $instance; + + /* Overwrite the $echo argument and set it to false. */ + $args['echo'] = false; /* Output the theme's $before_widget wrapper. */ echo $before_widget; @@ -86,19 +76,19 @@ class Hybrid_Widget_Archives extends WP_Widget { /* Create a title for the drop-down based on the archive type. */ if ( 'yearly' == $args['type'] ) - $option_title = esc_html__( 'Select Year', $this->textdomain ); + $option_title = esc_html__( 'Select Year', 'hybrid-core' ); elseif ( 'monthly' == $args['type'] ) - $option_title = esc_html__( 'Select Month', $this->textdomain ); + $option_title = esc_html__( 'Select Month', 'hybrid-core' ); elseif ( 'weekly' == $args['type'] ) - $option_title = esc_html__( 'Select Week', $this->textdomain ); + $option_title = esc_html__( 'Select Week', 'hybrid-core' ); elseif ( 'daily' == $args['type'] ) - $option_title = esc_html__( 'Select Day', $this->textdomain ); + $option_title = esc_html__( 'Select Day', 'hybrid-core' ); elseif ( 'postbypost' == $args['type'] || 'alpha' == $args['type'] ) - $option_title = esc_html__( 'Select Post', $this->textdomain ); + $option_title = esc_html__( 'Select Post', 'hybrid-core' ); /* Output the <select> element and each <option>. */ echo '<p><select name="archive-dropdown" onchange=\'document.location.href=this.options[this.selectedIndex].value;\'>'; @@ -123,10 +113,10 @@ class Hybrid_Widget_Archives extends WP_Widget { /** * Updates the widget control options for the particular instance of the widget. + * * @since 0.6.0 */ function update( $new_instance, $old_instance ) { - $instance = $old_instance; $instance = $new_instance; @@ -141,13 +131,14 @@ class Hybrid_Widget_Archives extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. + * * @since 0.6.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title' => esc_attr__( 'Archives', $this->textdomain ), + 'title' => esc_attr__( 'Archives', 'hybrid-core' ), 'limit' => 10, 'type' => 'monthly', 'format' => 'html', @@ -160,15 +151,15 @@ class Hybrid_Widget_Archives extends WP_Widget { $instance = wp_parse_args( (array) $instance, $defaults ); /* Create an array of archive types. */ - $type = array( 'alpha' => esc_attr__( 'Alphabetical', $this->textdomain ), 'daily' => esc_attr__( 'Daily', $this->textdomain ), 'monthly' => esc_attr__( 'Monthly', $this->textdomain ),'postbypost' => esc_attr__( 'Post By Post', $this->textdomain ), 'weekly' => esc_attr__( 'Weekly', $this->textdomain ), 'yearly' => esc_attr__( 'Yearly', $this->textdomain ) ); + $type = array( 'alpha' => esc_attr__( 'Alphabetical', 'hybrid-core' ), 'daily' => esc_attr__( 'Daily', 'hybrid-core' ), 'monthly' => esc_attr__( 'Monthly', 'hybrid-core' ),'postbypost' => esc_attr__( 'Post By Post', 'hybrid-core' ), 'weekly' => esc_attr__( 'Weekly', 'hybrid-core' ), 'yearly' => esc_attr__( 'Yearly', 'hybrid-core' ) ); /* Create an array of archive formats. */ - $format = array( 'custom' => esc_attr__( 'Custom', $this->textdomain ), 'html' => esc_attr__( 'HTML', $this->textdomain ), 'option' => esc_attr__( 'Option', $this->textdomain ) ); + $format = array( 'custom' => esc_attr__( 'Custom', 'hybrid-core' ), 'html' => esc_attr__( 'HTML', 'hybrid-core' ), 'option' => esc_attr__( 'Option', 'hybrid-core' ) ); ?> <div class="hybrid-widget-controls columns-2"> <p> - <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p> @@ -204,7 +195,7 @@ class Hybrid_Widget_Archives extends WP_Widget { </p> <p> <label for="<?php echo $this->get_field_id( 'show_post_count' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_post_count'], true ); ?> id="<?php echo $this->get_field_id( 'show_post_count' ); ?>" name="<?php echo $this->get_field_name( 'show_post_count' ); ?>" /> <?php _e( 'Show post count?', $this->textdomain ); ?> <code>show_post_count</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_post_count'], true ); ?> id="<?php echo $this->get_field_id( 'show_post_count' ); ?>" name="<?php echo $this->get_field_name( 'show_post_count' ); ?>" /> <?php _e( 'Show post count?', 'hybrid-core' ); ?> <code>show_post_count</code></label> </p> </div> <div style="clear:both;"> </div> diff --git a/wp-content/themes/hybrid/library/classes/widget-authors.php b/wp-content/themes/hybrid/library/classes/widget-authors.php index 2f938c0f4f041cf387745db053840af19f4c97fe..4929e290e988b6148962a51c49a0355f66998f6a 100644 --- a/wp-content/themes/hybrid/library/classes/widget-authors.php +++ b/wp-content/themes/hybrid/library/classes/widget-authors.php @@ -6,45 +6,30 @@ * * @package Hybrid * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Authors Widget Class * * @since 0.6.0 - * @link http://codex.wordpress.org/Template_Tags/wp_list_authors - * @link http://themehybrid.com/themes/hybrid/widgets */ class Hybrid_Widget_Authors extends WP_Widget { - /** - * Prefix for the widget. - * @since 0.7.0 - */ - var $prefix; - - /** - * Textdomain for the widget. - * @since 0.7.0 - */ - var $textdomain; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget prefix. */ - $this->prefix = hybrid_get_prefix(); - - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'authors', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your author lists.', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your author lists.', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -56,7 +41,7 @@ class Hybrid_Widget_Authors extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-authors', // $this->id_base - __( 'Authors', $this->textdomain ), // $this->name + __( 'Authors', 'hybrid-core' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); @@ -64,26 +49,17 @@ class Hybrid_Widget_Authors extends WP_Widget { /** * Outputs the widget based on the arguments input through the widget controls. + * * @since 0.6.0 */ - function widget( $args, $instance ) { - extract( $args, EXTR_SKIP ); - - /* Set up the arguments for wp_list_authors(). */ - $args = array( - 'order' => $instance['order'], - 'orderby' => $instance['orderby'], - 'number' => !empty( $instance['number'] ) ? intval( $instance['number'] ) : '', - 'style' => $instance['style'], - 'feed' => $instance['feed'], - 'feed_image' => $instance['feed_image'], - 'optioncount' => !empty( $instance['optioncount'] ) ? true : false, - 'exclude_admin' => !empty( $instance['exclude_admin'] ) ? true : false, - 'show_fullname' => !empty( $instance['show_fullname'] ) ? true : false, - 'hide_empty' => !empty( $instance['hide_empty'] ) ? true : false, - 'html' => !empty( $instance['html'] ) ? true : false, - 'echo' => false - ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); + + /* Set the $args for wp_list_authors() to the $instance array. */ + $args = $instance; + + /* Overwrite the $echo argument and set it to false. */ + $args['echo'] = false; /* Output the theme's $before_widget wrapper. */ echo $before_widget; @@ -108,6 +84,7 @@ class Hybrid_Widget_Authors extends WP_Widget { /** * Updates the widget control options for the particular instance of the widget. + * * @since 0.6.0 */ function update( $new_instance, $old_instance ) { @@ -132,13 +109,14 @@ class Hybrid_Widget_Authors extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. + * * @since 0.6.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title' => esc_attr__( 'Authors', $this->textdomain ), + 'title' => esc_attr__( 'Authors', 'hybrid-core' ), 'order' => 'ASC', 'orderby' => 'display_name', 'number' => '', @@ -155,14 +133,14 @@ class Hybrid_Widget_Authors extends WP_Widget { /* Merge the user-selected arguments with the defaults. */ $instance = wp_parse_args( (array) $instance, $defaults ); - $order = array( 'ASC' => esc_attr__( 'Ascending', $this->textdomain ), 'DESC' => esc_attr__( 'Descending', $this->textdomain ) ); - $orderby = array( 'display_name' => esc_attr__( 'Display Name', $this->textdomain ), 'email' => esc_attr__( 'Email', $this->textdomain ), 'ID' => esc_attr__( 'ID', $this->textdomain ), 'nicename' => esc_attr__( 'Nice Name', $this->textdomain ), 'post_count' => esc_attr__( 'Post Count', $this->textdomain ), 'registered' => esc_attr__( 'Registered', $this->textdomain ), 'url' => esc_attr__( 'URL', $this->textdomain ), 'user_login' => esc_attr__( 'Login', $this->textdomain ) ); + $order = array( 'ASC' => esc_attr__( 'Ascending', 'hybrid-core' ), 'DESC' => esc_attr__( 'Descending', 'hybrid-core' ) ); + $orderby = array( 'display_name' => esc_attr__( 'Display Name', 'hybrid-core' ), 'email' => esc_attr__( 'Email', 'hybrid-core' ), 'ID' => esc_attr__( 'ID', 'hybrid-core' ), 'nicename' => esc_attr__( 'Nice Name', 'hybrid-core' ), 'post_count' => esc_attr__( 'Post Count', 'hybrid-core' ), 'registered' => esc_attr__( 'Registered', 'hybrid-core' ), 'url' => esc_attr__( 'URL', 'hybrid-core' ), 'user_login' => esc_attr__( 'Login', 'hybrid-core' ) ); ?> <div class="hybrid-widget-controls columns-2"> <p> - <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p> @@ -188,7 +166,7 @@ class Hybrid_Widget_Authors extends WP_Widget { <p> <label for="<?php echo $this->get_field_id( 'style' ); ?>"><code>style</code></label> <select class="widefat" id="<?php echo $this->get_field_id( 'style' ); ?>" name="<?php echo $this->get_field_name( 'style' ); ?>"> - <?php foreach ( array( 'list' => esc_attr__( 'List', $this->textdomain), 'none' => esc_attr__( 'None', $this->textdomain ) ) as $option_value => $option_label ) { ?> + <?php foreach ( array( 'list' => esc_attr__( 'List', 'hybrid-core'), 'none' => esc_attr__( 'None', 'hybrid-core' ) ) as $option_value => $option_label ) { ?> <option value="<?php echo esc_attr( $option_value ); ?>" <?php selected( $instance['style'], $option_value ); ?>><?php echo esc_html( $option_label ); ?></option> <?php } ?> </select> @@ -206,23 +184,23 @@ class Hybrid_Widget_Authors extends WP_Widget { </p> <p> <label for="<?php echo $this->get_field_id( 'html' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['html'], true ); ?> id="<?php echo $this->get_field_id( 'html' ); ?>" name="<?php echo $this->get_field_name( 'html' ); ?>" /> <?php _e( '<acronym title="Hypertext Markup Language">HTML</acronym>?', $this->textdomain ); ?> <code>html</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['html'], true ); ?> id="<?php echo $this->get_field_id( 'html' ); ?>" name="<?php echo $this->get_field_name( 'html' ); ?>" /> <?php _e( '<acronym title="Hypertext Markup Language">HTML</acronym>?', 'hybrid-core' ); ?> <code>html</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'optioncount' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['optioncount'], true ); ?> id="<?php echo $this->get_field_id( 'optioncount' ); ?>" name="<?php echo $this->get_field_name( 'optioncount' ); ?>" /> <?php _e( 'Show post count?', $this->textdomain ); ?> <code>optioncount</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['optioncount'], true ); ?> id="<?php echo $this->get_field_id( 'optioncount' ); ?>" name="<?php echo $this->get_field_name( 'optioncount' ); ?>" /> <?php _e( 'Show post count?', 'hybrid-core' ); ?> <code>optioncount</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'exclude_admin' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['exclude_admin'], true ); ?> id="<?php echo $this->get_field_id( 'exclude_admin' ); ?>" name="<?php echo $this->get_field_name( 'exclude_admin' ); ?>" /> <?php _e( 'Exclude admin?', $this->textdomain ); ?> <code>exclude_admin</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['exclude_admin'], true ); ?> id="<?php echo $this->get_field_id( 'exclude_admin' ); ?>" name="<?php echo $this->get_field_name( 'exclude_admin' ); ?>" /> <?php _e( 'Exclude admin?', 'hybrid-core' ); ?> <code>exclude_admin</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'show_fullname' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_fullname'], true ); ?> id="<?php echo $this->get_field_id( 'show_fullname' ); ?>" name="<?php echo $this->get_field_name( 'show_fullname' ); ?>" /> <?php _e( 'Show full name?', $this->textdomain ); ?> <code>show_fullname</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_fullname'], true ); ?> id="<?php echo $this->get_field_id( 'show_fullname' ); ?>" name="<?php echo $this->get_field_name( 'show_fullname' ); ?>" /> <?php _e( 'Show full name?', 'hybrid-core' ); ?> <code>show_fullname</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'hide_empty' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['hide_empty'], true ); ?> id="<?php echo $this->get_field_id( 'hide_empty' ); ?>" name="<?php echo $this->get_field_name( 'hide_empty' ); ?>" /> <?php _e( 'Hide empty?', $this->textdomain ); ?> <code>hide_empty</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['hide_empty'], true ); ?> id="<?php echo $this->get_field_id( 'hide_empty' ); ?>" name="<?php echo $this->get_field_name( 'hide_empty' ); ?>" /> <?php _e( 'Hide empty?', 'hybrid-core' ); ?> <code>hide_empty</code></label> </p> </div> <div style="clear:both;"> </div> diff --git a/wp-content/themes/hybrid/library/classes/widget-bookmarks.php b/wp-content/themes/hybrid/library/classes/widget-bookmarks.php index fecf9b2033454c88a451d60695cd6f794e379e85..d3789ddb78ec8e1ecc5a2acd312c66cc0789a557 100644 --- a/wp-content/themes/hybrid/library/classes/widget-bookmarks.php +++ b/wp-content/themes/hybrid/library/classes/widget-bookmarks.php @@ -6,45 +6,30 @@ * * @package Hybrid * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Bookmarks Widget Class * * @since 0.6.0 - * @link http://codex.wordpress.org/Template_Tags/wp_list_bookmarks - * @link http://themehybrid.com/themes/hybrid/widgets */ class Hybrid_Widget_Bookmarks extends WP_Widget { - /** - * Prefix for the widget. - * @since 0.7.0 - */ - var $prefix; - - /** - * Textdomain for the widget. - * @since 0.7.0 - */ - var $textdomain; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget prefix. */ - $this->prefix = hybrid_get_prefix(); - - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'bookmarks', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your bookmarks (links).', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your bookmarks (links).', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -56,65 +41,69 @@ class Hybrid_Widget_Bookmarks extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-bookmarks', // $this->id_base - __( 'Bookmarks', $this->textdomain ), // $this->name + __( 'Bookmarks', 'hybrid-core' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); } - /** * Outputs the widget based on the arguments input through the widget controls. + * * @since 0.6.0 */ - function widget( $args, $instance ) { - extract( $args ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); /* Set up the $before_widget ID for multiple widgets created by the bookmarks widget. */ - if ( $instance['categorize'] ) + if ( !empty( $instance['categorize'] ) ) $before_widget = preg_replace( '/id="[^"]*"/','id="%id"', $before_widget ); /* Add a class to $before_widget if one is set. */ - if ( $instance['class'] ) + if ( !empty( $instance['class'] ) ) $before_widget = str_replace( 'class="', 'class="' . esc_attr( $instance['class'] ) . ' ', $before_widget ); - /* Set up the arguments for wp_list_bookmarks(). */ - $args = array( - 'title_li' => apply_filters( 'widget_title', $instance['title_li'], $instance, $this->id_base ), - 'category' => !empty( $instance['category'] ) ? join( ', ', $instance['category'] ) : '', - 'exclude_category' => !empty( $instance['exclude_category'] ) ? join( ', ', $instance['exclude_category'] ) : '', - 'category_order' => $instance['category_order'], - 'category_orderby' => $instance['category_orderby'], - 'include' => !empty( $instance['include'] ) ? join( ', ', $instance['include'] ) : '', - 'exclude' => !empty( $instance['exclude'] ) ? join( ', ', $instance['exclude'] ) : '', - 'order' => $instance['order'], - 'orderby' => $instance['orderby'], - 'limit' => $instance['limit'] ? intval( $instance['limit'] ) : -1, - 'between' => $instance['between'], - 'link_before' => $instance['link_before'], - 'link_after' => $instance['link_after'], - 'search' => $instance['search'], - 'categorize' => !empty( $instance['categorize'] ) ? true : false, - 'show_description' => !empty( $instance['show_description'] ) ? true : false, - 'hide_invisible' => !empty( $instance['hide_invisible'] ) ? true : false, - 'show_rating' => !empty( $instance['show_rating'] ) ? true : false, - 'show_updated' => !empty( $instance['show_updated'] ) ? true : false, - 'show_images' => !empty( $instance['show_images'] ) ? true : false, - 'show_name' => !empty( $instance['show_name'] ) ? true : false, - 'show_private' => !empty( $instance['show_private'] ) ? true : false, - 'title_before' => $before_title, - 'title_after' => $after_title, - 'category_before' => $before_widget, - 'category_after' => $after_widget, - 'category_name' => false, - 'echo' => false - ); + /* Set the $args for wp_list_bookmarks() to the $instance array. */ + $args = $instance; + + /* wp_list_bookmarks() hasn't been updated in WP to use wp_parse_id_list(), so we have to pass strings for includes/excludes. */ + if ( !empty( $args['category'] ) && is_array( $args['category'] ) ) + $args['category'] = join( ', ', $args['category'] ); + + if ( !empty( $args['exclude_category'] ) && is_array( $args['exclude_category'] ) ) + $args['exclude_category'] = join( ', ', $args['exclude_category'] ); + + if ( !empty( $args['include'] ) && is_array( $args['include'] ) ) + $args['include'] = join( ',', $args['include'] ); + + if ( !empty( $args['exclude'] ) && is_array( $args['exclude'] ) ) + $args['exclude'] = join( ',', $args['exclude'] ); + + /* If no limit is given, set it to -1. */ + $args['limit'] = empty( $args['limit'] ) ? -1 : $args['limit']; + + /* Some arguments must be set to the sidebar arguments to be output correctly. */ + $args['title_li'] = apply_filters( 'widget_title', ( empty( $args['title_li'] ) ? __( 'Bookmarks', 'hybrid-core' ) : $args['title_li'] ), $instance, $this->id_base ); + $args['title_before'] = $before_title; + $args['title_after'] = $after_title; + $args['category_before'] = $before_widget; + $args['category_after'] = $after_widget; + $args['category_name'] = ''; + $args['echo'] = false; /* Output the bookmarks widget. */ - echo str_replace( array( "\r", "\n", "\t" ), '', wp_list_bookmarks( $args ) ); + $bookmarks = str_replace( array( "\r", "\n", "\t" ), '', wp_list_bookmarks( $args ) ); + + /* If no title is given and the bookmarks aren't categorized, add a wrapper <ul>. */ + if ( empty( $args['title_li'] ) && false === $args['categorize'] ) + $bookmarks = '<ul class="xoxo bookmarks">' . $bookmarks . '</ul>'; + + /* Output the bookmarks. */ + echo $bookmarks; } /** * Updates the widget control options for the particular instance of the widget. + * * @since 0.6.0 */ function update( $new_instance, $old_instance ) { @@ -149,19 +138,20 @@ class Hybrid_Widget_Bookmarks extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. + * * @since 0.6.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title_li' => esc_attr__( 'Bookmarks', $this->textdomain ), + 'title_li' => esc_attr__( 'Bookmarks', 'hybrid-core' ), 'categorize' => true, 'category_order' => 'ASC', 'category_orderby' => 'name', 'category' => array(), 'exclude_category' => array(), - 'limit' => '', + 'limit' => -1, 'order' => 'ASC', 'orderby' => 'name', 'include' => array(), @@ -185,16 +175,16 @@ class Hybrid_Widget_Bookmarks extends WP_Widget { $terms = get_terms( 'link_category' ); $bookmarks = get_bookmarks( array( 'hide_invisible' => false ) ); - $category_order = array( 'ASC' => esc_attr__( 'Ascending', $this->textdomain ), 'DESC' => esc_attr__( 'Descending', $this->textdomain ) ); - $category_orderby = array( 'count' => esc_attr__( 'Count', $this->textdomain ), 'ID' => esc_attr__( 'ID', $this->textdomain ), 'name' => esc_attr__( 'Name', $this->textdomain ), 'slug' => esc_attr__( 'Slug', $this->textdomain ) ); - $order = array( 'ASC' => esc_attr__( 'Ascending', $this->textdomain ), 'DESC' => esc_attr__( 'Descending', $this->textdomain ) ); - $orderby = array( 'id' => esc_attr__( 'ID', $this->textdomain ), 'description' => esc_attr__( 'Description', $this->textdomain ), 'length' => esc_attr__( 'Length', $this->textdomain ), 'name' => esc_attr__( 'Name', $this->textdomain ), 'notes' => esc_attr__( 'Notes', $this->textdomain ), 'owner' => esc_attr__( 'Owner', $this->textdomain ), 'rand' => esc_attr__( 'Random', $this->textdomain ), 'rating' => esc_attr__( 'Rating', $this->textdomain ), 'rel' => esc_attr__( 'Rel', $this->textdomain ), 'rss' => esc_attr__( 'RSS', $this->textdomain ), 'target' => esc_attr__( 'Target', $this->textdomain ), 'updated' => esc_attr__( 'Updated', $this->textdomain ), 'url' => esc_attr__( 'URL', $this->textdomain ) ); + $category_order = array( 'ASC' => esc_attr__( 'Ascending', 'hybrid-core' ), 'DESC' => esc_attr__( 'Descending', 'hybrid-core' ) ); + $category_orderby = array( 'count' => esc_attr__( 'Count', 'hybrid-core' ), 'ID' => esc_attr__( 'ID', 'hybrid-core' ), 'name' => esc_attr__( 'Name', 'hybrid-core' ), 'slug' => esc_attr__( 'Slug', 'hybrid-core' ) ); + $order = array( 'ASC' => esc_attr__( 'Ascending', 'hybrid-core' ), 'DESC' => esc_attr__( 'Descending', 'hybrid-core' ) ); + $orderby = array( 'id' => esc_attr__( 'ID', 'hybrid-core' ), 'description' => esc_attr__( 'Description', 'hybrid-core' ), 'length' => esc_attr__( 'Length', 'hybrid-core' ), 'name' => esc_attr__( 'Name', 'hybrid-core' ), 'notes' => esc_attr__( 'Notes', 'hybrid-core' ), 'owner' => esc_attr__( 'Owner', 'hybrid-core' ), 'rand' => esc_attr__( 'Random', 'hybrid-core' ), 'rating' => esc_attr__( 'Rating', 'hybrid-core' ), 'rel' => esc_attr__( 'Rel', 'hybrid-core' ), 'rss' => esc_attr__( 'RSS', 'hybrid-core' ), 'target' => esc_attr__( 'Target', 'hybrid-core' ), 'updated' => esc_attr__( 'Updated', 'hybrid-core' ), 'url' => esc_attr__( 'URL', 'hybrid-core' ) ); ?> <div class="hybrid-widget-controls columns-3"> <p> - <label for="<?php echo $this->get_field_id( 'title_li' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title_li' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title_li' ); ?>" name="<?php echo $this->get_field_name( 'title_li' ); ?>" value="<?php echo esc_attr( $instance['title_li'] ); ?>" /> </p> <p> @@ -296,35 +286,35 @@ class Hybrid_Widget_Bookmarks extends WP_Widget { </p> <p> <label for="<?php echo $this->get_field_id( 'categorize' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['categorize'], true ); ?> id="<?php echo $this->get_field_id( 'categorize' ); ?>" name="<?php echo $this->get_field_name( 'categorize' ); ?>" /> <?php _e( 'Categorize?', $this->textdomain ); ?> <code>categorize</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['categorize'], true ); ?> id="<?php echo $this->get_field_id( 'categorize' ); ?>" name="<?php echo $this->get_field_name( 'categorize' ); ?>" /> <?php _e( 'Categorize?', 'hybrid-core' ); ?> <code>categorize</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'show_description' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_description'], true ); ?> id="<?php echo $this->get_field_id( 'show_description' ); ?>" name="<?php echo $this->get_field_name( 'show_description' ); ?>" /> <?php _e( 'Show description?', $this->textdomain ); ?> <code>show_description</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_description'], true ); ?> id="<?php echo $this->get_field_id( 'show_description' ); ?>" name="<?php echo $this->get_field_name( 'show_description' ); ?>" /> <?php _e( 'Show description?', 'hybrid-core' ); ?> <code>show_description</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'hide_invisible' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['hide_invisible'], true ); ?> id="<?php echo $this->get_field_id( 'hide_invisible' ); ?>" name="<?php echo $this->get_field_name( 'hide_invisible' ); ?>" /> <?php _e( 'Hide invisible?', $this->textdomain ); ?> <code>hide_invisible</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['hide_invisible'], true ); ?> id="<?php echo $this->get_field_id( 'hide_invisible' ); ?>" name="<?php echo $this->get_field_name( 'hide_invisible' ); ?>" /> <?php _e( 'Hide invisible?', 'hybrid-core' ); ?> <code>hide_invisible</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'show_rating' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_rating'], true ); ?> id="<?php echo $this->get_field_id( 'show_rating' ); ?>" name="<?php echo $this->get_field_name( 'show_rating' ); ?>" /> <?php _e( 'Show rating?', $this->textdomain ); ?> <code>show_rating</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_rating'], true ); ?> id="<?php echo $this->get_field_id( 'show_rating' ); ?>" name="<?php echo $this->get_field_name( 'show_rating' ); ?>" /> <?php _e( 'Show rating?', 'hybrid-core' ); ?> <code>show_rating</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'show_updated' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_updated'], true ); ?> id="<?php echo $this->get_field_id( 'show_updated' ); ?>" name="<?php echo $this->get_field_name( 'show_updated' ); ?>" /> <?php _e( 'Show updated?', $this->textdomain ); ?> <code>show_updated</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_updated'], true ); ?> id="<?php echo $this->get_field_id( 'show_updated' ); ?>" name="<?php echo $this->get_field_name( 'show_updated' ); ?>" /> <?php _e( 'Show updated?', 'hybrid-core' ); ?> <code>show_updated</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'show_images' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_images'], true ); ?> id="<?php echo $this->get_field_id( 'show_images' ); ?>" name="<?php echo $this->get_field_name( 'show_images' ); ?>" /> <?php _e( 'Show images?', $this->textdomain ); ?> <code>show_images</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_images'], true ); ?> id="<?php echo $this->get_field_id( 'show_images' ); ?>" name="<?php echo $this->get_field_name( 'show_images' ); ?>" /> <?php _e( 'Show images?', 'hybrid-core' ); ?> <code>show_images</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'show_name' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_name'], true ); ?> id="<?php echo $this->get_field_id( 'show_name' ); ?>" name="<?php echo $this->get_field_name( 'show_name' ); ?>" /> <?php _e( 'Show name?', $this->textdomain ); ?> <code>show_name</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_name'], true ); ?> id="<?php echo $this->get_field_id( 'show_name' ); ?>" name="<?php echo $this->get_field_name( 'show_name' ); ?>" /> <?php _e( 'Show name?', 'hybrid-core' ); ?> <code>show_name</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'show_private' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_private'], true ); ?> id="<?php echo $this->get_field_id( 'show_private' ); ?>" name="<?php echo $this->get_field_name( 'show_private' ); ?>" /> <?php _e( 'Show private?', $this->textdomain ); ?> <code>show_private</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_private'], true ); ?> id="<?php echo $this->get_field_id( 'show_private' ); ?>" name="<?php echo $this->get_field_name( 'show_private' ); ?>" /> <?php _e( 'Show private?', 'hybrid-core' ); ?> <code>show_private</code></label> </p> </div> diff --git a/wp-content/themes/hybrid/library/classes/widget-calendar.php b/wp-content/themes/hybrid/library/classes/widget-calendar.php index 74233f288169cb6c27dc843f966ef8968aab8771..b5adfe4a5090b30efc1eb8cf25b85dae1cce7354 100644 --- a/wp-content/themes/hybrid/library/classes/widget-calendar.php +++ b/wp-content/themes/hybrid/library/classes/widget-calendar.php @@ -6,45 +6,30 @@ * * @package Hybrid * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Calendar Widget Class * * @since 0.6.0 - * @link http://codex.wordpress.org/Function_Reference/get_calendar - * @link http://themehybrid.com/themes/hybrid/widgets */ class Hybrid_Widget_Calendar extends WP_Widget { - /** - * Prefix for the widget. - * @since 0.7.0 - */ - var $prefix; - - /** - * Textdomain for the widget. - * @since 0.7.0 - */ - var $textdomain; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget prefix. */ - $this->prefix = hybrid_get_prefix(); - - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'calendar', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your calendar.', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your calendar.', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -56,7 +41,7 @@ class Hybrid_Widget_Calendar extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-calendar', // $this->id_base - __( 'Calendar', $this->textdomain ), // $this->name + __( 'Calendar', 'hybrid-core' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); @@ -64,10 +49,11 @@ class Hybrid_Widget_Calendar extends WP_Widget { /** * Outputs the widget based on the arguments input through the widget controls. + * * @since 0.6.0 */ - function widget( $args, $instance ) { - extract( $args ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); /* Get the $initial argument. */ $initial = !empty( $instance['initial'] ) ? true : false; @@ -90,12 +76,10 @@ class Hybrid_Widget_Calendar extends WP_Widget { /** * Updates the widget control options for the particular instance of the widget. + * * @since 0.6.0 */ function update( $new_instance, $old_instance ) { - $instance = $old_instance; - - $instance = $new_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['initial'] = ( isset( $new_instance['initial'] ) ? 1 : 0 ); @@ -105,13 +89,14 @@ class Hybrid_Widget_Calendar extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. + * * @since 0.6.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title' => esc_attr__( 'Calendar', $this->textdomain ), + 'title' => esc_attr__( 'Calendar', 'hybrid-core' ), 'initial' => false ); @@ -120,12 +105,12 @@ class Hybrid_Widget_Calendar extends WP_Widget { <div class="hybrid-widget-controls columns-1"> <p> - <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p> <input class="checkbox" type="checkbox" <?php checked( $instance['initial'], true ); ?> id="<?php echo $this->get_field_id( 'initial' ); ?>" name="<?php echo $this->get_field_name( 'initial' ); ?>" /> - <label for="<?php echo $this->get_field_id( 'initial' ); ?>"><?php _e( 'One-letter abbreviation?', $this->textdomain ); ?> <code>initial</code></label> + <label for="<?php echo $this->get_field_id( 'initial' ); ?>"><?php _e( 'One-letter abbreviation?', 'hybrid-core' ); ?> <code>initial</code></label> </p> </div> <?php diff --git a/wp-content/themes/hybrid/library/classes/widget-categories.php b/wp-content/themes/hybrid/library/classes/widget-categories.php index 2b1f4730c99c615d470ce26d721227da1f0908ce..8f367468d93ba31387992db1bf3853f7cefb18b1 100644 --- a/wp-content/themes/hybrid/library/classes/widget-categories.php +++ b/wp-content/themes/hybrid/library/classes/widget-categories.php @@ -6,45 +6,30 @@ * * @package Hybrid * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Categories Widget Class * - * @since 0.6 - * @link http://codex.wordpress.org/Template_Tags/wp_list_categories - * @link http://themehybrid.com/themes/hybrid/widgets + * @since 0.6.0 */ class Hybrid_Widget_Categories extends WP_Widget { - /** - * Prefix for the widget. - * @since 0.7.0 - */ - var $prefix; - - /** - * Textdomain for the widget. - * @since 0.7.0 - */ - var $textdomain; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget prefix. */ - $this->prefix = hybrid_get_prefix(); - - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'categories', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your category links.', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your category links.', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -56,7 +41,7 @@ class Hybrid_Widget_Categories extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-categories', // $this->id_base - __( 'Categories', $this->textdomain ), // $this->name + __( 'Categories', 'hybrid-core' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); @@ -64,36 +49,18 @@ class Hybrid_Widget_Categories extends WP_Widget { /** * Outputs the widget based on the arguments input through the widget controls. + * * @since 0.6.0 */ - function widget( $args, $instance ) { - extract( $args ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); - /* Set up the arguments for wp_list_categories(). */ - $args = array( - 'taxonomy' => $instance['taxonomy'], - 'style' => $instance['style'], - 'orderby' => $instance['orderby'], - 'order' => $instance['order'], - 'include' => !empty( $instance['include'] ) ? join( ', ', $instance['include'] ) : '', - 'exclude' => !empty( $instance['exclude'] ) ? join( ', ', $instance['exclude'] ) : '', - 'exclude_tree' => $instance['exclude_tree'], - 'depth' => intval( $instance['depth'] ), - 'number' => intval( $instance['number'] ), - 'child_of' => intval( $instance['child_of'] ), - 'current_category' => intval( $instance['current_category'] ), - 'feed' => $instance['feed'], - 'feed_type' => $instance['feed_type'], - 'feed_image' => esc_url( $instance['feed_image'] ), - 'search' => $instance['search'], - 'hierarchical' => !empty( $instance['hierarchical'] ) ? true : false, - 'use_desc_for_title' => !empty( $instance['use_desc_for_title'] ) ? true : false, - 'show_last_update' => !empty( $instance['show_last_update'] ) ? true : false, - 'show_count' => !empty( $instance['show_count'] ) ? true : false, - 'hide_empty' => !empty( $instance['hide_empty'] ) ? true : false, - 'title_li' => false, - 'echo' => false - ); + /* Set the $args for wp_list_categories() to the $instance array. */ + $args = $instance; + + /* Set the $title_li and $echo arguments to false. */ + $args['title_li'] = false; + $args['echo'] = false; /* Output the theme's widget wrapper. */ echo $before_widget; @@ -118,6 +85,7 @@ class Hybrid_Widget_Categories extends WP_Widget { /** * Updates the widget control options for the particular instance of the widget. + * * @since 0.6.0 */ function update( $new_instance, $old_instance ) { @@ -134,18 +102,19 @@ class Hybrid_Widget_Categories extends WP_Widget { $instance['title'] = strip_tags( $new_instance['title'] ); $instance['taxonomy'] = $new_instance['taxonomy']; - $instance['exclude_tree'] = strip_tags( $new_instance['exclude_tree'] ); $instance['depth'] = strip_tags( $new_instance['depth'] ); $instance['number'] = strip_tags( $new_instance['number'] ); $instance['child_of'] = strip_tags( $new_instance['child_of'] ); $instance['current_category'] = strip_tags( $new_instance['current_category'] ); $instance['feed'] = strip_tags( $new_instance['feed'] ); - $instance['feed_image'] = strip_tags( $new_instance['feed_image'] ); + $instance['feed_image'] = esc_url( $new_instance['feed_image'] ); $instance['search'] = strip_tags( $new_instance['search'] ); + $instance['include'] = preg_replace( '/[^0-9,]/', '', $new_instance['include'] ); + $instance['exclude'] = preg_replace( '/[^0-9,]/', '', $new_instance['exclude'] ); + $instance['exclude_tree'] = preg_replace( '/[^0-9,]/', '', $new_instance['exclude_tree'] ); $instance['hierarchical'] = ( isset( $new_instance['hierarchical'] ) ? 1 : 0 ); $instance['use_desc_for_title'] = ( isset( $new_instance['use_desc_for_title'] ) ? 1 : 0 ); - $instance['show_last_update'] = ( isset( $new_instance['show_last_update'] ) ? 1 : 0 ); $instance['show_count'] = ( isset( $new_instance['show_count'] ) ? 1 : 0 ); $instance['hide_empty'] = ( isset( $new_instance['hide_empty'] ) ? 1 : 0 ); @@ -154,17 +123,18 @@ class Hybrid_Widget_Categories extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. + * * @since 0.6.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title' => esc_attr__( 'Categories', $this->textdomain ), + 'title' => esc_attr__( 'Categories', 'hybrid-core' ), 'taxonomy' => 'category', 'style' => 'list', - 'include' => array(), - 'exclude' => array(), + 'include' => '', + 'exclude' => '', 'exclude_tree' => '', 'child_of' => '', 'current_category' => '', @@ -179,7 +149,6 @@ class Hybrid_Widget_Categories extends WP_Widget { 'feed_type' => '', 'feed_image' => '', 'use_desc_for_title' => false, - 'show_last_update' => false, 'show_count' => false, ); @@ -189,16 +158,16 @@ class Hybrid_Widget_Categories extends WP_Widget { /* <select> element options. */ $taxonomies = get_taxonomies( array( 'show_tagcloud' => true ), 'objects' ); $terms = get_terms( $instance['taxonomy'] ); - $style = array( 'list' => esc_attr__( 'List', $this->textdomain ), 'none' => esc_attr__( 'None', $this->textdomain ) ); - $order = array( 'ASC' => esc_attr__( 'Ascending', $this->textdomain ), 'DESC' => esc_attr__( 'Descending', $this->textdomain ) ); - $orderby = array( 'count' => esc_attr__( 'Count', $this->textdomain ), 'ID' => esc_attr__( 'ID', $this->textdomain ), 'name' => esc_attr__( 'Name', $this->textdomain ), 'slug' => esc_attr__( 'Slug', $this->textdomain ), 'term_group' => esc_attr__( 'Term Group', $this->textdomain ) ); - $feed_type = array( '' => '', 'atom' => esc_attr__( 'Atom', $this->textdomain ), 'rdf' => esc_attr__( 'RDF', $this->textdomain ), 'rss' => esc_attr__( 'RSS', $this->textdomain ), 'rss2' => esc_attr__( 'RSS 2.0', $this->textdomain ) ); + $style = array( 'list' => esc_attr__( 'List', 'hybrid-core' ), 'none' => esc_attr__( 'None', 'hybrid-core' ) ); + $order = array( 'ASC' => esc_attr__( 'Ascending', 'hybrid-core' ), 'DESC' => esc_attr__( 'Descending', 'hybrid-core' ) ); + $orderby = array( 'count' => esc_attr__( 'Count', 'hybrid-core' ), 'ID' => esc_attr__( 'ID', 'hybrid-core' ), 'name' => esc_attr__( 'Name', 'hybrid-core' ), 'slug' => esc_attr__( 'Slug', 'hybrid-core' ), 'term_group' => esc_attr__( 'Term Group', 'hybrid-core' ) ); + $feed_type = array( '' => '', 'atom' => esc_attr__( 'Atom', 'hybrid-core' ), 'rdf' => esc_attr__( 'RDF', 'hybrid-core' ), 'rss' => esc_attr__( 'RSS', 'hybrid-core' ), 'rss2' => esc_attr__( 'RSS 2.0', 'hybrid-core' ) ); ?> <div class="hybrid-widget-controls columns-3"> <p> - <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p> @@ -233,6 +202,9 @@ class Hybrid_Widget_Categories extends WP_Widget { <?php } ?> </select> </p> + </div> + + <div class="hybrid-widget-controls columns-3"> <p> <label for="<?php echo $this->get_field_id( 'depth' ); ?>"><code>depth</code></label> <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'depth' ); ?>" name="<?php echo $this->get_field_name( 'depth' ); ?>" value="<?php echo esc_attr( $instance['depth'] ); ?>" /> @@ -241,24 +213,13 @@ class Hybrid_Widget_Categories extends WP_Widget { <label for="<?php echo $this->get_field_id( 'number' ); ?>"><code>number</code></label> <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" value="<?php echo esc_attr( $instance['number'] ); ?>" /> </p> - </div> - - <div class="hybrid-widget-controls columns-3"> <p> - <label for="<?php echo $this->get_field_id( 'include' ); ?>"><code>include</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'include' ); ?>" name="<?php echo $this->get_field_name( 'include' ); ?>[]" size="4" multiple="multiple"> - <?php foreach ( $terms as $term ) { ?> - <option value="<?php echo esc_attr( $term->term_id ); ?>" <?php echo ( in_array( $term->term_id, (array) $instance['include'] ) ? 'selected="selected"' : '' ); ?>><?php echo esc_html( $term->name ); ?></option> - <?php } ?> - </select> + <label for="<?php echo $this->get_field_id( 'include' ); ?>"><code>include</code></label> + <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'include' ); ?>" name="<?php echo $this->get_field_name( 'include' ); ?>" value="<?php echo esc_attr( $instance['include'] ); ?>" /> </p> <p> - <label for="<?php echo $this->get_field_id( 'exclude' ); ?>"><code>exclude</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'exclude' ); ?>" name="<?php echo $this->get_field_name( 'exclude' ); ?>[]" size="4" multiple="multiple"> - <?php foreach ( $terms as $term ) { ?> - <option value="<?php echo esc_attr( $term->term_id ); ?>" <?php echo ( in_array( $term->term_id, (array) $instance['exclude'] ) ? 'selected="selected"' : '' ); ?>><?php echo esc_html( $term->name ); ?></option> - <?php } ?> - </select> + <label for="<?php echo $this->get_field_id( 'exclude' ); ?>"><code>exclude</code></label> + <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'exclude' ); ?>" name="<?php echo $this->get_field_name( 'exclude' ); ?>" value="<?php echo esc_attr( $instance['exclude'] ); ?>" /> </p> <p> <label for="<?php echo $this->get_field_id( 'exclude_tree' ); ?>"><code>exclude_tree</code></label> @@ -297,23 +258,19 @@ class Hybrid_Widget_Categories extends WP_Widget { </p> <p> <label for="<?php echo $this->get_field_id( 'hierarchical' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['hierarchical'], true ); ?> id="<?php echo $this->get_field_id( 'hierarchical' ); ?>" name="<?php echo $this->get_field_name( 'hierarchical' ); ?>" /> <?php _e( 'Hierarchical?', $this->textdomain ); ?> <code>hierarchical</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['hierarchical'], true ); ?> id="<?php echo $this->get_field_id( 'hierarchical' ); ?>" name="<?php echo $this->get_field_name( 'hierarchical' ); ?>" /> <?php _e( 'Hierarchical?', 'hybrid-core' ); ?> <code>hierarchical</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'use_desc_for_title' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['use_desc_for_title'], true ); ?> id="<?php echo $this->get_field_id( 'use_desc_for_title' ); ?>" name="<?php echo $this->get_field_name( 'use_desc_for_title' ); ?>" /> <?php _e( 'Use description?', $this->textdomain ); ?> <code>use_desc_for_title</code></label> - </p> - <p> - <label for="<?php echo $this->get_field_id( 'show_last_update' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_last_update'], true ); ?> id="<?php echo $this->get_field_id( 'show_last_update' ); ?>" name="<?php echo $this->get_field_name( 'show_last_update' ); ?>" /> <?php _e( 'Show last update?', $this->textdomain ); ?> <code>show_last_update</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['use_desc_for_title'], true ); ?> id="<?php echo $this->get_field_id( 'use_desc_for_title' ); ?>" name="<?php echo $this->get_field_name( 'use_desc_for_title' ); ?>" /> <?php _e( 'Use description?', 'hybrid-core' ); ?> <code>use_desc_for_title</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'show_count' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['show_count'], true ); ?> id="<?php echo $this->get_field_id( 'show_count' ); ?>" name="<?php echo $this->get_field_name( 'show_count' ); ?>" /> <?php _e( 'Show count?', $this->textdomain ); ?> <code>show_count</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['show_count'], true ); ?> id="<?php echo $this->get_field_id( 'show_count' ); ?>" name="<?php echo $this->get_field_name( 'show_count' ); ?>" /> <?php _e( 'Show count?', 'hybrid-core' ); ?> <code>show_count</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'hide_empty' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['hide_empty'], true ); ?> id="<?php echo $this->get_field_id( 'hide_empty' ); ?>" name="<?php echo $this->get_field_name( 'hide_empty' ); ?>" /> <?php _e( 'Hide empty?', $this->textdomain ); ?> <code>hide_empty</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['hide_empty'], true ); ?> id="<?php echo $this->get_field_id( 'hide_empty' ); ?>" name="<?php echo $this->get_field_name( 'hide_empty' ); ?>" /> <?php _e( 'Hide empty?', 'hybrid-core' ); ?> <code>hide_empty</code></label> </p> </div> <div style="clear:both;"> </div> diff --git a/wp-content/themes/hybrid/library/classes/widget-nav-menu.php b/wp-content/themes/hybrid/library/classes/widget-nav-menu.php index 82ca3cd06e32b87f4f076b67d39afb45f94870f8..0f4f79ef967e0f77dc31f1adae1e36ecae44eafd 100644 --- a/wp-content/themes/hybrid/library/classes/widget-nav-menu.php +++ b/wp-content/themes/hybrid/library/classes/widget-nav-menu.php @@ -6,44 +6,30 @@ * * @package Hybrid * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Nav Menu Widget Class * * @since 0.8.0 - * @link http://themehybrid.com/themes/hybrid/widgets */ class Hybrid_Widget_Nav_Menu extends WP_Widget { - /** - * Prefix for the widget. - * @since 0.8.0 - */ - var $prefix; - - /** - * Textdomain for the widget. - * @since 0.8.0 - */ - var $textdomain; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget prefix. */ - $this->prefix = hybrid_get_prefix(); - - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'nav-menu', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your menus.', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your menus.', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -55,7 +41,7 @@ class Hybrid_Widget_Nav_Menu extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-nav-menu', // $this->id_base - __( 'Navigation Menu', $this->textdomain ), // $this->name + __( 'Navigation Menu', 'hybrid-core' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); @@ -63,28 +49,17 @@ class Hybrid_Widget_Nav_Menu extends WP_Widget { /** * Outputs the widget based on the arguments input through the widget controls. + * * @since 0.8.0 */ - function widget( $args, $instance ) { - extract( $args ); - - /* Set up the arguments for the wp_nav_menu() function. */ - $args = array( - 'menu' => $instance['menu'], - 'container' => $instance['container'], - 'container_id' => $instance['container_id'], - 'container_class' => $instance['container_class'], - 'menu_id' => $instance['menu_id'], - 'menu_class' => $instance['menu_class'], - 'link_before' => $instance['link_before'], - 'link_after' => $instance['link_after'], - 'before' => $instance['before'], - 'after' => $instance['after'], - 'depth' => intval( $instance['depth'] ), - 'fallback_cb' => $instance['fallback_cb'], - 'walker' => $instance['walker'], - 'echo' => false - ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); + + /* Set the $args for wp_nav_menu() to the $instance array. */ + $args = $instance; + + /* Overwrite the $echo argument and set it to false. */ + $args['echo'] = false; /* Output the theme's widget wrapper. */ echo $before_widget; @@ -102,6 +77,7 @@ class Hybrid_Widget_Nav_Menu extends WP_Widget { /** * Updates the widget control options for the particular instance of the widget. + * * @since 0.8.0 */ function update( $new_instance, $old_instance ) { @@ -123,13 +99,14 @@ class Hybrid_Widget_Nav_Menu extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. + * * @since 0.8.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title' => esc_attr__( 'Navigation', $this->textdomain ), + 'title' => esc_attr__( 'Navigation', 'hybrid-core' ), 'menu' => '', 'container' => 'div', 'container_id' => '', @@ -153,7 +130,7 @@ class Hybrid_Widget_Nav_Menu extends WP_Widget { <div class="hybrid-widget-controls columns-2"> <p> - <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p> diff --git a/wp-content/themes/hybrid/library/classes/widget-pages.php b/wp-content/themes/hybrid/library/classes/widget-pages.php index 44f127e905912a17ff3730473d89c6a151c391db..9c0e62a49bb5e74ab6b189f0ca25ca649c3ad6fb 100644 --- a/wp-content/themes/hybrid/library/classes/widget-pages.php +++ b/wp-content/themes/hybrid/library/classes/widget-pages.php @@ -6,39 +6,30 @@ * * @package Hybrid * @subpackage Widgets + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Pages Widget Class * * @since 0.6.0 - * @link http://codex.wordpress.org/Template_Tags/wp_list_pages - * @link http://themehybrid.com/themes/hybrid/widgets */ class Hybrid_Widget_Pages extends WP_Widget { - /** - * Prefix for the widget. - * @since 0.7.0 - */ - var $prefix; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget prefix. */ - $this->prefix = hybrid_get_prefix(); - - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'pages', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your page links.', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your page links.', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -50,7 +41,7 @@ class Hybrid_Widget_Pages extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-pages', // $this->id_base - __( 'Pages', $this->textdomain), // $this->name + __( 'Pages', 'hybrid-core'), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); @@ -58,33 +49,18 @@ class Hybrid_Widget_Pages extends WP_Widget { /** * Outputs the widget based on the arguments input through the widget controls. + * * @since 0.6.0 */ - function widget( $args, $instance ) { - extract( $args ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); - /* Set up the arguments for the wp_list_pages() function. */ - $args = array( - 'sort_column' => $instance['sort_column'], - 'sort_order' => $instance['sort_order'], - 'depth' => intval( $instance['depth'] ), - 'child_of' => intval( $instance['child_of'] ), - 'meta_key' => $instance['meta_key'], - 'meta_value' => $instance['meta_value'], - 'authors' => !empty( $instance['authors'] ) ? join( ', ', $instance['authors'] ) : '', - 'include' => !empty( $instance['include'] ) ? join( ', ', $instance['include'] ) : '', - 'exclude' => !empty( $instance['exclude'] ) ? join( ', ', $instance['exclude'] ) : '', - 'exclude_tree' => $instance['exclude_tree'], - 'link_before' => $instance['link_before'], - 'link_after' => $instance['link_after'], - 'date_format' => $instance['date_format'], - 'show_date' => $instance['show_date'], - 'number' => intval( $instance['number'] ), - 'offset' => intval( $instance['offset'] ), - 'hierarchical' => !empty( $instance['hierarchical'] ) ? true : false, - 'title_li' => false, - 'echo' => false - ); + /* Set the $args for wp_list_pages() to the $instance array. */ + $args = $instance; + + /* Set the $title_li and $echo to false. */ + $args['title_li'] = false; + $args['echo'] = false; /* Open the output of the widget. */ echo $before_widget; @@ -102,6 +78,7 @@ class Hybrid_Widget_Pages extends WP_Widget { /** * Updates the widget control options for the particular instance of the widget. + * * @since 0.6.0 */ function update( $new_instance, $old_instance ) { @@ -115,10 +92,14 @@ class Hybrid_Widget_Pages extends WP_Widget { $instance['child_of'] = strip_tags( $new_instance['child_of'] ); $instance['meta_key'] = strip_tags( $new_instance['meta_key'] ); $instance['meta_value'] = strip_tags( $new_instance['meta_value'] ); - $instance['exclude_tree'] = strip_tags( $new_instance['exclude_tree'] ); $instance['date_format'] = strip_tags( $new_instance['date_format'] ); $instance['number'] = strip_tags( $new_instance['number'] ); $instance['offset'] = strip_tags( $new_instance['offset'] ); + $instance['include'] = preg_replace( '/[^0-9,]/', '', $new_instance['include'] ); + $instance['exclude'] = preg_replace( '/[^0-9,]/', '', $new_instance['exclude'] ); + $instance['exclude_tree'] = preg_replace( '/[^0-9,]/', '', $new_instance['exclude_tree'] ); + $instance['authors'] = preg_replace( '/[^0-9,]/', '', $new_instance['authors'] ); + $instance['post_type'] = $new_instance['post_type']; $instance['sort_column'] = $new_instance['sort_column']; $instance['sort_order'] = $new_instance['sort_order']; $instance['show_date'] = $new_instance['show_date']; @@ -132,23 +113,25 @@ class Hybrid_Widget_Pages extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. + * * @since 0.6.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title' => esc_attr__( 'Pages', $this->textdomain), + 'title' => esc_attr__( 'Pages', 'hybrid-core'), + 'post_type' => 'page', 'depth' => 0, 'number' => '', 'offset' => '', 'child_of' => '', - 'include' => array(), - 'exclude' => array(), + 'include' => '', + 'exclude' => '', 'exclude_tree' => '', 'meta_key' => '', 'meta_value' => '', - 'authors' => array(), + 'authors' => '', 'link_before' => '', 'link_after' => '', 'show_date' => '', @@ -161,23 +144,27 @@ class Hybrid_Widget_Pages extends WP_Widget { /* Merge the user-selected arguments with the defaults. */ $instance = wp_parse_args( (array) $instance, $defaults ); - $posts = get_posts( array( 'post_type' => 'page', 'post_status' => 'any', 'post_mime_type' => '', 'orderby' => 'title', 'order' => 'ASC', 'numberposts' => -1 ) ); - $authors = array(); - foreach ( $posts as $post ) - $authors[$post->post_author] = get_the_author_meta( 'display_name', $post->post_author ); - - $sort_order = array( 'ASC' => esc_attr__( 'Ascending', $this->textdomain ), 'DESC' => esc_attr__( 'Descending', $this->textdomain ) ); - $sort_column = array( 'post_author' => esc_attr__( 'Author', $this->textdomain ), 'post_date' => esc_attr__( 'Date', $this->textdomain ), 'ID' => esc_attr__( 'ID', $this->textdomain ), 'menu_order' => esc_attr__( 'Menu Order', $this->textdomain ), 'post_modified' => esc_attr__( 'Modified', $this->textdomain ), 'post_name' => esc_attr__( 'Slug', $this->textdomain ), 'post_title' => esc_attr__( 'Title', $this->textdomain ) ); - $show_date = array( '' => '', 'created' => esc_attr__( 'Created', $this->textdomain ), 'modified' => esc_attr__( 'Modified', $this->textdomain ) ); + $post_types = get_post_types( array( 'public' => true, 'hierarchical' => true ), 'objects' ); + $sort_order = array( 'ASC' => esc_attr__( 'Ascending', 'hybrid-core' ), 'DESC' => esc_attr__( 'Descending', 'hybrid-core' ) ); + $sort_column = array( 'post_author' => esc_attr__( 'Author', 'hybrid-core' ), 'post_date' => esc_attr__( 'Date', 'hybrid-core' ), 'ID' => esc_attr__( 'ID', 'hybrid-core' ), 'menu_order' => esc_attr__( 'Menu Order', 'hybrid-core' ), 'post_modified' => esc_attr__( 'Modified', 'hybrid-core' ), 'post_name' => esc_attr__( 'Slug', 'hybrid-core' ), 'post_title' => esc_attr__( 'Title', 'hybrid-core' ) ); + $show_date = array( '' => '', 'created' => esc_attr__( 'Created', 'hybrid-core' ), 'modified' => esc_attr__( 'Modified', 'hybrid-core' ) ); $meta_key = array_merge( array( '' ), (array) get_meta_keys() ); ?> <div class="hybrid-widget-controls columns-3"> <p> - <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> + <p> + <label for="<?php echo $this->get_field_id( 'post_type' ); ?>"><code>post_type</code></label> + <select class="widefat" id="<?php echo $this->get_field_id( 'post_type' ); ?>" name="<?php echo $this->get_field_name( 'post_type' ); ?>"> + <?php foreach ( $post_types as $post_type ) { ?> + <option value="<?php echo esc_attr( $post_type->name ); ?>" <?php selected( $instance['post_type'], $post_type->name ); ?>><?php echo esc_html( $post_type->labels->singular_name ); ?></option> + <?php } ?> + </select> + </p> <p> <label for="<?php echo $this->get_field_id( 'sort_order' ); ?>"><code>sort_order</code></label> <select class="widefat" id="<?php echo $this->get_field_id( 'sort_order' ); ?>" name="<?php echo $this->get_field_name( 'sort_order' ); ?>"> @@ -202,6 +189,9 @@ class Hybrid_Widget_Pages extends WP_Widget { <label for="<?php echo $this->get_field_id( 'number' ); ?>"><code>number</code></label> <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" value="<?php echo esc_attr( $instance['number'] ); ?>" /> </p> + </div> + + <div class="hybrid-widget-controls columns-3"> <p> <label for="<?php echo $this->get_field_id( 'offset' ); ?>"><code>offset</code></label> <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'offset' ); ?>" name="<?php echo $this->get_field_name( 'offset' ); ?>" value="<?php echo esc_attr( $instance['offset'] ); ?>" /> @@ -210,24 +200,13 @@ class Hybrid_Widget_Pages extends WP_Widget { <label for="<?php echo $this->get_field_id( 'child_of' ); ?>"><code>child_of</code></label> <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'child_of' ); ?>" name="<?php echo $this->get_field_name( 'child_of' ); ?>" value="<?php echo esc_attr( $instance['child_of'] ); ?>" /> </p> - </div> - - <div class="hybrid-widget-controls columns-3"> <p> - <label for="<?php echo $this->get_field_id( 'include' ); ?>"><code>include</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'include' ); ?>" name="<?php echo $this->get_field_name( 'include' ); ?>[]" size="4" multiple="multiple"> - <?php foreach ( $posts as $post ) { ?> - <option value="<?php echo esc_attr( $post->ID ); ?>" <?php echo ( in_array( $post->ID, (array) $instance['include'] ) ? 'selected="selected"' : '' ); ?>><?php echo esc_html( $post->post_title ); ?></option> - <?php } ?> - </select> + <label for="<?php echo $this->get_field_id( 'include' ); ?>"><code>include</code></label> + <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'include' ); ?>" name="<?php echo $this->get_field_name( 'include' ); ?>" value="<?php echo esc_attr( $instance['include'] ); ?>" /> </p> <p> - <label for="<?php echo $this->get_field_id( 'exclude' ); ?>"><code>exclude</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'exclude' ); ?>" name="<?php echo $this->get_field_name( 'exclude' ); ?>[]" size="4" multiple="multiple"> - <?php foreach ( $posts as $post ) { ?> - <option value="<?php echo esc_attr( $post->ID ); ?>" <?php echo ( in_array( $post->ID, (array) $instance['exclude'] ) ? 'selected="selected"' : '' ); ?>><?php echo esc_html( $post->post_title ); ?></option> - <?php } ?> - </select> + <label for="<?php echo $this->get_field_id( 'exclude' ); ?>"><code>exclude</code></label> + <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'exclude' ); ?>" name="<?php echo $this->get_field_name( 'exclude' ); ?>" value="<?php echo esc_attr( $instance['exclude'] ); ?>" /> </p> <p> <label for="<?php echo $this->get_field_id( 'exclude_tree' ); ?>"><code>exclude_tree</code></label> @@ -249,12 +228,8 @@ class Hybrid_Widget_Pages extends WP_Widget { <div class="hybrid-widget-controls columns-3 column-last"> <p> - <label for="<?php echo $this->get_field_id( 'authors' ); ?>"><code>authors</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'authors' ); ?>" name="<?php echo $this->get_field_name( 'authors' ); ?>[]" size="4" multiple="multiple"> - <?php foreach ( $authors as $option_value => $option_label ) { ?> - <option value="<?php echo esc_attr( $option_value ); ?>" <?php echo ( in_array( $option_value, (array) $instance['authors'] ) ? 'selected="selected"' : '' ); ?>><?php echo esc_html( $option_label ); ?></option> - <?php } ?> - </select> + <label for="<?php echo $this->get_field_id( 'authors' ); ?>"><code>authors</code></label> + <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'authors' ); ?>" name="<?php echo $this->get_field_name( 'authors' ); ?>" value="<?php echo esc_attr( $instance['authors'] ); ?>" /> </p> <p> <label for="<?php echo $this->get_field_id( 'link_before' ); ?>"><code>link_before</code></label> @@ -278,7 +253,7 @@ class Hybrid_Widget_Pages extends WP_Widget { </p> <p> <label for="<?php echo $this->get_field_id( 'hierarchical' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['hierarchical'], true ); ?> id="<?php echo $this->get_field_id( 'hierarchical' ); ?>" name="<?php echo $this->get_field_name( 'hierarchical' ); ?>" /> <?php _e( 'Hierarchical?', $this->textdomain); ?> <code>hierarchical</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['hierarchical'], true ); ?> id="<?php echo $this->get_field_id( 'hierarchical' ); ?>" name="<?php echo $this->get_field_name( 'hierarchical' ); ?>" /> <?php _e( 'Hierarchical?', 'hybrid-core'); ?> <code>hierarchical</code></label> </p> </div> <div style="clear:both;"> </div> diff --git a/wp-content/themes/hybrid/library/classes/widget-search.php b/wp-content/themes/hybrid/library/classes/widget-search.php index 85c4f32d98f6757a8efd3a6efe6a388aad1dc630..c422108b5148cda3bf828517953c491383718f5b 100644 --- a/wp-content/themes/hybrid/library/classes/widget-search.php +++ b/wp-content/themes/hybrid/library/classes/widget-search.php @@ -7,44 +7,30 @@ * * @package Hybrid * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Search Widget Class * * @since 0.6.0 - * @link http://themehybrid.com/themes/hybrid/widgets */ class Hybrid_Widget_Search extends WP_Widget { - /** - * Prefix for the widget. - * @since 0.7.0 - */ - var $prefix; - - /** - * Textdomain for the widget. - * @since 0.7.0 - */ - var $textdomain; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget prefix. */ - $this->prefix = hybrid_get_prefix(); - - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'search', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your search form.', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your search form.', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -56,7 +42,7 @@ class Hybrid_Widget_Search extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-search', // $this->id_base - __( 'Search', $this->textdomain ), // $this->name + __( 'Search', 'hybrid-core' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); @@ -64,10 +50,11 @@ class Hybrid_Widget_Search extends WP_Widget { /** * Outputs the widget based on the arguments input through the widget controls. - * @since 0.6 + * + * @since 0.6.0 */ - function widget( $args, $instance ) { - extract( $args ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); /* Output the theme's $before_widget wrapper. */ echo $before_widget; @@ -85,31 +72,30 @@ class Hybrid_Widget_Search extends WP_Widget { else { /* Set up some variables for the search form. */ - global $search_form_num; - $search_num = ( ( $search_form_num ) ? '-' . esc_attr( $search_form_num ) : '' ); + if ( empty( $instance['search_text'] ) ) + $instance['search_text'] = ''; + $search_text = ( ( is_search() ) ? esc_attr( get_search_query() ) : esc_attr( $instance['search_text'] ) ); /* Open the form. */ - $search = '<form method="get" class="search-form" id="search-form' . $search_num . '" action="' . home_url() . '/"><div>'; + $search = '<form method="get" class="search-form" id="search-form' . esc_attr( $this->id_base ) . '" action="' . home_url() . '/"><div>'; /* If a search label was set, add it. */ if ( !empty( $instance['search_label'] ) ) - $search .= '<label for="search-text' . $search_num . '">' . $instance['search_label'] . '</label>'; + $search .= '<label for="search-text' . esc_attr( $this->id_base ) . '">' . $instance['search_label'] . '</label>'; /* Search form text input. */ - $search .= '<input class="search-text" type="text" name="s" id="search-text' . $search_num . '" value="' . $search_text . '" onfocus="if(this.value==this.defaultValue)this.value=\'\';" onblur="if(this.value==\'\')this.value=this.defaultValue;" />'; + $search .= '<input class="search-text" type="text" name="s" id="search-text' . esc_attr( $this->id_base ) . '" value="' . $search_text . '" onfocus="if(this.value==this.defaultValue)this.value=\'\';" onblur="if(this.value==\'\')this.value=this.defaultValue;" />'; /* Search form submit button. */ if ( $instance['search_submit'] ) - $search .= '<input class="search-submit button" name="submit" type="submit" id="search-submit' . $search_num . '" value="' . esc_attr( $instance['search_submit'] ) . '" />'; + $search .= '<input class="search-submit button" name="submit" type="submit" id="search-submit' . esc_attr( $this->id_base ). '" value="' . esc_attr( $instance['search_submit'] ) . '" />'; /* Close the form. */ - $search .= '</div></form><!-- .search-form -->'; + $search .= '</div></form>'; /* Display the form. */ echo $search; - - $search_form_num++; } /* Close the theme's widget wrapper. */ @@ -118,10 +104,12 @@ class Hybrid_Widget_Search extends WP_Widget { /** * Updates the widget control options for the particular instance of the widget. - * @since 0.6 + * + * @since 0.6.0 */ function update( $new_instance, $old_instance ) { - $instance = $old_instance; + $instance = $new_instance; + $instance['title'] = strip_tags( $new_instance['title'] ); $instance['search_label'] = strip_tags( $new_instance['search_label'] ); $instance['search_text'] = strip_tags( $new_instance['search_text'] ); @@ -133,13 +121,14 @@ class Hybrid_Widget_Search extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. - * @since 0.6 + * + * @since 0.6.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title' => esc_attr__( 'Search', $this->textdomain ), + 'title' => esc_attr__( 'Search', 'hybrid-core' ), 'theme_search' => false, 'search_label' => '', 'search_text' => '', @@ -151,27 +140,27 @@ class Hybrid_Widget_Search extends WP_Widget { <div class="hybrid-widget-controls columns-2"> <p> - <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p> - <label for="<?php echo $this->get_field_id( 'search_label' ); ?>"><?php _e( 'Search Label:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'search_label' ); ?>"><?php _e( 'Search Label:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'search_label' ); ?>" name="<?php echo $this->get_field_name( 'search_label' ); ?>" value="<?php echo esc_attr( $instance['search_label'] ); ?>" /> </p> <p> - <label for="<?php echo $this->get_field_id( 'search_text' ); ?>"><?php _e( 'Search Text:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'search_text' ); ?>"><?php _e( 'Search Text:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'search_text' ); ?>" name="<?php echo $this->get_field_name( 'search_text' ); ?>" value="<?php echo esc_attr( $instance['search_text'] ); ?>" /> </p> </div> <div class="hybrid-widget-controls columns-2 column-last"> <p> - <label for="<?php echo $this->get_field_id( 'search_submit' ); ?>"><?php _e( 'Search Submit:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'search_submit' ); ?>"><?php _e( 'Search Submit:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'search_submit' ); ?>" name="<?php echo $this->get_field_name( 'search_submit' ); ?>" value="<?php echo esc_attr( $instance['search_submit'] ); ?>" /> </p> <p> <label for="<?php echo $this->get_field_id( 'theme_search' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['theme_search'], true ); ?> id="<?php echo $this->get_field_id( 'theme_search' ); ?>" name="<?php echo $this->get_field_name( 'theme_search' ); ?>" /> <?php _e( 'Use theme\'s <code>searchform.php</code>?', $this->textdomain ); ?></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['theme_search'], true ); ?> id="<?php echo $this->get_field_id( 'theme_search' ); ?>" name="<?php echo $this->get_field_name( 'theme_search' ); ?>" /> <?php _e( 'Use theme\'s <code>searchform.php</code>?', 'hybrid-core' ); ?></label> </p> </div> <div style="clear:both;"> </div> diff --git a/wp-content/themes/hybrid/library/classes/widget-tags.php b/wp-content/themes/hybrid/library/classes/widget-tags.php index 444a410af59b1f77e00b024b57b63262f3f9721a..0f2f9918d82c93c7f3972c6394a76276c7d7bb6a 100644 --- a/wp-content/themes/hybrid/library/classes/widget-tags.php +++ b/wp-content/themes/hybrid/library/classes/widget-tags.php @@ -6,45 +6,30 @@ * * @package Hybrid * @subpackage Classes + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** * Tags Widget Class * - * @since 0.6 - * @link http://codex.wordpress.org/Template_Tags/wp_tag_cloud - * @link http://themehybrid.com/themes/hybrid/widgets + * @since 0.6.0 */ class Hybrid_Widget_Tags extends WP_Widget { - /** - * Prefix for the widget. - * @since 0.7.0 - */ - var $prefix; - - /** - * Textdomain for the widget. - * @since 0.7.0 - */ - var $textdomain; - /** * Set up the widget's unique name, ID, class, description, and other options. + * * @since 1.2.0 */ function __construct() { - /* Set the widget prefix. */ - $this->prefix = hybrid_get_prefix(); - - /* Set the widget textdomain. */ - $this->textdomain = hybrid_get_textdomain(); - /* Set up the widget options. */ $widget_options = array( 'classname' => 'tags', - 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your tags.', $this->textdomain ) + 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your tags.', 'hybrid-core' ) ); /* Set up the widget control options. */ @@ -56,7 +41,7 @@ class Hybrid_Widget_Tags extends WP_Widget { /* Create the widget. */ $this->WP_Widget( 'hybrid-tags', // $this->id_base - __( 'Tags', $this->textdomain ), // $this->name + __( 'Tags', 'hybrid-core' ), // $this->name $widget_options, // $this->widget_options $control_options // $this->control_options ); @@ -64,33 +49,24 @@ class Hybrid_Widget_Tags extends WP_Widget { /** * Outputs the widget based on the arguments input through the widget controls. - * @since 0.6 + * + * @since 0.6.0 */ - function widget( $args, $instance ) { - extract( $args ); + function widget( $sidebar, $instance ) { + extract( $sidebar ); - /* Set up the arguments for wp_tag_cloud(). */ - $args = array( - 'taxonomy' => $instance['taxonomy'], - 'largest' => !empty( $instance['largest'] ) ? absint( $instance['largest'] ) : 22, - 'smallest' => !empty( $instance['smallest'] ) ? absint( $instance['smallest'] ) : 8, - 'number' => intval( $instance['number'] ), - 'child_of' => intval( $instance['child_of'] ), - 'parent' => !empty( $instance['parent'] ) ? intval( $instance['parent'] ) : '', - 'separator' => !empty( $instance['separator'] ) ? $instance['separator'] : "\n", - 'pad_counts' => !empty( $instance['pad_counts'] ) ? true : false, - 'hide_empty' => !empty( $instance['hide_empty'] ) ? true : false, - 'unit' => $instance['unit'], - 'format' => $instance['format'], - 'include' => !empty( $instance['include'] ) ? join( ', ', $instance['include'] ) : '', - 'exclude' => !empty( $instance['exclude'] ) ? join( ', ', $instance['exclude'] ) : '', - 'order' => $instance['order'], - 'orderby' => $instance['orderby'], - 'link' => $instance['link'], - 'search' => $instance['search'], - 'name__like' => $instance['name__like'], - 'echo' => false - ); + /* Set the $args for wp_tag_cloud() to the $instance array. */ + $args = $instance; + + /* Make sure empty callbacks aren't passed for custom functions. */ + $args['topic_count_text_callback'] = !empty( $args['topic_count_text_callback'] ) ? $args['topic_count_text_callback'] : 'default_topic_count_text'; + $args['topic_count_scale_callback'] = !empty( $args['topic_count_scale_callback'] ) ? $args['topic_count_scale_callback'] : 'default_topic_count_scale'; + + /* If the separator is empty, set it to the default new line. */ + $args['separator'] = !empty( $args['separator'] ) ? $args['separator'] : "\n"; + + /* Overwrite the echo argument. */ + $args['echo'] = false; /* Output the theme's $before_widget wrapper. */ echo $before_widget; @@ -103,8 +79,14 @@ class Hybrid_Widget_Tags extends WP_Widget { $tags = str_replace( array( "\r", "\n", "\t" ), ' ', wp_tag_cloud( $args ) ); /* If $format should be flat, wrap it in the <p> element. */ - if ( 'flat' == $instance['format'] ) - $tags = '<p class="' . $instance['taxonomy'] . '-cloud term-cloud">' . $tags . '</p>'; + if ( 'flat' == $instance['format'] ) { + $classes = array( 'term-cloud' ); + + foreach ( $instance['taxonomy'] as $tax ) + $classes[] = sanitize_html_class( "{$tax}-cloud" ); + + $tags = '<p class="' . join( $classes, ' ' ) . '">' . $tags . '</p>'; + } /* Output the tag cloud. */ echo $tags; @@ -115,7 +97,8 @@ class Hybrid_Widget_Tags extends WP_Widget { /** * Updates the widget control options for the particular instance of the widget. - * @since 0.6 + * + * @since 0.6.0 */ function update( $new_instance, $old_instance ) { $instance = $old_instance; @@ -123,12 +106,6 @@ class Hybrid_Widget_Tags extends WP_Widget { /* Set the instance to the new instance. */ $instance = $new_instance; - /* If new taxonomy is chosen, reset includes and excludes. */ - if ( $instance['taxonomy'] !== $old_instance['taxonomy'] ) { - $instance['include'] = array(); - $instance['exclude'] = array(); - } - $instance['title'] = strip_tags( $new_instance['title'] ); $instance['smallest'] = strip_tags( $new_instance['smallest'] ); $instance['largest'] = strip_tags( $new_instance['largest'] ); @@ -138,6 +115,10 @@ class Hybrid_Widget_Tags extends WP_Widget { $instance['search'] = strip_tags( $new_instance['search'] ); $instance['child_of'] = strip_tags( $new_instance['child_of'] ); $instance['parent'] = strip_tags( $new_instance['parent'] ); + $instance['topic_count_text_callback'] = strip_tags( $new_instance['topic_count_text_callback'] ); + $instance['topic_count_scale_callback'] = strip_tags( $new_instance['topic_count_scale_callback'] ); + $instance['include'] = preg_replace( '/[^0-9,]/', '', $new_instance['include'] ); + $instance['exclude'] = preg_replace( '/[^0-9,]/', '', $new_instance['exclude'] ); $instance['unit'] = $new_instance['unit']; $instance['format'] = $new_instance['format']; $instance['orderby'] = $new_instance['orderby']; @@ -152,31 +133,34 @@ class Hybrid_Widget_Tags extends WP_Widget { /** * Displays the widget control options in the Widgets admin screen. - * @since 0.6 + * + * @since 0.6.0 */ function form( $instance ) { /* Set up the default form values. */ $defaults = array( - 'title' => esc_attr__( 'Tags', $this->textdomain ), + 'title' => esc_attr__( 'Tags', 'hybrid-core' ), 'order' => 'ASC', 'orderby' => 'name', 'format' => 'flat', - 'include' => array(), - 'exclude' => array(), + 'include' => '', + 'exclude' => '', 'unit' => 'pt', 'smallest' => 8, 'largest' => 22, 'link' => 'view', 'number' => 45, - 'separator' => '', + 'separator' => ' ', 'child_of' => '', 'parent' => '', - 'taxonomy' => 'post_tag', + 'taxonomy' => array( 'post_tag' ), 'hide_empty' => 1, 'pad_counts' => false, 'search' => '', - 'name__like' => '' + 'name__like' => '', + 'topic_count_text_callback' => 'default_topic_count_text', + 'topic_count_scale_callback' => 'default_topic_count_scale', ); /* Merge the user-selected arguments with the defaults. */ @@ -184,33 +168,24 @@ class Hybrid_Widget_Tags extends WP_Widget { /* <select> element options. */ $taxonomies = get_taxonomies( array( 'show_tagcloud' => true ), 'objects' ); - $terms = get_terms( $instance['taxonomy'] ); - $link = array( 'view' => esc_attr__( 'View', $this->textdomain ), 'edit' => esc_attr__( 'Edit', $this->textdomain ) ); - $format = array( 'flat' => esc_attr__( 'Flat', $this->textdomain ), 'list' => esc_attr__( 'List', $this->textdomain ) ); - $order = array( 'ASC' => esc_attr__( 'Ascending', $this->textdomain ), 'DESC' => esc_attr__( 'Descending', $this->textdomain ), 'RAND' => esc_attr__( 'Random', $this->textdomain ) ); - $orderby = array( 'count' => esc_attr__( 'Count', $this->textdomain ), 'name' => esc_attr__( 'Name', $this->textdomain ) ); + $link = array( 'view' => esc_attr__( 'View', 'hybrid-core' ), 'edit' => esc_attr__( 'Edit', 'hybrid-core' ) ); + $format = array( 'flat' => esc_attr__( 'Flat', 'hybrid-core' ), 'list' => esc_attr__( 'List', 'hybrid-core' ) ); + $order = array( 'ASC' => esc_attr__( 'Ascending', 'hybrid-core' ), 'DESC' => esc_attr__( 'Descending', 'hybrid-core' ), 'RAND' => esc_attr__( 'Random', 'hybrid-core' ) ); + $orderby = array( 'count' => esc_attr__( 'Count', 'hybrid-core' ), 'name' => esc_attr__( 'Name', 'hybrid-core' ) ); $unit = array( 'pt' => 'pt', 'px' => 'px', 'em' => 'em', '%' => '%' ); ?> <div class="hybrid-widget-controls columns-3"> <p> - <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain ); ?></label> + <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'hybrid-core' ); ?></label> <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p> <label for="<?php echo $this->get_field_id( 'taxonomy' ); ?>"><code>taxonomy</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'taxonomy' ); ?>" name="<?php echo $this->get_field_name( 'taxonomy' ); ?>"> + <select class="widefat" id="<?php echo $this->get_field_id( 'taxonomy' ); ?>" name="<?php echo $this->get_field_name( 'taxonomy' ); ?>[]" size="4" multiple="multiple"> <?php foreach ( $taxonomies as $taxonomy ) { ?> - <option value="<?php echo $taxonomy->name; ?>" <?php selected( $instance['taxonomy'], $taxonomy->name ); ?>><?php echo $taxonomy->labels->singular_name; ?></option> - <?php } ?> - </select> - </p> - <p> - <label for="<?php echo $this->get_field_id( 'link' ); ?>"><code>link</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'link' ); ?>" name="<?php echo $this->get_field_name( 'link' ); ?>"> - <?php foreach ( $link as $option_value => $option_label ) { ?> - <option value="<?php echo $option_value; ?>" <?php selected( $instance['link'], $option_value ); ?>><?php echo $option_label; ?></option> + <option value="<?php echo $taxonomy->name; ?>" <?php selected( in_array( $taxonomy->name, (array)$instance['taxonomy'] ) ); ?>><?php echo $taxonomy->labels->singular_name; ?></option> <?php } ?> </select> </p> @@ -242,20 +217,12 @@ class Hybrid_Widget_Tags extends WP_Widget { <div class="hybrid-widget-controls columns-3"> <p> - <label for="<?php echo $this->get_field_id( 'include' ); ?>"><code>include</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'include' ); ?>" name="<?php echo $this->get_field_name( 'include' ); ?>[]" size="4" multiple="multiple"> - <?php foreach ( $terms as $term ) { ?> - <option value="<?php echo $term->term_id; ?>" <?php echo ( in_array( $term->term_id, (array) $instance['include'] ) ? 'selected="selected"' : '' ); ?>><?php echo $term->name; ?></option> - <?php } ?> - </select> + <label for="<?php echo $this->get_field_id( 'include' ); ?>"><code>include</code></label> + <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'include' ); ?>" name="<?php echo $this->get_field_name( 'include' ); ?>" value="<?php echo esc_attr( $instance['include'] ); ?>" /> </p> <p> - <label for="<?php echo $this->get_field_id( 'exclude' ); ?>"><code>exclude</code></label> - <select class="widefat" id="<?php echo $this->get_field_id( 'exclude' ); ?>" name="<?php echo $this->get_field_name( 'exclude' ); ?>[]" size="4" multiple="multiple"> - <?php foreach ( $terms as $term ) { ?> - <option value="<?php echo $term->term_id; ?>" <?php echo ( in_array( $term->term_id, (array) $instance['exclude'] ) ? 'selected="selected"' : '' ); ?>><?php echo $term->name; ?></option> - <?php } ?> - </select> + <label for="<?php echo $this->get_field_id( 'exclude' ); ?>"><code>exclude</code></label> + <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'exclude' ); ?>" name="<?php echo $this->get_field_name( 'exclude' ); ?>" value="<?php echo esc_attr( $instance['exclude'] ); ?>" /> </p> <p> <label for="<?php echo $this->get_field_id( 'number' ); ?>"><code>number</code></label> @@ -277,9 +244,6 @@ class Hybrid_Widget_Tags extends WP_Widget { <?php } ?> </select> </p> - </div> - - <div class="hybrid-widget-controls columns-3 column-last"> <p> <label for="<?php echo $this->get_field_id( 'separator' ); ?>"><code>separator</code></label> <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'separator' ); ?>" name="<?php echo $this->get_field_name( 'separator' ); ?>" value="<?php echo esc_attr( $instance['separator'] ); ?>" /> @@ -292,6 +256,17 @@ class Hybrid_Widget_Tags extends WP_Widget { <label for="<?php echo $this->get_field_id( 'parent' ); ?>"><code>parent</code></label> <input type="text" class="smallfat code" id="<?php echo $this->get_field_id( 'parent' ); ?>" name="<?php echo $this->get_field_name( 'parent' ); ?>" value="<?php echo esc_attr( $instance['parent'] ); ?>" /> </p> + <p> + <label for="<?php echo $this->get_field_id( 'link' ); ?>"><code>link</code></label> + <select class="widefat" id="<?php echo $this->get_field_id( 'link' ); ?>" name="<?php echo $this->get_field_name( 'link' ); ?>"> + <?php foreach ( $link as $option_value => $option_label ) { ?> + <option value="<?php echo $option_value; ?>" <?php selected( $instance['link'], $option_value ); ?>><?php echo $option_label; ?></option> + <?php } ?> + </select> + </p> + </div> + + <div class="hybrid-widget-controls columns-3 column-last"> <p> <label for="<?php echo $this->get_field_id( 'search' ); ?>"><code>search</code></label> <input type="text" class="widefat code" id="<?php echo $this->get_field_id( 'search' ); ?>" name="<?php echo $this->get_field_name( 'search' ); ?>" value="<?php echo esc_attr( $instance['search'] ); ?>" /> @@ -300,13 +275,21 @@ class Hybrid_Widget_Tags extends WP_Widget { <label for="<?php echo $this->get_field_id( 'name__like' ); ?>"><code>name__like</code></label> <input type="text" class="widefat code" id="<?php echo $this->get_field_id( 'name__like' ); ?>" name="<?php echo $this->get_field_name( 'name__like' ); ?>" value="<?php echo esc_attr( $instance['name__like'] ); ?>" /> </p> + <p> + <label for="<?php echo $this->get_field_id( 'topic_count_text_callback' ); ?>"><code>topic_count_text_callback</code></label> + <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'topic_count_text_callback' ); ?>" name="<?php echo $this->get_field_name( 'topic_count_text_callback' ); ?>" value="<?php echo esc_attr( $instance['topic_count_text_callback'] ); ?>" /> + </p> + <p> + <label for="<?php echo $this->get_field_id( 'topic_count_scale_callback' ); ?>"><code>topic_count_scale_callback</code></label> + <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'topic_count_scale_callback' ); ?>" name="<?php echo $this->get_field_name( 'topic_count_scale_callback' ); ?>" value="<?php echo esc_attr( $instance['topic_count_scale_callback'] ); ?>" /> + </p> <p> <label for="<?php echo $this->get_field_id( 'pad_counts' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['pad_counts'], true ); ?> id="<?php echo $this->get_field_id( 'pad_counts' ); ?>" name="<?php echo $this->get_field_name( 'pad_counts' ); ?>" /> <?php _e( 'Pad counts?', $this->textdomain ); ?> <code>pad_counts</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['pad_counts'], true ); ?> id="<?php echo $this->get_field_id( 'pad_counts' ); ?>" name="<?php echo $this->get_field_name( 'pad_counts' ); ?>" /> <?php _e( 'Pad counts?', 'hybrid-core' ); ?> <code>pad_counts</code></label> </p> <p> <label for="<?php echo $this->get_field_id( 'hide_empty' ); ?>"> - <input class="checkbox" type="checkbox" <?php checked( $instance['hide_empty'], true ); ?> id="<?php echo $this->get_field_id( 'hide_empty' ); ?>" name="<?php echo $this->get_field_name( 'hide_empty' ); ?>" /> <?php _e( 'Hide empty?', $this->textdomain ); ?> <code>hide_empty</code></label> + <input class="checkbox" type="checkbox" <?php checked( $instance['hide_empty'], true ); ?> id="<?php echo $this->get_field_id( 'hide_empty' ); ?>" name="<?php echo $this->get_field_name( 'hide_empty' ); ?>" /> <?php _e( 'Hide empty?', 'hybrid-core' ); ?> <code>hide_empty</code></label> </p> </div> <div style="clear:both;"> </div> diff --git a/wp-content/themes/hybrid/library/css/drop-downs.css b/wp-content/themes/hybrid/library/css/drop-downs.css index fd05c46894d8a9bc05a613f4561bc7f917908045..44426d1913b259e5c783866cc22a36cee1102ad7 100644 --- a/wp-content/themes/hybrid/library/css/drop-downs.css +++ b/wp-content/themes/hybrid/library/css/drop-downs.css @@ -1 +1 @@ -div.menu ul{margin:0;padding:0;list-style:none;line-height:1.0}div.menu ul ul{position:absolute;top:-999em;width:10em}div.menu ul ul li{width:100%}div.menu li:hover{visibility:inherit}div.menu li{float:left;position:relative}div.menu a{display:block;position:relative}div.menu li:hover ul,li.sfHover ul{left:0;top:2em;z-index:99}div.menu li:hover li ul,li.sfHover li ul{top:-999em}div.menu li li:hover ul,li li.sfHover ul{left:10em;top:0}div.menu li li:hover li ul,li li.sfHover li ul{top:-999em}div.menu li li li:hover ul,li li li.sfHover ul{left:10em;top:0} \ No newline at end of file +div.menu ul,nav.menu ul{margin:0;padding:0;list-style:none;line-height:1.0}div.menu ul ul,nav.menu ul ul{position:absolute;top:-999em;width:10em}div.menu ul ul li,nav.menu ul ul li{width:100%}div.menu li:hover,nav.menu li:hover{visibility:inherit}div.menu li,nav.menu li{float:left;position:relative}div.menu a,nav.menu a{display:block;position:relative}div.menu li:hover ul,div.menu li.sfHover ul,nav.menu li:hover ul,nav.menu li.sfHover ul{left:0;top:2em;z-index:99}div.menu li:hover li ul,div.menu li.sfHover li ul,nav.menu li:hover li ul,nav.menu li.sfHover li ul{top:-999em}div.menu li li:hover ul,div.menu li li.sfHover ul,nav.menu li li:hover ul,nav.menu li li.sfHover ul{left:10em;top:0}div.menu li li:hover li ul,div.menu li li.sfHover li ul,nav.menu li li:hover li ul,nav.menu li li.sfHover li ul{top:-999em}div.menu li li li:hover ul,div.menu li li li.sfHover ul,nav.menu li li li:hover ul,nav.menu li li li.sfHover ul{left:10em;top:0} \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/css/drop-downs.dev.css b/wp-content/themes/hybrid/library/css/drop-downs.dev.css index 180dc86c3c3b17fbc4f99facef632b842c96bbcc..922d14af0d1f99ac4d35c65637e41107c0caa56b 100644 --- a/wp-content/themes/hybrid/library/css/drop-downs.dev.css +++ b/wp-content/themes/hybrid/library/css/drop-downs.dev.css @@ -1,55 +1,64 @@ -/** - * Dropdowns Stylesheet - * Sets up some default dropdown menu styles - * Style rules for both the page and category menus - * - * @since 0.5 - * @package Hybrid - * @subpackage CSS - */ - -/* Drop-down styles. */ -div.menu ul { - margin: 0; - padding: 0; - list-style: none; - line-height: 1.0; - } -div.menu ul ul { - position: absolute; - top: -999em; - width: 10em; - } -div.menu ul ul li { - width: 100%; - } -div.menu li:hover { - visibility: inherit; - } -div.menu li { - float: left; - position: relative; - } -div.menu a { - display: block; - position: relative; - } -div.menu li:hover ul, li.sfHover ul { - left: 0; - top: 2em; - z-index: 99; - } -div.menu li:hover li ul, li.sfHover li ul { - top: -999em; - } -div.menu li li:hover ul, li li.sfHover ul { - left: 10em; - top: 0; - } -div.menu li li:hover li ul, li li.sfHover li ul { - top: -999em; - } -div.menu li li li:hover ul, li li li.sfHover ul { - left: 10em; - top: 0; +/** + * Dropdowns Stylesheet - Sets up style rules for drop-down menus. + * + * @since 0.5.0 + * @package Hybrid + * @subpackage CSS + */ + +/* Drop-down styles. */ +div.menu ul, +nav.menu ul { + margin: 0; + padding: 0; + list-style: none; + line-height: 1.0; + } +div.menu ul ul, +nav.menu ul ul { + position: absolute; + top: -999em; + width: 10em; + } +div.menu ul ul li, +nav.menu ul ul li { + width: 100%; + } +div.menu li:hover, +nav.menu li:hover { + visibility: inherit; + } +div.menu li, +nav.menu li { + float: left; + position: relative; + } +div.menu a, +nav.menu a { + display: block; + position: relative; + } +div.menu li:hover ul, div.menu li.sfHover ul, +nav.menu li:hover ul, nav.menu li.sfHover ul { + left: 0; + top: 2em; + z-index: 99; + } +div.menu li:hover li ul, div.menu li.sfHover li ul, +nav.menu li:hover li ul, nav.menu li.sfHover li ul { + top: -999em; + } +div.menu li li:hover ul, div.menu li li.sfHover ul, +nav.menu li li:hover ul, nav.menu li li.sfHover ul { + left: 10em; + top: 0; + } +div.menu li li:hover li ul, div.menu li li.sfHover li ul, +nav.menu li li:hover li ul, nav.menu li li.sfHover li ul { + top: -999em; + } +div.menu li li li:hover ul, div.menu li li li.sfHover ul, +nav.menu li li li:hover ul, nav.menu li li li.sfHover ul { + left: 10em; + top: 0; } \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/css/holy-grail-fluid.css b/wp-content/themes/hybrid/library/css/holy-grail-fluid.css index 10606db3e9905521d3139e3ea15743228d925d3a..c2347ad5b6515b3807af72a117324a8b8c691c0b 100644 --- a/wp-content/themes/hybrid/library/css/holy-grail-fluid.css +++ b/wp-content/themes/hybrid/library/css/holy-grail-fluid.css @@ -1,5 +1,5 @@ -/** - * @deprecated 1.0.0 - This file is for backwards compatibility with the Hybrid parent theme. It will - * be removed in a future version. -*/ +/** + * @deprecated 1.0.0 - This file is for backwards compatibility with the Hybrid parent theme. It will + * be removed in a future version. +*/ body{min-width:600px}#container{overflow:hidden;padding-left:200px; padding-right:200px}.content,#primary,#secondary{position:relative;float:left;padding-bottom:20010px; margin-bottom:-20000px}.content{width:100%}#primary{width:200px; right:200px; margin-left:-100%}#secondary{width:200px; margin-right:-200px}#footer{clear:both}* html #secondary{left:200px} \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/css/nav-bar.css b/wp-content/themes/hybrid/library/css/nav-bar.css new file mode 100644 index 0000000000000000000000000000000000000000..aa85ad6720620df4cfd231ee9513bcbf1a4f223a --- /dev/null +++ b/wp-content/themes/hybrid/library/css/nav-bar.css @@ -0,0 +1 @@ +div.menu ul,nav.menu ul{margin:0;padding:0;list-style:none;line-height:1.0;position:relative}div.menu ul ul,nav.menu ul ul{position:absolute;top:-999em;width:100%}div.menu ul ul ul,nav.menu ul ul ul{width:10em}div.menu ul ul li,nav.menu ul ul li{position:relative;width:auto;float:left}div.menu ul ul ul li,nav.menu ul ul ul li{width:100%}div.menu li:hover,nav.menu li:hover{visibility:inherit}div.menu li,nav.menu li{float:left;position:static}div.menu a,nav.menu a{display:block;position:relative}div.menu li:hover ul,div.menu li.sfHover ul,nav.menu li:hover ul,nav.menu li.sfHover ul{left:0;top:2em;z-index:99}div.menu li:hover li ul,div.menu li.sfHover li ul,nav.menu li:hover li ul,nav.menu li.sfHover li ul{top:-999em}div.menu li li:hover ul,div.menu li li.sfHover ul,nav.menu li li:hover ul,nav.menu li li.sfHover ul{left:10em;top:0}div.menu li li:hover li ul,div.menu li li.sfHover li ul,nav.menu li li:hover li ul,nav.menu li li.sfHover li ul{top:-999em}div.menu li li li:hover ul,div.menu li li li.sfHover ul,nav.menu li li li:hover ul,nav.menu li li li.sfHover ul{left:10em;top:0}div.menu ul li.current-menu-item ul,div.menu ul ul li:hover ul,div.menu ul ul li.sfHover ul,nav.menu ul li.current-menu-item ul,nav.menu ul ul li:hover ul,nav.menu ul ul li.sfHover ul{left:0;top:2.5em}div.menu ul li.current-menu-item ul ul,nav.menu ul li.current-menu-item ul ul{top:-999em} \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/css/nav-bar.dev.css b/wp-content/themes/hybrid/library/css/nav-bar.dev.css new file mode 100644 index 0000000000000000000000000000000000000000..958dc4a22384df3d0208b95a3f9f85a94489f62b --- /dev/null +++ b/wp-content/themes/hybrid/library/css/nav-bar.dev.css @@ -0,0 +1,83 @@ +/** + * Nav-Bar Stylesheet - Sets up style rules for nav-bar style menus + * + * @since 1.3.0 + * @package HybridCore + * @subpackage CSS + */ + +div.menu ul, +nav.menu ul { + margin: 0; + padding: 0; + list-style: none; + line-height: 1.0; + position: relative; + } +div.menu ul ul, +nav.menu ul ul { + position: absolute; + top: -999em; + width: 100%; + } +div.menu ul ul ul, +nav.menu ul ul ul { + width: 10em; + } +div.menu ul ul li, +nav.menu ul ul li { + position: relative; + width: auto; + float: left; + } +div.menu ul ul ul li, +nav.menu ul ul ul li { + width: 100%; + } +div.menu li:hover, +nav.menu li:hover { + visibility: inherit; + } +div.menu li, +nav.menu li { + float: left; + position: static; + } +div.menu a, +nav.menu a { + display: block; + position: relative; + } +div.menu li:hover ul, div.menu li.sfHover ul, +nav.menu li:hover ul, nav.menu li.sfHover ul { + left: 0; + top: 2em; + z-index: 99; + } +div.menu li:hover li ul, div.menu li.sfHover li ul, +nav.menu li:hover li ul, nav.menu li.sfHover li ul { + top: -999em; + } +div.menu li li:hover ul, div.menu li li.sfHover ul, +nav.menu li li:hover ul, nav.menu li li.sfHover ul { + left: 10em; + top: 0; + } +div.menu li li:hover li ul, div.menu li li.sfHover li ul, +nav.menu li li:hover li ul, nav.menu li li.sfHover li ul { + top: -999em; + } +div.menu li li li:hover ul, div.menu li li li.sfHover ul, +nav.menu li li li:hover ul, nav.menu li li li.sfHover ul { + left: 10em; + top: 0; + } +div.menu ul li.current-menu-item ul, div.menu ul ul li:hover ul, div.menu ul ul li.sfHover ul, +nav.menu ul li.current-menu-item ul, nav.menu ul ul li:hover ul, nav.menu ul ul li.sfHover ul { + left: 0; + top: 2.5em; + } +div.menu ul li.current-menu-item ul ul, +nav.menu ul li.current-menu-item ul ul { + top: -999em; + } \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/extensions/breadcrumb-trail.php b/wp-content/themes/hybrid/library/extensions/breadcrumb-trail.php index ef93d3d980cc788c40a2581c914eae262234c1a3..c75a69e1af152bcc6b6ab5dbf2e292e17afc94be 100644 --- a/wp-content/themes/hybrid/library/extensions/breadcrumb-trail.php +++ b/wp-content/themes/hybrid/library/extensions/breadcrumb-trail.php @@ -2,21 +2,22 @@ /** * Breadcrumb Trail - A breadcrumb menu script for WordPress. * - * Breadcrumb Trail is a script for showing a breadcrumb trail for any type of page. It tries to anticipate - * any type of structure and display the best possible trail that matches your site's permalink structure. - * While not perfect, it attempts to fill in the gaps left by many other breadcrumb scripts. + * Breadcrumb Trail is a script for showing a breadcrumb trail for any type of page. It tries to + * anticipate any type of structure and display the best possible trail that matches your site's + * permalink structure. While not perfect, it attempts to fill in the gaps left by many other + * breadcrumb scripts. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package BreadcrumbTrail - * @version 0.4.1 + * @version 0.5.2 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2008 - 2011, Justin Tadlock + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock * @link http://justintadlock.com/archives/2009/04/05/breadcrumb-trail-wordpress-plugin * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ @@ -27,25 +28,24 @@ * formats those items. * * @since 0.1.0 + * @access public * @param array $args Mixed arguments for the menu. * @return string Output of the breadcrumb menu. */ function breadcrumb_trail( $args = array() ) { - /* Get the textdomain. */ - $textdomain = breadcrumb_trail_textdomain(); - /* Create an empty variable for the breadcrumb. */ $breadcrumb = ''; /* Set up the default arguments for the breadcrumb. */ $defaults = array( - 'separator' => '/', - 'before' => '<span class="breadcrumb-title">' . __( 'Browse:', $textdomain ) . '</span>', - 'after' => false, - 'front_page' => true, - 'show_home' => __( 'Home', $textdomain ), - 'echo' => true + 'container' => 'div', // div, nav, p, etc. + 'separator' => '/', + 'before' => __( 'Browse:', 'breadcrumb-trail' ), + 'after' => false, + 'front_page' => true, + 'show_home' => __( 'Home', 'breadcrumb-trail' ), + 'echo' => true ); /* Allow singular post views to have a taxonomy's terms prefixing the trail. */ @@ -67,14 +67,17 @@ function breadcrumb_trail( $args = array() ) { if ( !empty( $trail ) && is_array( $trail ) ) { /* Open the breadcrumb trail containers. */ - $breadcrumb = '<div class="breadcrumb breadcrumbs"><div class="breadcrumb-trail">'; + $breadcrumb = '<' . tag_escape( $args['container'] ) . ' class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb">'; /* If $before was set, wrap it in a container. */ $breadcrumb .= ( !empty( $args['before'] ) ? '<span class="trail-before">' . $args['before'] . '</span> ' : '' ); - /* Wrap the $trail['trail_end'] value in a container. */ - if ( !empty( $trail['trail_end'] ) ) - $trail['trail_end'] = '<span class="trail-end">' . $trail['trail_end'] . '</span>'; + /* Adds the 'trail-begin' class around first item if there's more than one item. */ + if ( 1 < count( $trail ) ) + array_unshift( $trail, '<span class="trail-begin">' . array_shift( $trail ) . '</span>' ); + + /* Adds the 'trail-end' class around last item. */ + array_push( $trail, '<span class="trail-end">' . array_pop( $trail ) . '</span>' ); /* Format the separator. */ $separator = ( !empty( $args['separator'] ) ? '<span class="sep">' . $args['separator'] . '</span>' : '<span class="sep">/</span>' ); @@ -86,7 +89,7 @@ function breadcrumb_trail( $args = array() ) { $breadcrumb .= ( !empty( $args['after'] ) ? ' <span class="trail-after">' . $args['after'] . '</span>' : '' ); /* Close the breadcrumb trail containers. */ - $breadcrumb .= '</div></div>'; + $breadcrumb .= '</' . tag_escape( $args['container'] ) . '>'; } /* Allow developers to filter the breadcrumb trail HTML. */ @@ -106,15 +109,13 @@ function breadcrumb_trail( $args = array() ) { * * @since 0.4.0 * @todo Build in caching based on the queried object ID. + * @access private * @param array $args Mixed arguments for the menu. * @return array List of items to be shown in the trail. */ function breadcrumb_trail_get_items( $args = array() ) { global $wp_rewrite; - /* Get the textdomain. */ - $textdomain = breadcrumb_trail_textdomain(); - /* Set up an empty trail array and empty path. */ $trail = array(); $path = ''; @@ -123,17 +124,22 @@ function breadcrumb_trail_get_items( $args = array() ) { if ( !is_front_page() && $args['show_home'] ) $trail[] = '<a href="' . home_url() . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '" rel="home" class="trail-begin">' . $args['show_home'] . '</a>'; + /* If bbPress is installed and we're on a bbPress page. */ + if ( function_exists( 'is_bbpress' ) && is_bbpress() ) { + $trail = array_merge( $trail, breadcrumb_trail_get_bbpress_items() ); + } + /* If viewing the front page of the site. */ - if ( is_front_page() ) { + elseif ( is_front_page() ) { if ( $args['show_home'] && $args['front_page'] ) - $trail['trail_end'] = "{$args['show_home']}"; + $trail[] = "{$args['show_home']}"; } /* If viewing the "home"/posts page. */ elseif ( is_home() ) { $home_page = get_page( get_queried_object_id() ); $trail = array_merge( $trail, breadcrumb_trail_get_parents( $home_page->post_parent, '' ) ); - $trail['trail_end'] = get_the_title( $home_page->ID ); + $trail[] = get_the_title( $home_page->ID ); } /* If viewing a singular post (page, attachment, etc.). */ @@ -209,9 +215,9 @@ function breadcrumb_trail_get_items( $args = array() ) { $trail[] = $terms; /* End with the post title. */ - $post_title = get_the_title(); + $post_title = single_post_title( '', false ); if ( !empty( $post_title ) ) - $trail['trail_end'] = $post_title; + $trail[] = $post_title; } /* If we're viewing any type of archive. */ @@ -244,7 +250,7 @@ function breadcrumb_trail_get_items( $args = array() ) { $trail = array_merge( $trail, breadcrumb_trail_get_term_parents( $term->parent, $term->taxonomy ) ); /* Add the term name to the trail end. */ - $trail['trail_end'] = single_term_title( '', false ); + $trail[] = single_term_title( '', false ); } /* If viewing a post type archive. */ @@ -266,7 +272,7 @@ function breadcrumb_trail_get_items( $args = array() ) { $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $path ) ); /* Add the post type [plural] name to the trail end. */ - $trail['trail_end'] = $post_type_object->labels->name; + $trail[] = $post_type_object->labels->name; } /* If viewing an author archive. */ @@ -285,20 +291,20 @@ function breadcrumb_trail_get_items( $args = array() ) { $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $path ) ); /* Add the author's display name to the trail end. */ - $trail['trail_end'] = get_the_author_meta( 'display_name', get_query_var( 'author' ) ); + $trail[] = get_the_author_meta( 'display_name', get_query_var( 'author' ) ); } /* If viewing a time-based archive. */ elseif ( is_time() ) { if ( get_query_var( 'minute' ) && get_query_var( 'hour' ) ) - $trail['trail_end'] = get_the_time( __( 'g:i a', $textdomain ) ); + $trail[] = get_the_time( __( 'g:i a', 'breadcrumb-trail' ) ); elseif ( get_query_var( 'minute' ) ) - $trail['trail_end'] = sprintf( __( 'Minute %1$s', $textdomain ), get_the_time( __( 'i', $textdomain ) ) ); + $trail[] = sprintf( __( 'Minute %1$s', 'breadcrumb-trail' ), get_the_time( __( 'i', 'breadcrumb-trail' ) ) ); elseif ( get_query_var( 'hour' ) ) - $trail['trail_end'] = get_the_time( __( 'g a', $textdomain ) ); + $trail[] = get_the_time( __( 'g a', 'breadcrumb-trail' ) ); } /* If viewing a date-based archive. */ @@ -309,39 +315,163 @@ function breadcrumb_trail_get_items( $args = array() ) { $trail = array_merge( $trail, breadcrumb_trail_get_parents( '', $wp_rewrite->front ) ); if ( is_day() ) { - $trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>'; - $trail[] = '<a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '" title="' . get_the_time( esc_attr__( 'F', $textdomain ) ) . '">' . get_the_time( __( 'F', $textdomain ) ) . '</a>'; - $trail['trail_end'] = get_the_time( __( 'd', $textdomain ) ); + $trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', 'breadcrumb-trail' ) ) . '">' . get_the_time( __( 'Y', 'breadcrumb-trail' ) ) . '</a>'; + $trail[] = '<a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '" title="' . get_the_time( esc_attr__( 'F', 'breadcrumb-trail' ) ) . '">' . get_the_time( __( 'F', 'breadcrumb-trail' ) ) . '</a>'; + $trail[] = get_the_time( __( 'd', 'breadcrumb-trail' ) ); } elseif ( get_query_var( 'w' ) ) { - $trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>'; - $trail['trail_end'] = sprintf( __( 'Week %1$s', $textdomain ), get_the_time( esc_attr__( 'W', $textdomain ) ) ); + $trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', 'breadcrumb-trail' ) ) . '">' . get_the_time( __( 'Y', 'breadcrumb-trail' ) ) . '</a>'; + $trail[] = sprintf( __( 'Week %1$s', 'breadcrumb-trail' ), get_the_time( esc_attr__( 'W', 'breadcrumb-trail' ) ) ); } elseif ( is_month() ) { - $trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', $textdomain ) ) . '">' . get_the_time( __( 'Y', $textdomain ) ) . '</a>'; - $trail['trail_end'] = get_the_time( __( 'F', $textdomain ) ); + $trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', 'breadcrumb-trail' ) ) . '">' . get_the_time( __( 'Y', 'breadcrumb-trail' ) ) . '</a>'; + $trail[] = get_the_time( __( 'F', 'breadcrumb-trail' ) ); } elseif ( is_year() ) { - $trail['trail_end'] = get_the_time( __( 'Y', $textdomain ) ); + $trail[] = get_the_time( __( 'Y', 'breadcrumb-trail' ) ); } } } /* If viewing search results. */ elseif ( is_search() ) - $trail['trail_end'] = sprintf( __( 'Search results for "%1$s"', $textdomain ), esc_attr( get_search_query() ) ); + $trail[] = sprintf( __( 'Search results for "%1$s"', 'breadcrumb-trail' ), esc_attr( get_search_query() ) ); /* If viewing a 404 error page. */ elseif ( is_404() ) - $trail['trail_end'] = __( '404 Not Found', $textdomain ); + $trail[] = __( '404 Not Found', 'breadcrumb-trail' ); /* Allow devs to step in and filter the $trail array. */ return apply_filters( 'breadcrumb_trail_items', $trail, $args ); } +/** + * Gets the items for the breadcrumb trail if bbPress is installed. + * + * @since 0.5.0 + * @access private + * @param array $args Mixed arguments for the menu. + * @return array List of items to be shown in the trail. + */ +function breadcrumb_trail_get_bbpress_items( $args = array() ) { + + /* Set up a new trail items array. */ + $trail = array(); + + /* Get the forum post type object. */ + $post_type_object = get_post_type_object( bbp_get_forum_post_type() ); + + /* If not viewing the forum root/archive page and a forum archive exists, add it. */ + if ( !empty( $post_type_object->has_archive ) && !bbp_is_forum_archive() ) + $trail[] = '<a href="' . get_post_type_archive_link( bbp_get_forum_post_type() ) . '">' . bbp_get_forum_archive_title() . '</a>'; + + /* If viewing the forum root/archive. */ + if ( bbp_is_forum_archive() ) { + $trail[] = bbp_get_forum_archive_title(); + } + + /* If viewing the topics archive. */ + elseif ( bbp_is_topic_archive() ) { + $trail[] = bbp_get_topic_archive_title(); + } + + /* If viewing a topic tag archive. */ + elseif ( bbp_is_topic_tag() ) { + $trail[] = bbp_get_topic_tag_name(); + } + + /* If viewing a topic tag edit page. */ + elseif ( bbp_is_topic_tag_edit() ) { + $trail[] = '<a href="' . bbp_get_topic_tag_link() . '">' . bbp_get_topic_tag_name() . '</a>'; + $trail[] = __( 'Edit', 'breadcrumb-trail' ); + } + + /* If viewing a "view" page. */ + elseif ( bbp_is_single_view() ) { + $trail[] = bbp_get_view_title(); + } + + /* If viewing a single topic page. */ + elseif ( bbp_is_single_topic() ) { + + /* Get the queried topic. */ + $topic_id = get_queried_object_id(); + + /* Get the parent items for the topic, which would be its forum (and possibly forum grandparents). */ + $trail = array_merge( $trail, breadcrumb_trail_get_parents( bbp_get_topic_forum_id( $topic_id ) ) ); + + /* If viewing a split, merge, or edit topic page, show the link back to the topic. Else, display topic title. */ + if ( bbp_is_topic_split() || bbp_is_topic_merge() || bbp_is_topic_edit() ) + $trail[] = '<a href="' . bbp_get_topic_permalink( $topic_id ) . '">' . bbp_get_topic_title( $topic_id ) . '</a>'; + else + $trail[] = bbp_get_topic_title( $topic_id ); + + /* If viewing a topic split page. */ + if ( bbp_is_topic_split() ) + $trail[] = __( 'Split', 'breadcrumb-trail' ); + + /* If viewing a topic merge page. */ + elseif ( bbp_is_topic_merge() ) + $trail[] = __( 'Merge', 'breadcrumb-trail' ); + + /* If viewing a topic edit page. */ + elseif ( bbp_is_topic_edit() ) + $trail[] = __( 'Edit', 'breadcrumb-trail' ); + } + + /* If viewing a single reply page. */ + elseif ( bbp_is_single_reply() ) { + + /* Get the queried reply object ID. */ + $reply_id = get_queried_object_id(); + + /* Get the parent items for the reply, which should be its topic. */ + $trail = array_merge( $trail, breadcrumb_trail_get_parents( bbp_get_reply_topic_id( $reply_id ) ) ); + + /* If viewing a reply edit page, link back to the reply. Else, display the reply title. */ + if ( bbp_is_reply_edit() ) { + $trail[] = '<a href="' . bbp_get_reply_url( $reply_id ) . '">' . bbp_get_reply_title( $reply_id ) . '</a>'; + $trail[] = __( 'Edit', 'breadcrumb-trail' ); + + } else { + $trail[] = bbp_get_reply_title( $reply_id ); + } + + } + + /* If viewing a single forum. */ + elseif ( bbp_is_single_forum() ) { + + /* Get the queried forum ID and its parent forum ID. */ + $forum_id = get_queried_object_id(); + $forum_parent_id = bbp_get_forum_parent_id( $forum_id ); + + /* If the forum has a parent forum, get its parent(s). */ + if ( 0 !== $forum_parent_id) + $trail = array_merge( $trail, breadcrumb_trail_get_parents( $forum_parent_id ) ); + + /* Add the forum title to the end of the trail. */ + $trail[] = bbp_get_forum_title( $forum_id ); + } + + /* If viewing a user page or user edit page. */ + elseif ( bbp_is_single_user() || bbp_is_single_user_edit() ) { + + if ( bbp_is_single_user_edit() ) { + $trail[] = '<a href="' . bbp_get_user_profile_url() . '">' . bbp_get_displayed_user_field( 'display_name' ) . '</a>'; + $trail[] = __( 'Edit', 'breadcrumb-trail' ); + } else { + $trail[] = bbp_get_displayed_user_field( 'display_name' ); + } + } + + /* Return the bbPress breadcrumb trail items. */ + return apply_filters( 'breadcrumb_trail_get_bbpress_items', $trail, $args ); +} + /** * Turns %tag% from permalink structures into usable links for the breadcrumb trail. This feels kind of * hackish for now because we're checking for specific %tag% examples and only doing it for the 'post' @@ -349,6 +479,7 @@ function breadcrumb_trail_get_items( $args = array() ) { * types. * * @since 0.4.0 + * @access private * @param int $post_id ID of the post whose parents we want. * @param string $path Path of a potential parent page. * @param array $args Mixed arguments for the menu. @@ -370,9 +501,6 @@ function breadcrumb_trail_map_rewrite_tags( $post_id = '', $path = '', $args = a if ( empty( $post ) || is_wp_error( $post ) || 'post' !== $post->post_type ) return $trail; - /* Get the textdomain. */ - $textdomain = breadcrumb_trail_textdomain(); - /* Trim '/' from both sides of the $path. */ $path = trim( $path, '/' ); @@ -390,15 +518,15 @@ function breadcrumb_trail_map_rewrite_tags( $post_id = '', $path = '', $args = a /* If using the %year% tag, add a link to the yearly archive. */ if ( '%year%' == $tag ) - $trail[] = '<a href="' . get_year_link( get_the_time( 'Y', $post_id ) ) . '" title="' . get_the_time( esc_attr__( 'Y', $textdomain ), $post_id ) . '">' . get_the_time( __( 'Y', $textdomain ), $post_id ) . '</a>'; + $trail[] = '<a href="' . get_year_link( get_the_time( 'Y', $post_id ) ) . '" title="' . get_the_time( esc_attr__( 'Y', 'breadcrumb-trail' ), $post_id ) . '">' . get_the_time( __( 'Y', 'breadcrumb-trail' ), $post_id ) . '</a>'; /* If using the %monthnum% tag, add a link to the monthly archive. */ elseif ( '%monthnum%' == $tag ) - $trail[] = '<a href="' . get_month_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ) ) . '" title="' . get_the_time( esc_attr__( 'F Y', $textdomain ), $post_id ) . '">' . get_the_time( __( 'F', $textdomain ), $post_id ) . '</a>'; + $trail[] = '<a href="' . get_month_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ) ) . '" title="' . get_the_time( esc_attr__( 'F Y', 'breadcrumb-trail' ), $post_id ) . '">' . get_the_time( __( 'F', 'breadcrumb-trail' ), $post_id ) . '</a>'; /* If using the %day% tag, add a link to the daily archive. */ elseif ( '%day%' == $tag ) - $trail[] = '<a href="' . get_day_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ), get_the_time( 'd', $post_id ) ) . '" title="' . get_the_time( esc_attr__( 'F j, Y', $textdomain ), $post_id ) . '">' . get_the_time( __( 'd', $textdomain ), $post_id ) . '</a>'; + $trail[] = '<a href="' . get_day_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ), get_the_time( 'd', $post_id ) ) . '" title="' . get_the_time( esc_attr__( 'F j, Y', 'breadcrumb-trail' ), $post_id ) . '">' . get_the_time( __( 'd', 'breadcrumb-trail' ), $post_id ) . '</a>'; /* If using the %author% tag, add a link to the post author archive. */ elseif ( '%author%' == $tag ) @@ -438,6 +566,7 @@ function breadcrumb_trail_map_rewrite_tags( $post_id = '', $path = '', $args = a * path, it'll be added. But, it's also just a way to check for a hierarchy with hierarchical post types. * * @since 0.3.0 + * @access private * @param int $post_id ID of the post whose parents we want. * @param string $path Path of a potential parent page. * @return array $trail Array of parent page links. @@ -524,6 +653,7 @@ function breadcrumb_trail_get_parents( $post_id = '', $path = '' ) { * function get_category_parents() but handles any type of taxonomy. * * @since 0.3.0 + * @access private * @param int $parent_id The ID of the first parent. * @param object|string $taxonomy The taxonomy of the term whose parents we want. * @return array $trail Array of links to parent terms. @@ -559,14 +689,4 @@ function breadcrumb_trail_get_term_parents( $parent_id = '', $taxonomy = '' ) { return $trail; } -/** - * Returns the textdomain used by the script and allows it to be filtered by plugins/themes. - * - * @since 0.4.0 - * @returns string The textdomain for the script. - */ -function breadcrumb_trail_textdomain() { - return apply_filters( 'breadcrumb_trail_textdomain', 'breadcrumb-trail' ); -} - ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/extensions/cleaner-caption.php b/wp-content/themes/hybrid/library/extensions/cleaner-caption.php index 52decfcdb02110d8a85ac2fd858c710f26ec0ce8..6490874f1b8a6a8a426714135bc54d2d99eae713 100644 --- a/wp-content/themes/hybrid/library/extensions/cleaner-caption.php +++ b/wp-content/themes/hybrid/library/extensions/cleaner-caption.php @@ -9,16 +9,16 @@ * the shortcode, allowing themes to better handle how their captions are designed. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package CleanerCaption - * @version 0.1.0 + * @version 0.1.1 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2011, Justin Tadlock + * @copyright Copyright (c) 2012, Justin Tadlock * @link http://justintadlock.com * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ @@ -31,6 +31,7 @@ add_filter( 'img_caption_shortcode', 'cleaner_caption', 10, 3 ); * inline styling WP adds, which creates 10px of padding around captioned elements. * * @since 0.1.0 + * @access private * @param string $output The output of the default caption (empty string at this point). * @param array $attr Array of arguments for the [caption] shortcode. * @param string $content The content placed after the opening [caption] tag and before the closing [/caption] tag. diff --git a/wp-content/themes/hybrid/library/extensions/cleaner-gallery.php b/wp-content/themes/hybrid/library/extensions/cleaner-gallery.php index b99aef421fba4d6fe24c38192c313a3bec8dbbe4..4841b1bc7128f1c3978b1719159fc92408c2a9c0 100644 --- a/wp-content/themes/hybrid/library/extensions/cleaner-gallery.php +++ b/wp-content/themes/hybrid/library/extensions/cleaner-gallery.php @@ -8,16 +8,16 @@ * galleries within their themes. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package CleanerGallery - * @version 0.9.2 + * @version 0.9.4 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2008 - 2011, Justin Tadlock + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock * @link http://justintadlock.com/archives/2008/04/13/cleaner-wordpress-gallery-plugin * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ @@ -31,12 +31,12 @@ add_filter( 'post_gallery', 'cleaner_gallery', 10, 2 ); * developers to style the gallery more easily. * * @since 0.9.0 + * @access private * @param string $output * @param array $attr * @return string $output */ function cleaner_gallery( $output, $attr ) { - global $post; static $cleaner_gallery_instance = 0; $cleaner_gallery_instance++; @@ -56,7 +56,7 @@ function cleaner_gallery( $output, $attr ) { $defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order ID', - 'id' => $post->ID, + 'id' => get_the_ID(), 'link' => '', 'itemtag' => 'dl', 'icontag' => 'dt', @@ -92,6 +92,7 @@ function cleaner_gallery( $output, $attr ) { 'include' => $include, 'numberposts' => $numberposts, 'offset' => $offset, + 'suppress_filters' => true ); /* Get image attachments. If none, return. */ @@ -121,7 +122,7 @@ function cleaner_gallery( $output, $attr ) { /* Open each gallery row. */ if ( $columns > 0 && $i % $columns == 0 ) - $output .= "\n\t\t\t\t<div class='gallery-row clear'>"; + $output .= "\n\t\t\t\t<div class='gallery-row gallery-clear'>"; /* Open each gallery item. */ $output .= "\n\t\t\t\t\t<{$itemtag} class='gallery-item col-{$columns}'>"; @@ -137,7 +138,7 @@ function cleaner_gallery( $output, $attr ) { $output .= "</{$icontag}>"; /* Get the caption. */ - $caption = apply_filters( 'cleaner_gallery_caption', wptexturize( esc_html( $attachment->post_excerpt ) ), $id, $attr, $cleaner_gallery_instance ); + $caption = apply_filters( 'cleaner_gallery_caption', wptexturize( $attachment->post_excerpt ), $id, $attr, $cleaner_gallery_instance ); /* If image caption is set. */ if ( !empty( $caption ) ) diff --git a/wp-content/themes/hybrid/library/extensions/custom-field-series.php b/wp-content/themes/hybrid/library/extensions/custom-field-series.php index 000be9b1fc21eabc92e32c8a9804007aa0dd8b4a..c12d89bd3b93c377fcaa3f5b47caab05f650a01b 100644 --- a/wp-content/themes/hybrid/library/extensions/custom-field-series.php +++ b/wp-content/themes/hybrid/library/extensions/custom-field-series.php @@ -9,22 +9,28 @@ * method before. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package CustomFieldSeries - * @version 0.3.0 + * @version 0.4.0 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2007 - 2011, Justin Tadlock + * @copyright Copyright (c) 2007 - 2012, Justin Tadlock * @link http://justintadlock.com/archives/2007/11/01/wordpress-custom-fields-listing-a-series-of-posts * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ +/* Add support for the 'custom-field-series' extension to posts. */ +add_action( 'init', 'custom_field_series_post_type_support' ); + +/* Register metadata for the custom field series. */ +add_action( 'init', 'custom_field_series_register_meta' ); + /* Create the meta box on the 'admin_menu' hook. */ -add_action( 'admin_menu', 'custom_field_series_create_meta_box' ); +add_action( 'admin_menu', 'custom_field_series_admin_setup' ); /** * Checks for a series of posts by the current post's metadata. The function grabs the meta value for the @@ -32,37 +38,34 @@ add_action( 'admin_menu', 'custom_field_series_create_meta_box' ); * meta key/value pair, the function adds them to an unordered list. * * @since 0.1.0 + * @access public * @param array $args Array of arguments. */ function custom_field_series( $args = array() ) { - global $post; - - /* Set up a default textdomain. */ - $textdomain = apply_filters( 'custom_field_series_textdomain', 'custom-field-series' ); /* Set $series to an empty string. */ $series = ''; - /* Allow developers to overwrite the meta key used for the series name. */ - $meta_key = apply_filters( 'custom_field_series_meta_key', 'Series' ); + /* Get the current post ID. */ + $post_id = get_the_ID(); /* Get the series meta value for the post. */ - $meta_value = get_post_meta( $post->ID, $meta_key, true ); + $meta_value = get_post_meta( $post_id, custom_field_series_meta_key(), true ); /* If a meta value was found, create a list of posts in the series. */ if ( !empty( $meta_value ) ) { /* Set up the default post query arguments. */ $defaults = array( - 'order' => 'DESC', - 'orderby' => 'ID', - 'include' => '', - 'exclude' => '', - 'post_type' => 'any', - 'numberposts' => -1, - 'meta_key' => $meta_key, - 'meta_value' => $meta_value, - 'echo' => true + 'order' => 'DESC', + 'orderby' => 'ID', + 'include' => '', + 'exclude' => '', + 'post_type' => 'any', + 'numberposts' => -1, + 'meta_key' => custom_field_series_meta_key(), + 'meta_value' => $meta_value, + 'echo' => true ); /* Allow developers to override the arguments used. */ @@ -80,14 +83,14 @@ function custom_field_series( $args = array() ) { /* Create the opening wrapper div, title, and list element. */ $series = '<div class="series series-' . esc_attr( $class ) . '">'; - $series .= '<h4 class="series-title">' . apply_filters( 'custom_field_series_title', __( 'Articles in this series', $textdomain ) ) . '</h4>'; + $series .= '<h4 class="series-title">' . apply_filters( 'custom_field_series_title', __( 'Articles in this series', 'custom-field-series' ) ) . '</h4>'; $series .= '<ul>'; /* Loop through the posts. */ foreach ( $series_posts as $serial ) { /* If the current post in the loop matches the post we're viewing, don't link to it. */ - if ( $serial->ID == $post->ID ) + if ( $serial->ID == $post_id ) $series .= '<li class="current-post">' . $serial->post_title . '</li>'; /* Display a link to the post. */ @@ -113,31 +116,116 @@ function custom_field_series( $args = array() ) { } /** - * Creates the meta box on the post editing screen for the 'post' post type. + * Adds post type support of 'custom-field-series' to the 'post' post type. Developers should register support + * for additional post types. * - * @since 0.3.0 + * @since 0.4.0 + * @access private + * @return void + */ +function custom_field_series_post_type_support() { + add_post_type_support( 'post', 'custom-field-series' ); +} + +/** + * Registers the custom field series meta key 'Series' for for specific object types and provides a + * function to sanitize the metadata on update. + * + * @since 0.4.0 + * @access private + * @return void + */ +function custom_field_series_register_meta() { + register_meta( 'post', custom_field_series_meta_key(), 'custom_field_series_sanitize_meta' ); +} + +/** + * Callback function for sanitizing meta when add_metadata() or update_metadata() is called by WordPress. + * If a developer wants to set up a custom method for sanitizing the data, they should use the + * "sanitize_{$meta_type}_meta_{$meta_key}" filter hook to do so. + * + * @since 0.4.0 + * @param mixed $meta_value The value of the data to sanitize. + * @param string $meta_key The meta key name. + * @param string $meta_type The type of metadata (post, comment, user, etc.) + * @return mixed $meta_value */ -function custom_field_series_create_meta_box() { +function custom_field_series_sanitize_meta( $meta_value, $meta_key, $meta_type ) { + return strip_tags( $meta_value ); +} - /* Set up a default textdomain. */ - $textdomain = apply_filters( 'custom_field_series_textdomain', 'custom-field-series' ); +/** + * Returns the meta key used for the 'Series' custom field so that developers can overwrite the key if they + * need to for their project. + * + * @since 0.4.0 + * @access public + * @return string The meta key used for the series metadata. + */ +function custom_field_series_meta_key() { + return apply_filters( 'custom_field_series_meta_key', 'Series' ); +} - add_meta_box( 'custom-field-series', __( 'Series', $textdomain ), 'custom_field_series_meta_box', 'post', 'side', 'default' ); +/** + * Admin setup for the custom field series script. + * + * @since 0.4.0 + * @access private + * @return void + */ +function custom_field_series_admin_setup() { + + /* Load the post meta boxes on the new post and edit post screens. */ + add_action( 'load-post.php', 'custom_field_series_load_meta_boxes' ); + add_action( 'load-post-new.php', 'custom_field_series_load_meta_boxes' ); +} + +/** + * Hooks into the 'add_meta_boxes' hook to add the custom field series meta box and the 'save_post' hook + * to save the metadata. + * + * @since 0.4.0 + * @access private + * @return void + */ +function custom_field_series_load_meta_boxes() { + + /* Add the custom field series meta box on the 'add_meta_boxes' hook. */ + add_action( 'add_meta_boxes', 'custom_field_series_create_meta_box', 10, 2 ); /* Saves the post meta box data. */ add_action( 'save_post', 'custom_field_series_meta_box_save', 10, 2 ); } +/** + * Creates the meta box on the post editing screen for the 'post' post type. + * + * @since 0.3.0 + * @access private + * @param string $post_type The post type of the current post being edited. + * @param object $post The current post object. + * @return void + */ +function custom_field_series_create_meta_box( $post_type, $post ) { + + if ( post_type_supports( $post_type, 'custom-field-series' ) ) + add_meta_box( 'custom-field-series', __( 'Series', 'custom-field-series' ), 'custom_field_series_meta_box', $post_type, 'side', 'default' ); +} + /** * Displays the input field with the meta box. * * @since 0.3.0 + * @access private + * @param object $object The post object currently being edited. + * @param array $box Specific information about the meta box being loaded. + * @return void */ function custom_field_series_meta_box( $object, $box ) { ?> <p> - <input type="hidden" name="custom_field_series_meta_box_nonce" value="<?php echo wp_create_nonce( basename( __FILE__ ) ); ?>" /> - <input type="text" name="custom-field-series" id="custom-field-series" value="<?php echo esc_attr( get_post_meta( $object->ID, apply_filters( 'custom_field_series_meta_key', 'Series' ), true ) ); ?>" size="30" tabindex="30" style="width: 99%;" /> + <?php wp_nonce_field( basename( __FILE__ ), 'custom-field-series-nonce' ); ?> + <input type="text" name="custom-field-series" id="custom-field-series" value="<?php echo esc_attr( get_post_meta( $object->ID, custom_field_series_meta_key(), true ) ); ?>" size="30" tabindex="30" style="width: 99%;" /> </p> <?php } @@ -146,40 +234,37 @@ function custom_field_series_meta_box( $object, $box ) { ?> * Saves the single value for the 'Series' meta key, which was set using the custom field series meta box. * * @since 0.3.0 + * @access private + * @param int $post_id The ID of the current post being saved. + * @param object $post The post object currently being saved. + * @return void */ function custom_field_series_meta_box_save( $post_id, $post ) { /* Verify the nonce before proceeding. */ - if ( !isset( $_POST['custom_field_series_meta_box_nonce'] ) || !wp_verify_nonce( $_POST['custom_field_series_meta_box_nonce'], basename( __FILE__ ) ) ) - return $post_id; - - /* Get the post type object. */ - $post_type = get_post_type_object( $post->post_type ); - - /* Check if the current user has permission to edit the post. */ - if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) + if ( !isset( $_POST['custom-field-series-nonce'] ) || !wp_verify_nonce( $_POST['custom-field-series-nonce'], basename( __FILE__ ) ) ) return $post_id; /* Get the posted series title and strip all tags from it. */ - $new_meta_value = ( isset( $_POST['custom-field-series'] ) ? strip_tags( $_POST['custom-field-series'] ) : '' ); + $new_meta_value = $_POST['custom-field-series']; /* Get the meta key. */ - $meta_key = apply_filters( 'custom_field_series_meta_key', 'Series' ); + $meta_key = custom_field_series_meta_key(); /* Get the meta value of the custom field key. */ $meta_value = get_post_meta( $post_id, $meta_key, true ); + /* If there is no new meta value but an old value exists, delete it. */ + if ( current_user_can( 'delete_post_meta', $post_id, $meta_key ) && '' == $new_meta_value && $meta_value ) + delete_post_meta( $post_id, $meta_key, $meta_value ); + /* If a new meta value was added and there was no previous value, add it. */ - if ( $new_meta_value && '' == $meta_value ) + elseif ( current_user_can( 'add_post_meta', $post_id, $meta_key ) && $new_meta_value && '' == $meta_value ) add_post_meta( $post_id, $meta_key, $new_meta_value, true ); - /* If the new meta value does not match the old value, update it. */ - elseif ( $new_meta_value && $new_meta_value != $meta_value ) + /* If the old layout doesn't match the new layout, update the post layout meta. */ + elseif ( current_user_can( 'edit_post_meta', $post_id, $meta_key ) && $meta_value !== $new_meta_value ) update_post_meta( $post_id, $meta_key, $new_meta_value ); - - /* If there is no new meta value but an old value exists, delete it. */ - elseif ( '' == $new_meta_value && $meta_value ) - delete_post_meta( $post_id, $meta_key, $meta_value ); } ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/extensions/entry-views.php b/wp-content/themes/hybrid/library/extensions/entry-views.php index 544576e52fdafdda85378e0ad4ad519fe550f25b..294c65f37a5460ff93eb4a250cef775c986d5a97 100644 --- a/wp-content/themes/hybrid/library/extensions/entry-views.php +++ b/wp-content/themes/hybrid/library/extensions/entry-views.php @@ -19,16 +19,16 @@ * @link http://core.trac.wordpress.org/ticket/14568 * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package EntryViews - * @version 0.2.0 + * @version 0.2.2 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2010 - 2011, Justin Tadlock + * @copyright Copyright (c) 2010 - 2012, Justin Tadlock * @link http://justintadlock.com * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ @@ -51,6 +51,8 @@ add_action( 'wp_ajax_nopriv_entry_views', 'entry_views_update_ajax' ); * post types). For all other post types, the theme should explicitly register support for this feature. * * @since 0.2.0 + * @access private + * @return void */ function entry_views_post_type_support() { @@ -69,9 +71,11 @@ function entry_views_post_type_support() { * extension. If so, set the $post_id variable and load the needed JavaScript. * * @since 0.1.0 + * @access private + * @return void */ function entry_views_load() { - global $entry_views; + global $_entry_views_post_id; /* Check if we're on a singular post view. */ if ( is_singular() ) { @@ -83,7 +87,7 @@ function entry_views_load() { if ( post_type_supports( $post->post_type, 'entry-views' ) ) { /* Set the post ID for later use because we wouldn't want a custom query to change this. */ - $entry_views->post_id = get_queried_object_id(); + $_entry_views_post_id = get_queried_object_id(); /* Enqueue the jQuery library. */ wp_enqueue_script( 'jquery' ); @@ -100,6 +104,9 @@ function entry_views_load() { * 'entry_views_meta_key' hook. * * @since 0.1.0 + * @access public + * @param int $post_id The ID of the post to update the meta for. + * @return void */ function entry_views_update( $post_id = '' ) { @@ -125,7 +132,9 @@ function entry_views_update( $post_id = '' ) { * [entry-views] format. * * @since 0.1.0 + * @access public * @param array $attr Attributes for use in the shortcode. + * @return string */ function entry_views_get( $attr = '' ) { @@ -147,6 +156,8 @@ function entry_views_get( $attr = '' ) { * AJAX nonce and passes the given $post_id to the entry views update function. * * @since 0.1.0 + * @access private + * @return void */ function entry_views_update_ajax() { @@ -167,15 +178,17 @@ function entry_views_update_ajax() { * callback function for updating the meta. * * @since 0.1.0 + * @access private + * @return void */ function entry_views_load_scripts() { - global $entry_views; + global $_entry_views_post_id; /* Create a nonce for the AJAX request. */ $nonce = wp_create_nonce( 'entry_views_ajax' ); /* Display the JavaScript needed. */ - echo '<script type="text/javascript">/* <![CDATA[ */ jQuery(document).ready( function() { jQuery.post( "' . admin_url( 'admin-ajax.php' ) . '", { action : "entry_views", _ajax_nonce : "' . $nonce . '", post_id : ' . $entry_views->post_id . ' } ); } ); /* ]]> */</script>' . "\n"; + echo '<script type="text/javascript">/* <![CDATA[ */ jQuery(document).ready( function() { jQuery.post( "' . admin_url( 'admin-ajax.php' ) . '", { action : "entry_views", _ajax_nonce : "' . $nonce . '", post_id : ' . $_entry_views_post_id . ' } ); } ); /* ]]> */</script>' . "\n"; } ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/extensions/get-the-image.php b/wp-content/themes/hybrid/library/extensions/get-the-image.php index 261f459454bbe92956669f81f10f6dcbb11bc602..31f4b6b15275920ee144ad8079e5b13be1554bb0 100644 --- a/wp-content/themes/hybrid/library/extensions/get-the-image.php +++ b/wp-content/themes/hybrid/library/extensions/get-the-image.php @@ -9,16 +9,16 @@ * the first image element used. It can also fall back to a given default image. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package GetTheImage - * @version 0.7.0 + * @version 0.8.0 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2008 - 2011, Justin Tadlock + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock * @link http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ @@ -41,34 +41,37 @@ add_action( 'added_post_meta', 'get_the_image_delete_cache_by_meta', 10, 2 ); * 'image_scan', 'callback', and 'default_image'. * * @since 0.1.0 + * @access public * @global $post The current post's database object. * @param array $args Arguments for how to load and display the image. * @return string|array The HTML for the image. | Image attributes in an array. */ function get_the_image( $args = array() ) { - global $post; /* Set the default arguments. */ $defaults = array( - 'meta_key' => array( 'Thumbnail', 'thumbnail' ), - 'post_id' => $post->ID, - 'attachment' => true, - 'the_post_thumbnail' => true, // WP 2.9+ image function - 'size' => 'thumbnail', - 'default_image' => false, - 'order_of_image' => 1, - 'link_to_post' => true, - 'image_class' => false, - 'image_scan' => false, - 'width' => false, - 'height' => false, - 'format' => 'img', - 'meta_key_save' => false, - 'callback' => null, - 'cache' => true, - 'echo' => true, - 'custom_key' => null, // @deprecated 0.6. Use 'meta_key'. - 'default_size' => null, // @deprecated 0.5. Use 'size'. + 'meta_key' => array( 'Thumbnail', 'thumbnail' ), // array|string + 'post_id' => get_the_ID(), + 'attachment' => true, + 'the_post_thumbnail' => true, // WP 2.9+ image function + 'size' => 'thumbnail', + 'default_image' => false, + 'order_of_image' => 1, + 'link_to_post' => true, + 'image_class' => false, + 'image_scan' => false, + 'width' => false, + 'height' => false, + 'format' => 'img', + 'meta_key_save' => false, + 'thumbnail_id_save' => false, // Set 'featured image'. + 'callback' => null, + 'cache' => true, + 'before' => '', + 'after' => '', + 'echo' => true, + 'custom_key' => null, // @deprecated 0.6. Use 'meta_key'. + 'default_size' => null, // @deprecated 0.5. Use 'size'. ); /* Allow plugins/themes to filter the arguments. */ @@ -101,6 +104,9 @@ function get_the_image( $args = array() ) { if ( !is_array( $image_cache ) ) $image_cache = array(); + /* Set up a default, empty $image_html variable. */ + $image_html = ''; + /* If there is no cached image, let's see if one exists. */ if ( !isset( $image_cache[$key] ) || empty( $cache ) ) { @@ -136,21 +142,21 @@ function get_the_image( $args = array() ) { get_the_image_meta_key_save( $args, $image['src'] ); /* Format the image HTML. */ - $image = get_the_image_format( $args, $image ); + $image_html = get_the_image_format( $args, $image ); /* Set the image cache for the specific post. */ - $image_cache[$key] = $image; + $image_cache[$key] = $image_html; wp_cache_set( $post_id, $image_cache, 'get_the_image' ); } } /* If an image was already cached for the post and arguments, use it. */ else { - $image = $image_cache[$key]; + $image_html = $image_cache[$key]; } /* Allow plugins/theme to override the final output. */ - $image = apply_filters( 'get_the_image', $image ); + $image_html = apply_filters( 'get_the_image', $image_html ); /* If $format is set to 'array', return an array of image attributes. */ if ( 'array' == $format ) { @@ -159,7 +165,7 @@ function get_the_image( $args = array() ) { $out = array(); /* Get the image attributes. */ - $atts = wp_kses_hair( $image, array( 'http' ) ); + $atts = wp_kses_hair( $image_html, array( 'http' ) ); /* Loop through the image attributes and add them in key/value pairs for the return array. */ foreach ( $atts as $att ) @@ -173,11 +179,19 @@ function get_the_image( $args = array() ) { /* Or, if $echo is set to false, return the formatted image. */ elseif ( false === $echo ) { - return $image; + return $args['before'] . $image_html . $args['after']; } + /* If there is a $post_thumbnail_id, do the actions associated with get_the_post_thumbnail(). */ + if ( isset( $image['post_thumbnail_id'] ) ) + do_action( 'begin_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size ); + /* Display the image if we get to this point. */ - echo $image; + echo $args['before'] . $image_html . $args['after']; + + /* If there is a $post_thumbnail_id, do the actions associated with get_the_post_thumbnail(). */ + if ( isset( $image['post_thumbnail_id'] ) ) + do_action( 'end_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size ); } /* Internal Functions */ @@ -187,31 +201,25 @@ function get_the_image( $args = array() ) { * is found, $image is set and the loop breaks. If an image is found, it is returned. * * @since 0.7.0 + * @access private * @param array $args Arguments for how to load and display the image. * @return array|bool Array of image attributes. | False if no image is found. */ function get_the_image_by_meta_key( $args = array() ) { /* If $meta_key is not an array. */ - if ( !is_array( $args['meta_key'] ) ) { - - /* Get the image URL by the single meta key. */ - $image = get_post_meta( $args['post_id'], $args['meta_key'], true ); - } + if ( !is_array( $args['meta_key'] ) ) + $args['meta_key'] = array( $args['meta_key'] ); - /* If $meta_key is an array. */ - elseif ( is_array( $args['meta_key'] ) ) { + /* Loop through each of the given meta keys. */ + foreach ( $args['meta_key'] as $meta_key ) { - /* Loop through each of the given meta keys. */ - foreach ( $args['meta_key'] as $meta_key ) { + /* Get the image URL by the current meta key in the loop. */ + $image = get_post_meta( $args['post_id'], $meta_key, true ); - /* Get the image URL by the current meta key in the loop. */ - $image = get_post_meta( $args['post_id'], $meta_key, true ); - - /* If an image was found, break out of the loop. */ - if ( !empty( $image ) ) - break; - } + /* If an image was found, break out of the loop. */ + if ( !empty( $image ) ) + break; } /* If a custom key value has been given for one of the keys, return the image URL. */ @@ -227,6 +235,7 @@ function get_the_image_by_meta_key( $args = array() ) { * later added in the display_the_image() function. * * @since 0.7.0 + * @access private * @param array $args Arguments for how to load and display the image. * @return array|bool Array of image attributes. | False if no image is found. */ @@ -257,40 +266,74 @@ function get_the_image_by_post_thumbnail( $args = array() ) { * attachments are found, loop through each. The loop only breaks once $order_of_image is reached. * * @since 0.7.0 + * @access private * @param array $args Arguments for how to load and display the image. * @return array|bool Array of image attributes. | False if no image is found. */ function get_the_image_by_attachment( $args = array() ) { - /* Get attachments for the inputted $post_id. */ - $attachments = get_children( array( 'post_parent' => $args['post_id'], 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ); + /* Get the post type of the current post. */ + $post_type = get_post_type( $args['post_id'] ); - /* If no attachments are found, check if the post itself is an attachment and grab its image. */ - if ( empty( $attachments ) && $args['size'] ) { - if ( 'attachment' == get_post_type( $args['post_id'] ) ) { - $image = wp_get_attachment_image_src( $args['post_id'], $args['size'] ); - $alt = trim( strip_tags( get_post_field( 'post_excerpt', $args['post_id'] ) ) ); + /* Check if the post itself is an image attachment. */ + if ( 'attachment' == $post_type && wp_attachment_is_image( $args['post_id'] ) ) { + $attachment_id = $args['post_id']; + } + + /* If the post is not an attachment, check if it has any image attachments. */ + elseif ( 'attachment' !== $post_type ) { + + /* Get attachments for the inputted $post_id. */ + $attachments = get_children( + array( + 'post_parent' => $args['post_id'], + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + 'order' => 'ASC', + 'orderby' => 'menu_order ID', + 'suppress_filters' => true + ) + ); + + /* Check if any attachments were found. */ + if ( !empty( $attachments ) ) { + + /* Set the default iterator to 0. */ + $i = 0; + + /* Loop through each attachment. */ + foreach ( $attachments as $id => $attachment ) { + + /* Set the attachment ID as the current ID in the loop. */ + $attachment_id = $id; + + /* Break if/when we hit 'order_of_image'. */ + if ( ++$i == $args['order_of_image'] ) + break; + } } } - /* If no attachments or image is found, return false. */ - if ( empty( $attachments ) && empty( $image ) ) - return false; + /* Check if we have an attachment ID before proceeding. */ + if ( !empty( $attachment_id ) ) { - /* Set the default iterator to 0. */ - $i = 0; + /* Get the attachment image. */ + $image = wp_get_attachment_image_src( $id, $args['size'] ); - /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */ - foreach ( $attachments as $id => $attachment ) { - if ( ++$i == $args['order_of_image'] ) { - $image = wp_get_attachment_image_src( $id, $args['size'] ); - $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) ); - break; - } + /* Get the attachment excerpt. */ + $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) ); + + /* Save the attachment as the 'featured image'. */ + if ( true === $args['thumbnail_id_save'] ) + set_post_thumbnail( $args['post_id'], $id ); + + /* Return the image URL. */ + return array( 'src' => $image[0], 'alt' => $alt ); } - /* Return the image URL. */ - return array( 'src' => $image[0], 'alt' => $alt ); + /* Return false for anything else. */ + return false; } /** @@ -298,6 +341,7 @@ function get_the_image_by_attachment( $args = array() ) { * if using large images within posts, better to use the other options. * * @since 0.7.0 + * @access private * @param array $args Arguments for how to load and display the image. * @return array|bool Array of image attributes. | False if no image is found. */ @@ -318,6 +362,7 @@ function get_the_image_by_scan( $args = array() ) { * Not used with get_the_image() by default. * * @since 0.7.0 + * @access private * @param array $args Arguments for how to load and display the image. * @return array|bool Array of image attributes. | False if no image is found. */ @@ -330,6 +375,7 @@ function get_the_image_by_default( $args = array() ) { * only be called if there is an image to display, but will handle it if not. * * @since 0.7.0 + * @access private * @param array $args Arguments for how to load and display the image. * @param array $image Array of image attributes ($image, $classes, $alt, $caption). * @return string $image Formatted image (w/link to post if the option is set). @@ -353,20 +399,16 @@ function get_the_image_format( $args = array(), $image = false ) { /* Loop through the custom field keys and add them as classes. */ if ( is_array( $meta_key ) ) { foreach ( $meta_key as $key ) - $classes[] = str_replace( ' ', '-', strtolower( $key ) ); + $classes[] = sanitize_html_class( $key ); } /* Add the $size and any user-added $image_class to the class. */ - $classes[] = $size; - $classes[] = $image_class; + $classes[] = sanitize_html_class( $size ); + $classes[] = sanitize_html_class( $image_class ); /* Join all the classes into a single string and make sure there are no duplicates. */ $class = join( ' ', array_unique( $classes ) ); - /* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */ - if ( !empty( $image['post_thumbnail_id'] ) ) - do_action( 'begin_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size ); - /* Add the image attributes to the <img /> element. */ $html = '<img src="' . $image['src'] . '" alt="' . esc_attr( strip_tags( $image_alt ) ) . '" class="' . esc_attr( $class ) . '"' . $width . $height . ' />'; @@ -374,10 +416,6 @@ function get_the_image_format( $args = array(), $image = false ) { if ( $link_to_post ) $html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( apply_filters( 'the_title', get_post_field( 'post_title', $post_id ) ) ) . '">' . $html . '</a>'; - /* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */ - if ( !empty( $image['post_thumbnail_id'] ) ) - do_action( 'end_fetch_post_thumbnail_html', $post_id, $image['post_thumbnail_id'], $size ); - /* If there is a $post_thumbnail_id, apply the WP filters normally associated with get_the_post_thumbnail(). */ if ( !empty( $image['post_thumbnail_id'] ) ) $html = apply_filters( 'post_thumbnail_html', $html, $post_id, $image['post_thumbnail_id'], $size, '' ); @@ -391,6 +429,7 @@ function get_the_image_format( $args = array(), $image = false ) { * of expensive scans of the content when using the image scan feature. * * @since 0.6.0 + * @access private * @param array $args Arguments for how to load and display the image. * @param array $image Array of image attributes ($image, $classes, $alt, $caption). */ @@ -416,6 +455,9 @@ function get_the_image_meta_key_save( $args = array(), $image = array() ) { * Deletes the image cache for the specific post when the 'save_post' hook is fired. * * @since 0.7.0 + * @access private + * @param int $post_id The ID of the post to delete the cache for. + * @return void */ function get_the_image_delete_cache_by_post( $post_id ) { wp_cache_delete( $post_id, 'get_the_image' ); @@ -426,6 +468,10 @@ function get_the_image_delete_cache_by_post( $post_id ) { * or 'updated_post_meta' hooks are called. * * @since 0.7.0 + * @access private + * @param int $meta_id The ID of the metadata being updated. + * @param int $post_id The ID of the post to delete the cache for. + * @return void */ function get_the_image_delete_cache_by_meta( $meta_id, $post_id ) { wp_cache_delete( $post_id, 'get_the_image' ); diff --git a/wp-content/themes/hybrid/library/extensions/loop-pagination.php b/wp-content/themes/hybrid/library/extensions/loop-pagination.php index 6909d00ba15488d73a986ce7044af2cc4a579826..fcca7dc4b29f81cb914e5e7213481a03c139655e 100644 --- a/wp-content/themes/hybrid/library/extensions/loop-pagination.php +++ b/wp-content/themes/hybrid/library/extensions/loop-pagination.php @@ -7,16 +7,16 @@ * possibly be using. Instead, they can simply build pagination right into their themes. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package LoopPagination - * @version 0.1.3 + * @version 0.1.5 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2010 - 2011, Justin Tadlock + * @copyright Copyright (c) 2010 - 2012, Justin Tadlock * @link http://devpress.com/blog/loop-pagination-for-theme-developers * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ @@ -26,11 +26,13 @@ * search pages. It is not for singular views. * * @since 0.1.0 + * @access public * @uses paginate_links() Creates a string of paginated links based on the arguments given. * @param array $args Arguments to customize how the page links are output. + * @return string $page_links */ function loop_pagination( $args = array() ) { - global $wp_rewrite, $wp_query, $post; + global $wp_rewrite, $wp_query; /* If there's not more than one page, return nothing. */ if ( 1 >= $wp_query->max_num_pages ) @@ -62,8 +64,9 @@ function loop_pagination( $args = array() ) { ); /* Add the $base argument to the array if the user is using permalinks. */ - if( $wp_rewrite->using_permalinks() ) - $defaults['base'] = user_trailingslashit( trailingslashit( get_pagenum_link() ) . 'page/%#%' ); + if ( $wp_rewrite->using_permalinks() ) + $defaults['base'] = str_replace( 2, '%#%', esc_url( get_pagenum_link( 2 ) ) ); + //$defaults['base'] = user_trailingslashit( trailingslashit( get_pagenum_link() ) . 'page/%#%' ); /* If we're on a search results page, we need to change this up a bit. */ if ( is_search() ) { @@ -98,7 +101,7 @@ function loop_pagination( $args = array() ) { if ( $args['echo'] ) echo $page_links; else - return $page_liks; + return $page_links; } ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/extensions/post-stylesheets.php b/wp-content/themes/hybrid/library/extensions/post-stylesheets.php index 8bfe27e582c95aff680409e4dca73c732a2de395..0455e4242965586910b482ea32bf59ba28b43f75 100644 --- a/wp-content/themes/hybrid/library/extensions/post-stylesheets.php +++ b/wp-content/themes/hybrid/library/extensions/post-stylesheets.php @@ -7,25 +7,95 @@ * individual posts using the 'Stylesheet' post meta key and the stylesheet name as the post meta value. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package PostStylesheets - * @version 0.2.0 + * @version 0.3.0 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2010 - 2011, Justin Tadlock + * @copyright Copyright (c) 2010 - 2012, Justin Tadlock * @link http://justintadlock.com * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * + * @todo register_meta() */ +/* Register metadata with WordPress. */ +add_action( 'init', 'post_stylesheets_register_meta' ); + +/* Add post type support for the 'post-stylesheets' feature. */ +add_action( 'init', 'post_stylesheets_add_post_type_support' ); +add_action( 'init', 'post_stylesheets_remove_post_type_support' ); + /* Filters stylesheet_uri with a function for adding a new style. */ add_filter( 'stylesheet_uri', 'post_stylesheets_stylesheet_uri', 10, 2 ); -/* Create the post stylesheets meta box on the 'admin_menu' hook. */ -add_action( 'admin_menu', 'post_stylesheets_create_meta_box' ); +/* Admin setup for the 'post-stylesheets' feature. */ +add_action( 'admin_menu', 'post_stylesheets_admin_setup' ); + +/** + * Registers the post stylesheets meta key ('Stylesheet') for posts and provides a function to sanitize + * the metadata on update. + * + * @since 0.3.0 + * @return void + */ +function post_stylesheets_register_meta() { + register_meta( 'post', post_stylesheets_get_meta_key(), 'post_stylesheets_sanitize_meta' ); +} + +/** + * Callback function for sanitizing meta when add_metadata() or update_metadata() is called by WordPress. + * If a developer wants to set up a custom method for sanitizing the data, they should use the + * "sanitize_{$meta_type}_meta_{$meta_key}" filter hook to do so. + * + * @since 0.3.0 + * @param mixed $meta_value The value of the data to sanitize. + * @param string $meta_key The meta key name. + * @param string $meta_type The type of metadata (post, comment, user, etc.) + * @return mixed $meta_value + */ +function post_styleheets_sanitize_meta( $meta_value, $meta_key, $meta_type ) { + return esc_attr( strip_tags( $meta_value ) ); +} + +/** + * Adds post type support for the 'post-stylesheets' feature to all 'public' post types. + * + * @since 0.3.0 + * @access private + * @return void + */ +function post_stylesheets_add_post_type_support() { + + /* Get all available 'public' post types. */ + $post_types = get_post_types( array( 'public' => true ) ); + + /* Loop through each of the public post types and add support for post stylesheets. */ + foreach ( $post_types as $type ) + add_post_type_support( $type, 'post-stylesheets' ); +} + +/** + * Removes post stylesheets support for certain post types created by plugins. + * + * @since 0.3.0 + * @access private + * @return void + */ +function post_stylesheets_remove_post_type_support() { + + /* Removes post stylesheets support of the bbPress 'topic' post type. */ + if ( function_exists( 'bbp_get_topic_post_type' ) ) + remove_post_type_support( bbp_get_topic_post_type(), 'post-stylesheets' ); + + /* Removes post stylesheets support of the bbPress 'reply' post type. */ + if ( function_exists( 'bbp_get_reply_post_type' ) ) + remove_post_type_support( bbp_get_reply_post_type(), 'post-stylesheets' ); +} /** * Checks if a post (or any post type) has the given meta key of 'Stylesheet' when on the singular view of @@ -34,25 +104,46 @@ add_action( 'admin_menu', 'post_stylesheets_create_meta_box' ); * than the typical style.css file. * * @since 0.1.0 + * @todo Use features from Ticket #18302 when available. http://core.trac.wordpress.org/ticket/18302 + * @access private + * @param string $stylesheet_uri The URI of the active theme's stylesheet. + * @param string $stylesheet_dir_uri The directory URI of the active theme's stylesheet. + * @return string $stylesheet_uri */ function post_stylesheets_stylesheet_uri( $stylesheet_uri, $stylesheet_dir_uri ) { /* Check if viewing a singular post. */ if ( is_singular() ) { - /* Check if the user has set a value for the post stylesheet. */ - $stylesheet = get_post_stylesheet( get_queried_object_id() ); + /* If viewing a bbPress topic, use its forum object. */ + if ( function_exists( 'bbp_is_single_topic' ) && bbp_is_single_topic() ) + $post = get_post( bbp_get_topic_forum_id( get_queried_object_id() ) ); + + /* If viewing a bbPress reply, use its forum object. */ + elseif ( function_exists( 'bbp_is_single_reply' ) && bbp_is_single_reply() ) + $post = get_post( bbp_get_reply_forum_id( get_queried_object_id() ) ); - /* If a meta value was given and the file exists, set $stylesheet_uri to the new file. */ - if ( !empty( $stylesheet ) ) { + /* Get the queried object (post). */ + else + $post = get_queried_object(); - /* If the stylesheet is found in the child theme '/css' folder, use it. */ - if ( file_exists( trailingslashit( get_stylesheet_directory() ) . "css/{$stylesheet}" ) ) - $stylesheet_uri = trailingslashit( $stylesheet_dir_uri ) . "css/{$stylesheet}"; + /* Check if the post type supports 'post-stylesheets' before proceeding. */ + if ( post_type_supports( $post->post_type, 'post-stylesheets' ) ) { - /* Else, if the stylesheet is found in the parent theme '/css' folder, use it. */ - elseif ( file_exists( trailingslashit( get_template_directory() ) . "css/{$stylesheet}" ) ) - $stylesheet_uri = trailingslashit( get_template_directory_uri() ) . "css/{$stylesheet}"; + /* Check if the user has set a value for the post stylesheet. */ + $stylesheet = get_post_stylesheet( $post->ID ); + + /* If a meta value was given and the file exists, set $stylesheet_uri to the new file. */ + if ( !empty( $stylesheet ) ) { + + /* If the stylesheet is found in the child theme '/css' folder, use it. */ + if ( file_exists( trailingslashit( get_stylesheet_directory() ) . "css/{$stylesheet}" ) ) + $stylesheet_uri = trailingslashit( $stylesheet_dir_uri ) . "css/{$stylesheet}"; + + /* Else, if the stylesheet is found in the parent theme '/css' folder, use it. */ + elseif ( file_exists( trailingslashit( get_template_directory() ) . "css/{$stylesheet}" ) ) + $stylesheet_uri = trailingslashit( get_template_directory_uri() ) . "css/{$stylesheet}"; + } } } @@ -64,28 +155,44 @@ function post_stylesheets_stylesheet_uri( $stylesheet_uri, $stylesheet_dir_uri ) * Returns the post stylesheet if one is saved as post metadata. * * @since 0.3.0 + * @access public * @param int $post_id The ID of the post to get the stylesheet for. - * @return string|bool Stylesheet name if given. False for no stylesheet. + * @return string Stylesheet name if given. Empty string for no stylesheet. */ function get_post_stylesheet( $post_id ) { - return get_post_meta( $post_id, apply_filters( 'post_stylesheets_meta_key', 'Stylesheet' ), true ); + return get_post_meta( $post_id, post_stylesheets_get_meta_key(), true ); } /** * Adds/updates the post stylesheet for a specific post. * * @since 0.3.0 + * @access public * @param int $post_id The ID of the post to set the stylesheet for. * @param string $stylesheet The filename of the stylesheet. + * @return bool True on successful update, false on failure. */ function set_post_stylesheet( $post_id, $stylesheet ) { - return update_post_meta( $post_id, apply_filters( 'post_stylesheets_meta_key', 'Stylesheet' ), $stylesheet ); + return update_post_meta( $post_id, post_stylesheets_get_meta_key(), $stylesheet ); +} + +/** + * Deletes a post stylesheet. + * + * @since 0.3.0 + * @access public + * @param int $post_id The ID of the post to delete the stylesheet for. + * @return bool True on successful delete, false on failure. + */ +function delete_post_stylesheet( $post_id ) { + return delete_post_meta( $post_id, post_stylesheets_get_meta_key() ); } /** * Checks if a post has a specific post stylesheet. * * @since 0.3.0 + * @access public * @param string $stylesheet The filename of the stylesheet. * @param int $post_id The ID of the post to check. * @return bool True|False depending on whether the post has the stylesheet. @@ -101,32 +208,66 @@ function has_post_stylesheet( $stylesheet, $post_id = '' ) { } /** - * Creates the post stylesheets meta box. + * Admin setup for the post stylesheets script. * - * @since 0.2.0 + * @since 0.3.0 + * @access private + * @return void */ -function post_stylesheets_create_meta_box() { +function post_stylesheets_admin_setup() { - /* Get all available 'public' post types. */ - $post_types = get_post_types( array( 'public' => true ), 'objects' ); + /* Load the post meta boxes on the new post and edit post screens. */ + add_action( 'load-post.php', 'post_stylesheets_load_meta_boxes' ); + add_action( 'load-post-new.php', 'post_stylesheets_load_meta_boxes' ); +} - /* Loop through each of the public post types and add the meta box to it. */ - foreach ( $post_types as $type ) - add_meta_box( "post-stylesheets", sprintf( __( '%s Stylesheet', apply_filters( 'post_stylesheets_textdomain', 'post-stylesheets' ) ), $type->labels->singular_name ), 'post_stylesheets_meta_box', $type->name, 'side', 'default' ); +/** + * Hooks into the 'add_meta_boxes' hook to add the post stylesheets meta box and the 'save_post' hook + * to save the metadata. + * + * @since 0.3.0 + * @access private + * @return void + */ +function post_stylesheets_load_meta_boxes() { + + /* Add the post stylesheets meta box on the 'add_meta_boxes' hook. */ + add_action( 'add_meta_boxes', 'post_stylesheets_create_meta_box', 10, 2 ); /* Saves the post meta box data. */ add_action( 'save_post', 'post_stylesheets_meta_box_save', 10, 2 ); } +/** + * Adds the post stylesheets meta box if the post type supports 'post-stylesheets' and the current user has + * permission to edit post meta. + * + * @since 0.2.0 + * @access private + * @param string $post_type The post type of the current post being edited. + * @param object $post The current post object. + * @return void + */ +function post_stylesheets_create_meta_box( $post_type, $post ) { + + /* Add the meta box if the post type supports 'post-stylesheets'. */ + if ( ( post_type_supports( $post_type, 'post-stylesheets' ) ) && ( current_user_can( 'edit_post_meta', $post->ID ) || current_user_can( 'add_post_meta', $post->ID ) || current_user_can( 'delete_post_meta', $post->ID ) ) ) + add_meta_box( "post-stylesheets", __( 'Stylesheet', 'post-stylesheets' ), 'post_stylesheets_meta_box', $post_type, 'side', 'default' ); +} + /** * Displays the input field for entering a custom stylesheet. * * @since 0.2.0 + * @access private + * @param object $object The post object currently being edited. + * @param array $box Specific information about the meta box being loaded. + * @return void */ function post_stylesheets_meta_box( $object, $box ) { ?> <p> - <input type="hidden" name="post_stylesheets_meta_box_nonce" value="<?php echo wp_create_nonce( basename( __FILE__ ) ); ?>" /> + <?php wp_nonce_field( basename( __FILE__ ), 'post-stylesheets-nonce' ); ?> <input type="text" class="widefat" name="post-stylesheets" id="post-stylesheets" value="<?php echo esc_attr( get_post_stylesheet( $object->ID ) ); ?>" /> </p> <?php @@ -136,29 +277,51 @@ function post_stylesheets_meta_box( $object, $box ) { ?> * Saves the user-selected post stylesheet on the 'save_post' hook. * * @since 0.2.0 + * @access private + * @param int $post_id The ID of the current post being saved. + * @param object $post The post object currently being saved. */ function post_stylesheets_meta_box_save( $post_id, $post ) { /* Verify the nonce before proceeding. */ - if ( !isset( $_POST["post_stylesheets_meta_box_nonce"] ) || !wp_verify_nonce( $_POST["post_stylesheets_meta_box_nonce"], basename( __FILE__ ) ) ) - return $post_id; + if ( !isset( $_POST['post-stylesheets-nonce'] ) || !wp_verify_nonce( $_POST['post-stylesheets-nonce'], basename( __FILE__ ) ) ) + return; - /* Get the post type object. */ - $post_type = get_post_type_object( $post->post_type ); + /* Check if the post type supports 'post-stylesheets'. */ + if ( !post_type_supports( $post->post_type, 'post-stylesheets' ) ) + return; - /* Check if the current user has permission to edit the post. */ - if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) - return $post_id; + /* Get the meta key. */ + $meta_key = post_stylesheets_get_meta_key(); /* Get the previous post stylesheet. */ - $old_stylesheet = get_post_stylesheet( $post_id ); + $meta_value = get_post_stylesheet( $post_id ); /* Get the submitted post stylesheet. */ - $new_stylesheet = esc_attr( strip_tags( $_POST['post-stylesheets'] ) ); + $new_meta_value = $_POST['post-stylesheets']; - /* If the old stylesheet doesn't match the new stylesheet, update the post stylesheet meta. */ - if ( $old_stylesheet !== $new_stylesheet ) - set_post_stylesheet( $post_id, $new_stylesheet ); + /* If there is no new meta value but an old value exists, delete it. */ + if ( current_user_can( 'delete_post_meta', $post_id, $meta_key ) && '' == $new_meta_value && $meta_value ) + delete_post_stylesheet( $post_id ); + + /* If a new meta value was added and there was no previous value, add it. */ + elseif ( current_user_can( 'add_post_meta', $post_id, $meta_key ) && $new_meta_value && '' == $meta_value ) + set_post_stylesheet( $post_id, $new_meta_value ); + + /* If the old layout doesn't match the new layout, update the post layout meta. */ + elseif ( current_user_can( 'edit_post_meta', $post_id, $meta_key ) && $meta_value !== $new_meta_value ) + set_post_stylesheet( $post_id, $new_meta_value ); +} + +/** + * Returns the meta key used by the script for post metadata. + * + * @since 0.3.0 + * @access public + * @return string + */ +function post_stylesheets_get_meta_key() { + return apply_filters( 'post_stylesheets_meta_key', 'Stylesheet' ); } ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/extensions/theme-layouts.php b/wp-content/themes/hybrid/library/extensions/theme-layouts.php index 0a27f71018134fe8f6c0b9b9f69f80dc7390ab15..db0220249cafeec85db4f6ff6fd3d5556a520011 100644 --- a/wp-content/themes/hybrid/library/extensions/theme-layouts.php +++ b/wp-content/themes/hybrid/library/extensions/theme-layouts.php @@ -12,26 +12,90 @@ * design should be handled on a theme-by-theme basis. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @package ThemeLayouts - * @version 0.3.0 + * @version 0.4.0 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2010 - 2011, Justin Tadlock + * @copyright Copyright (c) 2010 - 2012, Justin Tadlock * @link http://justintadlock.com * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ -/* Filters the body_class hook to add a custom class. */ -add_filter( 'body_class', 'theme_layouts_body_class' ); +/* Register metadata with WordPress. */ +add_action( 'init', 'theme_layouts_register_meta' ); + +/* Add post type support for theme layouts. */ +add_action( 'init', 'theme_layouts_add_post_type_support' ); +add_action( 'init', 'theme_layouts_remove_post_type_support' ); /* Set up the custom post layouts. */ add_action( 'admin_menu', 'theme_layouts_admin_setup' ); +/* Filters the body_class hook to add a custom class. */ +add_filter( 'body_class', 'theme_layouts_body_class' ); + +/** + * Registers the theme layouts meta key ('Layout') for specific object types and provides a function to sanitize + * the metadata on update. + * + * @since 0.4.0 + * @return void + */ +function theme_layouts_register_meta() { + register_meta( 'post', theme_layouts_get_meta_key(), 'theme_layouts_sanitize_meta' ); + register_meta( 'user', theme_layouts_get_meta_key(), 'theme_layouts_sanitize_meta' ); +} + +/** + * Callback function for sanitizing meta when add_metadata() or update_metadata() is called by WordPress. + * If a developer wants to set up a custom method for sanitizing the data, they should use the + * "sanitize_{$meta_type}_meta_{$meta_key}" filter hook to do so. + * + * @since 0.4.0 + * @param mixed $meta_value The value of the data to sanitize. + * @param string $meta_key The meta key name. + * @param string $meta_type The type of metadata (post, comment, user, etc.) + * @return mixed $meta_value + */ +function theme_layouts_sanitize_meta( $meta_value, $meta_key, $meta_type ) { + return esc_attr( strip_tags( $meta_value ) ); +} + +/** + * Adds post type support to all 'public' post types. This allows themes to remove support for the 'theme-layouts' + * feature with remove_post_type_support(). + * + * @since 0.4.0 + * @return void + */ +function theme_layouts_add_post_type_support() { + + /* Gets available public post types. */ + $post_types = get_post_types( array( 'public' => true ) ); + + /* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */ + foreach ( $post_types as $type ) + add_post_type_support( $type, 'theme-layouts' ); +} + +/** + * Removes theme layouts support from specific post types created by plugins. + * + * @since 0.4.0 + * @return void + */ +function theme_layouts_remove_post_type_support() { + + /* Removes theme layouts support of the bbPress 'reply' post type. */ + if ( function_exists( 'bbp_get_reply_post_type' ) ) + remove_post_type_support( bbp_get_reply_post_type(), 'theme-layouts' ); +} + /** * Gets the layout for the current post based off the 'Layout' custom field key if viewing a singular post * entry. All other pages are given a default layout of 'layout-default'. @@ -71,6 +135,10 @@ function theme_layouts_get_layout() { if ( empty( $layout ) || !in_array( $layout, $post_layouts[0] ) ) $layout = 'default'; + /* If the theme set a default layout, use it if the layout should be set to default. */ + if ( 'default' == $layout && !empty( $post_layouts[1] ) && isset( $post_layouts[1]['default'] ) ) + $layout = $post_layouts[1]['default']; + /* @deprecated 0.2.0. Use the 'get_theme_layout' hook. */ $layout = apply_filters( 'get_post_layout', "layout-{$layout}" ); @@ -88,7 +156,7 @@ function theme_layouts_get_layout() { function get_post_layout( $post_id ) { /* Get the post layout. */ - $layout = get_post_meta( $post_id, apply_filters( 'theme_layouts_meta_key', 'Layout' ), true ); + $layout = get_post_meta( $post_id, theme_layouts_get_meta_key(), true ); /* Return the layout if one is found. Otherwise, return 'default'. */ return ( !empty( $layout ) ? $layout : 'default' ); @@ -100,10 +168,22 @@ function get_post_layout( $post_id ) { * @since 0.2.0 * @param int $post_id The ID of the post to set the layout for. * @param string $layout The name of the layout to set. - * @return bool The return value of the update_post_meta() function. + * @return bool True on successful update, false on failure. */ function set_post_layout( $post_id, $layout ) { - return update_post_meta( $post_id, apply_filters( 'theme_layouts_meta_key', 'Layout' ), $layout ); + return update_post_meta( $post_id, theme_layouts_get_meta_key(), $layout ); +} + +/** + * Deletes a post layout. + * + * @since 0.4.0 + * @access public + * @param int $post_id The ID of the post to delete the layout for. + * @return bool True on successful delete, false on failure. + */ +function delete_post_layout( $post_id ) { + return delete_post_meta( $post_id, theme_layouts_get_meta_key() ); } /** @@ -129,11 +209,12 @@ function has_post_layout( $layout, $post_id = '' ) { * * @since 0.3.0 * @param int $user_id The ID of the user to get the layout for. + * @return string The layout if one exists, 'default' if one doesn't. */ function get_user_layout( $user_id ) { /* Get the user layout. */ - $layout = get_user_meta( $user_id, apply_filters( 'theme_layouts_meta_key', 'Layout' ), true ); + $layout = get_user_meta( $user_id, theme_layouts_get_meta_key(), true ); /* Return the layout if one is found. Otherwise, return 'default'. */ return ( !empty( $layout ) ? $layout : 'default' ); @@ -145,10 +226,22 @@ function get_user_layout( $user_id ) { * @since 0.3.0 * @param int $user_id The ID of the user to set the layout for. * @param string $layout The name of the layout to set. - * @return bool The return value of update_user_meta() function. + * @return bool True on successful update, false on failure. */ function set_user_layout( $user_id, $layout ) { - return update_user_meta( $user_id, apply_filters( 'theme_layouts_meta_key', 'Layout' ), $layout ); + return update_user_meta( $user_id, theme_layouts_get_meta_key(), $layout ); +} + +/** + * Deletes a user layout. + * + * @since 0.4.0 + * @access public + * @param int $user_id The ID of the user to delete the layout for. + * @return bool True on successful delete, false on failure. + */ +function delete_user_layout( $user_id ) { + return delete_user_meta( $user_id, theme_layouts_get_meta_key() ); } /** @@ -193,18 +286,19 @@ function theme_layouts_body_class( $classes ) { * required. The layout name will be used if no text string is found. * * @since 0.2.0 + * @return array $strings */ function theme_layouts_strings() { /* Set up the default layout strings. */ $strings = array( - 'default' => __( 'Default', theme_layouts_textdomain() ), - '1c' => __( 'One Column', theme_layouts_textdomain() ), - '2c-l' => __( 'Two Columns, Left', theme_layouts_textdomain() ), - '2c-r' => __( 'Two Columns, Right', theme_layouts_textdomain() ), - '3c-l' => __( 'Three Columns, Left', theme_layouts_textdomain() ), - '3c-r' => __( 'Three Columns, Right', theme_layouts_textdomain() ), - '3c-c' => __( 'Three Columns, Center', theme_layouts_textdomain() ) + 'default' => __( 'Default', 'theme-layouts' ), + '1c' => __( 'One Column', 'theme-layouts' ), + '2c-l' => __( 'Two Columns, Left', 'theme-layouts' ), + '2c-r' => __( 'Two Columns, Right', 'theme-layouts' ), + '3c-l' => __( 'Three Columns, Left', 'theme-layouts' ), + '3c-r' => __( 'Three Columns, Right', 'theme-layouts' ), + '3c-c' => __( 'Three Columns, Center', 'theme-layouts' ) ); /* Allow devs to filter the strings for custom layouts. */ @@ -215,6 +309,8 @@ function theme_layouts_strings() { * Get a specific layout's text string. * * @since 0.2.0 + * @param string $layout + * @return string */ function theme_layouts_get_string( $layout ) { @@ -230,24 +326,55 @@ function theme_layouts_get_string( $layout ) { * metadata save function to the 'save_post' hook. * * @since 0.2.0 + * @return void */ function theme_layouts_admin_setup() { - /* Gets available public post types. */ - $post_types = get_post_types( array( 'public' => true ), 'objects' ); + /* Load the post meta boxes on the new post and edit post screens. */ + add_action( 'load-post.php', 'theme_layouts_load_meta_boxes' ); + add_action( 'load-post-new.php', 'theme_layouts_load_meta_boxes' ); - /* For each available post type, create a meta box on its edit page if it supports '$prefix-post-settings'. */ - foreach ( $post_types as $type ) - add_meta_box( 'theme-layouts-post-meta-box', __( 'Layout', theme_layouts_textdomain() ), 'theme_layouts_post_meta_box', $type->name, 'side', 'default' ); + /* If the attachment post type supports 'theme-layouts', add form fields for it. */ + if ( post_type_supports( 'attachment', 'theme-layouts' ) ) { + + /* Adds a theme layout <select> element to the attachment edit form. */ + add_filter( 'attachment_fields_to_edit', 'theme_layouts_attachment_fields_to_edit', 10, 2 ); + + /* Saves the theme layout for attachments. */ + add_filter( 'attachment_fields_to_save', 'theme_layouts_attachment_fields_to_save', 10, 2 ); + } +} + +/** + * Hooks into the 'add_meta_boxes' hook to add the theme layouts meta box and the 'save_post' hook + * to save the metadata. + * + * @since 0.4.0 + * @return void + */ +function theme_layouts_load_meta_boxes() { + + /* Add the layout meta box on the 'add_meta_boxes' hook. */ + add_action( 'add_meta_boxes', 'theme_layouts_add_meta_boxes', 10, 2 ); /* Saves the post format on the post editing page. */ add_action( 'save_post', 'theme_layouts_save_post', 10, 2 ); +} - /* Adds a theme layout <select> element to the attachment edit form. */ - add_filter( 'attachment_fields_to_edit', 'theme_layouts_attachment_fields_to_edit', 10, 2 ); +/** + * Adds the theme layouts meta box if the post type supports 'theme-layouts' and the current user has + * permission to edit post meta. + * + * @since 0.4.0 + * @param string $post_type The post type of the current post being edited. + * @param object $post The current post object. + * @return void + */ +function theme_layouts_add_meta_boxes( $post_type, $post ) { - /* Saves the theme layout for attachments. */ - add_filter( 'attachment_fields_to_save', 'theme_layouts_attachment_fields_to_save', 10, 2 ); + /* Add the meta box if the post type supports 'post-stylesheets'. */ + if ( ( post_type_supports( $post_type, 'theme-layouts' ) ) && ( current_user_can( 'edit_post_meta', $post->ID ) || current_user_can( 'add_post_meta', $post->ID ) || current_user_can( 'delete_post_meta', $post->ID ) ) ) + add_meta_box( 'theme-layouts-post-meta-box', __( 'Layout', 'theme-layouts' ), 'theme_layouts_post_meta_box', $post_type, 'side', 'default' ); } /** @@ -255,6 +382,11 @@ function theme_layouts_admin_setup() { * the layout they wish to use for the specific post. * * @since 0.2.0 + * @access private + * @param object $post The post object currently being edited. + * @param array $box Specific information about the meta box being loaded. + * @return void + * @return void */ function theme_layouts_post_meta_box( $post, $box ) { @@ -267,16 +399,16 @@ function theme_layouts_post_meta_box( $post, $box ) { <div class="post-layout"> - <input type="hidden" name="theme_layouts_post_meta_box_nonce" value="<?php echo wp_create_nonce( basename( __FILE__ ) ); ?>" /> + <?php wp_nonce_field( basename( __FILE__ ), 'theme-layouts-nonce' ); ?> - <p><?php _e( 'Layout is a theme-specific structure for the single view of the post.', theme_layouts_textdomain() ); ?></p> + <p><?php _e( 'Layout is a theme-specific structure for the single view of the post.', 'theme-layouts' ); ?></p> <div class="post-layout-wrap"> <ul> - <li><input type="radio" name="post_layout" id="post_layout_default" value="default" <?php checked( $post_layout, 'default' );?> /> <label for="post_layout_default"><?php echo esc_html( theme_layouts_get_string( 'default' ) ); ?></label></li> + <li><input type="radio" name="post-layout" id="post-layout-default" value="default" <?php checked( $post_layout, 'default' );?> /> <label for="post-layout-default"><?php echo esc_html( theme_layouts_get_string( 'default' ) ); ?></label></li> <?php foreach ( $post_layouts as $layout ) { ?> - <li><input type="radio" name="post_layout" id="post_layout_<?php echo esc_attr( $layout ); ?>" value="<?php echo esc_attr( $layout ); ?>" <?php checked( $post_layout, $layout ); ?> /> <label for="post_layout_<?php echo esc_attr( $layout ); ?>"><?php echo esc_html( theme_layouts_get_string( $layout ) ); ?></label></li> + <li><input type="radio" name="post-layout" id="post-layout-<?php echo esc_attr( $layout ); ?>" value="<?php echo esc_attr( $layout ); ?>" <?php checked( $post_layout, $layout ); ?> /> <label for="post-layout-<?php echo esc_attr( $layout ); ?>"><?php echo esc_html( theme_layouts_get_string( $layout ) ); ?></label></li> <?php } ?> </ul> </div> @@ -287,35 +419,44 @@ function theme_layouts_post_meta_box( $post, $box ) { * Saves the post layout metadata if on the post editing screen in the admin. * * @since 0.2.0 + * @access private + * @param int $post_id The ID of the current post being saved. + * @param object $post The post object currently being saved. + * @return void|int */ function theme_layouts_save_post( $post_id, $post ) { /* Verify the nonce for the post formats meta box. */ - if ( !isset( $_POST['theme_layouts_post_meta_box_nonce'] ) || !wp_verify_nonce( $_POST['theme_layouts_post_meta_box_nonce'], basename( __FILE__ ) ) ) + if ( !isset( $_POST['theme-layouts-nonce'] ) || !wp_verify_nonce( $_POST['theme-layouts-nonce'], basename( __FILE__ ) ) ) return $post_id; - /* Get the post type object. */ - $post_type = get_post_type_object( $post->post_type ); - - /* Check if the current user has permission to edit the post. */ - if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) - return $post_id; + /* Get the meta key. */ + $meta_key = theme_layouts_get_meta_key(); /* Get the previous post layout. */ - $old_layout = get_post_layout( $post_id ); + $meta_value = get_post_layout( $post_id ); /* Get the submitted post layout. */ - $new_layout = esc_attr( $_POST['post_layout'] ); + $new_meta_value = $_POST['post-layout']; + + /* If there is no new meta value but an old value exists, delete it. */ + if ( current_user_can( 'delete_post_meta', $post_id, $meta_key ) && '' == $new_meta_value && $meta_value ) + delete_post_layout( $post_id ); + + /* If a new meta value was added and there was no previous value, add it. */ + elseif ( current_user_can( 'add_post_meta', $post_id, $meta_key ) && $new_meta_value && '' == $meta_value ) + set_post_layout( $post_id, $new_meta_value ); /* If the old layout doesn't match the new layout, update the post layout meta. */ - if ( $old_layout !== $new_layout ) - set_post_layout( $post_id, $new_layout ); + elseif ( current_user_can( 'edit_post_meta', $post_id, $meta_key ) && $meta_value !== $new_meta_value ) + set_post_layout( $post_id, $new_meta_value ); } /** * Adds a select drop-down element to the attachment edit form for selecting the attachment layout. * * @since 0.3.0 + * @access private * @param array $fields Array of fields for the edit attachment form. * @param object $post The attachment post object. * @return array $fields @@ -330,18 +471,18 @@ function theme_layouts_attachment_fields_to_edit( $fields, $post ) { $post_layout = get_post_layout( $post->ID ); /* Set the default post layout. */ - $select = '<option id="post_layout_default" value="default" ' . selected( $post_layout, 'default', false ) . '>' . esc_html( theme_layouts_get_string( 'default' ) ) . '</option>'; + $select = '<option id="post-layout-default" value="default" ' . selected( $post_layout, 'default', false ) . '>' . esc_html( theme_layouts_get_string( 'default' ) ) . '</option>'; /* Loop through each theme-supported layout, adding it to the select element. */ foreach ( $post_layouts as $layout ) - $select .= '<option id="post_layout_' . esc_attr( $layout ) . '" value="' . esc_attr( $layout ) . '" ' . selected( $post_layout, $layout, false ) . '>' . esc_html( theme_layouts_get_string( $layout ) ) . '</option>'; + $select .= '<option id="post-layout-' . esc_attr( $layout ) . '" value="' . esc_attr( $layout ) . '" ' . selected( $post_layout, $layout, false ) . '>' . esc_html( theme_layouts_get_string( $layout ) ) . '</option>'; /* Set the HTML for the post layout select drop-down. */ $select = '<select name="attachments[' . $post->ID . '][theme-layouts-post-layout]" id="attachments[' . $post->ID . '][theme-layouts-post-layout]">' . $select . '</select>'; /* Add the attachment layout field to the $fields array. */ $fields['theme-layouts-post-layout'] = array( - 'label' => __( 'Layout', theme_layouts_textdomain() ), + 'label' => __( 'Layout', 'theme-layouts' ), 'input' => 'html', 'html' => $select ); @@ -354,6 +495,7 @@ function theme_layouts_attachment_fields_to_edit( $fields, $post ) { * Saves the attachment layout for the attachment edit form. * * @since 0.3.0 + * @access private * @param array $post The attachment post array (not the post object!). * @param array $fields Array of fields for the edit attachment form. * @return array $post @@ -363,15 +505,26 @@ function theme_layouts_attachment_fields_to_save( $post, $fields ) { /* If the theme layouts field was submitted. */ if ( isset( $fields['theme-layouts-post-layout'] ) ) { + /* Get the meta key. */ + $meta_key = theme_layouts_get_meta_key(); + /* Get the previous post layout. */ - $old_layout = get_post_layout( $post['ID'] ); + $meta_value = get_post_layout( $post['ID'] ); /* Get the submitted post layout. */ - $new_layout = esc_attr( $fields['theme-layouts-post-layout'] ); + $new_meta_value = $fields['theme-layouts-post-layout']; + + /* If there is no new meta value but an old value exists, delete it. */ + if ( current_user_can( 'delete_post_meta', $post['ID'], $meta_key ) && '' == $new_meta_value && $meta_value ) + delete_post_layout( $post['ID'] ); + + /* If a new meta value was added and there was no previous value, add it. */ + elseif ( current_user_can( 'add_post_meta', $post['ID'], $meta_key ) && $new_meta_value && '' == $meta_value ) + set_post_layout( $post['ID'], $new_meta_value ); /* If the old layout doesn't match the new layout, update the post layout meta. */ - if ( $old_layout !== $new_layout ) - set_post_layout( $post['ID'], $new_layout ); + elseif ( current_user_can( 'edit_post_meta', $post['ID'], $meta_key ) && $meta_value !== $new_meta_value ) + set_post_layout( $post['ID'], $new_meta_value ); } /* Return the attachment post array. */ @@ -379,13 +532,14 @@ function theme_layouts_attachment_fields_to_save( $post, $fields ) { } /** - * Returns the textdomain used by the script and allows it to be filtered by plugins/themes. + * Wrapper function for returning the metadata key used for objects that can use layouts. * - * @since 0.2.0 - * @returns string The textdomain for the script. + * @since 0.3.0 + * @access public + * @return string The meta key used for theme layouts. */ -function theme_layouts_textdomain() { - return apply_filters( 'theme_layouts_textdomain', 'theme-layouts' ); +function theme_layouts_get_meta_key() { + return apply_filters( 'theme_layouts_meta_key', 'Layout' ); } /** diff --git a/wp-content/themes/hybrid/library/functions/comments.php b/wp-content/themes/hybrid/library/functions/comments.php index c8b5c8e50d5ec7dfa685d032dc3e27cf564d271a..b4899f924003d7d926bb249fad5667086a48951f 100644 --- a/wp-content/themes/hybrid/library/functions/comments.php +++ b/wp-content/themes/hybrid/library/functions/comments.php @@ -6,6 +6,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Filter the comment form defaults. */ @@ -21,6 +25,7 @@ add_filter( 'get_avatar_comment_types', 'hybrid_avatar_comment_types' ); * element to use for listing comments. * * @since 0.7.0 + * @access public * @return array $args Arguments for listing comments. */ function hybrid_list_comments_args() { @@ -48,9 +53,11 @@ function hybrid_list_comments_args() { * is only located once if it is needed. Following comments will use the saved template. * * @since 0.2.3 + * @access public * @param $comment The comment object. - * @param $args Array of arguments passed from wp_list_comments() - * @param $depth What level the particular comment is + * @param $args Array of arguments passed from wp_list_comments(). + * @param $depth What level the particular comment is. + * @return void */ function hybrid_comments_callback( $comment, $args, $depth ) { global $hybrid; @@ -67,8 +74,18 @@ function hybrid_comments_callback( $comment, $args, $depth ) { /* Check if a template has been provided for the specific comment type. If not, get the template. */ if ( !isset( $hybrid->comment_template[$comment_type] ) ) { - /* Locate the template based on the comment type. Default to 'comment.php'. */ - $template = locate_template( array( "comment-{$comment_type}.php", 'comment.php' ) ); + /* Create an array of template files to look for. */ + $templates = array( "comment-{$comment_type}.php" ); + + /* If the comment type is a 'pingback' or 'trackback', allow the use of 'comment-ping.php'. */ + if ( 'pingback' == $comment_type || 'trackback' == $comment_type ) + $templates[] = 'comment-ping.php'; + + /* Add the fallback 'comment.php' template. */ + $templates[] = 'comment.php'; + + /* Locate the comment template. */ + $template = locate_template( $templates ); /* Set the template in the comment template array. */ $hybrid->comment_template[$comment_type] = $template; @@ -85,6 +102,8 @@ function hybrid_comments_callback( $comment, $args, $depth ) { * case something is changed. * * @since 0.2.3 + * @access public + * @return void */ function hybrid_comments_end_callback() { echo '</li><!-- .comment -->'; @@ -96,8 +115,10 @@ function hybrid_comments_end_callback() { * trackbacks and pingbacks. * * @since 0.2.0 + * @access public * @global $comment The current comment's DB object. * @global $hybrid The global Hybrid object. + * @return void */ function hybrid_avatar() { global $comment, $hybrid; @@ -147,43 +168,41 @@ function hybrid_avatar() { * users to build custom comment forms by filtering 'comment_form_defaults' in their child theme. * * @since 0.8.0 + * @access public * @param array $args The default comment form arguments. * @return array $args The filtered comment form arguments. */ function hybrid_comment_form_args( $args ) { global $user_identity; - /* Get the theme textdomain. */ - $domain = hybrid_get_textdomain(); - /* Get the current commenter. */ $commenter = wp_get_current_commenter(); /* Create the required <span> and <input> element class. */ - $req = ( ( get_option( 'require_name_email' ) ) ? ' <span class="required">' . __( '*', $domain ) . '</span> ' : '' ); + $req = ( ( get_option( 'require_name_email' ) ) ? ' <span class="required">' . __( '*', 'hybrid-core' ) . '</span> ' : '' ); $input_class = ( ( get_option( 'require_name_email' ) ) ? ' req' : '' ); /* Sets up the default comment form fields. */ $fields = array( - 'author' => '<p class="form-author' . esc_attr( $input_class ) . '"><label for="author">' . __( 'Name', $domain ) . $req . '</label> <input type="text" class="text-input" name="author" id="author" value="' . esc_attr( $commenter['comment_author'] ) . '" size="40" /></p>', - 'email' => '<p class="form-email' . esc_attr( $input_class ) . '"><label for="email">' . __( 'Email', $domain ) . $req . '</label> <input type="text" class="text-input" name="email" id="email" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="40" /></p>', - 'url' => '<p class="form-url"><label for="url">' . __( 'Website', $domain ) . '</label><input type="text" class="text-input" name="url" id="url" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="40" /></p>' + 'author' => '<p class="form-author' . esc_attr( $input_class ) . '"><label for="author">' . __( 'Name', 'hybrid-core' ) . $req . '</label> <input type="text" class="text-input" name="author" id="author" value="' . esc_attr( $commenter['comment_author'] ) . '" size="40" /></p>', + 'email' => '<p class="form-email' . esc_attr( $input_class ) . '"><label for="email">' . __( 'Email', 'hybrid-core' ) . $req . '</label> <input type="text" class="text-input" name="email" id="email" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="40" /></p>', + 'url' => '<p class="form-url"><label for="url">' . __( 'Website', 'hybrid-core' ) . '</label><input type="text" class="text-input" name="url" id="url" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="40" /></p>' ); /* Sets the default arguments for displaying the comment form. */ $args = array( 'fields' => apply_filters( 'comment_form_default_fields', $fields ), - 'comment_field' => '<p class="form-textarea req"><label for="comment">' . __( 'Comment', $domain ) . '</label><textarea name="comment" id="comment" cols="60" rows="10"></textarea></p>', - 'must_log_in' => '<p class="alert">' . sprintf( __( 'You must be <a href="%1$s" title="Log in">logged in</a> to post a comment.', $domain ), wp_login_url( get_permalink() ) ) . '</p><!-- .alert -->', - 'logged_in_as' => '<p class="log-in-out">' . sprintf( __( 'Logged in as <a href="%1$s" title="%2$s">%2$s</a>.', $domain ), admin_url( 'profile.php' ), esc_attr( $user_identity ) ) . ' <a href="' . wp_logout_url( get_permalink() ) . '" title="' . esc_attr__( 'Log out of this account', $domain ) . '">' . __( 'Log out »', $domain ) . '</a></p><!-- .log-in-out -->', + 'comment_field' => '<p class="form-textarea req"><label for="comment">' . __( 'Comment', 'hybrid-core' ) . '</label><textarea name="comment" id="comment" cols="60" rows="10"></textarea></p>', + 'must_log_in' => '<p class="alert">' . sprintf( __( 'You must be <a href="%1$s" title="Log in">logged in</a> to post a comment.', 'hybrid-core' ), wp_login_url( get_permalink() ) ) . '</p><!-- .alert -->', + 'logged_in_as' => '<p class="log-in-out">' . sprintf( __( 'Logged in as <a href="%1$s" title="%2$s">%2$s</a>.', 'hybrid-core' ), admin_url( 'profile.php' ), esc_attr( $user_identity ) ) . ' <a href="' . wp_logout_url( get_permalink() ) . '" title="' . esc_attr__( 'Log out of this account', 'hybrid-core' ) . '">' . __( 'Log out »', 'hybrid-core' ) . '</a></p><!-- .log-in-out -->', 'comment_notes_before' => '', 'comment_notes_after' => '', 'id_form' => 'commentform', 'id_submit' => 'submit', - 'title_reply' => __( 'Leave a Reply', $domain ), - 'title_reply_to' => __( 'Leave a Reply to %s', $domain ), - 'cancel_reply_link' => __( 'Click here to cancel reply.', $domain ), - 'label_submit' => __( 'Post Comment', $domain ), + 'title_reply' => __( 'Leave a Reply', 'hybrid-core' ), + 'title_reply_to' => __( 'Leave a Reply to %s', 'hybrid-core' ), + 'cancel_reply_link' => __( 'Click here to cancel reply.', 'hybrid-core' ), + 'label_submit' => __( 'Post Comment', 'hybrid-core' ), ); /* Return the arguments for displaying the comment form. */ @@ -195,6 +214,7 @@ function hybrid_comment_form_args( $args ) { * default, WordPress only allows the 'comment' comment type to have an avatar. * * @since 1.2.0 + * @access private * @param array $types List of all comment types allowed to have avatars. * @return array $types */ diff --git a/wp-content/themes/hybrid/library/functions/context.php b/wp-content/themes/hybrid/library/functions/context.php index d3b3c465e15e062f4a5a89557d9784f56d99838d..d73be8f442648e37e33b8a1035becba9095bae8c 100644 --- a/wp-content/themes/hybrid/library/functions/context.php +++ b/wp-content/themes/hybrid/library/functions/context.php @@ -7,6 +7,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** @@ -20,6 +24,7 @@ * second during a specific minute within a specific hour on a specific day and so on. * * @since 0.7.0 + * @access public * @global $wp_query The current page's query object. * @global $hybrid The global Hybrid object. * @return array $hybrid->context Several contexts based on the current page. @@ -60,7 +65,9 @@ function hybrid_get_context() { if ( is_tax() || is_category() || is_tag() ) { $hybrid->context[] = 'taxonomy'; $hybrid->context[] = "taxonomy-{$object->taxonomy}"; - $hybrid->context[] = "taxonomy-{$object->taxonomy}-" . sanitize_html_class( $object->slug, $object->term_id ); + + $slug = ( ( 'post_format' == $object->taxonomy ) ? str_replace( 'post-format-', '', $object->slug ) : $object->slug ); + $hybrid->context[] = "taxonomy-{$object->taxonomy}-" . sanitize_html_class( $slug, $object->term_id ); } /* Post type archives. */ @@ -117,9 +124,10 @@ function hybrid_get_context() { * even, and alt are added. * * @since 0.5.0 + * @access public * @global $post The current post's DB object. * @param string|array $class Additional classes for more control. - * @return string $class + * @return void */ function hybrid_entry_class( $class = '', $post_id = null ) { static $post_alt; @@ -150,9 +158,13 @@ function hybrid_entry_class( $class = '', $post_id = null ) { $classes[] = 'protected'; /* Has excerpt. */ - if ( has_excerpt() ) + if ( post_type_supports( $post->post_type, 'excerpt' ) && has_excerpt() ) $classes[] = 'has-excerpt'; + /* Has <!--more--> link. */ + if ( !is_singular() && false !== strpos( $post->post_content, '<!--more-->' ) ) + $classes[] = 'has-more-link'; + /* Post format. */ if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) ) { $post_format = get_post_format( $post_id ); @@ -199,8 +211,10 @@ function hybrid_entry_class( $class = '', $post_id = null ) { * (Odd should come first, even second). * * @since 0.2.0 + * @access public * @global $wpdb WordPress DB access object. * @global $comment The current comment's DB object. + * @return void */ function hybrid_comment_class( $class = '' ) { global $post, $comment, $hybrid; @@ -209,7 +223,11 @@ function hybrid_comment_class( $class = '' ) { $classes = get_comment_class( $class ); /* Get the comment type. */ - $classes[] = get_comment_type(); + $comment_type = get_comment_type(); + + /* If the comment type is 'pingback' or 'trackback', add the 'ping' comment class. */ + if ( 'pingback' == $comment_type || 'trackback' == $comment_type ) + $classes[] = 'ping'; /* User classes to match user role and user. */ if ( $comment->user_id > 0 ) { @@ -217,14 +235,14 @@ function hybrid_comment_class( $class = '' ) { /* Create new user object. */ $user = new WP_User( $comment->user_id ); - /* Set a class with the user's role. */ + /* Set a class with the user's role(s). */ if ( is_array( $user->roles ) ) { foreach ( $user->roles as $role ) - $classes[] = "role-{$role}"; + $classes[] = sanitize_html_class( "role-{$role}" ); } /* Set a class with the user's name. */ - $classes[] = 'user-' . sanitize_html_class( $user->user_nicename, $user->ID ); + $classes[] = sanitize_html_class( "user-{$user->user_nicename}", "user-{$user->ID}" ); } /* If not a registered user */ @@ -245,6 +263,9 @@ function hybrid_comment_class( $class = '' ) { if ( get_option( 'show_avatars' ) && in_array( $comment->comment_type, $avatar_comment_types ) ) $classes[] = 'has-avatar'; + /* Make sure comment classes doesn't have any duplicates. */ + $classes = array_unique( $classes ); + /* Join all the classes into one string and echo them. */ $class = join( ' ', $classes ); @@ -255,9 +276,10 @@ function hybrid_comment_class( $class = '' ) { * Provides classes for the <body> element depending on page context. * * @since 0.1.0 + * @access public * @uses $wp_query * @param string|array $class Additional classes for more control. - * @return string + * @return void */ function hybrid_body_class( $class = '' ) { global $wp_query; @@ -285,6 +307,14 @@ function hybrid_body_class( $class = '' ) { if ( is_admin_bar_showing() ) $classes[] = 'admin-bar'; + /* Use the '.custom-background' class to integrate with the WP background feature. */ + if ( get_background_image() || get_background_color() ) + $classes[] = 'custom-background'; + + /* Add the '.custom-header' class if the user is using a custom header. */ + if ( get_header_image() ) + $classes[] = 'custom-header'; + /* Merge base contextual classes with $classes. */ $classes = array_merge( $classes, hybrid_get_context() ); @@ -295,7 +325,7 @@ function hybrid_body_class( $class = '' ) { $post = get_queried_object(); /* Checks for custom template. */ - $template = str_replace( array ( "{$post->post_type}-template-", "{$post->post_type}-", '.php' ), '', get_post_meta( get_queried_object_id(), "_wp_{$post->post_type}_template", true ) ); + $template = str_replace( array ( "{$post->post_type}-template-", "{$post->post_type}-" ), '', basename( get_post_meta( get_queried_object_id(), "_wp_{$post->post_type}_template", true ), '.php' ) ); if ( !empty( $template ) ) $classes[] = "{$post->post_type}-template-{$template}"; @@ -338,13 +368,14 @@ function hybrid_body_class( $class = '' ) { * possible situation WordPress throws at it for the best optimization. * * @since 0.1.0 + * @access public * @global $wp_query + * @return void */ function hybrid_document_title() { global $wp_query; /* Set up some default variables. */ - $domain = hybrid_get_textdomain(); $doctitle = ''; $separator = ':'; @@ -389,48 +420,51 @@ function hybrid_document_title() { /* If viewing a date-/time-based archive. */ elseif ( is_date () ) { if ( get_query_var( 'minute' ) && get_query_var( 'hour' ) ) - $doctitle = sprintf( __( 'Archive for %1$s', $domain ), get_the_time( __( 'g:i a', $domain ) ) ); + $doctitle = sprintf( __( 'Archive for %1$s', 'hybrid-core' ), get_the_time( __( 'g:i a', 'hybrid-core' ) ) ); elseif ( get_query_var( 'minute' ) ) - $doctitle = sprintf( __( 'Archive for minute %1$s', $domain ), get_the_time( __( 'i', $domain ) ) ); + $doctitle = sprintf( __( 'Archive for minute %1$s', 'hybrid-core' ), get_the_time( __( 'i', 'hybrid-core' ) ) ); elseif ( get_query_var( 'hour' ) ) - $doctitle = sprintf( __( 'Archive for %1$s', $domain ), get_the_time( __( 'g a', $domain ) ) ); + $doctitle = sprintf( __( 'Archive for %1$s', 'hybrid-core' ), get_the_time( __( 'g a', 'hybrid-core' ) ) ); elseif ( is_day() ) - $doctitle = sprintf( __( 'Archive for %1$s', $domain ), get_the_time( __( 'F jS, Y', $domain ) ) ); + $doctitle = sprintf( __( 'Archive for %1$s', 'hybrid-core' ), get_the_time( __( 'F jS, Y', 'hybrid-core' ) ) ); elseif ( get_query_var( 'w' ) ) - $doctitle = sprintf( __( 'Archive for week %1$s of %2$s', $domain ), get_the_time( __( 'W', $domain ) ), get_the_time( __( 'Y', $domain ) ) ); + $doctitle = sprintf( __( 'Archive for week %1$s of %2$s', 'hybrid-core' ), get_the_time( __( 'W', 'hybrid-core' ) ), get_the_time( __( 'Y', 'hybrid-core' ) ) ); elseif ( is_month() ) - $doctitle = sprintf( __( 'Archive for %1$s', $domain ), single_month_title( ' ', false) ); + $doctitle = sprintf( __( 'Archive for %1$s', 'hybrid-core' ), single_month_title( ' ', false) ); elseif ( is_year() ) - $doctitle = sprintf( __( 'Archive for %1$s', $domain ), get_the_time( __( 'Y', $domain ) ) ); + $doctitle = sprintf( __( 'Archive for %1$s', 'hybrid-core' ), get_the_time( __( 'Y', 'hybrid-core' ) ) ); } /* For any other archives. */ else { - $doctitle = __( 'Archives', $domain ); + $doctitle = __( 'Archives', 'hybrid-core' ); } } /* If viewing a search results page. */ elseif ( is_search() ) - $doctitle = sprintf( __( 'Search results for "%1$s"', $domain ), esc_attr( get_search_query() ) ); + $doctitle = sprintf( __( 'Search results for "%1$s"', 'hybrid-core' ), esc_attr( get_search_query() ) ); /* If viewing a 404 not found page. */ elseif ( is_404() ) - $doctitle = __( '404 Not Found', $domain ); + $doctitle = __( '404 Not Found', 'hybrid-core' ); /* If the current page is a paged page. */ if ( ( ( $page = $wp_query->get( 'paged' ) ) || ( $page = $wp_query->get( 'page' ) ) ) && $page > 1 ) - $doctitle = sprintf( __( '%1$s Page %2$s', $domain ), $doctitle . $separator, number_format_i18n( $page ) ); + $doctitle = sprintf( __( '%1$s Page %2$s', 'hybrid-core' ), $doctitle . $separator, number_format_i18n( $page ) ); /* Apply the wp_title filters so we're compatible with plugins. */ $doctitle = apply_filters( 'wp_title', $doctitle, $separator, '' ); + /* Trim separator + space from beginning and end in case a plugin adds it. */ + $doctitle = trim( $doctitle, "{$separator} " ); + /* Print the title to the screen. */ echo apply_atomic( 'document_title', esc_attr( $doctitle ) ); } diff --git a/wp-content/themes/hybrid/library/functions/core-seo.php b/wp-content/themes/hybrid/library/functions/core-seo.php index e78c6317e629057a7780b48fdad78c5fc9c7c865..97c3d6943f70a9f3cd7dcd5cd8f30cf813cf4881 100644 --- a/wp-content/themes/hybrid/library/functions/core-seo.php +++ b/wp-content/themes/hybrid/library/functions/core-seo.php @@ -6,6 +6,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Add <meta> elements to the <head> area. */ @@ -21,6 +25,8 @@ add_action( 'wp_head', 'hybrid_meta_keywords', 1 ); * hybrid_meta_robots filter hook at the end. * * @since 0.2.3 + * @access private + * @return void */ function hybrid_meta_robots() { @@ -39,6 +45,8 @@ function hybrid_meta_robots() { * archives, it uses the user's display name. * * @since 0.3.3 + * @access private + * @return void */ function hybrid_meta_author() { @@ -68,22 +76,21 @@ function hybrid_meta_author() { * published. All other pages will show the current year. * * @since 0.4.0 + * @access private + * @return void */ function hybrid_meta_copyright() { - /* Get the theme's textdomain. */ - $domain = hybrid_get_textdomain(); - /* If viewing a singular post, get the post month and year. */ if ( is_singular() ) - $date = get_the_time( esc_attr__( 'F Y', $domain ) ); + $date = get_the_time( esc_attr__( 'F Y', 'hybrid-core' ) ); /* For all other views, get the current year. */ else - $date = date( esc_attr__( 'Y', $domain ) ); + $date = date( esc_attr__( 'Y', 'hybrid-core' ) ); /* Create the HTML for the copyright meta tag. */ - $copyright = '<meta name="copyright" content="' . sprintf( esc_attr__( 'Copyright (c) %1$s', $domain ), $date ) . '" />' . "\n"; + $copyright = '<meta name="copyright" content="' . sprintf( esc_attr__( 'Copyright (c) %1$s', 'hybrid-core' ), $date ) . '" />' . "\n"; echo apply_atomic( 'meta_copyright', $copyright ); } @@ -92,6 +99,8 @@ function hybrid_meta_copyright() { * Add the revised meta tag on the singular view of posts. This shows the last time the post was modified. * * @since 0.4.0 + * @access private + * @return void */ function hybrid_meta_revised() { @@ -100,7 +109,7 @@ function hybrid_meta_revised() { /* If viewing a singular post, get the last modified date/time to use in the revised meta tag. */ if ( is_singular() ) - $revised = '<meta name="revised" content="' . get_the_modified_time( esc_attr__( 'l, F jS, Y, g:i a', hybrid_get_textdomain() ) ) . '" />' . "\n"; + $revised = '<meta name="revised" content="' . get_the_modified_time( esc_attr__( 'l, F jS, Y, g:i a', 'hybrid-core' ) ) . '" />' . "\n"; echo apply_atomic( 'meta_revised', $revised ); } @@ -109,6 +118,8 @@ function hybrid_meta_revised() { * Generates the meta description based on either metadata or the description for the object. * * @since 0.2.3 + * @access private + * @return void */ function hybrid_meta_description() { @@ -176,6 +187,8 @@ function hybrid_meta_description() { * Generates meta keywords/tags for the site. * * @since 0.2.3 + * @access private + * @return void */ function hybrid_meta_keywords() { diff --git a/wp-content/themes/hybrid/library/functions/core.php b/wp-content/themes/hybrid/library/functions/core.php index 1cada8df55af5aa660e836a739295954097a8a8a..73f428bbd3f5ad1a08d21993925d0d4d83ecb0ae 100644 --- a/wp-content/themes/hybrid/library/functions/core.php +++ b/wp-content/themes/hybrid/library/functions/core.php @@ -6,6 +6,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** @@ -15,6 +19,7 @@ * each theme's hooks (assuming other themes used the same system). * * @since 0.7.0 + * @access public * @uses get_template() Defines the theme prefix based on the theme directory. * @global object $hybrid The global Hybrid object. * @return string $hybrid->prefix The prefix of the theme. @@ -29,75 +34,6 @@ function hybrid_get_prefix() { return $hybrid->prefix; } -/** - * Defines the theme textdomain. This allows the framework to recognize the proper textdomain of the - * parent theme. Theme developers building from the framework should use this function in their templates - * to easily define the correct textdomain. - * - * @since 0.7.0 - * @uses get_template() Defines the theme textdomain based on the template directory. - * @global object $hybrid The global Hybrid object. - * @return string $hybrid->textdomain The textdomain of the theme. - */ -function hybrid_get_textdomain() { - global $hybrid; - - /* If the global textdomain isn't set, define it. Plugin/theme authors may also define a custom textdomain. */ - if ( empty( $hybrid->textdomain ) ) - $hybrid->textdomain = sanitize_key( apply_filters( hybrid_get_prefix() . '_textdomain', get_template() ) ); - - return $hybrid->textdomain; -} - -/** - * Returns the textdomain for the child theme. - * - * @since 1.2.0 - * @uses get_stylesheet() Defines the child theme textdomain based on the stylesheet directory. - * @global object $hybrid The global Hybrid object. - * @return string $hybrid->child_theme_textdomain The textdomain of the child theme. - */ -function hybrid_get_child_textdomain() { - global $hybrid; - - /* If a child theme isn't active, return an empty string. */ - if ( !is_child_theme() ) - return ''; - - /* If the global textdomain isn't set, define it. Plugin/theme authors may also define a custom textdomain. */ - if ( empty( $hybrid->child_textdomain ) ) - $hybrid->child_textdomain = sanitize_key( apply_filters( hybrid_get_prefix() . '_child_textdomain', get_stylesheet() ) ); - - return $hybrid->child_textdomain; -} - -/** - * Filters the 'load_textdomain_mofile' filter hook so that we can change the directory and file name - * of the mofile for translations. This allows child themes to have a folder called /languages with translations - * of their parent theme so that the translations aren't lost on a parent theme upgrade. - * - * @since 0.9.0 - * @param string $mofile File name of the .mo file. - * @param string $domain The textdomain currently being filtered. - */ -function hybrid_load_textdomain( $mofile, $domain ) { - - /* If the $domain is for the parent or child theme, search for a $domain-$locale.mo file. */ - if ( $domain == hybrid_get_textdomain() || $domain == hybrid_get_child_textdomain() ) { - - /* Check for a $domain-$locale.mo file in the parent and child theme root and /languages folder. */ - $locale = get_locale(); - $locate_mofile = locate_template( array( "languages/{$domain}-{$locale}.mo", "{$domain}-{$locale}.mo" ) ); - - /* If a mofile was found based on the given format, set $mofile to that file name. */ - if ( !empty( $locate_mofile ) ) - $mofile = $locate_mofile; - } - - /* Return the $mofile string. */ - return $mofile; -} - /** * Adds contextual action hooks to the theme. This allows users to easily add context-based content * without having to know how to use WordPress conditional tags. The theme handles the logic. @@ -107,6 +43,7 @@ function hybrid_load_textdomain( $mofile, $domain ) { * 'hybrid_singular-post-ID_header'. * * @since 0.7.0 + * @access public * @uses hybrid_get_prefix() Gets the theme prefix. * @uses hybrid_get_context() Gets the context of the current page. * @param string $tag Usually the location of the hook but defines what the base hook is. @@ -140,6 +77,7 @@ function do_atomic( $tag = '', $arg = '' ) { * and 'hybrid_singular-post-ID_entry_meta'. * * @since 0.7.0 + * @access public * @uses hybrid_get_prefix() Gets the theme prefix. * @uses hybrid_get_context() Gets the context of the current page. * @param string $tag Usually the location of the hook but defines what the base hook is. @@ -175,6 +113,7 @@ function apply_atomic( $tag = '', $value = '' ) { * function itself, developers can create individual functions to handle shortcodes. * * @since 0.7.0 + * @access public * @param string $tag Usually the location of the hook but defines what the base hook is. * @param mixed $value The value to be filtered. * @return mixed $value The value after it has been filtered. @@ -188,6 +127,7 @@ function apply_atomic_shortcode( $tag = '', $value = '' ) { * setting a default of 12 hours or 43,200 seconds (60 * 60 * 12). * * @since 0.8.0 + * @access public * @return int Transient expiration time in seconds. */ function hybrid_get_transient_expiration() { @@ -199,6 +139,7 @@ function hybrid_get_transient_expiration() { * the hook, and it will add a context (or any variable) if it's given. * * @since 0.7.0 + * @access public * @param string $tag The basic name of the hook (e.g., 'before_header'). * @param string $context A specific context/value to be added to the hook. */ @@ -211,6 +152,7 @@ function hybrid_format_hook( $tag, $context = '' ) { * simply overwrites whatever the content width is. * * @since 1.2.0 + * @access public * @global int $content_width The width for the theme's content area. * @param int $width Numeric value of the width to set. */ @@ -224,6 +166,7 @@ function hybrid_set_content_width( $width = '' ) { * Function for getting the theme's content width. * * @since 1.2.0 + * @access public * @global int $content_width The width for the theme's content area. * @return int $content_width */ @@ -238,6 +181,7 @@ function hybrid_get_content_width() { * having to run through the get_theme_data() function again. * * @since 1.2.0 + * @access public * @param string $path Whether to use the template (parent theme) or stylesheet (child theme) path. */ function hybrid_get_theme_data( $path = 'template' ) { diff --git a/wp-content/themes/hybrid/library/functions/customize.php b/wp-content/themes/hybrid/library/functions/customize.php new file mode 100644 index 0000000000000000000000000000000000000000..a9361d69e2021d5e0133f81f38c5bb2ee5e80558 --- /dev/null +++ b/wp-content/themes/hybrid/library/functions/customize.php @@ -0,0 +1,181 @@ +<?php +/** + * Functions for registering and setting theme settings that tie into the WordPress theme customizer. + * This file loads additional classes and adds settings to the customizer for the built-in Hybrid Core + * settings. + * + * @package HybridCore + * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + */ + +/* Load custom control classes. */ +add_action( 'customize_register', 'hybrid_load_customize_controls', 1 ); + +/* Register custom sections, settings, and controls. */ +add_action( 'customize_register', 'hybrid_customize_register' ); + +/* Add the footer content Ajax to the correct hooks. */ +add_action( 'wp_ajax_hybrid_customize_footer_content', 'hybrid_customize_footer_content_ajax' ); +add_action( 'wp_ajax_nopriv_hybrid_customize_footer_content', 'hybrid_customize_footer_content_ajax' ); + +/** + * Loads framework-specific customize control classes. Customize control classes extend the WordPress + * WP_Customize_Control class to create unique classes that can be used within the framework. + * + * @since 1.4.0 + * @access private + */ +function hybrid_load_customize_controls() { + + /* Loads the textarea customize control class. */ + require_once( trailingslashit( HYBRID_CLASSES ) . 'customize-control-textarea.php' ); +} + +/** + * Registers custom sections, settings, and controls for the $wp_customize instance. + * + * @since 1.4.0 + * @access private + * @param object $wp_customize + */ +function hybrid_customize_register( $wp_customize ) { + + /* Get supported theme settings. */ + $supports = get_theme_support( 'hybrid-core-theme-settings' ); + + /* Get the theme prefix. */ + $prefix = hybrid_get_prefix(); + + /* Get the default theme settings. */ + $default_settings = hybrid_get_default_theme_settings(); + + /* Add the footer section, setting, and control if theme supports the 'footer' setting. */ + if ( is_array( $supports[0] ) && in_array( 'footer', $supports[0] ) ) { + + /* Add the footer section. */ + $wp_customize->add_section( + 'hybrid-core-footer', + array( + 'title' => esc_html__( 'Footer', 'hybrid-core' ), + 'priority' => 200, + 'capability' => 'edit_theme_options' + ) + ); + + /* Add the 'footer_insert' setting. */ + $wp_customize->add_setting( + "{$prefix}_theme_settings[footer_insert]", + array( + 'default' => $default_settings['footer_insert'], + 'type' => 'option', + 'capability' => 'edit_theme_options', + 'sanitize_callback' => 'hybrid_customize_sanitize', + 'sanitize_js_callback' => 'hybrid_customize_sanitize', + 'transport' => 'postMessage', + ) + ); + + /* Add the textarea control for the 'footer_insert' setting. */ + $wp_customize->add_control( + new Hybrid_Customize_Control_Textarea( + $wp_customize, + 'hybrid-core-footer', + array( + 'label' => esc_html__( 'Footer', 'hybrid-core' ), + 'section' => 'hybrid-core-footer', + 'settings' => "{$prefix}_theme_settings[footer_insert]", + ) + ) + ); + + /* If viewing the customize preview screen, add a script to show a live preview. */ + if ( $wp_customize->is_preview() && !is_admin() ) + add_action( 'wp_footer', 'hybrid_customize_preview_script', 21 ); + } +} + +/** + * Sanitizes the footer content on the customize screen. Users with the 'unfiltered_html' cap can post + * anything. For other users, wp_filter_post_kses() is ran over the setting. + * + * @since 1.4.0 + * @access public + * @param mixed $setting The current setting passed to sanitize. + * @param object $object The setting object passed via WP_Customize_Setting. + * @return mixed $setting + */ +function hybrid_customize_sanitize( $setting, $object ) { + + /* Get the theme prefix. */ + $prefix = hybrid_get_prefix(); + + /* Make sure we kill evil scripts from users without the 'unfiltered_html' cap. */ + if ( "{$prefix}_theme_settings[footer_insert]" == $object->id && !current_user_can( 'unfiltered_html' ) ) + $setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) ); + + /* Return the sanitized setting and apply filters. */ + return apply_filters( "{$prefix}_customize_sanitize", $setting, $object ); +} + +/** + * Runs the footer content posted via Ajax through the do_shortcode() function. This makes sure the + * shortcodes are output correctly in the live preview. + * + * @since 1.4.0 + * @access private + */ +function hybrid_customize_footer_content_ajax() { + + /* Check the AJAX nonce to make sure this is a valid request. */ + check_ajax_referer( 'hybrid_customize_footer_content_nonce' ); + + /* If footer content has been posted, run it through the do_shortcode() function. */ + if ( isset( $_POST['footer_content'] ) ) + echo do_shortcode( wp_kses_stripslashes( $_POST['footer_content'] ) ); + + /* Always die() when handling Ajax. */ + die(); +} + +/** + * Handles changing settings for the live preview of the theme. + * + * @since 1.4.0 + * @access private + */ +function hybrid_customize_preview_script() { + + /* Create a nonce for the Ajax. */ + $nonce = wp_create_nonce( 'hybrid_customize_footer_content_nonce' ); + + ?> + <script type="text/javascript"> + wp.customize( + '<?php echo hybrid_get_prefix(); ?>_theme_settings[footer_insert]', + function( value ) { + value.bind( + function( to ) { + jQuery.post( + '<?php echo admin_url( 'admin-ajax.php' ); ?>', + { + action: 'hybrid_customize_footer_content', + _ajax_nonce: '<?php echo $nonce; ?>', + footer_content: to + }, + function( response ) { + jQuery( '.footer-content' ).html( response ); + } + ); + } + ); + } + ); + </script> + <?php +} + +?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/functions/deprecated.php b/wp-content/themes/hybrid/library/functions/deprecated.php index 1279a95e7a0eb5fb2937acd9d71f3d02f981d0b2..ff7dce5ad255297b79597639f7003cc5126179fa 100644 --- a/wp-content/themes/hybrid/library/functions/deprecated.php +++ b/wp-content/themes/hybrid/library/functions/deprecated.php @@ -8,6 +8,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** @@ -211,12 +215,6 @@ function hybrid_after_entry() { */ function hybrid_after_singular() { _deprecated_function( __FUNCTION__, '1.0.0', "do_atomic( 'after_singular' )" ); - - if ( is_singular( 'post' ) && !is_attachment() ) - do_action( 'hybrid_after_single' ); - elseif ( is_page() ) - do_action( 'hybrid_after_page' ); - do_atomic( 'after_singular' ); } @@ -357,7 +355,7 @@ add_action( 'check_admin_referer', 'hybrid_back_compat_update_settings' ); * @deprecated 1.0.0 */ function hybrid_back_compat_update_settings( $action ) { - _deprecated_function( __FUNCTION__, '1.0.0' ); + //_deprecated_function( __FUNCTION__, '1.0.0' ); $prefix = hybrid_get_prefix(); @@ -401,6 +399,33 @@ function hybrid_settings_page_enqueue_script() { return; } +/** + * @since 0.7.0 + * @deprecated 1.3.0 + */ +function hybrid_admin_init() { + _deprecated_function( __FUNCTION__, '1.3.0', 'hybrid_admin_setup' ); + return; +} + +/** + * @since 1.2.0 + * @deprecated 1.3.0 + */ +function hybrid_settings_page_contextual_help() { + _deprecated_function( __FUNCTION__, '1.3.0', 'hybrid_settings_page_help' ); + return; +} + +/** + * @since 0.9.0 + * @deprecated 1.3.0 + */ +function hybrid_load_textdomain( $mofile, $domain ) { + _deprecated_function( __FUNCTION__, '1.3.0', 'hybrid_load_textdomain_mofile' ); + return hybrid_load_textdomain_mofile( $mofile, $domain ); +} + /* === Removed Functions === */ /* Functions removed in the 0.8 branch. */ @@ -544,7 +569,7 @@ function hybrid_post_stylesheets() { * @since 0.5.0 */ function hybrid_function_removed( $func = '' ) { - die( sprintf( __( '<code>%1$s</code> — This function has been removed or replaced by another function.', hybrid_get_textdomain() ), $func ) ); + die( sprintf( __( '<code>%1$s</code> — This function has been removed or replaced by another function.', 'hybrid-core' ), $func ) ); } ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/functions/i18n.php b/wp-content/themes/hybrid/library/functions/i18n.php new file mode 100644 index 0000000000000000000000000000000000000000..25ef14cec382173d587b90ec1b6ac01e5729101c --- /dev/null +++ b/wp-content/themes/hybrid/library/functions/i18n.php @@ -0,0 +1,209 @@ +<?php +/** + * Internationalization and translation functions. Because Hybrid Core is a framework made up of various + * extensions with different textdomains, it must filter 'gettext' so that a single translation file can + * handle all translations. + * + * @package HybridCore + * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + */ + +/** + * Checks if a textdomain's translation files have been loaded. This function behaves differently from + * WordPress core's is_textdomain_loaded(), which will return true after any translation function is run over + * a text string with the given domain. The purpose of this function is to simply check if the translation files + * are loaded. + * + * @since 1.3.0 + * @access private This is only used internally by the framework for checking translations. + * @param string $domain The textdomain to check translations for. + */ +function hybrid_is_textdomain_loaded( $domain ) { + global $hybrid; + + return ( isset( $hybrid->textdomain_loaded[$domain] ) && true === $hybrid->textdomain_loaded[$domain] ) ? true : false; +} + +/** + * Loads the framework's translation files. The function first checks if the parent theme or child theme + * has the translation files housed in their '/languages' folder. If not, it sets the translation file the the + * framework '/languages' folder. + * + * @since 1.3.0 + * @access private + * @uses load_textdomain() Loads an MO file into the domain for the framework. + * @param string $domain The name of the framework's textdomain. + * @return true|false Whether the MO file was loaded. + */ +function hybrid_load_framework_textdomain( $domain ) { + + /* Get the WordPress installation's locale set by the user. */ + $locale = get_locale(); + + /* Check if the mofile is located in parent/child theme /languages folder. */ + $mofile = locate_template( array( "languages/{$domain}-{$locale}.mo" ) ); + + /* If no mofile was found in the parent/child theme, set it to the framework's mofile. */ + if ( empty( $mofile ) ) + $mofile = trailingslashit( HYBRID_LANGUAGES ) . "{$domain}-{$locale}.mo"; + + return load_textdomain( $domain, $mofile ); +} + +/** + * @since 0.7.0 + * @deprecated 1.3.0 + */ +function hybrid_get_textdomain() { + _deprecated_function( __FUNCTION__, '1.3.0', 'hybrid_get_parent_textdomain' ); + return hybrid_get_parent_textdomain(); +} + +/** + * Gets the parent theme textdomain. This allows the framework to recognize the proper textdomain of the + * parent theme. + * + * Important! Do not use this for translation functions in your theme. Hardcode your textdomain string. Your + * theme's textdomain should match your theme's folder name. + * + * @since 1.3.0 + * @access private + * @uses get_template() Defines the theme textdomain based on the template directory. + * @global object $hybrid The global Hybrid object. + * @return string $hybrid->textdomain The textdomain of the theme. + */ +function hybrid_get_parent_textdomain() { + global $hybrid; + + /* If the global textdomain isn't set, define it. Plugin/theme authors may also define a custom textdomain. */ + if ( empty( $hybrid->parent_textdomain ) ) + $hybrid->parent_textdomain = sanitize_key( apply_filters( hybrid_get_prefix() . '_parent_textdomain', get_template() ) ); + + /* Return the expected textdomain of the parent theme. */ + return $hybrid->parent_textdomain; +} + +/** + * Gets the child theme textdomain. This allows the framework to recognize the proper textdomain of the + * child theme. + * + * Important! Do not use this for translation functions in your theme. Hardcode your textdomain string. Your + * theme's textdomain should match your theme's folder name. + * + * @since 1.2.0 + * @access private + * @uses get_stylesheet() Defines the child theme textdomain based on the stylesheet directory. + * @global object $hybrid The global Hybrid object. + * @return string $hybrid->child_theme_textdomain The textdomain of the child theme. + */ +function hybrid_get_child_textdomain() { + global $hybrid; + + /* If a child theme isn't active, return an empty string. */ + if ( !is_child_theme() ) + return ''; + + /* If the global textdomain isn't set, define it. Plugin/theme authors may also define a custom textdomain. */ + if ( empty( $hybrid->child_textdomain ) ) + $hybrid->child_textdomain = sanitize_key( apply_filters( hybrid_get_prefix() . '_child_textdomain', get_stylesheet() ) ); + + /* Return the expected textdomain of the child theme. */ + return $hybrid->child_textdomain; +} + +/** + * Filters the 'load_textdomain_mofile' filter hook so that we can change the directory and file name + * of the mofile for translations. This allows child themes to have a folder called /languages with translations + * of their parent theme so that the translations aren't lost on a parent theme upgrade. + * + * @since 1.3.0 + * @access private + * @param string $mofile File name of the .mo file. + * @param string $domain The textdomain currently being filtered. + * @return $mofile + */ +function hybrid_load_textdomain_mofile( $mofile, $domain ) { + + /* If the $domain is for the parent or child theme, search for a $domain-$locale.mo file. */ + if ( $domain == hybrid_get_parent_textdomain() || $domain == hybrid_get_child_textdomain() ) { + + /* Check for a $domain-$locale.mo file in the parent and child theme root and /languages folder. */ + $locale = get_locale(); + $locate_mofile = locate_template( array( "languages/{$domain}-{$locale}.mo", "{$domain}-{$locale}.mo" ) ); + + /* If a mofile was found based on the given format, set $mofile to that file name. */ + if ( !empty( $locate_mofile ) ) + $mofile = $locate_mofile; + } + + /* Return the $mofile string. */ + return $mofile; +} + +/** + * Filters 'gettext' to change the translations used for the 'hybrid-core' textdomain. This filter makes it possible + * for the theme's MO file to translate the framework's text strings. + * + * @since 1.3.0 + * @access private + * @param string $translated The translated text. + * @param string $text The original, untranslated text. + * @param string $domain The textdomain for the text. + * @return string $translated + */ +function hybrid_gettext( $translated, $text, $domain ) { + + /* Check if 'hybrid-core' is the current textdomain, there's no mofile for it, and the theme has a mofile. */ + if ( 'hybrid-core' == $domain && !hybrid_is_textdomain_loaded( 'hybrid-core' ) && hybrid_is_textdomain_loaded( hybrid_get_parent_textdomain() ) ) { + + /* Get the translations for the theme. */ + $translations = &get_translations_for_domain( hybrid_get_parent_textdomain() ); + + /* Translate the text using the theme's translation. */ + $translated = $translations->translate( $text ); + } + + return $translated; +} + +/** + * Filters 'gettext' to change the translations used for the each of the extensions' textdomains. This filter + * makes it possible for the theme's MO file to translate the framework's extensions. + * + * @since 1.3.0 + * @access private + * @param string $translated The translated text. + * @param string $text The original, untranslated text. + * @param string $domain The textdomain for the text. + * @return string $translated + */ +function hybrid_extensions_gettext( $translated, $text, $domain ) { + + /* Check if the current textdomain matches one of the framework extensions. */ + if ( in_array( $domain, array( 'breadcrumb-trail', 'custom-field-series', 'post-stylesheets', 'theme-layouts' ) ) ) { + + /* If the theme supports the extension, switch the translations. */ + if ( current_theme_supports( $domain ) ) { + + /* If the framework mofile is loaded, use its translations. */ + if ( hybrid_is_textdomain_loaded( 'hybrid-core' ) ) + $translations = &get_translations_for_domain( 'hybrid-core' ); + + /* If the theme mofile is loaded, use its translations. */ + elseif ( hybrid_is_textdomain_loaded( hybrid_get_parent_textdomain() ) ) + $translations = &get_translations_for_domain( hybrid_get_parent_textdomain() ); + + /* If translations were found, translate the text. */ + if ( !empty( $translations ) ) + $translated = $translations->translate( $text ); + } + } + + return $translated; +} + +?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/functions/media.php b/wp-content/themes/hybrid/library/functions/media.php index e1d2019ec1a87f35730e0d555121854f66f69457..f3a29bcb8acfb6f0b2402706ebdf36610f0c66e0 100644 --- a/wp-content/themes/hybrid/library/functions/media.php +++ b/wp-content/themes/hybrid/library/functions/media.php @@ -5,6 +5,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Register Hybrid Core scripts. */ @@ -16,34 +20,55 @@ add_action( 'wp_enqueue_scripts', 'hybrid_enqueue_scripts' ); /* Load the development stylsheet in script debug mode. */ add_filter( 'stylesheet_uri', 'hybrid_debug_stylesheet', 10, 2 ); +/* Add all image sizes to the image editor to insert into post. */ +add_filter( 'image_size_names_choose', 'hybrid_image_size_names_choose' ); + /** * Registers JavaScript files for the framework. This function merely registers scripts with WordPress using * the wp_register_script() function. It does not load any script files on the site. If a theme wants to register * its own custom scripts, it should do so on the 'wp_enqueue_scripts' hook. * * @since 1.2.0 + * @access private + * @return void */ function hybrid_register_scripts() { + /* Supported JavaScript. */ + $supports = get_theme_support( 'hybrid-core-javascript' ); + /* Register the 'drop-downs' script if the current theme supports 'hybrid-core-drop-downs'. */ - if ( current_theme_supports( 'hybrid-core-drop-downs' ) ) - wp_register_script( 'drop-downs', esc_url( apply_atomic( 'drop_downs_script', trailingslashit( HYBRID_JS ) . 'drop-downs.js' ) ), array( 'jquery' ), '20110705', true ); + if ( current_theme_supports( 'hybrid-core-drop-downs' ) || ( isset( $supports[0] ) && in_array( 'drop-downs', $supports[0] ) ) ) + wp_register_script( 'drop-downs', esc_url( apply_atomic( 'drop_downs_script', trailingslashit( HYBRID_JS ) . 'drop-downs.js' ) ), array( 'jquery' ), '20110920', true ); + + /* Register the 'nav-bar' script if the current theme supports 'hybrid-core-nav-bar'. */ + if ( isset( $supports[0] ) && in_array( 'nav-bar', $supports[0] ) ) + wp_register_script( 'nav-bar', esc_url( apply_atomic( 'nav_bar_script', trailingslashit( HYBRID_JS ) . 'nav-bar.js' ) ), array( 'jquery' ), '20111008', true ); } /** * Tells WordPress to load the scripts needed for the framework using the wp_enqueue_script() function. * * @since 1.2.0 + * @access private + * @return void */ function hybrid_enqueue_scripts() { + /* Supported JavaScript. */ + $supports = get_theme_support( 'hybrid-core-javascript' ); + /* Load the comment reply script on singular posts with open comments if threaded comments are supported. */ if ( is_singular() && get_option( 'thread_comments' ) && comments_open() ) wp_enqueue_script( 'comment-reply' ); /* Load the 'drop-downs' script if the current theme supports 'hybrid-core-drop-downs'. */ - if ( current_theme_supports( 'hybrid-core-drop-downs' ) ) + if ( current_theme_supports( 'hybrid-core-drop-downs' ) || ( isset( $supports[0] ) && in_array( 'drop-downs', $supports[0] ) ) ) wp_enqueue_script( 'drop-downs' ); + + /* Load the 'nav-bar' script if the current theme supports 'hybrid-core-nav-bar'. */ + if ( isset( $supports[0] ) && in_array( 'nav-bar', $supports[0] ) ) + wp_enqueue_script( 'nav-bar' ); } /** @@ -52,6 +77,10 @@ function hybrid_enqueue_scripts() { * file is present within the theme folder and use it if it exists. Else, it defaults to 'style.css'. * * @since 0.9.0 + * @access private + * @param string $stylesheet_uri The URI of the active theme's stylesheet. + * @param string $stylesheet_dir_uri The directory URI of the active theme's stylesheet. + * @return string $stylesheet_uri */ function hybrid_debug_stylesheet( $stylesheet_uri, $stylesheet_dir_uri ) { @@ -65,7 +94,7 @@ function hybrid_debug_stylesheet( $stylesheet_uri, $stylesheet_dir_uri ) { $stylesheet = str_replace( '.css', '.dev.css', $stylesheet ); /* If the stylesheet exists in the stylesheet directory, set the stylesheet URI to the dev stylesheet. */ - if ( file_exists( trailingslashit( STYLESHEETPATH ) . $stylesheet ) ) + if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $stylesheet ) ) $stylesheet_uri = trailingslashit( $stylesheet_dir_uri ) . $stylesheet; } @@ -73,6 +102,32 @@ function hybrid_debug_stylesheet( $stylesheet_uri, $stylesheet_dir_uri ) { return $stylesheet_uri; } +/** + * Adds theme/plugin custom images sizes added with add_image_size() to the image uploader/editor. This + * allows users to insert these images within their post content editor. + * + * @since 1.3.0 + * @access private + * @param array $sizes Selectable image sizes. + * @return array $sizes + */ +function hybrid_image_size_names_choose( $sizes ) { + + /* Get all intermediate image sizes. */ + $intermediate_sizes = get_intermediate_image_sizes(); + $add_sizes = array(); + + /* Loop through each of the intermediate sizes, adding them to the $add_sizes array. */ + foreach ( $intermediate_sizes as $size ) + $add_sizes[$size] = $size; + + /* Merge the original array, keeping it intact, with the new array of image sizes. */ + $sizes = array_merge( $add_sizes, $sizes ); + + /* Return the new sizes plus the old sizes back. */ + return $sizes; +} + /** * Loads the correct function for handling attachments. Checks the attachment mime type to call * correct function. Image attachments are not loaded with this function. The functionality for them @@ -82,8 +137,10 @@ function hybrid_debug_stylesheet( $stylesheet_uri, $stylesheet_dir_uri ) { * lead to messy template files. * * @since 0.5.0 + * @access public * @uses get_post_mime_type() Gets the mime type of the attachment. * @uses wp_get_attachment_url() Gets the URL of the attachment file. + * @return void */ function hybrid_attachment() { $file = wp_get_attachment_url(); @@ -106,6 +163,7 @@ function hybrid_attachment() { * on those pages. * * @since 0.3.0 + * @access public * @param string $mime attachment mime type * @param string $file attachment file URL * @return string @@ -124,6 +182,7 @@ function hybrid_application_attachment( $mime = '', $file = '' ) { * in the pages. * * @since 0.3.0 + * @access public * @param string $mime attachment mime type * @param string $file attachment file URL * @return string @@ -144,6 +203,7 @@ function hybrid_text_attachment( $mime = '', $file = '' ) { * @todo Test out and support more audio types. * * @since 0.2.2 + * @access public * @param string $mime attachment mime type * @param string $file attachment file URL * @return string @@ -163,6 +223,7 @@ function hybrid_audio_attachment( $mime = '', $file = '' ) { * Handles video attachments on attachment pages. Add other video types to the <object> element. * * @since 0.2.2 + * @access public * @param string $mime attachment mime type * @param string $file attachment file URL * @return string diff --git a/wp-content/themes/hybrid/library/functions/menus.php b/wp-content/themes/hybrid/library/functions/menus.php index 3cf18956a6c6c75b13696ff98abb86003e6498f7..7439d84f5cf2a193b8b19b3526ff8430323e833b 100644 --- a/wp-content/themes/hybrid/library/functions/menus.php +++ b/wp-content/themes/hybrid/library/functions/menus.php @@ -6,6 +6,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Register nav menus. */ @@ -15,8 +19,10 @@ add_action( 'init', 'hybrid_register_menus' ); * Registers the the framework's default menus based on the menus the theme has registered support for. * * @since 0.8.0 + * @access private * @uses register_nav_menu() Registers a nav menu with WordPress. * @link http://codex.wordpress.org/Function_Reference/register_nav_menu + * @return void */ function hybrid_register_menus() { @@ -29,15 +35,15 @@ function hybrid_register_menus() { /* Register the 'primary' menu. */ if ( in_array( 'primary', $menus[0] ) ) - register_nav_menu( 'primary', _x( 'Primary', 'nav menu location', hybrid_get_textdomain() ) ); + register_nav_menu( 'primary', _x( 'Primary', 'nav menu location', 'hybrid-core' ) ); /* Register the 'secondary' menu. */ if ( in_array( 'secondary', $menus[0] ) ) - register_nav_menu( 'secondary', _x( 'Secondary', 'nav menu location', hybrid_get_textdomain() ) ); + register_nav_menu( 'secondary', _x( 'Secondary', 'nav menu location', 'hybrid-core' ) ); /* Register the 'subsidiary' menu. */ if ( in_array( 'subsidiary', $menus[0] ) ) - register_nav_menu( 'subsidiary', _x( 'Subsidiary', 'nav menu location', hybrid_get_textdomain() ) ); + register_nav_menu( 'subsidiary', _x( 'Subsidiary', 'nav menu location', 'hybrid-core' ) ); } ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/functions/meta.php b/wp-content/themes/hybrid/library/functions/meta.php new file mode 100644 index 0000000000000000000000000000000000000000..b094734f7278815eb62029684cb113005d89c85f --- /dev/null +++ b/wp-content/themes/hybrid/library/functions/meta.php @@ -0,0 +1,66 @@ +<?php +/** + * Metadata functions used in the core framework. This file registers meta keys for use in WordPress + * in a safe manner by setting up a custom sanitize callback. + * + * @package HybridCore + * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + */ + +/* Register meta on the 'init' hook. */ +add_action( 'init', 'hybrid_register_meta' ); + +/** + * Registers the framework's custom metadata keys and sets up the sanitize callback function. + * + * @since 1.3.0 + * @return void + */ +function hybrid_register_meta() { + + /* Register meta if the theme supports the 'hybrid-core-seo' feature. */ + if ( current_theme_supports( 'hybrid-core-seo' ) ) { + + /* Register 'Title', 'Description', and 'Keywords' meta for posts. */ + register_meta( 'post', 'Title', 'hybrid_sanitize_meta' ); + register_meta( 'post', 'Description', 'hybrid_sanitize_meta' ); + register_meta( 'post', 'Keywords', 'hybrid_sanitize_meta' ); + + /* Register 'Title', 'Description', and 'Keywords' meta for users. */ + register_meta( 'user', 'Title', 'hybrid_sanitize_meta' ); + register_meta( 'user', 'Description', 'hybrid_sanitize_meta' ); + register_meta( 'user', 'Keywords', 'hybrid_sanitize_meta' ); + } + + /* Register meta if the theme supports the 'hybrid-core-template-hierarchy' feature. */ + if ( current_theme_supports( 'hybrid-core-template-hierarchy' ) ) { + + $post_types = get_post_types( array( 'public' => true ) ); + + foreach ( $post_types as $post_type ) { + if ( 'page' !== $post_type ) + register_meta( 'post', "_wp_{$post_type}_template", 'hybrid_sanitize_meta' ); + } + } +} + +/** + * Callback function for sanitizing meta when add_metadata() or update_metadata() is called by WordPress. + * If a developer wants to set up a custom method for sanitizing the data, they should use the + * "sanitize_{$meta_type}_meta_{$meta_key}" filter hook to do so. + * + * @since 1.3.0 + * @param mixed $meta_value The value of the data to sanitize. + * @param string $meta_key The meta key name. + * @param string $meta_type The type of metadata (post, comment, user, etc.) + * @return mixed $meta_value + */ +function hybrid_sanitize_meta( $meta_value, $meta_key, $meta_type ) { + return strip_tags( $meta_value ); +} + +?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/functions/settings.php b/wp-content/themes/hybrid/library/functions/settings.php index b9ef0e3bd6cb8316357c391bc33c1af505fbfab3..f8d4acba6c195b9150f821ebccab810daf5ab0fb 100644 --- a/wp-content/themes/hybrid/library/functions/settings.php +++ b/wp-content/themes/hybrid/library/functions/settings.php @@ -7,6 +7,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /** @@ -15,11 +19,12 @@ * only loaded once on each page load. * * @since 0.7.0 + * @access public * @uses get_option() Gets an option from the database. * @uses hybrid_get_prefix() Gets the prefix of the theme. * @global object $hybrid The global Hybrid object. * @param string $option The specific theme setting the user wants. - * @return string|int|array $settings[$option] Specific setting asked for. + * @return mixed $settings[$option] Specific setting asked for. */ function hybrid_get_setting( $option = '' ) { global $hybrid; @@ -51,12 +56,13 @@ function hybrid_get_setting( $option = '' ) { * provide a hook for default settings at this time. * * @since 1.0.0 + * @access public + * @return array $settings The default theme settings. */ function hybrid_get_default_theme_settings() { /* Set up some default variables. */ $settings = array(); - $domain = hybrid_get_textdomain(); $prefix = hybrid_get_prefix(); /* Get theme-supported meta boxes for the settings page. */ @@ -67,11 +73,11 @@ function hybrid_get_default_theme_settings() { /* If there is a child theme active, add the [child-link] shortcode to the $footer_insert. */ if ( is_child_theme() ) - $settings['footer_insert'] = '<p class="copyright">' . __( 'Copyright © [the-year] [site-link].', $domain ) . '</p>' . "\n\n" . '<p class="credit">' . __( 'Powered by [wp-link], [theme-link], and [child-link].', $domain ) . '</p>'; + $settings['footer_insert'] = '<p class="copyright">' . __( 'Copyright © [the-year] [site-link].', 'hybrid-core' ) . '</p>' . "\n\n" . '<p class="credit">' . __( 'Powered by [wp-link], [theme-link], and [child-link].', 'hybrid-core' ) . '</p>'; /* If no child theme is active, leave out the [child-link] shortcode. */ else - $settings['footer_insert'] = '<p class="copyright">' . __( 'Copyright © [the-year] [site-link].', $domain ) . '</p>' . "\n\n" . '<p class="credit">' . __( 'Powered by [wp-link] and [theme-link].', $domain ) . '</p>'; + $settings['footer_insert'] = '<p class="copyright">' . __( 'Copyright © [the-year] [site-link].', 'hybrid-core' ) . '</p>' . "\n\n" . '<p class="credit">' . __( 'Powered by [wp-link] and [theme-link].', 'hybrid-core' ) . '</p>'; } /* Return the $settings array and provide a hook for overwriting the default settings. */ diff --git a/wp-content/themes/hybrid/library/functions/shortcodes.php b/wp-content/themes/hybrid/library/functions/shortcodes.php index 56169297608ca03086d54cfe62532ceaaef2dac3..ffde6aa8b8822a75c6fb1e75aca1e929a22552db 100644 --- a/wp-content/themes/hybrid/library/functions/shortcodes.php +++ b/wp-content/themes/hybrid/library/functions/shortcodes.php @@ -1,12 +1,17 @@ <?php /** - * Shortcodes bundled for use with themes. These shortcodes can be used in any shortcode-ready area, - * which includes the post content area. Themes may optionally make alternate shortcode-aware areas - * where these shortcodes may be used. Note that some shortcodes are specific to posts and comments - * and would be useless outside of the post and comment loops. + * Shortcodes bundled for use with themes. These shortcodes are not meant to be used with the post content + * editor. Their purpose is to make it easier for users to filter hooks without having to know too much PHP code + * and to provide access to specific functionality in other (non-post content) shortcode-aware areas. Note that + * some shortcodes are specific to posts and comments and would be useless outside of the post and comment + * loops. To use the shortcodes, a theme must register support for 'hybrid-core-shortcodes'. * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Register shortcodes. */ @@ -17,8 +22,10 @@ add_action( 'init', 'hybrid_add_shortcodes' ); * function to register new shortcodes with WordPress. * * @since 0.8.0 + * @access private * @uses add_shortcode() to create new shortcodes. * @link http://codex.wordpress.org/Shortcode_API + * @return void */ function hybrid_add_shortcodes() { @@ -40,6 +47,8 @@ function hybrid_add_shortcodes() { add_shortcode( 'entry-published', 'hybrid_entry_published_shortcode' ); add_shortcode( 'entry-edit-link', 'hybrid_entry_edit_link_shortcode' ); add_shortcode( 'entry-shortlink', 'hybrid_entry_shortlink_shortcode' ); + add_shortcode( 'entry-permalink', 'hybrid_entry_permalink_shortcode' ); + add_shortcode( 'post-format-link', 'hybrid_post_format_link_shortcode' ); /* Add comment-specific shortcodes. */ add_shortcode( 'comment-published', 'hybrid_comment_published_shortcode' ); @@ -53,17 +62,21 @@ function hybrid_add_shortcodes() { * Shortcode to display the current year. * * @since 0.6.0 + * @access public * @uses date() Gets the current year. + * @return string */ function hybrid_the_year_shortcode() { - return date( __( 'Y', hybrid_get_textdomain() ) ); + return date( __( 'Y', 'hybrid-core' ) ); } /** * Shortcode to display a link back to the site. * * @since 0.6.0 + * @access public * @uses get_bloginfo() Gets information about the install. + * @return string */ function hybrid_site_link_shortcode() { return '<a class="site-link" href="' . home_url() . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '" rel="home"><span>' . get_bloginfo( 'name' ) . '</span></a>'; @@ -73,47 +86,54 @@ function hybrid_site_link_shortcode() { * Shortcode to display a link to WordPress.org. * * @since 0.6.0 + * @access public + * @return string */ function hybrid_wp_link_shortcode() { - return '<a class="wp-link" href="http://wordpress.org" title="' . esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform', hybrid_get_textdomain() ) . '"><span>' . __( 'WordPress', hybrid_get_textdomain() ) . '</span></a>'; + return '<a class="wp-link" href="http://wordpress.org" title="' . esc_attr__( 'State-of-the-art semantic personal publishing platform', 'hybrid-core' ) . '"><span>' . __( 'WordPress', 'hybrid-core' ) . '</span></a>'; } /** - * Shortcode to display a link to the Hybrid theme page. + * Shortcode to display a link to the parent theme page. * * @since 0.6.0 + * @access public * @uses get_theme_data() Gets theme (parent theme) information. + * @return string */ function hybrid_theme_link_shortcode() { - $data = hybrid_get_theme_data(); - return '<a class="theme-link" href="' . esc_url( $data['URI'] ) . '" title="' . esc_attr( $data['Name'] ) . '"><span>' . esc_attr( $data['Name'] ) . '</span></a>'; + $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); + return '<a class="theme-link" href="' . esc_url( $theme->get( 'ThemeURI' ) ) . '" title="' . sprintf( esc_attr__( '%s WordPress Theme', 'hybrid-core' ), $theme->get( 'Name' ) ) . '"><span>' . esc_attr( $theme->get( 'Name' ) ) . '</span></a>'; } /** * Shortcode to display a link to the child theme's page. * * @since 0.6.0 + * @access public * @uses get_theme_data() Gets theme (child theme) information. + * @return string */ function hybrid_child_link_shortcode() { - $data = hybrid_get_theme_data( 'stylesheet' ); - return '<a class="child-link" href="' . esc_url( $data['URI'] ) . '" title="' . esc_attr( $data['Name'] ) . '"><span>' . esc_html( $data['Name'] ) . '</span></a>'; + $theme = wp_get_theme( get_stylesheet(), get_theme_root( get_stylesheet_directory() ) ); + return '<a class="child-link" href="' . esc_url( $theme->get( 'ThemeURI' ) ) . '" title="' . esc_attr( $theme->get( 'Name' ) ) . '"><span>' . esc_html( $theme->get( 'Name' ) ) . '</span></a>'; } /** * Shortcode to display a login link or logout link. * * @since 0.6.0 + * @access public * @uses is_user_logged_in() Checks if the current user is logged into the site. * @uses wp_logout_url() Creates a logout URL. * @uses wp_login_url() Creates a login URL. + * @return string */ function hybrid_loginout_link_shortcode() { - $domain = hybrid_get_textdomain(); if ( is_user_logged_in() ) - $out = '<a class="logout-link" href="' . esc_url( wp_logout_url( site_url( $_SERVER['REQUEST_URI'] ) ) ) . '" title="' . esc_attr__( 'Log out of this account', $domain ) . '">' . __( 'Log out', $domain ) . '</a>'; + $out = '<a class="logout-link" href="' . esc_url( wp_logout_url( site_url( $_SERVER['REQUEST_URI'] ) ) ) . '" title="' . esc_attr__( 'Log out', 'hybrid-core' ) . '">' . __( 'Log out', 'hybrid-core' ) . '</a>'; else - $out = '<a class="login-link" href="' . esc_url( wp_login_url( site_url( $_SERVER['REQUEST_URI'] ) ) ) . '" title="' . esc_attr__( 'Log into this account', $domain ) . '">' . __( 'Log in', $domain ) . '</a>'; + $out = '<a class="login-link" href="' . esc_url( wp_login_url( site_url( $_SERVER['REQUEST_URI'] ) ) ) . '" title="' . esc_attr__( 'Log in', 'hybrid-core' ) . '">' . __( 'Log in', 'hybrid-core' ) . '</a>'; return $out; } @@ -122,11 +142,13 @@ function hybrid_loginout_link_shortcode() { * Displays query count and load time if the current user can edit themes. * * @since 0.6.0 + * @access public * @uses current_user_can() Checks if the current user can edit themes. + * @return string */ function hybrid_query_counter_shortcode() { if ( current_user_can( 'edit_theme_options' ) ) - return sprintf( __( 'This page loaded in %1$s seconds with %2$s database queries.', hybrid_get_textdomain() ), timer_stop( 0, 3 ), get_num_queries() ); + return sprintf( __( 'This page loaded in %1$s seconds with %2$s database queries.', 'hybrid-core' ), timer_stop( 0, 3 ), get_num_queries() ); return ''; } @@ -134,7 +156,9 @@ function hybrid_query_counter_shortcode() { * Displays a nav menu that has been created from the Menus screen in the admin. * * @since 0.8.0 + * @access public * @uses wp_nav_menu() Displays the nav menu. + * @return string */ function hybrid_nav_menu_shortcode( $attr ) { @@ -164,33 +188,34 @@ function hybrid_nav_menu_shortcode( $attr ) { * Displays the edit link for an individual post. * * @since 0.7.0 + * @access public * @param array $attr + * @return string */ function hybrid_entry_edit_link_shortcode( $attr ) { - global $post; - $domain = hybrid_get_textdomain(); - $post_type = get_post_type_object( $post->post_type ); + $post_type = get_post_type_object( get_post_type() ); - if ( !current_user_can( $post_type->cap->edit_post, $post->ID ) ) + if ( !current_user_can( $post_type->cap->edit_post, get_the_ID() ) ) return ''; $attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr ); - return $attr['before'] . '<span class="edit"><a class="post-edit-link" href="' . esc_url( get_edit_post_link( $post->ID ) ) . '" title="' . sprintf( esc_attr__( 'Edit %1$s', $domain ), $post_type->labels->singular_name ) . '">' . __( 'Edit', $domain ) . '</a></span>' . $attr['after']; + return $attr['before'] . '<span class="edit"><a class="post-edit-link" href="' . esc_url( get_edit_post_link( get_the_ID() ) ) . '" title="' . sprintf( esc_attr__( 'Edit %1$s', 'hybrid-core' ), $post_type->labels->singular_name ) . '">' . __( 'Edit', 'hybrid-core' ) . '</a></span>' . $attr['after']; } /** * Displays the published date of an individual post. * * @since 0.7.0 + * @access public * @param array $attr + * @return string */ function hybrid_entry_published_shortcode( $attr ) { - $domain = hybrid_get_textdomain(); $attr = shortcode_atts( array( 'before' => '', 'after' => '', 'format' => get_option( 'date_format' ) ), $attr ); - $published = '<abbr class="published" title="' . sprintf( get_the_time( esc_attr__( 'l, F jS, Y, g:i a', $domain ) ) ) . '">' . sprintf( get_the_time( $attr['format'] ) ) . '</abbr>'; + $published = '<abbr class="published" title="' . sprintf( get_the_time( esc_attr__( 'l, F jS, Y, g:i a', 'hybrid-core' ) ) ) . '">' . sprintf( get_the_time( $attr['format'] ) ) . '</abbr>'; return $attr['before'] . $published . $attr['after']; } @@ -198,25 +223,26 @@ function hybrid_entry_published_shortcode( $attr ) { * Displays a post's number of comments wrapped in a link to the comments area. * * @since 0.7.0 + * @access public * @param array $attr + * @return string */ function hybrid_entry_comments_link_shortcode( $attr ) { - $domain = hybrid_get_textdomain(); $comments_link = ''; $number = doubleval( get_comments_number() ); - $attr = shortcode_atts( array( 'zero' => __( 'Leave a response', $domain ), 'one' => __( '%1$s Response', $domain ), 'more' => __( '%1$s Responses', $domain ), 'css_class' => 'comments-link', 'none' => '', 'before' => '', 'after' => '' ), $attr ); + $attr = shortcode_atts( array( 'zero' => __( 'Leave a response', 'hybrid-core' ), 'one' => __( '%1$s Response', 'hybrid-core' ), 'more' => __( '%1$s Responses', 'hybrid-core' ), 'css_class' => 'comments-link', 'none' => '', 'before' => '', 'after' => '' ), $attr ); if ( 0 == $number && !comments_open() && !pings_open() ) { if ( $attr['none'] ) $comments_link = '<span class="' . esc_attr( $attr['css_class'] ) . '">' . sprintf( $attr['none'], number_format_i18n( $number ) ) . '</span>'; } elseif ( 0 == $number ) - $comments_link = '<a class="' . esc_attr( $attr['css_class'] ) . '" href="' . get_permalink() . '#respond" title="' . sprintf( esc_attr__( 'Comment on %1$s', $domain ), the_title_attribute( 'echo=0' ) ) . '">' . sprintf( $attr['zero'], number_format_i18n( $number ) ) . '</a>'; + $comments_link = '<a class="' . esc_attr( $attr['css_class'] ) . '" href="' . get_permalink() . '#respond" title="' . sprintf( esc_attr__( 'Comment on %1$s', 'hybrid-core' ), the_title_attribute( 'echo=0' ) ) . '">' . sprintf( $attr['zero'], number_format_i18n( $number ) ) . '</a>'; elseif ( 1 == $number ) - $comments_link = '<a class="' . esc_attr( $attr['css_class'] ) . '" href="' . get_comments_link() . '" title="' . sprintf( esc_attr__( 'Comment on %1$s', $domain ), the_title_attribute( 'echo=0' ) ) . '">' . sprintf( $attr['one'], number_format_i18n( $number ) ) . '</a>'; + $comments_link = '<a class="' . esc_attr( $attr['css_class'] ) . '" href="' . get_comments_link() . '" title="' . sprintf( esc_attr__( 'Comment on %1$s', 'hybrid-core' ), the_title_attribute( 'echo=0' ) ) . '">' . sprintf( $attr['one'], number_format_i18n( $number ) ) . '</a>'; elseif ( 1 < $number ) - $comments_link = '<a class="' . esc_attr( $attr['css_class'] ) . '" href="' . get_comments_link() . '" title="' . sprintf( esc_attr__( 'Comment on %1$s', $domain ), the_title_attribute( 'echo=0' ) ) . '">' . sprintf( $attr['more'], number_format_i18n( $number ) ) . '</a>'; + $comments_link = '<a class="' . esc_attr( $attr['css_class'] ) . '" href="' . get_comments_link() . '" title="' . sprintf( esc_attr__( 'Comment on %1$s', 'hybrid-core' ), the_title_attribute( 'echo=0' ) ) . '">' . sprintf( $attr['more'], number_format_i18n( $number ) ) . '</a>'; if ( $comments_link ) $comments_link = $attr['before'] . $comments_link . $attr['after']; @@ -228,7 +254,9 @@ function hybrid_entry_comments_link_shortcode( $attr ) { * Displays an individual post's author with a link to his or her archive. * * @since 0.7.0 + * @access public * @param array $attr + * @return string */ function hybrid_entry_author_shortcode( $attr ) { $attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr ); @@ -240,12 +268,13 @@ function hybrid_entry_author_shortcode( $attr ) { * Displays a list of terms for a specific taxonomy. * * @since 0.7.0 + * @access public * @param array $attr + * @return string */ function hybrid_entry_terms_shortcode( $attr ) { - global $post; - $attr = shortcode_atts( array( 'id' => $post->ID, 'taxonomy' => 'post_tag', 'separator' => ', ', 'before' => '', 'after' => '' ), $attr ); + $attr = shortcode_atts( array( 'id' => get_the_ID(), 'taxonomy' => 'post_tag', 'separator' => ', ', 'before' => '', 'after' => '' ), $attr ); $attr['before'] = ( empty( $attr['before'] ) ? '<span class="' . $attr['taxonomy'] . '">' : '<span class="' . $attr['taxonomy'] . '"><span class="before">' . $attr['before'] . '</span>' ); $attr['after'] = ( empty( $attr['after'] ) ? '</span>' : '<span class="after">' . $attr['after'] . '</span></span>' ); @@ -257,42 +286,39 @@ function hybrid_entry_terms_shortcode( $attr ) { * Displays a post's title with a link to the post. * * @since 0.7.0 + * @access public + * @return string */ -function hybrid_entry_title_shortcode() { - global $post; - - if ( is_front_page() && !is_home() ) - $title = the_title( '<h2 class="' . esc_attr( $post->post_type ) . '-title entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>', false ); +function hybrid_entry_title_shortcode( $attr ) { - elseif ( is_singular() ) - $title = the_title( '<h1 class="' . esc_attr( $post->post_type ) . '-title entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h1>', false ); + $attr = shortcode_atts( array( 'permalink' => true ), $attr ); - elseif ( 'link_category' == get_query_var( 'taxonomy' ) ) - $title = false; + $tag = is_singular() ? 'h1' : 'h2'; + $class = sanitize_html_class( get_post_type() ) . '-title entry-title'; + if ( false == (bool)$attr['permalink'] ) + $title = the_title( "<{$tag} class='{$class}'>", "</{$tag}>", false ); else - $title = the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>', false ); + $title = the_title( "<{$tag} class='{$class}'><a href='" . get_permalink() . "'>", "</a></{$tag}>", false ); - /* If there's no post title, return a clickable '(No title)'. */ - if ( empty( $title ) && !is_singular() && 'link_category' !== get_query_var( 'taxonomy' ) ) - $title = '<h2 class="entry-title no-entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . __( '(Untitled)', hybrid_get_textdomain() ) . '</a></h2>'; + if ( empty( $title ) && !is_singular() ) + $title = "<{$tag} class='{$class}'><a href='" . get_permalink() . "'>" . __( '(Untitled)', 'hybrid-core' ) . "</a></{$tag}>"; return $title; } /** - * Displays the shortlinke of an individual entry. + * Displays the shortlink of an individual entry. * * @since 0.8.0 + * @access public + * @return string */ function hybrid_entry_shortlink_shortcode( $attr ) { - global $post; - - $domain = hybrid_get_textdomain(); $attr = shortcode_atts( array( - 'text' => __( 'Shortlink', $domain ), + 'text' => __( 'Shortlink', 'hybrid-core' ), 'title' => the_title_attribute( array( 'echo' => false ) ), 'before' => '', 'after' => '' @@ -300,19 +326,51 @@ function hybrid_entry_shortlink_shortcode( $attr ) { $attr ); - $shortlink = esc_url( wp_get_shortlink( $post->ID ) ); + $shortlink = esc_url( wp_get_shortlink( get_the_ID() ) ); return "{$attr['before']}<a class='shortlink' href='{$shortlink}' title='" . esc_attr( $attr['title'] ) . "' rel='shortlink'>{$attr['text']}</a>{$attr['after']}"; } +/** + * Returns the output of the [entry-permalink] shortcode, which is a link back to the post permalink page. + * + * @since 1.3.0. + * @param array $attr The shortcode arguments. + * @return string A permalink back to the post. + */ +function hybrid_entry_permalink_shortcode( $attr ) { + + $attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr ); + + return $attr['before'] . '<a href="' . esc_url( get_permalink() ) . '" class="permalink">' . __( 'Permalink', 'hybrid-core' ) . '</a>' . $attr['after']; +} + +/** + * Returns the output of the [post-format-link] shortcode. This shortcode is for use when a theme uses the + * post formats feature. + * + * @since 1.3.0. + * @param array $attr The shortcode arguments. + * @return string A link to the post format archive. + */ +function hybrid_post_format_link_shortcode( $attr ) { + + $attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr ); + $format = get_post_format(); + $url = ( empty( $format ) ? get_permalink() : get_post_format_link( $format ) ); + + return $attr['before'] . '<a href="' . esc_url( $url ) . '" class="post-format-link">' . get_post_format_string( $format ) . '</a>' . $attr['after']; +} + /** * Displays the published date and time of an individual comment. * * @since 0.7.0 + * @access public + * @return string */ function hybrid_comment_published_shortcode() { - $domain = hybrid_get_textdomain(); - $link = '<span class="published">' . sprintf( __( '%1$s at %2$s', $domain ), '<abbr class="comment-date" title="' . get_comment_date( esc_attr__( 'l, F jS, Y, g:i a', $domain ) ) . '">' . get_comment_date() . '</abbr>', '<abbr class="comment-time" title="' . get_comment_date( esc_attr__( 'l, F jS, Y, g:i a', $domain ) ) . '">' . get_comment_time() . '</abbr>' ) . '</span>'; + $link = '<span class="published">' . sprintf( __( '%1$s at %2$s', 'hybrid-core' ), '<abbr class="comment-date" title="' . get_comment_date( esc_attr__( 'l, F jS, Y, g:i a', 'hybrid-core' ) ) . '">' . get_comment_date() . '</abbr>', '<abbr class="comment-time" title="' . get_comment_date( esc_attr__( 'l, F jS, Y, g:i a', 'hybrid-core' ) ) . '">' . get_comment_time() . '</abbr>' ) . '</span>'; return $link; } @@ -320,6 +378,7 @@ function hybrid_comment_published_shortcode() { * Displays the comment author of an individual comment. * * @since 0.8.0 + * @access public * @global $comment The current comment's DB object. * @return string */ @@ -353,13 +412,14 @@ function hybrid_comment_author_shortcode( $attr ) { * Displays the permalink to an individual comment. * * @since 0.7.0 + * @access public + * @return string */ function hybrid_comment_permalink_shortcode( $attr ) { global $comment; $attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr ); - $domain = hybrid_get_textdomain(); - $link = '<a class="permalink" href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '" title="' . sprintf( esc_attr__( 'Permalink to comment %1$s', $domain ), $comment->comment_ID ) . '">' . __( 'Permalink', $domain ) . '</a>'; + $link = '<a class="permalink" href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '" title="' . sprintf( esc_attr__( 'Permalink to comment %1$s', 'hybrid-core' ), $comment->comment_ID ) . '">' . __( 'Permalink', 'hybrid-core' ) . '</a>'; return $attr['before'] . $link . $attr['after']; } @@ -367,6 +427,8 @@ function hybrid_comment_permalink_shortcode( $attr ) { * Displays a comment's edit link to users that have the capability to edit the comment. * * @since 0.7.0 + * @access public + * @return string */ function hybrid_comment_edit_link_shortcode( $attr ) { global $comment; @@ -377,9 +439,8 @@ function hybrid_comment_edit_link_shortcode( $attr ) { return ''; $attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr ); - $domain = hybrid_get_textdomain(); - $link = '<a class="comment-edit-link" href="' . esc_url( $edit_link ) . '" title="' . sprintf( esc_attr__( 'Edit %1$s', $domain ), $comment->comment_type ) . '"><span class="edit">' . __( 'Edit', $domain ) . '</span></a>'; + $link = '<a class="comment-edit-link" href="' . esc_url( $edit_link ) . '" title="' . sprintf( esc_attr__( 'Edit %1$s', 'hybrid-core' ), $comment->comment_type ) . '"><span class="edit">' . __( 'Edit', 'hybrid-core' ) . '</span></a>'; $link = apply_filters( 'edit_comment_link', $link, $comment->comment_ID ); return $attr['before'] . $link . $attr['after']; @@ -389,16 +450,17 @@ function hybrid_comment_edit_link_shortcode( $attr ) { * Displays a reply link for the 'comment' comment_type if threaded comments are enabled. * * @since 0.7.0 + * @access public + * @return string */ function hybrid_comment_reply_link_shortcode( $attr ) { - $domain = hybrid_get_textdomain(); if ( !get_option( 'thread_comments' ) || 'comment' !== get_comment_type() ) return ''; $defaults = array( - 'reply_text' => __( 'Reply', $domain ), - 'login_text' => __( 'Log in to reply.', $domain ), + 'reply_text' => __( 'Reply', 'hybrid-core' ), + 'login_text' => __( 'Log in to reply.', 'hybrid-core' ), 'depth' => intval( $GLOBALS['comment_depth'] ), 'max_depth' => get_option( 'thread_comments_depth' ), 'before' => '', diff --git a/wp-content/themes/hybrid/library/functions/sidebars.php b/wp-content/themes/hybrid/library/functions/sidebars.php index 2f35c3eb5262ad1890c11268a647bc83c333293e..0e7ce78113535056b727817df8173850b5b111f1 100644 --- a/wp-content/themes/hybrid/library/functions/sidebars.php +++ b/wp-content/themes/hybrid/library/functions/sidebars.php @@ -7,6 +7,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Register widget areas. */ @@ -17,8 +21,10 @@ add_action( 'widgets_init', 'hybrid_register_sidebars' ); * for using add_theme_support(). * * @since 0.7.0 + * @access private * @uses register_sidebar() Registers a sidebar with WordPress. * @link http://codex.wordpress.org/Function_Reference/register_sidebar + * @return void */ function hybrid_register_sidebars() { @@ -46,12 +52,18 @@ function hybrid_register_sidebars() { 'after_title' => '</h3>' ); + /* Allow developers to filter the default sidebar arguments. */ + $defaults = apply_filters( hybrid_get_prefix() . '_sidebar_defaults', $defaults, $sidebar ); + /* Parse the sidebar arguments and defaults. */ $args = wp_parse_args( $core_sidebars[$sidebar], $defaults ); /* If no 'id' was given, use the $sidebar variable and sanitize it. */ $args['id'] = ( isset( $args['id'] ) ? sanitize_key( $args['id'] ) : sanitize_key( $sidebar ) ); + /* Allow developers to filter the sidebar arguments. */ + $args = apply_filters( hybrid_get_prefix() . '_sidebar_args', $args, $sidebar ); + /* Register the sidebar. */ register_sidebar( $args ); } @@ -64,41 +76,40 @@ function hybrid_register_sidebars() { * sidebar is registered. * * @since 1.2.0 + * @access private + * @return array $sidebars All the available framework sidebars. */ function hybrid_get_sidebars() { - /* Get the theme textdomain. */ - $domain = hybrid_get_textdomain(); - /* Set up an array of sidebars. */ $sidebars = array( 'primary' => array( - 'name' => _x( 'Primary', 'sidebar', $domain ), - 'description' => __( 'The main (primary) widget area, most often used as a sidebar.', $domain ) + 'name' => _x( 'Primary', 'sidebar', 'hybrid-core' ), + 'description' => __( 'The main (primary) widget area, most often used as a sidebar.', 'hybrid-core' ) ), 'secondary' => array( - 'name' => _x( 'Secondary', 'sidebar', $domain ), - 'description' => __( 'The second most important widget area, most often used as a secondary sidebar.', $domain ), + 'name' => _x( 'Secondary', 'sidebar', 'hybrid-core' ), + 'description' => __( 'The second most important widget area, most often used as a secondary sidebar.', 'hybrid-core' ), ), 'subsidiary' => array( - 'name' => _x( 'Subsidiary', 'sidebar', $domain ), - 'description' => __( 'A widget area loaded in the footer of the site.', $domain ), + 'name' => _x( 'Subsidiary', 'sidebar', 'hybrid-core' ), + 'description' => __( 'A widget area loaded in the footer of the site.', 'hybrid-core' ), ), 'header' => array( - 'name' => _x( 'Header', 'sidebar', $domain ), - 'description' => __( 'Displayed within the site\'s header area.', $domain ), + 'name' => _x( 'Header', 'sidebar', 'hybrid-core' ), + 'description' => __( "Displayed within the site's header area.", 'hybrid-core' ), ), 'before-content' => array( - 'name' => _x( 'Before Content', 'sidebar', $domain ), - 'description' => __( 'Loaded before the page\'s main content area.', $domain ), + 'name' => _x( 'Before Content', 'sidebar', 'hybrid-core' ), + 'description' => __( "Loaded before the page's main content area.", 'hybrid-core' ), ), 'after-content' => array( - 'name' => _x( 'After Content', 'sidebar', $domain ), - 'description' => __( 'Loaded after the page\'s main content area.', $domain ), + 'name' => _x( 'After Content', 'sidebar', 'hybrid-core' ), + 'description' => __( "Loaded after the page's main content area.", 'hybrid-core' ), ), 'after-singular' => array( - 'name' => _x( 'After Singular', 'sidebar', $domain ), - 'description' => __( 'Loaded on singular post (page, attachment, etc.) views before the comments area.', $domain ), + 'name' => _x( 'After Singular', 'sidebar', 'hybrid-core' ), + 'description' => __( 'Loaded on singular post (page, attachment, etc.) views before the comments area.', 'hybrid-core' ), ) ); diff --git a/wp-content/themes/hybrid/library/functions/template-hierarchy.php b/wp-content/themes/hybrid/library/functions/template-hierarchy.php index bcd995699592885d2729b4b7151c739db0335d22..431e17d393270b653fafe37915771c9642da13e6 100644 --- a/wp-content/themes/hybrid/library/functions/template-hierarchy.php +++ b/wp-content/themes/hybrid/library/functions/template-hierarchy.php @@ -7,6 +7,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Filter the date template. */ @@ -18,6 +22,7 @@ add_filter( 'author_template', 'hybrid_user_template' ); /* Filter the tag and category (taxonomy) templates. */ add_filter( 'tag_template', 'hybrid_taxonomy_template' ); add_filter( 'category_template', 'hybrid_taxonomy_template' ); +add_filter( 'taxonomy_template', 'hybrid_taxonomy_template' ); /* Filter the single, page, and attachment (singular) templates. */ add_filter( 'single_template', 'hybrid_singular_template' ); @@ -29,6 +34,7 @@ add_filter( 'attachment_template', 'hybrid_singular_template' ); * is_date() allows by checking for the year, month, week, day, hour, and minute. * * @since 0.6.0 + * @access private * @uses locate_template() Checks for template in child and parent theme. * @param string $template * @return string $template Full path to file. @@ -83,6 +89,7 @@ function hybrid_date_template( $template ) { * user-$nicename.php, $user-role-$role.php, user.php, author.php, archive.php. * * @since 0.7.0 + * @access private * @uses locate_template() Checks for template in child and parent theme. * @param string $template * @return string Full path to file. @@ -125,6 +132,7 @@ function hybrid_user_template( $template ) { * taxonomy.php, archive.php. * * @since 0.7.0 + * @access private * @uses locate_template() Checks for template in child and parent theme. * @param string $template * @return string Full path to file. @@ -134,8 +142,11 @@ function hybrid_taxonomy_template( $template ) { /* Get the queried term object. */ $term = get_queried_object(); + /* Remove 'post-format' from the slug. */ + $slug = ( ( 'post_format' == $term->taxonomy ) ? str_replace( 'post-format-', '', $term->slug ) : $term->slug ); + /* Return the available templates. */ - return locate_template( array( "taxonomy-{$term->taxonomy}-{$term->slug}.php", "taxonomy-{$term->taxonomy}.php", 'taxonomy.php', 'archive.php' ) ); + return locate_template( array( "taxonomy-{$term->taxonomy}-{$slug}.php", "taxonomy-{$term->taxonomy}.php", 'taxonomy.php', 'archive.php' ) ); } /** @@ -147,6 +158,7 @@ function hybrid_taxonomy_template( $template ) { * attachment-$mime[1].php, or attachment-$mime[0].php. * * @since 0.7.0 + * @access private * @param string $template The default WordPress post template. * @return string $template The theme post template after all templates have been checked for. */ @@ -185,8 +197,9 @@ function hybrid_singular_template( $template ) { /* Add a template based off the post type name. */ $templates[] = "{$post->post_type}.php"; - /* Allow for WP's more recent 'single-{$post_type}.php' for compatibility. */ + /* Allow for WP standard 'single' templates for compatibility. */ $templates[] = "single-{$post->post_type}.php"; + $templates[] = 'single.php'; /* Add a general template of singular.php. */ $templates[] = "singular.php"; diff --git a/wp-content/themes/hybrid/library/functions/utility.php b/wp-content/themes/hybrid/library/functions/utility.php index c8895c1a24fa8bbe57a8e11b6149ee5736f0e228..847e7b16d7becc30f97a30d46d280a2d6f36a096 100644 --- a/wp-content/themes/hybrid/library/functions/utility.php +++ b/wp-content/themes/hybrid/library/functions/utility.php @@ -5,6 +5,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Add extra support for post types. */ @@ -20,13 +24,15 @@ add_filter( 'extra_theme_headers', 'hybrid_extra_theme_headers' ); * they're not registered. * * @since 0.8.0 + * @access private + * @return void */ function hybrid_add_post_type_support() { - /* Add support for excerpts and entry-views to the 'page' post type. */ + /* Add support for excerpts to the 'page' post type. */ add_post_type_support( 'page', array( 'excerpt' ) ); - /* Add support for comments, trackbacks, and entry-views to the 'attachment' post type. */ + /* Add support for trackbacks to the 'attachment' post type. */ add_post_type_support( 'attachment', array( 'trackbacks' ) ); } @@ -36,6 +42,7 @@ function hybrid_add_post_type_support() { * displaying additional information to the theme user. * * @since 1.2.0 + * @access private * @link http://codex.wordpress.org/Theme_Review#Licensing * @param array $headers Array of extra headers added by plugins/themes. * @return array $headers @@ -73,6 +80,7 @@ function hybrid_extra_theme_headers( $headers ) { * being viewed by the user. * * @since 0.8.0 + * @access public * @param string $template The slug of the template whose context we're searching for. * @return string $template The full path of the located template. */ @@ -104,10 +112,12 @@ function get_atomic_template( $template ) { * filter hook. * * @since 0.4.0 + * @access private + * @return void */ function hybrid_meta_template() { - $data = hybrid_get_theme_data(); - $template = '<meta name="template" content="' . esc_attr( "{$data['Title']} {$data['Version']}" ) . '" />' . "\n"; + $theme = wp_get_theme( get_template(), get_theme_root( get_template_directory() ) ); + $template = '<meta name="template" content="' . esc_attr( $theme->get( 'Name' ) . ' ' . $theme->get( 'Version' ) ) . '" />' . "\n"; echo apply_atomic( 'meta_template', $template ); } @@ -116,6 +126,8 @@ function hybrid_meta_template() { * pages, wrap it in a <div> element. * * @since 0.1.0 + * @access public + * @return void */ function hybrid_site_title() { @@ -124,7 +136,7 @@ function hybrid_site_title() { /* Get the site title. If it's not empty, wrap it with the appropriate HTML. */ if ( $title = get_bloginfo( 'name' ) ) - $title = '<' . $tag . ' id="site-title"><a href="' . home_url() . '" title="' . esc_attr( $title ) . '" rel="home"><span>' . $title . '</span></a></' . $tag . '>'; + $title = sprintf( '<%1$s id="site-title"><a href="%2$s" title="%3$s" rel="home"><span>%4$s</span></a></%1$s>', tag_escape( $tag ), home_url(), esc_attr( $title ), $title ); /* Display the site title and apply filters for developers to overwrite. */ echo apply_atomic( 'site_title', $title ); @@ -135,6 +147,8 @@ function hybrid_site_title() { * On other pages, wrap it in a <div> element. * * @since 0.1.0 + * @access public + * @return void */ function hybrid_site_description() { @@ -143,17 +157,32 @@ function hybrid_site_description() { /* Get the site description. If it's not empty, wrap it with the appropriate HTML. */ if ( $desc = get_bloginfo( 'description' ) ) - $desc = "\n\t\t\t" . '<' . $tag . ' id="site-description"><span>' . $desc . '</span></' . $tag . '>' . "\n"; + $desc = sprintf( '<%1$s id="site-description"><span>%2$s</span></%1$s>', tag_escape( $tag ), $desc ); /* Display the site description and apply filters for developers to overwrite. */ echo apply_atomic( 'site_description', $desc ); } +/** + * Standardized function for outputting the footer content. + * + * @since 1.4.0 + * @access public + * @return void + */ +function hybrid_footer_content() { + + /* Only run the code if the theme supports the Hybrid Core theme settings. */ + if ( current_theme_supports( 'hybrid-core-theme-settings' ) ) + echo apply_atomic_shortcode( 'footer_content', hybrid_get_setting( 'footer_insert' ) ); +} + /** * Checks if a post of any post type has a custom template. This is the equivalent of WordPress' * is_page_template() function with the exception that it works for all post types. * * @since 1.2.0 + * @access public * @param string $template The name of the template to check for. * @return bool Whether the post has a template. */ diff --git a/wp-content/themes/hybrid/library/functions/widgets.php b/wp-content/themes/hybrid/library/functions/widgets.php index 25bb497ad3fb70fbd9c8b60dfcb957aac7e89955..2d1bf9737741af6aa50d1ce95bf18831d0296dde 100644 --- a/wp-content/themes/hybrid/library/functions/widgets.php +++ b/wp-content/themes/hybrid/library/functions/widgets.php @@ -7,6 +7,10 @@ * * @package HybridCore * @subpackage Functions + * @author Justin Tadlock <justin@justintadlock.com> + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock + * @link http://themehybrid.com/hybrid-core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ /* Unregister WP widgets. */ @@ -20,8 +24,10 @@ add_action( 'widgets_init', 'hybrid_register_widgets' ); * widget by extending the available options of the widget. * * @since 0.6.0 + * @access private * @uses register_widget() Registers individual widgets with WordPress * @link http://codex.wordpress.org/Function_Reference/register_widget + * @return void */ function hybrid_register_widgets() { @@ -85,8 +91,10 @@ function hybrid_register_widgets() { * aren't replaced by the framework widgets are not unregistered. * * @since 0.3.2 + * @access private * @uses unregister_widget() Unregisters a registered widget. * @link http://codex.wordpress.org/Function_Reference/unregister_widget + * @return void */ function hybrid_unregister_widgets() { diff --git a/wp-content/themes/hybrid/library/hybrid.php b/wp-content/themes/hybrid/library/hybrid.php index 28e297ddc526df4269271594b0271337603929ab..997c298e0a830249850d8b7d6a5c8b12d10499b6 100644 --- a/wp-content/themes/hybrid/library/hybrid.php +++ b/wp-content/themes/hybrid/library/hybrid.php @@ -14,8 +14,8 @@ * feature using the add_theme_support( $feature ) function within their theme. * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU - * General Public License version 2, as published by the Free Software Foundation. You may NOT assume - * that you can use any other version of the GPL. + * General Public License as published by the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -24,9 +24,9 @@ * to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * @package HybridCore - * @version 1.2.1 + * @version 1.4.2 * @author Justin Tadlock <justin@justintadlock.com> - * @copyright Copyright (c) 2008 - 2011, Justin Tadlock + * @copyright Copyright (c) 2008 - 2012, Justin Tadlock * @link http://themehybrid.com/hybrid-core * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ @@ -53,6 +53,10 @@ class Hybrid { * @since 1.0.0 */ function __construct() { + global $hybrid; + + /* Set up an empty class for the global $hybrid object. */ + $hybrid = new stdClass; /* Define framework, parent theme, and child theme constants. */ add_action( 'after_setup_theme', array( &$this, 'constants' ), 1 ); @@ -66,11 +70,14 @@ class Hybrid { /* Language functions and translations setup. */ add_action( 'after_setup_theme', array( &$this, 'i18n' ), 4 ); + /* Handle theme supported features. */ + add_action( 'after_setup_theme', array( &$this, 'theme_support' ), 12 ); + /* Load the framework functions. */ - add_action( 'after_setup_theme', array( &$this, 'functions' ), 12 ); + add_action( 'after_setup_theme', array( &$this, 'functions' ), 13 ); /* Load the framework extensions. */ - add_action( 'after_setup_theme', array( &$this, 'extensions' ), 13 ); + add_action( 'after_setup_theme', array( &$this, 'extensions' ), 14 ); /* Load admin files. */ add_action( 'wp_loaded', array( &$this, 'admin' ) ); @@ -86,7 +93,7 @@ class Hybrid { function constants() { /* Sets the framework version number. */ - define( 'HYBRID_VERSION', '1.2.1' ); + define( 'HYBRID_VERSION', '1.4.2' ); /* Sets the path to the parent theme directory. */ define( 'THEME_DIR', get_template_directory() ); @@ -118,6 +125,9 @@ class Hybrid { /* Sets the path to the core framework functions directory. */ define( 'HYBRID_FUNCTIONS', trailingslashit( HYBRID_DIR ) . 'functions' ); + /* Sets the path to the core framework languages directory. */ + define( 'HYBRID_LANGUAGES', trailingslashit( HYBRID_DIR ) . 'languages' ); + /* Sets the path to the core framework images directory URI. */ define( 'HYBRID_IMAGES', trailingslashit( HYBRID_URI ) . 'images' ); @@ -141,6 +151,9 @@ class Hybrid { /* Load the context-based functions. */ require_once( trailingslashit( HYBRID_FUNCTIONS ) . 'context.php' ); + + /* Load the core framework internationalization functions. */ + require_once( trailingslashit( HYBRID_FUNCTIONS ) . 'i18n.php' ); } /** @@ -153,13 +166,20 @@ class Hybrid { * @since 1.2.0 */ function i18n() { + global $hybrid; + + /* Get parent and child theme textdomains. */ + $parent_textdomain = hybrid_get_parent_textdomain(); + $child_textdomain = hybrid_get_child_textdomain(); + + /* Load the framework textdomain. */ + $hybrid->textdomain_loaded['hybrid-core'] = hybrid_load_framework_textdomain( 'hybrid-core' ); /* Load theme textdomain. */ - load_theme_textdomain( hybrid_get_textdomain() ); + $hybrid->textdomain_loaded[$parent_textdomain] = load_theme_textdomain( $parent_textdomain ); /* Load child theme textdomain. */ - if ( is_child_theme() ) - load_child_theme_textdomain( hybrid_get_child_textdomain() ); + $hybrid->textdomain_loaded[$child_textdomain] = is_child_theme() ? load_child_theme_textdomain( $child_textdomain ) : false; /* Get the user's locale. */ $locale = get_locale(); @@ -172,6 +192,31 @@ class Hybrid { require_once( $locale_functions ); } + /** + * Removes theme supported features from themes in the case that a user has a plugin installed + * that handles the functionality. + * + * @since 1.3.0 + */ + function theme_support() { + + /* Remove support for the core SEO component if the WP SEO plugin is installed. */ + if ( defined( 'WPSEO_VERSION' ) ) + remove_theme_support( 'hybrid-core-seo' ); + + /* Remove support for the the Breadcrumb Trail extension if the plugin is installed. */ + if ( function_exists( 'breadcrumb_trail' ) ) + remove_theme_support( 'breadcrumb-trail' ); + + /* Remove support for the the Cleaner Gallery extension if the plugin is installed. */ + if ( function_exists( 'cleaner_gallery' ) ) + remove_theme_support( 'cleaner-gallery' ); + + /* Remove support for the the Get the Image extension if the plugin is installed. */ + if ( function_exists( 'get_the_image' ) ) + remove_theme_support( 'get-the-image' ); + } + /** * Loads the framework functions. Many of these functions are needed to properly run the * framework. Some components are only loaded if the theme supports them. @@ -186,16 +231,22 @@ class Hybrid { /* Load media-related functions. */ require_once( trailingslashit( HYBRID_FUNCTIONS ) . 'media.php' ); + /* Load the metadata functions. */ + require_once( trailingslashit( HYBRID_FUNCTIONS ) . 'meta.php' ); + /* Load the utility functions. */ require_once( trailingslashit( HYBRID_FUNCTIONS ) . 'utility.php' ); /* Load the theme settings functions if supported. */ require_if_theme_supports( 'hybrid-core-theme-settings', trailingslashit( HYBRID_FUNCTIONS ) . 'settings.php' ); + /* Load the customizer functions if theme settings are supported. */ + require_if_theme_supports( 'hybrid-core-theme-settings', trailingslashit( HYBRID_FUNCTIONS ) . 'customize.php' ); + /* Load the menus functions if supported. */ require_if_theme_supports( 'hybrid-core-menus', trailingslashit( HYBRID_FUNCTIONS ) . 'menus.php' ); - /* Load the core SEO component. */ + /* Load the core SEO component if supported. */ require_if_theme_supports( 'hybrid-core-seo', trailingslashit( HYBRID_FUNCTIONS ) . 'core-seo.php' ); /* Load the shortcodes if supported. */ @@ -224,17 +275,14 @@ class Hybrid { */ function extensions() { - /* Load the Breadcrumb Trail extension if supported and the plugin isn't active. */ - if ( !function_exists( 'breadcrumb_trail' ) ) - require_if_theme_supports( 'breadcrumb-trail', trailingslashit( HYBRID_EXTENSIONS ) . 'breadcrumb-trail.php' ); + /* Load the Breadcrumb Trail extension if supported. */ + require_if_theme_supports( 'breadcrumb-trail', trailingslashit( HYBRID_EXTENSIONS ) . 'breadcrumb-trail.php' ); - /* Load the Cleaner Gallery extension if supported and the plugin isn't active. */ - if ( !function_exists( 'cleaner_gallery' ) ) - require_if_theme_supports( 'cleaner-gallery', trailingslashit( HYBRID_EXTENSIONS ) . 'cleaner-gallery.php' ); + /* Load the Cleaner Gallery extension if supported. */ + require_if_theme_supports( 'cleaner-gallery', trailingslashit( HYBRID_EXTENSIONS ) . 'cleaner-gallery.php' ); - /* Load the Get the Image extension if supported and the plugin isn't active. */ - if ( !function_exists( 'get_the_image' ) ) - require_if_theme_supports( 'get-the-image', trailingslashit( HYBRID_EXTENSIONS ) . 'get-the-image.php' ); + /* Load the Get the Image extension if supported. */ + require_if_theme_supports( 'get-the-image', trailingslashit( HYBRID_EXTENSIONS ) . 'get-the-image.php' ); /* Load the Cleaner Caption extension if supported. */ require_if_theme_supports( 'cleaner-caption', trailingslashit( HYBRID_EXTENSIONS ) . 'cleaner-caption.php' ); @@ -280,6 +328,10 @@ class Hybrid { */ function default_filters() { + /* Remove bbPress theme compatibility if current theme supports bbPress. */ + if ( current_theme_supports( 'bbpress' ) ) + remove_action( 'bbp_init', 'bbp_setup_theme_compat', 8 ); + /* Move the WordPress generator to a better priority. */ remove_action( 'wp_head', 'wp_generator' ); add_action( 'wp_head', 'wp_generator', 1 ); @@ -288,13 +340,11 @@ class Hybrid { add_action( 'wp_head', 'hybrid_meta_template', 1 ); /* Filter the textdomain mofile to allow child themes to load the parent theme translation. */ - add_filter( 'load_textdomain_mofile', 'hybrid_load_textdomain', 10, 2 ); + add_filter( 'load_textdomain_mofile', 'hybrid_load_textdomain_mofile', 10, 2 ); - /* Filter textdomain for extensions. */ - add_filter( 'breadcrumb_trail_textdomain', 'hybrid_get_textdomain' ); - add_filter( 'theme_layouts_textdomain', 'hybrid_get_textdomain' ); - add_filter( 'custom_field_series_textdomain', 'hybrid_get_textdomain' ); - add_filter( 'post_stylesheets_textdomain', 'hybrid_get_textdomain' ); + /* Filter text strings for Hybrid Core and extensions so themes can serve up translations. */ + add_filter( 'gettext', 'hybrid_gettext', 1, 3 ); + add_filter( 'gettext', 'hybrid_extensions_gettext', 1, 3 ); /* Make text widgets and term descriptions shortcode aware. */ add_filter( 'widget_text', 'do_shortcode' ); diff --git a/wp-content/themes/hybrid/library/js/drop-downs.dev.js b/wp-content/themes/hybrid/library/js/drop-downs.dev.js index a0adb54225540be186574d14ce071eef45f1f1f9..e172e14a973bb002b1de33eba29f6bc7d641f557 100644 --- a/wp-content/themes/hybrid/library/js/drop-downs.dev.js +++ b/wp-content/themes/hybrid/library/js/drop-downs.dev.js @@ -213,7 +213,7 @@ * Hybrid drop-downs. * @author Justin Tadlock * @license http://www.gnu.org/licenses/gpl.html - * @copyright 2008 - 2011 Justin Tadlock + * @copyright 2008 - 2012 Justin Tadlock */ $j = jQuery.noConflict(); @@ -232,5 +232,17 @@ $j(document).ready( dropShadows: false } ); + + $j( 'nav.menu ul:first-child' ).supersubs( { + minWidth: 12, + maxWidth: 27, + extraWidth: 1 + } + ).superfish( { + delay: 100, + animation: { opacity: 'show', height: 'show' }, + dropShadows: false + } + ); } ); \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/js/drop-downs.js b/wp-content/themes/hybrid/library/js/drop-downs.js index a2d10d6093bac11540e30fac01b21f6c3c812b48..24f6ccf2d8f0e031aa9138bad45a7ba151d1f616 100644 --- a/wp-content/themes/hybrid/library/js/drop-downs.js +++ b/wp-content/themes/hybrid/library/js/drop-downs.js @@ -1 +1 @@ -(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join("")),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(["li.",o.hoverClass].join("")).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(["ul.",c.menuClass,":first"].join(""))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$("li."+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(" ")).filter("li:has(ul)").removeClass(o.pathClass);});sf.o[s]=sf.op=o;$("li:has(ul)",this)[($.fn.hoverIntent&&!o.disableHI)?"hoverIntent":"hover"](over,out).each(function(){if(o.autoArrows){addArrow($(">a:first-child",this));}}).not("."+c.bcClass).hideSuperfishUl();var $a=$("a",this);$a.each(function(i){var $li=$a.eq(i).parents("li");$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7)){menuClasses.push(c.shadowClass);}$(this).addClass(menuClasses.join(" "));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined){this.toggleClass(sf.c.shadowClass+"-off");}};sf.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};sf.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:"";o.retainPath=false;var $ul=$(["li.",o.hoverClass].join(""),this).add(this).not(not).removeClass(o.hoverClass).find(">ul").hide().css("visibility","hidden");o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+"-off",$ul=this.addClass(o.hoverClass).find(">ul:hidden").css("visibility","visible");sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);(function($){$.fn.supersubs=function(options){var opts=$.extend({},$.fn.supersubs.defaults,options);return this.each(function(){var $$=$(this);var o=$.meta?$.extend({},opts,$$.data()):opts;var fontsize=$('<li id="menu-fontsize">—</li>').css({padding:0,position:"absolute",top:"-999em",width:"auto"}).appendTo($$).width();$("#menu-fontsize").remove();$ULs=$$.find("ul");$ULs.each(function(i){var $ul=$ULs.eq(i);var $LIs=$ul.children();var $As=$LIs.children("a");var liFloat=$LIs.css("white-space","nowrap").css("float");var emWidth=$ul.add($LIs).add($As).css({"float":"none",width:"auto"}).end().end()[0].clientWidth/fontsize;emWidth+=o.extraWidth;if(emWidth>o.maxWidth){emWidth=o.maxWidth;}else{if(emWidth<o.minWidth){emWidth=o.minWidth;}}emWidth+="em";$ul.css("width",emWidth);$LIs.css({"float":liFloat,width:"100%","white-space":"normal"}).each(function(){var $childUl=$(">ul",this);var offsetDirection=$childUl.css("left")!==undefined?"left":"right";$childUl.css(offsetDirection,emWidth);});});});};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0};})(jQuery);$j=jQuery.noConflict();$j(document).ready(function(){$j("div.menu ul:first-child").supersubs({minWidth:12,maxWidth:27,extraWidth:1}).superfish({delay:100,animation:{opacity:"show",height:"show"},dropShadows:false});}); \ No newline at end of file +;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl()},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path)}},o.delay)},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone())};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass)});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this))}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li)}).blur(function(){out.call($li)})});o.onInit.call(this)}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '))})};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)this.toggleClass(sf.c.shadowClass+'-off')};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul)});return this}})})(jQuery);(function($){$.fn.supersubs=function(options){var opts=$.extend({},$.fn.supersubs.defaults,options);return this.each(function(){var $$=$(this);var o=$.meta?$.extend({},opts,$$.data()):opts;var fontsize=$('<li id="menu-fontsize">—</li>').css({'padding':0,'position':'absolute','top':'-999em','width':'auto'}).appendTo($$).width();$('#menu-fontsize').remove();$ULs=$$.find('ul');$ULs.each(function(i){var $ul=$ULs.eq(i);var $LIs=$ul.children();var $As=$LIs.children('a');var liFloat=$LIs.css('white-space','nowrap').css('float');var emWidth=$ul.add($LIs).add($As).css({'float':'none','width':'auto'}).end().end()[0].clientWidth/fontsize;emWidth+=o.extraWidth;if(emWidth>o.maxWidth){emWidth=o.maxWidth}else if(emWidth<o.minWidth){emWidth=o.minWidth}emWidth+='em';$ul.css('width',emWidth);$LIs.css({'float':liFloat,'width':'100%','white-space':'normal'}).each(function(){var $childUl=$('>ul',this);var offsetDirection=$childUl.css('left')!==undefined?'left':'right';$childUl.css(offsetDirection,emWidth)})})})};$.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);$j=jQuery.noConflict();$j(document).ready(function(){$j('div.menu ul:first-child').supersubs({minWidth:12,maxWidth:27,extraWidth:1}).superfish({delay:100,animation:{opacity:'show',height:'show'},dropShadows:false});$j('nav.menu ul:first-child').supersubs({minWidth:12,maxWidth:27,extraWidth:1}).superfish({delay:100,animation:{opacity:'show',height:'show'},dropShadows:false})}); \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/js/nav-bar.dev.js b/wp-content/themes/hybrid/library/js/nav-bar.dev.js new file mode 100644 index 0000000000000000000000000000000000000000..73e6f4564b2088f62d5525dce54d5827a63952fd --- /dev/null +++ b/wp-content/themes/hybrid/library/js/nav-bar.dev.js @@ -0,0 +1,153 @@ +/* + * Superfish v1.4.8 - jQuery menu widget + * Copyright (c) 2008 Joel Birch + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt + */ + +;(function($){ + $.fn.superfish = function(op){ + + var sf = $.fn.superfish, + c = sf.c, + $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), + over = function(){ + var $$ = $(this), menu = getMenu($$); + clearTimeout(menu.sfTimer); + $$.showSuperfishUl().siblings().hideSuperfishUl(); + }, + out = function(){ + var $$ = $(this), menu = getMenu($$), o = sf.op; + clearTimeout(menu.sfTimer); + menu.sfTimer=setTimeout(function(){ + o.retainPath=($.inArray($$[0],o.$path)>-1); + $$.hideSuperfishUl(); + if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} + },o.delay); + }, + getMenu = function($menu){ + var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; + sf.op = sf.o[menu.serial]; + return menu; + }, + addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; + + return this.each(function() { + var s = this.serial = sf.o.length; + var o = $.extend({},sf.defaults,op); + o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){ + $(this).addClass([o.hoverClass,c.bcClass].join(' ')) + .filter('li:has(ul)').removeClass(o.pathClass); + }); + sf.o[s] = sf.op = o; + + $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { + if (o.autoArrows) addArrow( $('>a:first-child',this) ); + }) + .not('.'+c.bcClass) + .hideSuperfishUl(); + + var $a = $('a',this); + $a.each(function(i){ + var $li = $a.eq(i).parents('li'); + $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); + }); + o.onInit.call(this); + + }).each(function() { + var menuClasses = [c.menuClass]; + if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass); + $(this).addClass(menuClasses.join(' ')); + }); + }; + + var sf = $.fn.superfish; + sf.o = []; + sf.op = {}; + sf.IE7fix = function(){ + var o = sf.op; + if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined) + this.toggleClass(sf.c.shadowClass+'-off'); + }; + sf.c = { + bcClass : 'sf-breadcrumb', + menuClass : 'sf-js-enabled', + anchorClass : 'sf-with-ul', + arrowClass : 'sf-sub-indicator', + shadowClass : 'sf-shadow' + }; + sf.defaults = { + hoverClass : 'sfHover', + pathClass : 'overideThisToUse', + pathLevels : 1, + delay : 800, + animation : {opacity:'show'}, + speed : 'normal', + autoArrows : true, + dropShadows : true, + disableHI : false, // true disables hoverIntent detection + onInit : function(){}, // callback functions + onBeforeShow: function(){}, + onShow : function(){}, + onHide : function(){} + }; + $.fn.extend({ + hideSuperfishUl : function(){ + var o = sf.op, + not = (o.retainPath===true) ? o.$path : ''; + o.retainPath = false; + var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) + .find('>ul').hide().css('visibility','hidden'); + o.onHide.call($ul); + return this; + }, + showSuperfishUl : function(){ + var o = sf.op, + sh = sf.c.shadowClass+'-off', + $ul = this.addClass(o.hoverClass) + .find('>ul:hidden').css('visibility','visible'); + sf.IE7fix.call($ul); + o.onBeforeShow.call($ul); + $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); + return this; + } + }); + +})(jQuery); + +/** + * Hybrid drop-downs. + * @author Justin Tadlock + * @license http://www.gnu.org/licenses/gpl.html + * @copyright 2008 - 2012 Justin Tadlock + */ +$j = jQuery.noConflict(); + +$j(document).ready( + function() { + + $j( 'div.menu ul li.current-menu-ancestor' ).addClass( 'current-menu-item' ); + $j( 'nav.menu ul li.current-menu-ancestor' ).addClass( 'current-menu-item' ); + + /* Drop-down controls. */ + $j('div.menu ul:first-child').superfish( { + pathClass: 'current-menu-item', + delay: 100, + animation: { opacity: 'show', height: 'show' }, + dropShadows: false + } + ); + + $j( 'nav.menu ul:first-child' ).superfish( { + pathClass: 'current-menu-item', + delay: 100, + animation: { opacity: 'show', height: 'show' }, + dropShadows: false + } + ); + } +); \ No newline at end of file diff --git a/wp-content/themes/hybrid/library/js/nav-bar.js b/wp-content/themes/hybrid/library/js/nav-bar.js new file mode 100644 index 0000000000000000000000000000000000000000..dca4ae8cfad257f7bf1616b832cb50bfb4e73643 --- /dev/null +++ b/wp-content/themes/hybrid/library/js/nav-bar.js @@ -0,0 +1 @@ +;(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl()},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path)}},o.delay)},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone())};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass)});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this))}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li)}).blur(function(){out.call($li)})});o.onInit.call(this)}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '))})};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)this.toggleClass(sf.c.shadowClass+'-off')};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul)});return this}})})(jQuery);$j=jQuery.noConflict();$j(document).ready(function(){$j('div.menu ul li.current-menu-ancestor').addClass('current-menu-item');$j('nav.menu ul li.current-menu-ancestor').addClass('current-menu-item');$j('div.menu ul:first-child').superfish({pathClass:'current-menu-item',delay:100,animation:{opacity:'show',height:'show'},dropShadows:false});$j('nav.menu ul:first-child').superfish({pathClass:'current-menu-item',delay:100,animation:{opacity:'show',height:'show'},dropShadows:false})}); \ No newline at end of file diff --git a/wp-content/themes/hybrid/loop-error.php b/wp-content/themes/hybrid/loop-error.php index 9e98f63e6ce46eabb9b03d96b6b6018f297a9469..87bbd31a3c44873050adeab9f7c83e595ace2500 100644 --- a/wp-content/themes/hybrid/loop-error.php +++ b/wp-content/themes/hybrid/loop-error.php @@ -1,21 +1,21 @@ -<?php -/** - * Loop Error Template - * - * Displays an error message when no posts are found. - * - * @package Hybrid - * @subpackage Template - */ -?> - <div id="post-0" class="<?php hybrid_entry_class(); ?>"> - - <div class="entry-content"> - - <p class="no-data"> - <?php _e( 'Apologies, but no results were found.', hybrid_get_textdomain() ); ?> - </p><!-- .no-data --> - - </div><!-- .entry-content --> - +<?php +/** + * Loop Error Template + * + * Displays an error message when no posts are found. + * + * @package Hybrid + * @subpackage Template + */ +?> + <div id="post-0" class="<?php hybrid_entry_class(); ?>"> + + <div class="entry-content"> + + <p class="no-data"> + <?php _e( 'Apologies, but no results were found.', 'hybrid' ); ?> + </p><!-- .no-data --> + + </div><!-- .entry-content --> + </div><!-- .hentry .error --> \ No newline at end of file diff --git a/wp-content/themes/hybrid/loop-meta.php b/wp-content/themes/hybrid/loop-meta.php index 42e778cdbec4a268b5fdf27f2ca766902a76b385..d3d010d1fc0aa3b00e5a50fa782f9b7c97ed0a0d 100644 --- a/wp-content/themes/hybrid/loop-meta.php +++ b/wp-content/themes/hybrid/loop-meta.php @@ -1,130 +1,130 @@ -<?php -/** - * Loop Meta Template - * - * Displays information at the top of the page about archive and search results when viewing those pages. - * This is not shown on the home page and singular views. - * - * @package Hybrid - * @subpackage Template - */ -?> - - <?php if ( is_home() && !is_front_page() ) : ?> - - <?php global $wp_query; ?> - - <div class="loop-meta"> - <h1 class="loop-title"><?php echo get_post_field( 'post_title', $wp_query->get_queried_object_id() ); ?></h1> - </div><!-- .loop-meta --> - - <?php elseif ( is_category() ) : ?> - - <div class="loop-meta archive-info category-info"> - - <h1 class="loop-title archive-title category-title"><?php single_cat_title(); ?></h1> - - <div class="loop-description archive-description category-description"> - <?php echo category_description(); ?> - </div><!-- .loop-description --> - - </div><!-- .loop-meta --> - - <?php elseif ( is_tag() ) : ?> - - <div class="loop-meta archive-info post_tag-info tag-info"> - - <h1 class="loop-title archive-title post_tag-title tag-title"><?php single_tag_title(); ?></h1> - - <div class="loop-description archive-description post_tag-description tag-description"> - <?php echo tag_description(); ?> - </div><!-- .loop-description --> - - </div><!-- .loop-meta --> - - <?php elseif ( is_tax() ) : ?> - - <div class="loop-meta archive-info taxonomy-info"> - - <h1 class="loop-title archive-title taxonomy-title"><?php single_term_title(); ?></h1> - - <div class="loop-description archive-description taxonomy-description"> - <?php echo term_description( '', get_query_var( 'taxonomy' ) ); ?> - </div><!-- .loop-description --> - - </div><!-- .loop-meta --> - - <?php elseif ( is_author() ) : ?> - - <?php $id = get_query_var( 'author' ); ?> - - <div id="hcard-<?php the_author_meta( 'user_nicename', $id ); ?>" class="loop-meta vcard archive-info user-info user-profile author-info author-profile"> - - <h1 class="loop-title fn n archive-title user-title author-title"><?php the_author_meta( 'display_name', $id ); ?></h1> - - <div class="loop-description archive-description user-description author-description"> - <?php echo get_avatar( get_the_author_meta( 'user_email', $id ), '100', '', get_the_author_meta( 'display_name', $id ) ); ?> - - <p class="user-bio author-bio"> - <?php the_author_meta( 'description', $id ); ?> - </p><!-- .user-bio --> - </div><!-- .loop-description --> - - </div><!-- .loop-meta --> - - <?php elseif ( is_search() ) : ?> - - <div class="loop-meta search-info"> - - <h1 class="loop-title search-title"><?php echo esc_attr( get_search_query() ); ?></h1> - - <div class="loop-description search-description"> - <p> - <?php printf( __( 'You are browsing the search results for "%1$s"', hybrid_get_textdomain() ), esc_attr( get_search_query() ) ); ?> - </p> - </div><!-- .loop-description --> - - </div><!-- .loop-meta --> - - <?php elseif ( is_date() ) : ?> - - <div class="loop-meta archive-info date-info"> - <h1 class="loop-title archive-title date-title"><?php _e( 'Archives by date', hybrid_get_textdomain() ); ?></h1> - - <div class="loop-description archive-description date-description"> - <p> - <?php _e( 'You are browsing the site archives by date.', hybrid_get_textdomain() ); ?> - </p> - </div><!-- .loop-description --> - - </div><!-- .loop-meta --> - - <?php elseif ( is_post_type_archive() ) : ?> - - <?php $post_type = get_post_type_object( get_query_var( 'post_type' ) ); ?> - - <div class="loop-meta archive-info"> - - <h1 class="loop-title archive-title"><?php post_type_archive_title(); ?></h1> - - <div class="loop-description archive-description"> - <?php if ( !empty( $post_type->description ) ) echo "<p>{$post_type->description}</p>"; ?> - </div><!-- .loop-description --> - - </div><!-- .loop-meta --> - - <?php elseif ( is_archive() ) : ?> - - <div class="loop-meta archive-info"> - - <h1 class="loop-title archive-title"><?php _e( 'Archives', hybrid_get_textdomain() ); ?></h1> - - <div class="loop-description archive-description"> - <p> - <?php _e( 'You are browsing the site archives.', hybrid_get_textdomain() ); ?> - </p> - </div><!-- .loop-description --> - - </div><!-- .loop-meta --> - +<?php +/** + * Loop Meta Template + * + * Displays information at the top of the page about archive and search results when viewing those pages. + * This is not shown on the home page and singular views. + * + * @package Hybrid + * @subpackage Template + */ +?> + + <?php if ( is_home() && !is_front_page() ) : ?> + + <?php global $wp_query; ?> + + <div class="loop-meta"> + <h1 class="loop-title"><?php echo get_post_field( 'post_title', $wp_query->get_queried_object_id() ); ?></h1> + </div><!-- .loop-meta --> + + <?php elseif ( is_category() ) : ?> + + <div class="loop-meta archive-info category-info"> + + <h1 class="loop-title archive-title category-title"><?php single_cat_title(); ?></h1> + + <div class="loop-description archive-description category-description"> + <?php echo category_description(); ?> + </div><!-- .loop-description --> + + </div><!-- .loop-meta --> + + <?php elseif ( is_tag() ) : ?> + + <div class="loop-meta archive-info post_tag-info tag-info"> + + <h1 class="loop-title archive-title post_tag-title tag-title"><?php single_tag_title(); ?></h1> + + <div class="loop-description archive-description post_tag-description tag-description"> + <?php echo tag_description(); ?> + </div><!-- .loop-description --> + + </div><!-- .loop-meta --> + + <?php elseif ( is_tax() ) : ?> + + <div class="loop-meta archive-info taxonomy-info"> + + <h1 class="loop-title archive-title taxonomy-title"><?php single_term_title(); ?></h1> + + <div class="loop-description archive-description taxonomy-description"> + <?php echo term_description( '', get_query_var( 'taxonomy' ) ); ?> + </div><!-- .loop-description --> + + </div><!-- .loop-meta --> + + <?php elseif ( is_author() ) : ?> + + <?php $id = get_query_var( 'author' ); ?> + + <div id="hcard-<?php the_author_meta( 'user_nicename', $id ); ?>" class="loop-meta vcard archive-info user-info user-profile author-info author-profile"> + + <h1 class="loop-title fn n archive-title user-title author-title"><?php the_author_meta( 'display_name', $id ); ?></h1> + + <div class="loop-description archive-description user-description author-description"> + <?php echo get_avatar( get_the_author_meta( 'user_email', $id ), '100', '', get_the_author_meta( 'display_name', $id ) ); ?> + + <p class="user-bio author-bio"> + <?php the_author_meta( 'description', $id ); ?> + </p><!-- .user-bio --> + </div><!-- .loop-description --> + + </div><!-- .loop-meta --> + + <?php elseif ( is_search() ) : ?> + + <div class="loop-meta search-info"> + + <h1 class="loop-title search-title"><?php echo esc_attr( get_search_query() ); ?></h1> + + <div class="loop-description search-description"> + <p> + <?php printf( __( 'You are browsing the search results for "%1$s"', 'hybrid' ), esc_attr( get_search_query() ) ); ?> + </p> + </div><!-- .loop-description --> + + </div><!-- .loop-meta --> + + <?php elseif ( is_date() ) : ?> + + <div class="loop-meta archive-info date-info"> + <h1 class="loop-title archive-title date-title"><?php _e( 'Archives by date', 'hybrid' ); ?></h1> + + <div class="loop-description archive-description date-description"> + <p> + <?php _e( 'You are browsing the site archives by date.', 'hybrid' ); ?> + </p> + </div><!-- .loop-description --> + + </div><!-- .loop-meta --> + + <?php elseif ( is_post_type_archive() ) : ?> + + <?php $post_type = get_post_type_object( get_query_var( 'post_type' ) ); ?> + + <div class="loop-meta archive-info"> + + <h1 class="loop-title archive-title"><?php post_type_archive_title(); ?></h1> + + <div class="loop-description archive-description"> + <?php if ( !empty( $post_type->description ) ) echo "<p>{$post_type->description}</p>"; ?> + </div><!-- .loop-description --> + + </div><!-- .loop-meta --> + + <?php elseif ( is_archive() ) : ?> + + <div class="loop-meta archive-info"> + + <h1 class="loop-title archive-title"><?php _e( 'Archives', 'hybrid' ); ?></h1> + + <div class="loop-description archive-description"> + <p> + <?php _e( 'You are browsing the site archives.', 'hybrid' ); ?> + </p> + </div><!-- .loop-description --> + + </div><!-- .loop-meta --> + <?php endif; ?> \ No newline at end of file diff --git a/wp-content/themes/hybrid/loop-nav.php b/wp-content/themes/hybrid/loop-nav.php index d3c0b439fc23b0b704cb9e5a12e491a3a41506f4..5b34b28f1273d05398e53aa44679ed01f735b918 100644 --- a/wp-content/themes/hybrid/loop-nav.php +++ b/wp-content/themes/hybrid/loop-nav.php @@ -14,21 +14,21 @@ <?php if ( is_attachment() ) : ?> <div class="navigation-links"> - <?php previous_post_link( '%link', '<span class="previous">' . __( '« Return to entry', hybrid_get_textdomain() ) . '</span>' ); ?> + <?php previous_post_link( '%link', '<span class="previous">' . __( '« Return to entry', 'hybrid' ) . '</span>' ); ?> </div> <?php elseif ( is_singular( 'post' ) ) : ?> <div class="navigation-links"> - <?php previous_post_link( '%link', '<span class="previous">' . __( '« Previous', hybrid_get_textdomain() ) . '</span>' ); ?> - <?php next_post_link( '%link', '<span class="next">' . __( 'Next »', hybrid_get_textdomain() ) . '</span>' ); ?> + <?php previous_post_link( '%link', '<span class="previous">' . __( '« Previous', 'hybrid' ) . '</span>' ); ?> + <?php next_post_link( '%link', '<span class="next">' . __( 'Next »', 'hybrid' ) . '</span>' ); ?> </div><!-- .navigation-links --> <?php elseif ( !is_singular() && function_exists( 'wp_pagenavi' ) ) : wp_pagenavi(); ?> <?php elseif ( !is_singular() && current_theme_supports( 'loop-pagination' ) ) : loop_pagination(); ?> - <?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '« Previous', hybrid_get_textdomain() ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next »', hybrid_get_textdomain() ) . '</span>' ) ) ) : ?> + <?php elseif ( !is_singular() && $nav = get_posts_nav_link( array( 'sep' => '', 'prelabel' => '<span class="previous">' . __( '« Previous', 'hybrid' ) . '</span>', 'nxtlabel' => '<span class="next">' . __( 'Next »', 'hybrid' ) . '</span>' ) ) ) : ?> <div class="navigation-links"> <?php echo $nav; ?> diff --git a/wp-content/themes/hybrid/page-archives.php b/wp-content/themes/hybrid/page-archives.php index 24e8932f34ba12431d9cdae32747396ee3004a00..4e2897f0cc2da683659bc88cc45bce902653511f 100644 --- a/wp-content/themes/hybrid/page-archives.php +++ b/wp-content/themes/hybrid/page-archives.php @@ -34,13 +34,13 @@ get_header(); // Loads the header.php template. ?> <?php else : ?> - <h2><?php _e( 'Archives by category', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Archives by category', 'hybrid' ); ?></h2> <ul class="xoxo category-archives"> - <?php wp_list_categories( array( 'feed' => __( 'RSS', hybrid_get_textdomain() ), 'show_count' => true, 'use_desc_for_title' => false, 'title_li' => false ) ); ?> + <?php wp_list_categories( array( 'feed' => __( 'RSS', 'hybrid' ), 'show_count' => true, 'use_desc_for_title' => false, 'title_li' => false ) ); ?> </ul><!-- .xoxo .category-archives --> - <h2><?php _e( 'Archives by month', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Archives by month', 'hybrid' ); ?></h2> <ul class="xoxo monthly-archives"> <?php wp_get_archives( array( 'show_post_count' => true, 'type' => 'monthly' ) ); ?> @@ -48,7 +48,7 @@ get_header(); // Loads the header.php template. ?> <?php endif; ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-authors.php b/wp-content/themes/hybrid/page-authors.php index 579ab64da31911cd38098131d2a2601b6f9cf1f1..806508d83dc0aef0318316b798bdf786790ac795 100644 --- a/wp-content/themes/hybrid/page-authors.php +++ b/wp-content/themes/hybrid/page-authors.php @@ -53,7 +53,7 @@ get_header(); // Loads the header.php template. ?> <?php endforeach; ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-biography.php b/wp-content/themes/hybrid/page-biography.php index 430a2ede69ef38ef843e98bfb6cbc4ca8cc14cc7..eca5abc441ea8862e81c1ae8945a019eb5c9a5df 100644 --- a/wp-content/themes/hybrid/page-biography.php +++ b/wp-content/themes/hybrid/page-biography.php @@ -38,23 +38,23 @@ get_header(); // Loads the header.php template. ?> <ul class="xoxo clear"> <?php if ( get_the_author_meta( 'nickname' ) ) : ?> - <li><strong><?php _e( 'Nickname:', hybrid_get_textdomain() ); ?></strong> <span class="nickname"><?php the_author_meta( 'nickname' ); ?></span></li> + <li><strong><?php _e( 'Nickname:', 'hybrid' ); ?></strong> <span class="nickname"><?php the_author_meta( 'nickname' ); ?></span></li> <?php endif; ?> <?php if ( get_the_author_meta( 'user_url' ) ) : ?> - <li><strong><?php _e( 'Website:', hybrid_get_textdomain() ); ?></strong> <a class="url" href="<?php the_author_meta( 'user_url' ); ?>" title="<?php the_author_meta( 'user_url' ); ?>"><?php the_author_meta( 'user_url' ); ?></a></li> + <li><strong><?php _e( 'Website:', 'hybrid' ); ?></strong> <a class="url" href="<?php the_author_meta( 'user_url' ); ?>" title="<?php the_author_meta( 'user_url' ); ?>"><?php the_author_meta( 'user_url' ); ?></a></li> <?php endif; ?> <?php if ( get_the_author_meta( 'aim' ) ) : ?> - <li><strong><?php _e( 'AIM:', hybrid_get_textdomain() ); ?></strong> <a class="url" href="aim:goim?screenname=<?php the_author_meta( 'aim' ); ?>" title="<?php printf( __( 'IM with %1$s', hybrid_get_textdomain() ), get_the_author_meta( 'aim' ) ); ?>"><?php the_author_meta( 'aim' ); ?></a></li> + <li><strong><?php _e( 'AIM:', 'hybrid' ); ?></strong> <a class="url" href="aim:goim?screenname=<?php the_author_meta( 'aim' ); ?>" title="<?php printf( __( 'IM with %1$s', 'hybrid' ), get_the_author_meta( 'aim' ) ); ?>"><?php the_author_meta( 'aim' ); ?></a></li> <?php endif; ?> <?php if ( get_the_author_meta( 'jabber' ) ) : ?> - <li><strong><?php _e( 'Jabber:', hybrid_get_textdomain() ); ?></strong> <a class="url" href="xmpp:<?php the_author_meta( 'jabber' ); ?>@jabberservice.com" title="<?php printf( __( 'IM with %1$s', hybrid_get_textdomain() ), get_the_author_meta( 'jabber' ) ); ?>"><?php the_author_meta( 'jabber' ); ?></a></li> + <li><strong><?php _e( 'Jabber:', 'hybrid' ); ?></strong> <a class="url" href="xmpp:<?php the_author_meta( 'jabber' ); ?>@jabberservice.com" title="<?php printf( __( 'IM with %1$s', 'hybrid' ), get_the_author_meta( 'jabber' ) ); ?>"><?php the_author_meta( 'jabber' ); ?></a></li> <?php endif; ?> <?php if ( get_the_author_meta( 'yim' ) ) : ?> - <li><strong><?php _e( 'Yahoo:', hybrid_get_textdomain() ); ?></strong> <a class="url" href="ymsgr:sendIM?<?php the_author_meta( 'yim' ); ?>" title="<?php printf( __( 'IM with %1$s', hybrid_get_textdomain() ), get_the_author_meta( 'yim' ) ); ?>"><?php the_author_meta( 'yim' ); ?></a></li> + <li><strong><?php _e( 'Yahoo:', 'hybrid' ); ?></strong> <a class="url" href="ymsgr:sendIM?<?php the_author_meta( 'yim' ); ?>" title="<?php printf( __( 'IM with %1$s', 'hybrid' ), get_the_author_meta( 'yim' ) ); ?>"><?php the_author_meta( 'yim' ); ?></a></li> <?php endif; ?> </ul><!-- .xoxo --> @@ -62,7 +62,7 @@ get_header(); // Loads the header.php template. ?> </div><!-- .author-profile .vcard --> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-blog.php b/wp-content/themes/hybrid/page-blog.php index 3605c86e5b657e1b7022fca666c29aab4b6598ca..335a8710d8fd263fae03f8f64843e02627c5814c 100644 --- a/wp-content/themes/hybrid/page-blog.php +++ b/wp-content/themes/hybrid/page-blog.php @@ -30,8 +30,8 @@ get_header(); // Loads the header.php template. ?> <?php do_atomic( 'before_entry' ); // hybrid_before_entry ?> <div class="entry-content"> - <?php the_content( sprintf( __( 'Continue reading %1$s', hybrid_get_textdomain() ), the_title( ' "', '"', false ) ) ); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php the_content( sprintf( __( 'Continue reading %1$s', 'hybrid' ), the_title( ' "', '"', false ) ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> <?php do_atomic( 'after_entry' ); // hybrid_after_entry ?> diff --git a/wp-content/themes/hybrid/page-bookmarks.php b/wp-content/themes/hybrid/page-bookmarks.php index 220db4d8e72ba1d400bcfdf3f21336310305a6d9..f3620faad586e31bf2aa6ddb7539fcb759a8b88e 100644 --- a/wp-content/themes/hybrid/page-bookmarks.php +++ b/wp-content/themes/hybrid/page-bookmarks.php @@ -41,7 +41,7 @@ get_header(); // Loads the header.php template. ?> ); ?> <?php wp_list_bookmarks( $args ); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-categories.php b/wp-content/themes/hybrid/page-categories.php index 18eb677e9222f0a64f0dc53c7ce4ba461d0201e3..df67b70250aa5201c80c08d2758eb2b5c0afbd2b 100644 --- a/wp-content/themes/hybrid/page-categories.php +++ b/wp-content/themes/hybrid/page-categories.php @@ -28,10 +28,10 @@ get_header(); // Loads the header.php template. ?> <?php the_content(); ?> <ul class="xoxo category-archives"> - <?php wp_list_categories( array( 'feed' => __( 'RSS', hybrid_get_textdomain() ), 'show_count' => true, 'use_desc_for_title' => false, 'title_li' => false ) ); ?> + <?php wp_list_categories( array( 'feed' => __( 'RSS', 'hybrid' ), 'show_count' => true, 'use_desc_for_title' => false, 'title_li' => false ) ); ?> </ul><!-- .xoxo .category-archives --> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-daily.php b/wp-content/themes/hybrid/page-daily.php index a2b1cbbcec4d5ec12933632b7d266262be8c6408..1ed4043d8153d64f7f71a116a5ccdf4aba645391 100644 --- a/wp-content/themes/hybrid/page-daily.php +++ b/wp-content/themes/hybrid/page-daily.php @@ -30,7 +30,7 @@ get_header(); // Loads the header.php template. ?> <?php wp_get_archives( array( 'type' => 'daily', 'show_post_count' => true ) ); ?> </ul><!-- .xoxo .daily-archives --> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-logged-in.php b/wp-content/themes/hybrid/page-logged-in.php index 6d4758252125c12f3d8e3bb2db32e32f50e95f38..a61d5aaeb4fb7cb25691da1718448b80194f0ae2 100644 --- a/wp-content/themes/hybrid/page-logged-in.php +++ b/wp-content/themes/hybrid/page-logged-in.php @@ -27,7 +27,7 @@ get_header(); // Loads the header.php template. ?> <div class="entry-content"> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> <?php do_atomic( 'after_entry' ); // hybrid_after_entry ?> @@ -49,9 +49,9 @@ get_header(); // Loads the header.php template. ?> <div class="entry-content"> <p class="alert"> - <?php printf( __( 'You must be <a href="%1$s" title="Log in">logged in</a> to view the content of this page.', hybrid_get_textdomain() ), wp_login_url( get_permalink() ) ); ?> + <?php printf( __( 'You must be <a href="%1$s" title="Log in">logged in</a> to view the content of this page.', 'hybrid' ), wp_login_url( get_permalink() ) ); ?> - <?php if ( get_option( 'users_can_register' ) ) printf( __( 'If you\'re not currently a member, please take a moment to <a href="%1$s" title="Register">register</a>.', hybrid_get_textdomain() ), site_url( 'wp-login.php?action=register', 'login' ) ); ?> + <?php if ( get_option( 'users_can_register' ) ) printf( __( 'If you\'re not currently a member, please take a moment to <a href="%1$s" title="Register">register</a>.', 'hybrid' ), site_url( 'wp-login.php?action=register', 'login' ) ); ?> </p><!-- .alert --> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-monthly.php b/wp-content/themes/hybrid/page-monthly.php index dd453969998eac98efe71f2702011884aaffe497..fa569580454dd88e124f9bccda41284a78bb35f3 100644 --- a/wp-content/themes/hybrid/page-monthly.php +++ b/wp-content/themes/hybrid/page-monthly.php @@ -30,7 +30,7 @@ get_header(); // Loads the header.php template. ?> <?php wp_get_archives( array( 'type' => 'monthly', 'show_post_count' => true ) ); ?> </ul><!-- .xoxo .monthly-archives --> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-no-widgets.php b/wp-content/themes/hybrid/page-no-widgets.php index e40ac3380d3d0b92f4f3f33f124fccdff1544799..8c8820bae9af9654246c0ca29cd4e3449598c19b 100644 --- a/wp-content/themes/hybrid/page-no-widgets.php +++ b/wp-content/themes/hybrid/page-no-widgets.php @@ -24,7 +24,7 @@ get_header(); // Loads the header.php template. ?> <div class="entry-content"> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> <?php do_atomic( 'after_entry' ); // hybrid_after_entry ?> diff --git a/wp-content/themes/hybrid/page-post_tag-cloud.php b/wp-content/themes/hybrid/page-post_tag-cloud.php index b2a02a2307463ca63566cd3212522ac2df4b36ea..bacb56191377b575264e1e8f3b4a7fdb842ddd79 100644 --- a/wp-content/themes/hybrid/page-post_tag-cloud.php +++ b/wp-content/themes/hybrid/page-post_tag-cloud.php @@ -31,7 +31,7 @@ get_header(); // Loads the header.php template. ?> <?php wp_tag_cloud( array( 'number' => 0 ) ); ?> </p><!-- .term-cloud .post_tag-cloud --> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-sitemap.php b/wp-content/themes/hybrid/page-sitemap.php index f2c201a424f8357c58ada9e5680e0b7cfc38c21f..ca5b74c828273fffbd8399b25164c25134419e6f 100644 --- a/wp-content/themes/hybrid/page-sitemap.php +++ b/wp-content/themes/hybrid/page-sitemap.php @@ -27,71 +27,71 @@ get_header(); // Loads the header.php template. ?> <?php the_content(); ?> - <h2><?php _e( 'Feeds', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Feeds', 'hybrid' ); ?></h2> <ul class="xoxo feeds"> - <li><a href="<?php bloginfo( 'rdf_url' ); ?>" title="<?php esc_attr_e( 'RDF/RSS 1.0 feed', hybrid_get_textdomain() ); ?>"><?php _e( '<acronym title="Resource Description Framework">RDF</acronym> <acronym title="Really Simple Syndication">RSS</acronym> 1.0 feed', hybrid_get_textdomain() ); ?></a></li> - <li><a href="<?php bloginfo( 'rss_url' ); ?>" title="<?php esc_attr_e( 'RSS 0.92 feed', hybrid_get_textdomain() ); ?>"><?php _e( '<acronym title="Really Simple Syndication">RSS</acronym> 0.92 feed', hybrid_get_textdomain() ); ?></a></li> - <li><a href="<?php bloginfo( 'rss2_url' ); ?>" title="<?php esc_attr_e( 'RSS 2.0 feed', hybrid_get_textdomain() ); ?>"><?php _e( '<acronym title="Really Simple Syndication">RSS</acronym> 2.0 feed', hybrid_get_textdomain() ); ?></a></li> - <li><a href="<?php bloginfo( 'atom_url' ); ?>" title="<?php esc_attr_e( 'Atom feed', hybrid_get_textdomain() ); ?>"><?php _e( 'Atom feed', hybrid_get_textdomain() ); ?></a></li> - <li><a href="<?php bloginfo( 'comments_rss2_url' ); ?>" title="<?php esc_attr_e( 'Comments RSS 2.0 feed', hybrid_get_textdomain() ); ?>"><?php _e( 'Comments <acronym title="Really Simple Syndication">RSS</acronym> 2.0 feed', hybrid_get_textdomain() ); ?></a></li> + <li><a href="<?php bloginfo( 'rdf_url' ); ?>" title="<?php esc_attr_e( 'RDF/RSS 1.0 feed', 'hybrid' ); ?>"><?php _e( '<acronym title="Resource Description Framework">RDF</acronym> <acronym title="Really Simple Syndication">RSS</acronym> 1.0 feed', 'hybrid' ); ?></a></li> + <li><a href="<?php bloginfo( 'rss_url' ); ?>" title="<?php esc_attr_e( 'RSS 0.92 feed', 'hybrid' ); ?>"><?php _e( '<acronym title="Really Simple Syndication">RSS</acronym> 0.92 feed', 'hybrid' ); ?></a></li> + <li><a href="<?php bloginfo( 'rss2_url' ); ?>" title="<?php esc_attr_e( 'RSS 2.0 feed', 'hybrid' ); ?>"><?php _e( '<acronym title="Really Simple Syndication">RSS</acronym> 2.0 feed', 'hybrid' ); ?></a></li> + <li><a href="<?php bloginfo( 'atom_url' ); ?>" title="<?php esc_attr_e( 'Atom feed', 'hybrid' ); ?>"><?php _e( 'Atom feed', 'hybrid' ); ?></a></li> + <li><a href="<?php bloginfo( 'comments_rss2_url' ); ?>" title="<?php esc_attr_e( 'Comments RSS 2.0 feed', 'hybrid' ); ?>"><?php _e( 'Comments <acronym title="Really Simple Syndication">RSS</acronym> 2.0 feed', 'hybrid' ); ?></a></li> </ul><!-- .xoxo .feeds --> - <h2><?php _e( 'Pages', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Pages', 'hybrid' ); ?></h2> <ul class="xoxo pages"> <?php wp_list_pages( array( 'title_li' => false ) ); ?> </ul><!-- .xoxo .pages --> - <h2><?php _e( 'Category Archives', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Category Archives', 'hybrid' ); ?></h2> <ul class="xoxo category-archives"> - <?php wp_list_categories( array( 'feed' => __( 'RSS', hybrid_get_textdomain() ), 'show_count' => true, 'use_desc_for_title' => false, 'title_li' => false ) ); ?> + <?php wp_list_categories( array( 'feed' => __( 'RSS', 'hybrid' ), 'show_count' => true, 'use_desc_for_title' => false, 'title_li' => false ) ); ?> </ul><!-- .xoxo .category-archives --> - <h2><?php _e( 'Author Archives', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Author Archives', 'hybrid' ); ?></h2> <ul class="xoxo author-archives"> - <?php wp_list_authors( array( 'exclude_admin' => false, 'show_fullname' => true, 'feed' => __( 'RSS', hybrid_get_textdomain() ), 'optioncount' => true, 'title_li' => false ) ); ?> + <?php wp_list_authors( array( 'exclude_admin' => false, 'show_fullname' => true, 'feed' => __( 'RSS', 'hybrid' ), 'optioncount' => true, 'title_li' => false ) ); ?> </ul><!-- .xoxo .author-archives --> - <h2><?php _e( 'Yearly Archives', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Yearly Archives', 'hybrid' ); ?></h2> <ul class="xoxo yearly-archives"> <?php wp_get_archives( array( 'type' => 'yearly', 'show_post_count' => true ) ); ?> </ul><!-- .xoxo .yearly-archives --> - <h2><?php _e( 'Monthly Archives', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Monthly Archives', 'hybrid' ); ?></h2> <ul class="xoxo monthly-archives"> <?php wp_get_archives( array( 'type' => 'monthly', 'show_post_count' => true ) ); ?> </ul><!-- .xoxo .monthly-archives --> - <h2><?php _e( 'Weekly Archives', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Weekly Archives', 'hybrid' ); ?></h2> <ul class="xoxo weekly-archives"> <?php wp_get_archives( array( 'type' => 'weekly', 'show_post_count' => true ) ); ?> </ul><!-- .xoxo .weekly-archives --> - <h2><?php _e( 'Daily Archives', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Daily Archives', 'hybrid' ); ?></h2> <ul class="xoxo daily-archives"> <?php wp_get_archives( array( 'type' => 'daily', 'show_post_count' => true ) ); ?> </ul><!-- .xoxo .daily-archives --> - <h2><?php _e( 'Tag Archives', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Tag Archives', 'hybrid' ); ?></h2> <p class="tag-cloud"> <?php wp_tag_cloud( array( 'number' => 0 ) ); ?> </p><!-- .tag-cloud --> - <h2><?php _e( 'Blog Posts', hybrid_get_textdomain() ); ?></h2> + <h2><?php _e( 'Blog Posts', 'hybrid' ); ?></h2> <ul class="xoxo post-archives"> <?php wp_get_archives( array( 'type' => 'postbypost' ) ); ?> </ul><!-- .xoxo .post-archives --> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-weekly.php b/wp-content/themes/hybrid/page-weekly.php index f778d47d02a92f997b302f08bf0b99260be5ad3c..ae517ad838d335b05d103c946bc9b83d7dda8cee 100644 --- a/wp-content/themes/hybrid/page-weekly.php +++ b/wp-content/themes/hybrid/page-weekly.php @@ -30,7 +30,7 @@ get_header(); // Loads the header.php template. ?> <?php wp_get_archives( array( 'type' => 'weekly', 'show_post_count' => true ) ); ?> </ul><!-- .xoxo .weekly-archives --> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/page-widgets.php b/wp-content/themes/hybrid/page-widgets.php index 5599b560e3dff9a2015af573f44700bbb1531e4f..eafe10420d23eb842c77bd3c5f46c8942d00a186 100644 --- a/wp-content/themes/hybrid/page-widgets.php +++ b/wp-content/themes/hybrid/page-widgets.php @@ -23,7 +23,7 @@ get_header(); // Loads the header.php template. ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> - <?php edit_post_link( __( 'Edit', hybrid_get_textdomain() ), '<p class="entry-meta"><span class="edit">', '</span></p>' ); ?> + <?php edit_post_link( __( 'Edit', 'hybrid' ), '<p class="entry-meta"><span class="edit">', '</span></p>' ); ?> <?php do_atomic( 'after_singular' ); // hybrid_after_singular ?> diff --git a/wp-content/themes/hybrid/page-yearly.php b/wp-content/themes/hybrid/page-yearly.php index 1abf0d3ee27c0ced1f71e3d78439737be394165a..c64f972981aa2039905e8bafc3f0f54d53b19480 100644 --- a/wp-content/themes/hybrid/page-yearly.php +++ b/wp-content/themes/hybrid/page-yearly.php @@ -30,7 +30,7 @@ get_header(); // Loads the header.php template. ?> <?php wp_get_archives( array( 'type' => 'yearly', 'show_post_count' => true ) ); ?> </ul><!-- .xoxo .yearly-archives --> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> diff --git a/wp-content/themes/hybrid/post-no-widgets.php b/wp-content/themes/hybrid/post-no-widgets.php index 6e4edc80241618b1a54c69579da8ac7091566b94..4b6f7712d34185aadb389fdc33e1d1f156ffcd56 100644 --- a/wp-content/themes/hybrid/post-no-widgets.php +++ b/wp-content/themes/hybrid/post-no-widgets.php @@ -22,7 +22,7 @@ get_header(); // Loads the header.php template. ?> <div class="entry-content"> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> <?php do_atomic( 'after_entry' ); // hybrid_after_entry ?> diff --git a/wp-content/themes/hybrid/searchform.php b/wp-content/themes/hybrid/searchform.php index 141c8deec6613e644acaa10b35d98bb6d52bd607..c62de018a7000f334f83e308b12937dd5c59298a 100644 --- a/wp-content/themes/hybrid/searchform.php +++ b/wp-content/themes/hybrid/searchform.php @@ -15,8 +15,8 @@ <form method="get" class="search-form" id="search-form<?php if ( $search_num ) echo "-{$search_num}"; ?>" action="<?php echo trailingslashit( home_url() ); ?>"> <div> - <input class="search-text" type="text" name="s" id="search-text<?php if ( $search_num) echo "-{$search_num}"; ?>" value="<?php if ( is_search() ) echo esc_attr( get_search_query() ); else esc_attr_e( 'Search this site...', hybrid_get_textdomain() ); ?>" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" /> - <input class="search-submit button" name="submit" type="submit" id="search-submit<?php if ( $search_num ) echo "-{$search_num}"; ?>" value="<?php esc_attr_e( 'Search', hybrid_get_textdomain() ); ?>" /> + <input class="search-text" type="text" name="s" id="search-text<?php if ( $search_num) echo "-{$search_num}"; ?>" value="<?php if ( is_search() ) echo esc_attr( get_search_query() ); else esc_attr_e( 'Search this site...', 'hybrid' ); ?>" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" /> + <input class="search-submit button" name="submit" type="submit" id="search-submit<?php if ( $search_num ) echo "-{$search_num}"; ?>" value="<?php esc_attr_e( 'Search', 'hybrid' ); ?>" /> </div> </form><!-- .search-form --> diff --git a/wp-content/themes/hybrid/singular.php b/wp-content/themes/hybrid/singular.php index 2efdb0ce7fdf80f2a282fee6149bfb1c588060c6..f1adb1d4d11816eb6a1ed12093f2ea2a4524288f 100644 --- a/wp-content/themes/hybrid/singular.php +++ b/wp-content/themes/hybrid/singular.php @@ -26,7 +26,7 @@ get_header(); // Loads the header.php template. ?> <div class="entry-content"> <?php the_content(); ?> - <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', hybrid_get_textdomain() ), 'after' => '</p>' ) ); ?> + <?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?> </div><!-- .entry-content --> <?php do_atomic( 'after_entry' ); // hybrid_after_entry ?> diff --git a/wp-content/themes/hybrid/style.css b/wp-content/themes/hybrid/style.css index 4e9535ea500b05d6bdd456d9b04c0e93a05fb83e..7657972566046a355734c4ba6ea1f81eaa1b52ed 100644 --- a/wp-content/themes/hybrid/style.css +++ b/wp-content/themes/hybrid/style.css @@ -2,15 +2,15 @@ * Theme Name: Hybrid * Theme URI: http://themehybrid.com/themes/hybrid * Description: A user-friendly, search-engine optimized parent theme, featuring 15 custom page templates and multiple widget-ready areas, allowing you to create any type of site you want. - * Version: 1.0 + * Version: 1.1 * Author: Justin Tadlock * Author URI: http://justintadlock.com - * Tags: theme-options, threaded-comments, sticky-post, microformats, translation-ready, rtl-language-support, one-column, two-columns, three-columns, fixed-width + * Tags: theme-options, threaded-comments, microformats, translation-ready, rtl-language-support, one-column, two-columns, right-sidebar, fixed-width, sticky-post, custom-menu, full-width-template, featured-images * License: GNU General Public License v2.0 * License URI: http://www.gnu.org/licenses/gpl-2.0.html * - * Copyright (c) 2008 - 2011 Justin Tadlock. All rights reserved. + * Copyright (c) 2008 - 2012 Justin Tadlock. * http://justintadlock.com */ -html,body,div,span,object,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;vertical-align:baseline;outline:none;font-size:100%;background:transparent;border:none;text-decoration:none}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}b,i,hr,u,center,menu,layer,s,strike,font,xmp{margin:0;padding:0;vertical-align:baseline;outline:none;font-size:100%;font-weight:normal;font-style:normal;background:transparent;border:none;text-decoration:none}body{line-height:24px;font-family:Georgia,Times,"Times New Roman",serif;color:#333;background:#fff}h1,h2,h3,h4,h5,h6{font-style:normal;font-weight:normal;margin:0 0 21px 0}h1{font-size:1.8em}h2{font-size:1.7em}h3{font-size:1.55em}h4{font-size:1.4em}h5{font-size:1.25em}h6{font-size:1.1em}p{margin:0 0 21px 0}ol,ul{list-style:none}ul{list-style:disc;margin:0 0 21px 2.5em}ol{list-style-type:decimal;margin:0 0 21px 3em}ol ol{list-style:upper-roman}ol ol ol{list-style:lower-roman}ol ol ol ol{list-style:upper-alpha}ol ol ol ol ol{list-style:lower-alpha}ul ul,ol ol,ul ol,ol ul{margin-bottom:0}dl{margin:0 0 18px 3px}dl dt{font-weight:bold;margin:12px 0 0 0}dl dd{margin:6px 0 0 1.5em}strong{font-weight:bold}strong strong{font-weight:normal}em,cite{font-style:italic}em em,cite cite{font-style:normal}abbr{cursor:help}acronym{text-transform:uppercase;border-bottom:1px dashed #666;cursor:help}big{font-size:120%}small,sup,sub{font-size:80%}sup{vertical-align:baseline;position:relative;bottom:0.3em}sub{vertical-align:baseline;position:relative;top:0.3em}address{font-style:italic;margin:0 0 21px 0}li address,dd address{margin:0}blockquote{margin:0 2.5em;font-style:normal}blockquote em,blockquote cite{font-style:italic}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{cursor:pointer}a img{border:none}pre{overflow:auto;font:.9em Monaco,monospace,Courier,"Courier New";line-height:21px;margin-bottom:21px;padding:9px}code{font:.9em Monaco,monospace,Courier,"Courier New"}pre code{font-size:1em}ins,dfn{font-style:italic;text-decoration:none;border-bottom:1px solid #666}del,s,strike{text-decoration:line-through}object{margin-bottom:21px}input,textarea{font-size:1em;padding:3px}input[type="submit"]{cursor:pointer}:focus{outline:none}form label{cursor:pointer}option{padding:1px 3px}table{border-collapse:collapse;border-spacing:0;margin-bottom:21px}th,td{text-align:left}hr{height:1px;margin-bottom:21px;background:#333}img.wp-smiley{max-height:12px;margin:0;padding:0;border:none}.gallery{display:block;text-align:center;margin-bottom:21px}.alignleft,.left{float:left;margin-right:15px}.alignright,.right{float:right;margin-left:15px}.aligncenter,.center{display:block;margin:0 auto 21px auto}.alignnone,.block{clear:both;margin:0 0 21px 0}.clear{clear:both}img.alignleft,img.alignright{display:inline}blockquote.alignleft,blockquote.alignright{width:33%}#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:left;width:620px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{position:relative;float:right;width:300px}#secondary{position:relative;clear:right;float:right;width:300px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both;overflow:hidden}div.menu ul{margin:0;padding:0;list-style:none;line-height:1.0}div.menu ul ul{position:absolute;top:-999em;width:10em}div.menu ul ul li{width:100%}div.menu li:hover{visibility:inherit}div.menu li{float:left;position:relative}div.menu a{display:block;position:relative}div.menu li:hover ul,li.sfHover ul{left:0;top:2em;z-index:99}div.menu li:hover li ul,li.sfHover li ul{top:-999em}div.menu li li:hover ul,li li.sfHover ul{left:10em;top:0}div.menu li li:hover li ul,li li.sfHover li ul{top:-999em}div.menu li li li:hover ul,li li li.sfHover ul{left:10em;top:0}.gallery{display:block;clear:both;overflow:hidden;margin:0 auto}.gallery .gallery-row{display:block;clear:both;overflow:hidden;margin:0}.gallery .gallery-item{overflow:hidden;float:left;margin:0;text-align:center;list-style:none;padding:0}.gallery .gallery-item .gallery-icon img{width:auto;max-width:89%;height:auto;padding:1%;margin:0 auto}.gallery-caption{margin-left:0}.gallery .col-0{width:100%}.gallery .col-1{width:100%}.gallery .col-2{width:50%}.gallery .col-3{width:33.33%}.gallery .col-4{width:25%}.gallery .col-5{width:20%}.gallery .col-6{width:16.66%}.gallery .col-7{width:14.28%}.gallery .col-8{width:12.5%}.gallery .col-9{width:11.11%}.gallery .col-10{width:10%}.gallery .col-11{width:9.09%}.gallery .col-12{width:8.33%}.gallery .col-13{width:7.69%}.gallery .col-14{width:7.14%}.gallery .col-15{width:6.66%}.gallery .col-16{width:6.25%}.gallery .col-17{width:5.88%}.gallery .col-18{width:5.55%}.gallery .col-19{width:5.26%}.gallery .col-20{width:5%}.gallery .col-21{width:4.76%}.gallery .col-22{width:4.54%}.gallery .col-23{width:4.34%}.gallery .col-24{width:4.16%}.gallery .col-25{width:4%}.gallery .col-26{width:3.84%}.gallery .col-27{width:3.7%}.gallery .col-28{width:3.57%}.gallery .col-29{width:3.44%}.gallery .col-30{width:3.33%}.sticky,.bypostauthor{}body{font:normal normal normal 15px/21px Georgia,Times,"Times New Roman",serif;color:#000}#body-container{margin:90px auto 21px auto}a{color:#21759b;text-decoration:none}a:visited{color:#551a8b}a:hover,a:active{color:#d54e21;text-decoration:underline}h1,h2,h3,h4,h5,h6{font-family:Arial,Verdana,sans-serif;color:#000;font-weight:bold}h1{font-size:24px}h2{font-size:21px}h3{font-size:19px}h4{font-size:17px}h5{font-size:15px}h6{font-size:13px}ul{list-style:square}blockquote{font-style:italic;color:#555}blockquote blockquote{color:#777}blockquote em{font-style:normal}pre{padding:9px;background:#f9f9f9;border:1px solid #ccc}code{padding:0 3px;background:#eee}pre code{background:transparent}table{width:100%;border-collapse:separate;border-top:1px solid #ccc;border-left:1px solid #ccc}caption{font-size:.9em;font-style:italic;text-align:right}td,th{padding:3px 6px;border-bottom:1px solid #ccc;border-right:1px solid #ccc}th{background:#eee}.drop-cap{float:left;margin:3px 3px 0 0;font:normal normal normal 47px/35px "Warnock Pro","Goudy Old Style",Palatino,"Book Antiqua",Georgia,serif;color:#333}.note{padding:6px 9px;background:#eee;border:1px solid #ccc}.warning,.alert{padding:6px 9px;background:#fffbbc;border:1px solid #E6DB55}.error{padding:6px 9px;background:#ffebe8;border:1px solid #C00}.download{padding:6px 9px;background:#e7f7d3;border:1px solid #6c3}.breadcrumb{margin:0 0 30px 0;font-size:.9em;font-style:italic;color:#666}.breadcrumb a{color:#111;text-decoration:none}.breadcrumb a:hover{color:#d54e21;text-decoration:underline}.hentry img{max-width:610px;height:auto;padding:4px;border:1px solid #ccc}.no-widgets .hentry img{max-width:950px}img.alignleft,img.alignright{margin-bottom:10px}.thumbnail{float:left;width:100px;height:100px;margin:5px 15px 10px 0}img.wp-smiley{max-width:12px;padding:0;background:transparent;border:none}.wp-caption{max-width:616px;margin-top:6px;padding:6px 1px 3px 1px;border:1px solid #ccc;text-align:center}.wp-caption .wp-caption-text{margin:0;padding:0 5px;text-align:right;font-size:.9em;font-style:italic;color:#666}.wp-caption img{max-width:604px;margin:0 auto;padding:0;border:1px solid #666}.no-widgets .wp-caption{max-width:956px}.no-widgets .wp-caption img{max-width:946px}.gallery img{border:1px solid #ccc}.avatar{float:left;width:100px;height:100px;margin:5px 15px 0 0;padding:4px;border:1px solid #ccc}#header{margin:0 0 40px 0}#site-title{font:normal normal bold 35px/35px Arial,Verdana,sans-serif;margin:0 0 10px 0}#site-title a{color:#000}#site-description{font:normal normal normal 16px/20px Georgia,Times,"Times New Roman",serif;margin:0;color:#666}#primary-menu,#navigation{overflow:visible;height:34px;margin:0 0 60px 0;z-index:100}#primary-menu li,#page-nav li{margin-right:15px}#primary-menu li li,#page-nav li li{margin-right:0}#primary-menu li a,#page-nav li a{padding:8px 15px 8px 15px;color:#111;background:#fff;border:1px solid #ccc}#primary-menu li:hover ul,#primary-menu li.sfHover ul,#page-nav li:hover ul,#page-nav li.sfHover ul{top:32px}#primary-menu li li a,#page-nav li li a{border-top:none;margin-right:0}#primary-menu li ul,#page-nav li ul{background:#fff;border-top:1px solid #ccc}#primary-menu li li:hover ul,#primary-menu li li.sfHover ul,#primary-menu li li li:hover ul,#primary-menu li li li.sfHover ul,#page-nav li li:hover ul,#page-nav li li.sfHover ul,#page-nav li li li:hover ul,#page-nav li li li.sfHover ul {top:-1px}#primary-menu li li li,#page-nav li li li{margin-left:-1px}#container{margin-bottom:21px}.content{margin:0 0 21px 0}.no-widgets .content,.page-template-no-widgets .content{width:960px}.hentry{overflow:hidden;margin:0 0 40px 0}.singular .hentry{margin:0}.loop-meta{overflow:hidden;margin:0 0 40px 0}.loop-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif}.entry-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif;margin:0 0 12px 0}.archive .entry-title,.search .entry-title{font-size:21px;margin:0 0 5px 0}.singular-page .entry-title,.singular-attachment .entry-title{margin:0 0 21px 0}.entry-title a{color:#000}.byline{margin:0 0 30px 0;font-style:italic;color:#666}.archive .byline,.search .byline{margin:0 0 5px 0}.entry-content{margin:0 0 10px 0}.entry-meta{clear:both;font-style:italic;color:#666}p.page-links,.comment-pagination{clear:both}.comment-pagination{margin-bottom:21px}p.page-links a,.comment-pagination .page-numbers{margin:0 3px;padding:3px 9px 3px 9px;border:1px solid #ccc}.navigation-links{margin-bottom:21px;font-style:italic}.navigation-links .previous{float:left;max-width:50%}.navigation-links .next{float:right;max-width:50%;text-align:right}.navigation-attachment{overflow:hidden}.widget{overflow:hidden;margin:0 0 15px 0;color:#464646}.widget a{color:#464646;text-decoration:underline}.widget a:hover{color:#d54e21;text-decoration:none}.widget-title{font-size:18px;color:#111}#utility-before-content,#utility-after-content,#utility-after-page,#utility-after-single{margin:0 0 21px 0;padding:20px 20px 0 20px;border:1px solid #ccc}#comments-template{clear:both}.comments-header{font-size:1.2em}.comments-closed{font-style:italic}ol.comment-list,ol.comment-list ol.children{list-style:none;margin:0 0 21px 0}li.comment,li li li.comment,li li li li li.comment,li li li li li li li.comment,li li li li li li li li li.comment,li.pingback,li.trackback{overflow:hidden;margin:0 0 21px 0;padding:21px 21px 0 21px;background:#fff;border:1px solid #ccc}li li.comment,li li li li.comment,li li li li li li.comment,li li li li li li li li.comment,li li li li li li li li li li.comment{background:#f9f9f9}#comments-template .avatar{width:40px;height:40px;float:left;margin-right:15px;padding:0;border:1px solid #666}.comment-meta{margin:10px 0 21px 0;font-size:13px;color:#666}.comment-author{font-size:15px;color:#000}.comment-reply-link,.permalink,.comment-edit-link{font-style:italic;color:#666}.comment-text{clear:left;margin:0 15px}.text-input{display:block;padding:3px 6px;width:97%}#comments-template label{font-size:.9em}textarea{width:98%}#submit{display:inline-block;margin-right:15px;padding:7px 15px 8px 15px;background:#fff;border:1px solid #ccc}#submit:hover{cursor:pointer;background:#f9f9f9}#footer-container{clear:both;margin:0 0 21px 0}#subsidiary{margin:0 0 21px 0}#footer{font-style:italic;color:#444}#footer .copyright{display:inline;float:left;margin-right:9px}.content{float:left;width:620px}#primary{float:right;width:300px}#secondary{clear:right;float:right;width:300px} \ No newline at end of file +html,body,div,span,object,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;vertical-align:baseline;outline:none;font-size:100%;background:transparent;border:none;text-decoration:none}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}b,i,hr,u,center,menu,layer,s,strike,font,xmp{margin:0;padding:0;vertical-align:baseline;outline:none;font-size:100%;font-weight:normal;font-style:normal;background:transparent;border:none;text-decoration:none}body{line-height:24px;font-family:Georgia,Times,"Times New Roman",serif;color:#333;background:#fff}h1,h2,h3,h4,h5,h6{font-style:normal;font-weight:normal;margin:0 0 21px 0}h1{font-size:1.8em}h2{font-size:1.7em}h3{font-size:1.55em}h4{font-size:1.4em}h5{font-size:1.25em}h6{font-size:1.1em}p{margin:0 0 21px 0}ol,ul{list-style:none}ul{list-style:disc;margin:0 0 21px 2.5em}ol{list-style-type:decimal;margin:0 0 21px 3em}ol ol{list-style:upper-roman}ol ol ol{list-style:lower-roman}ol ol ol ol{list-style:upper-alpha}ol ol ol ol ol{list-style:lower-alpha}ul ul,ol ol,ul ol,ol ul{margin-bottom:0}dl{margin:0 0 18px 3px}dl dt{font-weight:bold;margin:12px 0 0 0}dl dd{margin:6px 0 0 1.5em}strong{font-weight:bold}strong strong{font-weight:normal}em,cite{font-style:italic}em em,cite cite{font-style:normal}abbr{cursor:help}acronym{text-transform:uppercase;border-bottom:1px dashed #666;cursor:help}big{font-size:120%}small,sup,sub{font-size:80%}sup{vertical-align:baseline;position:relative;bottom:0.3em}sub{vertical-align:baseline;position:relative;top:0.3em}address{font-style:italic;margin:0 0 21px 0}li address,dd address{margin:0}blockquote{margin:0 2.5em;font-style:normal}blockquote em,blockquote cite{font-style:italic}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}a{cursor:pointer}a img{border:none}pre{overflow:auto;font:.9em Monaco,monospace,Courier,"Courier New";line-height:21px;margin-bottom:21px;padding:9px}code{font:.9em Monaco,monospace,Courier,"Courier New"}pre code{font-size:1em}ins,dfn{font-style:italic;text-decoration:none;border-bottom:1px solid #666}del,s,strike{text-decoration:line-through}object{margin-bottom:21px}input,textarea{font-size:1em;padding:3px}input[type="submit"]{cursor:pointer}:focus{outline:none}form label{cursor:pointer}option{padding:1px 3px}table{border-collapse:collapse;border-spacing:0;margin-bottom:21px}th,td{text-align:left}hr{height:1px;margin-bottom:21px;background:#333}img.wp-smiley{max-height:12px;margin:0;padding:0;border:none}.gallery{display:block;text-align:center;margin-bottom:21px}.alignleft,.left{float:left;margin-right:15px}.alignright,.right{float:right;margin-left:15px}.aligncenter,.center{display:block;margin:0 auto 21px auto}.alignnone,.block{clear:both;margin:0 0 21px 0}.clear{clear:both}img.alignleft,img.alignright{display:inline}blockquote.alignleft,blockquote.alignright{width:33%}#body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:left;width:620px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{position:relative;float:right;width:300px}#secondary{position:relative;clear:right;float:right;width:300px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both;overflow:hidden}div.menu ul{margin:0;padding:0;list-style:none;line-height:1.0}div.menu ul ul{position:absolute;top:-999em;width:10em}div.menu ul ul li{width:100%}div.menu li:hover{visibility:inherit}div.menu li{float:left;position:relative}div.menu a{display:block;position:relative}div.menu li:hover ul,li.sfHover ul{left:0;top:2em;z-index:99}div.menu li:hover li ul,li.sfHover li ul{top:-999em}div.menu li li:hover ul,li li.sfHover ul{left:10em;top:0}div.menu li li:hover li ul,li li.sfHover li ul{top:-999em}div.menu li li li:hover ul,li li li.sfHover ul{left:10em;top:0}.gallery{display:block;clear:both;overflow:hidden;margin:0 auto}.gallery .gallery-row{display:block;clear:both;overflow:hidden;margin:0}.gallery .gallery-item{overflow:hidden;float:left;margin:0;text-align:center;list-style:none;padding:0}.gallery .gallery-item .gallery-icon img{width:auto;max-width:89%;height:auto;padding:1%;margin:0 auto}.gallery-caption{margin-left:0}.gallery .col-0{width:100%}.gallery .col-1{width:100%}.gallery .col-2{width:50%}.gallery .col-3{width:33.33%}.gallery .col-4{width:25%}.gallery .col-5{width:20%}.gallery .col-6{width:16.66%}.gallery .col-7{width:14.28%}.gallery .col-8{width:12.5%}.gallery .col-9{width:11.11%}.gallery .col-10{width:10%}.gallery .col-11{width:9.09%}.gallery .col-12{width:8.33%}.gallery .col-13{width:7.69%}.gallery .col-14{width:7.14%}.gallery .col-15{width:6.66%}.gallery .col-16{width:6.25%}.gallery .col-17{width:5.88%}.gallery .col-18{width:5.55%}.gallery .col-19{width:5.26%}.gallery .col-20{width:5%}.gallery .col-21{width:4.76%}.gallery .col-22{width:4.54%}.gallery .col-23{width:4.34%}.gallery .col-24{width:4.16%}.gallery .col-25{width:4%}.gallery .col-26{width:3.84%}.gallery .col-27{width:3.7%}.gallery .col-28{width:3.57%}.gallery .col-29{width:3.44%}.gallery .col-30{width:3.33%}.sticky,.bypostauthor{}body{font:normal normal normal 15px/21px Georgia,Times,"Times New Roman",serif;color:#000}#body-container{margin:90px auto 21px auto}a{color:#21759b;text-decoration:none}a:visited{color:#551a8b}a:hover,a:active{color:#d54e21;text-decoration:underline}h1,h2,h3,h4,h5,h6{font-family:Arial,Verdana,sans-serif;color:#000;font-weight:bold}h1{font-size:24px}h2{font-size:21px}h3{font-size:19px}h4{font-size:17px}h5{font-size:15px}h6{font-size:13px}ul{list-style:square}blockquote{font-style:italic;color:#555}blockquote blockquote{color:#777}blockquote em{font-style:normal}pre{padding:9px;background:#f9f9f9;border:1px solid #ccc}code{padding:0 3px;background:#eee}pre code{background:transparent}table{width:100%;border-collapse:separate;border-top:1px solid #ccc;border-left:1px solid #ccc}caption{font-size:.9em;font-style:italic;text-align:right}td,th{padding:3px 6px;border-bottom:1px solid #ccc;border-right:1px solid #ccc}th{background:#eee}.drop-cap{float:left;margin:3px 3px 0 0;font:normal normal normal 47px/35px "Warnock Pro","Goudy Old Style",Palatino,"Book Antiqua",Georgia,serif;color:#333}.note{padding:6px 9px;background:#eee;border:1px solid #ccc}.warning,.alert{padding:6px 9px;background:#fffbbc;border:1px solid #E6DB55}.error{padding:6px 9px;background:#ffebe8;border:1px solid #C00}.download{padding:6px 9px;background:#e7f7d3;border:1px solid #6c3}.breadcrumbs{margin:0 0 30px 0;font-size:.9em;font-style:italic;color:#666}.breadcrumbs a{color:#111;text-decoration:none}.breadcrumbs a:hover{color:#d54e21;text-decoration:underline}.hentry img{max-width:610px;height:auto;padding:4px;border:1px solid #ccc}.no-widgets .hentry img{max-width:950px}img.alignleft,img.alignright{margin-bottom:10px}.thumbnail{float:left;width:100px;height:100px;margin:5px 15px 10px 0}img.wp-smiley{max-width:12px;padding:0;background:transparent;border:none}.wp-caption{max-width:616px;margin-top:6px;padding:6px 1px 3px 1px;border:1px solid #ccc;text-align:center}.wp-caption .wp-caption-text{margin:0;padding:0 5px;text-align:right;font-size:.9em;font-style:italic;color:#666}.wp-caption img{max-width:604px;margin:0 auto;padding:0;border:1px solid #666}.no-widgets .wp-caption{max-width:956px}.no-widgets .wp-caption img{max-width:946px}.gallery img{border:1px solid #ccc}.avatar{float:left;width:100px;height:100px;margin:5px 15px 0 0;padding:4px;border:1px solid #ccc}#header{margin:0 0 40px 0}#site-title{font:normal normal bold 35px/35px Arial,Verdana,sans-serif;margin:0 0 10px 0}#site-title a{color:#000}#site-description{font:normal normal normal 16px/20px Georgia,Times,"Times New Roman",serif;margin:0;color:#666}#primary-menu,#navigation{overflow:visible;height:34px;margin:0 0 60px 0;z-index:100}#primary-menu li,#page-nav li{margin-right:15px}#primary-menu li li,#page-nav li li{margin-right:0}#primary-menu li a,#page-nav li a{padding:8px 15px 8px 15px;color:#111;background:#fff;border:1px solid #ccc}#primary-menu li:hover ul,#primary-menu li.sfHover ul,#page-nav li:hover ul,#page-nav li.sfHover ul{top:32px}#primary-menu li li a,#page-nav li li a{border-top:none;margin-right:0}#primary-menu li ul,#page-nav li ul{background:#fff;border-top:1px solid #ccc}#primary-menu li li:hover ul,#primary-menu li li.sfHover ul,#primary-menu li li li:hover ul,#primary-menu li li li.sfHover ul,#page-nav li li:hover ul,#page-nav li li.sfHover ul,#page-nav li li li:hover ul,#page-nav li li li.sfHover ul {top:-1px}#primary-menu li li li,#page-nav li li li{margin-left:-1px}#container{margin-bottom:21px}.content{margin:0 0 21px 0}.no-widgets .content,.page-template-no-widgets .content{width:960px}.hentry{overflow:hidden;margin:0 0 40px 0}.singular .hentry{margin:0}.loop-meta{overflow:hidden;margin:0 0 40px 0}.loop-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif}.entry-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif;margin:0 0 12px 0}.archive .entry-title,.search .entry-title{font-size:21px;margin:0 0 5px 0}.singular-page .entry-title,.singular-attachment .entry-title{margin:0 0 21px 0}.entry-title a{color:#000}.byline{margin:0 0 30px 0;font-style:italic;color:#666}.archive .byline,.search .byline{margin:0 0 5px 0}.entry-content{margin:0 0 10px 0}.entry-meta{clear:both;font-style:italic;color:#666}p.page-links,.comment-pagination{clear:both}.comment-pagination{margin-bottom:21px}p.page-links a,.comment-pagination .page-numbers{margin:0 3px;padding:3px 9px 3px 9px;border:1px solid #ccc}.navigation-links{margin-bottom:21px;font-style:italic}.navigation-links .previous{float:left;max-width:50%}.navigation-links .next{float:right;max-width:50%;text-align:right}.navigation-attachment{overflow:hidden}.widget{overflow:hidden;margin:0 0 15px 0;color:#464646}.widget a{color:#464646;text-decoration:underline}.widget a:hover{color:#d54e21;text-decoration:none}.widget-title{font-size:18px;color:#111}#utility-before-content,#utility-after-content,#utility-after-page,#utility-after-single{margin:0 0 21px 0;padding:20px 20px 0 20px;border:1px solid #ccc}#comments-template{clear:both}.comments-header{font-size:1.2em}.comments-closed{font-style:italic}ol.comment-list,ol.comment-list ol.children{list-style:none;margin:0 0 21px 0}li.comment,li li li.comment,li li li li li.comment,li li li li li li li.comment,li li li li li li li li li.comment,li.pingback,li.trackback{overflow:hidden;margin:0 0 21px 0;padding:21px 21px 0 21px;background:#fff;border:1px solid #ccc}li li.comment,li li li li.comment,li li li li li li.comment,li li li li li li li li.comment,li li li li li li li li li li.comment{background:#f9f9f9}#comments-template .avatar{width:40px;height:40px;float:left;margin-right:15px;padding:0;border:1px solid #666}.comment-meta{margin:10px 0 21px 0;font-size:13px;color:#666}.comment-author{font-size:15px;color:#000}.comment-reply-link,.permalink,.comment-edit-link{font-style:italic;color:#666}.comment-text{clear:left;margin:0 15px}.text-input{display:block;padding:3px 6px;width:97%}#comments-template label{font-size:.9em}textarea{width:98%}#submit{display:inline-block;margin-right:15px;padding:7px 15px 8px 15px;background:#fff;border:1px solid #ccc}#submit:hover{cursor:pointer;background:#f9f9f9}#footer-container{clear:both;margin:0 0 21px 0}#subsidiary{margin:0 0 21px 0}#footer{font-style:italic;color:#444}#footer .copyright{display:inline;float:left;margin-right:9px}.content{float:left;width:620px}#primary{float:right;width:300px}#secondary{clear:right;float:right;width:300px} \ No newline at end of file diff --git a/wp-content/themes/hybrid/style.dev.css b/wp-content/themes/hybrid/style.dev.css index ea8746dde26b9267d901337da91a592cd246640d..6591c59ffe88f75b99536ddf782f5d85e9e2ddce 100644 --- a/wp-content/themes/hybrid/style.dev.css +++ b/wp-content/themes/hybrid/style.dev.css @@ -147,17 +147,17 @@ th { } /* Breadcrumb */ -.breadcrumb { +.breadcrumbs { margin: 0 0 30px 0; font-size: .9em; font-style: italic; color: #666; } -.breadcrumb a { +.breadcrumbs a { color: #111; text-decoration: none; } -.breadcrumb a:hover { +.breadcrumbs a:hover { color: #d54e21; text-decoration: underline; }