|
|
@@ -12,10 +12,10 @@ sidebars, comments, ect.
|
|
|
|
|
|
/*
|
|
|
1. library/bones.php
|
|
|
- - head cleanup (remove rsd, uri links, junk css, ect)
|
|
|
+ - head cleanup (remove rsd, uri links, junk css, ect)
|
|
|
- enqueueing scripts & styles
|
|
|
- theme support functions
|
|
|
- - custom menu output & fallbacks
|
|
|
+ - custom menu output & fallbacks
|
|
|
- related post function
|
|
|
- page-navi function
|
|
|
- removing <p> from around images
|
|
|
@@ -26,22 +26,22 @@ sidebars, comments, ect.
|
|
|
require_once('library/bones.php'); // if you remove this, bones will break
|
|
|
/*
|
|
|
2. library/custom-post-type.php
|
|
|
- - an example custom post type
|
|
|
- - example custom taxonomy (like categories)
|
|
|
- - example custom taxonomy (like tags)
|
|
|
+ - an example custom post type
|
|
|
+ - example custom taxonomy (like categories)
|
|
|
+ - example custom taxonomy (like tags)
|
|
|
*/
|
|
|
require_once('library/custom-post-type.php'); // you can disable this if you like
|
|
|
/*
|
|
|
3. library/admin.php
|
|
|
- - removing some default WordPress dashboard widgets
|
|
|
- - an example custom dashboard widget
|
|
|
- - adding custom login css
|
|
|
- - changing text in footer of admin
|
|
|
+ - removing some default WordPress dashboard widgets
|
|
|
+ - an example custom dashboard widget
|
|
|
+ - adding custom login css
|
|
|
+ - changing text in footer of admin
|
|
|
*/
|
|
|
// require_once('library/admin.php'); // this comes turned off by default
|
|
|
/*
|
|
|
4. library/translation/translation.php
|
|
|
- - adding support for other languages
|
|
|
+ - adding support for other languages
|
|
|
*/
|
|
|
// require_once('library/translation/translation.php'); // this comes turned off by default
|
|
|
|
|
|
@@ -74,40 +74,40 @@ you like. Enjoy!
|
|
|
|
|
|
// Sidebars & Widgetizes Areas
|
|
|
function bones_register_sidebars() {
|
|
|
- register_sidebar(array(
|
|
|
- 'id' => 'sidebar1',
|
|
|
- 'name' => __('Sidebar 1', 'bonestheme'),
|
|
|
- 'description' => __('The first (primary) sidebar.', 'bonestheme'),
|
|
|
- 'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
|
|
- 'after_widget' => '</div>',
|
|
|
- 'before_title' => '<h4 class="widgettitle">',
|
|
|
- 'after_title' => '</h4>',
|
|
|
- ));
|
|
|
-
|
|
|
- /*
|
|
|
- to add more sidebars or widgetized areas, just copy
|
|
|
- and edit the above sidebar code. In order to call
|
|
|
- your new sidebar just use the following code:
|
|
|
-
|
|
|
- Just change the name to whatever your new
|
|
|
- sidebar's id is, for example:
|
|
|
-
|
|
|
- register_sidebar(array(
|
|
|
- 'id' => 'sidebar2',
|
|
|
- 'name' => __('Sidebar 2', 'bonestheme'),
|
|
|
- 'description' => __('The second (secondary) sidebar.', 'bonestheme'),
|
|
|
- 'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
|
|
- 'after_widget' => '</div>',
|
|
|
- 'before_title' => '<h4 class="widgettitle">',
|
|
|
- 'after_title' => '</h4>',
|
|
|
- ));
|
|
|
-
|
|
|
- To call the sidebar in your template, you can just copy
|
|
|
- the sidebar.php file and rename it to your sidebar's name.
|
|
|
- So using the above example, it would be:
|
|
|
- sidebar-sidebar2.php
|
|
|
-
|
|
|
- */
|
|
|
+ register_sidebar(array(
|
|
|
+ 'id' => 'sidebar1',
|
|
|
+ 'name' => __('Sidebar 1', 'bonestheme'),
|
|
|
+ 'description' => __('The first (primary) sidebar.', 'bonestheme'),
|
|
|
+ 'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
|
|
+ 'after_widget' => '</div>',
|
|
|
+ 'before_title' => '<h4 class="widgettitle">',
|
|
|
+ 'after_title' => '</h4>',
|
|
|
+ ));
|
|
|
+
|
|
|
+ /*
|
|
|
+ to add more sidebars or widgetized areas, just copy
|
|
|
+ and edit the above sidebar code. In order to call
|
|
|
+ your new sidebar just use the following code:
|
|
|
+
|
|
|
+ Just change the name to whatever your new
|
|
|
+ sidebar's id is, for example:
|
|
|
+
|
|
|
+ register_sidebar(array(
|
|
|
+ 'id' => 'sidebar2',
|
|
|
+ 'name' => __('Sidebar 2', 'bonestheme'),
|
|
|
+ 'description' => __('The second (secondary) sidebar.', 'bonestheme'),
|
|
|
+ 'before_widget' => '<div id="%1$s" class="widget %2$s">',
|
|
|
+ 'after_widget' => '</div>',
|
|
|
+ 'before_title' => '<h4 class="widgettitle">',
|
|
|
+ 'after_title' => '</h4>',
|
|
|
+ ));
|
|
|
+
|
|
|
+ To call the sidebar in your template, you can just copy
|
|
|
+ the sidebar.php file and rename it to your sidebar's name.
|
|
|
+ So using the above example, it would be:
|
|
|
+ sidebar-sidebar2.php
|
|
|
+
|
|
|
+ */
|
|
|
} // don't remove this bracket!
|
|
|
|
|
|
/************* COMMENT LAYOUT *********************/
|
|
|
@@ -118,34 +118,34 @@ function bones_comments($comment, $args, $depth) {
|
|
|
<li <?php comment_class(); ?>>
|
|
|
<article id="comment-<?php comment_ID(); ?>" class="clearfix">
|
|
|
<header class="comment-author vcard">
|
|
|
- <?php
|
|
|
- /*
|
|
|
- this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:
|
|
|
- echo get_avatar($comment,$size='32',$default='<path_to_url>' );
|
|
|
- */
|
|
|
- ?>
|
|
|
- <!-- custom gravatar call -->
|
|
|
- <?php
|
|
|
- // create variable
|
|
|
- $bgauthemail = get_comment_author_email();
|
|
|
- ?>
|
|
|
- <img data-gravatar="http://www.gravatar.com/avatar/<?php echo md5($bgauthemail); ?>?s=32" class="load-gravatar avatar avatar-48 photo" height="32" width="32" src="<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif" />
|
|
|
- <!-- end custom gravatar call -->
|
|
|
+ <?php
|
|
|
+ /*
|
|
|
+ this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:
|
|
|
+ echo get_avatar($comment,$size='32',$default='<path_to_url>' );
|
|
|
+ */
|
|
|
+ ?>
|
|
|
+ <!-- custom gravatar call -->
|
|
|
+ <?php
|
|
|
+ // create variable
|
|
|
+ $bgauthemail = get_comment_author_email();
|
|
|
+ ?>
|
|
|
+ <img data-gravatar="http://www.gravatar.com/avatar/<?php echo md5($bgauthemail); ?>?s=32" class="load-gravatar avatar avatar-48 photo" height="32" width="32" src="<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif" />
|
|
|
+ <!-- end custom gravatar call -->
|
|
|
<?php printf(__('<cite class="fn">%s</cite>', 'bonestheme'), get_comment_author_link()) ?>
|
|
|
<time datetime="<?php echo comment_time('Y-m-j'); ?>"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php comment_time(__('F jS, Y', 'bonestheme')); ?> </a></time>
|
|
|
<?php edit_comment_link(__('(Edit)', 'bonestheme'),' ','') ?>
|
|
|
</header>
|
|
|
<?php if ($comment->comment_approved == '0') : ?>
|
|
|
- <div class="alert alert-info">
|
|
|
- <p><?php _e('Your comment is awaiting moderation.', 'bonestheme') ?></p>
|
|
|
- </div>
|
|
|
+ <div class="alert alert-info">
|
|
|
+ <p><?php _e('Your comment is awaiting moderation.', 'bonestheme') ?></p>
|
|
|
+ </div>
|
|
|
<?php endif; ?>
|
|
|
<section class="comment_content clearfix">
|
|
|
<?php comment_text() ?>
|
|
|
</section>
|
|
|
<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
|
|
|
</article>
|
|
|
- <!-- </li> is added by WordPress automatically -->
|
|
|
+ <!-- </li> is added by WordPress automatically -->
|
|
|
<?php
|
|
|
} // don't remove this bracket!
|
|
|
|
|
|
@@ -153,12 +153,12 @@ function bones_comments($comment, $args, $depth) {
|
|
|
|
|
|
// Search Form
|
|
|
function bones_wpsearch($form) {
|
|
|
- $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
|
|
|
- <label class="screen-reader-text" for="s">' . __('Search for:', 'bonestheme') . '</label>
|
|
|
- <input type="text" value="' . get_search_query() . '" name="s" id="s" placeholder="'.esc_attr__('Search the Site...','bonestheme').'" />
|
|
|
- <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
|
|
|
- </form>';
|
|
|
- return $form;
|
|
|
+ $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
|
|
|
+ <label class="screen-reader-text" for="s">' . __('Search for:', 'bonestheme') . '</label>
|
|
|
+ <input type="text" value="' . get_search_query() . '" name="s" id="s" placeholder="'.esc_attr__('Search the Site...','bonestheme').'" />
|
|
|
+ <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
|
|
|
+ </form>';
|
|
|
+ return $form;
|
|
|
} // don't remove this bracket!
|
|
|
|
|
|
|