Browse Source

merging 1.7 functions into master

Eddie Machado 12 năm trước cách đây
mục cha
commit
3b2414e547
4 tập tin đã thay đổi với 233 bổ sung344 xóa
  1. 39 110
      comments.php
  2. 108 81
      functions.php
  3. 8 1
      library/admin.php
  4. 78 152
      library/bones.php

+ 39 - 110
comments.php

@@ -3,119 +3,48 @@
 The comments page for Bones
 */
 
-// Do not delete these lines
-	if ( ! empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename( $_SERVER['SCRIPT_FILENAME'] ) )
-		die ('Please do not load this page directly. Thanks!');
+// don't load it if you can't comment
+if ( post_password_required() ) {
+  return;
+}
 
-	if ( post_password_required() ) { ?>
-		<div class="alert alert-help">
-			<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'bonestheme' ); ?></p>
-		</div>
-	<?php
-		return;
-	}
 ?>
 
 <?php // You can start editing here. ?>
 
-<?php if ( have_comments() ) : ?>
-	<h3 id="comments" class="h2"><?php comments_number( __( '<span>No</span> Responses', 'bonestheme' ), __( '<span>One</span> Response', 'bonestheme' ), _n( '<span>%</span> Response', '<span>%</span> Responses', get_comments_number(), 'bonestheme' ) );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
+  <?php if ( have_comments() ) : ?>
+
+    <h3 id="comments-title" class="h2"><?php comments_number( __( '<span>No</span> Comments', 'bonestheme' ), __( '<span>One</span> Comment', 'bonestheme' ), _n( '<span>%</span> Comments', '<span>%</span> Comments', get_comments_number(), 'bonestheme' ) );?></h3>
+
+    <section class="commentlist">
+      <?php
+        wp_list_comments( array(
+          'style'             => 'div',
+          'short_ping'        => true,
+          'avatar_size'       => 40,
+          'callback'          => bones_comments,
+          'type'              => 'all',
+          'reply_text'        => 'Reply',
+          'page'              => '',
+          'per_page'          => '',
+          'reverse_top_level' => null,
+          'reverse_children'  => ''
+        ) );
+      ?>
+    </section>
+
+    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
+    	<nav class="navigation comment-navigation" role="navigation">
+      	<div class="comment-nav-prev"><?php previous_comments_link( __( '&larr; Previous Comments', 'bonestheme' ) ); ?></div>
+      	<div class="comment-nav-next"><?php next_comments_link( __( 'More Comments &rarr;', 'bonestheme' ) ); ?></div>
+    	</nav>
+    <?php endif; ?>
+
+    <?php if ( ! comments_open() ) : ?>
+    	<p class="no-comments"><?php _e( 'Comments are closed.' , 'bonestheme' ); ?></p>
+    <?php endif; ?>
+
+  <?php endif; ?>
+
+  <?php comment_form(); ?>
 
-	<nav id="comment-nav">
-		<ul class="clearfix">
-				<li><?php previous_comments_link() ?></li>
-				<li><?php next_comments_link() ?></li>
-		</ul>
-	</nav>
-
-	<ol class="commentlist">
-		<?php wp_list_comments( 'type=comment&callback=bones_comments' ); ?>
-	</ol>
-
-	<nav id="comment-nav">
-		<ul class="clearfix">
-				<li><?php previous_comments_link() ?></li>
-				<li><?php next_comments_link() ?></li>
-		</ul>
-	</nav>
-
-	<?php else : // this is displayed if there are no comments so far ?>
-
-	<?php if ( comments_open() ) : ?>
-			<?php // If comments are open, but there are no comments. ?>
-
-	<?php else : // comments are closed ?>
-
-	<?php // If comments are closed. ?>
-	<!--p class="nocomments"><?php _e( 'Comments are closed.', 'bonestheme' ); ?></p-->
-
-	<?php endif; ?>
-
-<?php endif; ?>
-
-
-<?php if ( comments_open() ) : ?>
-
-<section id="respond" class="respond-form">
-
-	<h3 id="comment-form-title" class="h2"><?php comment_form_title( __( 'Leave a Reply', 'bonestheme' ), __( 'Leave a Reply to %s', 'bonestheme' )); ?></h3>
-
-	<div id="cancel-comment-reply">
-		<p class="small"><?php cancel_comment_reply_link(); ?></p>
-	</div>
-
-	<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
-		<div class="alert alert-help">
-			<p><?php printf( __( 'You must be %1$slogged in%2$s to post a comment.', 'bonestheme' ), '<a href="<?php echo wp_login_url( get_permalink() ); ?>">', '</a>' ); ?></p>
-		</div>
-	<?php else : ?>
-
-	<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
-
-	<?php if ( is_user_logged_in() ) : ?>
-
-	<p class="comments-logged-in-as"><?php _e( 'Logged in as', 'bonestheme' ); ?> <a href="<?php echo get_option( 'siteurl' ); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="<?php _e( 'Log out of this account', 'bonestheme' ); ?>"><?php _e( 'Log out', 'bonestheme' ); ?> <?php _e( '&raquo;', 'bonestheme' ); ?></a></p>
-
-	<?php else : ?>
-
-	<ul id="comment-form-elements" class="clearfix">
-
-		<li>
-			<label for="author"><?php _e( 'Name', 'bonestheme' ); ?> <?php if ($req) _e( '(required)'); ?></label>
-			<input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" placeholder="<?php _e( 'Your Name*', 'bonestheme' ); ?>" <?php if ($req) echo "aria-required='true'"; ?> />
-		</li>
-
-		<li>
-			<label for="email"><?php _e( 'Mail', 'bonestheme' ); ?> <?php if ($req) _e( '(required)'); ?></label>
-			<input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" placeholder="<?php _e( 'Your E-Mail*', 'bonestheme' ); ?>" <?php if ($req) echo "aria-required='true'"; ?> />
-			<small><?php _e("(will not be published)", 'bonestheme' ); ?></small>
-		</li>
-
-		<li>
-			<label for="url"><?php _e( 'Website', 'bonestheme' ); ?></label>
-			<input type="url" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" placeholder="<?php _e( 'Got a website?', 'bonestheme' ); ?>" />
-		</li>
-
-	</ul>
-
-	<?php endif; ?>
-
-	<p><textarea name="comment" id="comment" placeholder="<?php _e( 'Your Comment here...', 'bonestheme' ); ?>"></textarea></p>
-
-	<p>
-		<input name="submit" type="submit" id="submit" class="button" value="<?php _e( 'Submit', 'bonestheme' ); ?>" />
-		<?php comment_id_fields(); ?>
-	</p>
-
-	<div class="alert alert-info">
-		<p id="allowed_tags" class="small"><strong>XHTML:</strong> <?php _e( 'You can use these tags', 'bonestheme' ); ?>: <code><?php echo allowed_tags(); ?></code></p>
-	</div>
-
-	<?php do_action( 'comment_form', $post->ID ); ?>
-
-	</form>
-
-	<?php endif; // If registration required and not logged in ?>
-</section>
-
-<?php endif; // if you delete this the sky will fall on your head ?>

+ 108 - 81
functions.php

@@ -8,42 +8,64 @@ just edit things like thumbnail sizes, header images,
 sidebars, comments, ect.
 */
 
-/************* INCLUDE NEEDED FILES ***************/
+// LOAD BONES CORE (if you remove this, the theme will break)
+require_once( 'library/bones.php' );
 
-/*
-1. library/bones.php
-	- head cleanup (remove rsd, uri links, junk css, ect)
-	- enqueueing scripts & styles
-	- theme support functions
-	- custom menu output & fallbacks
-	- related post function
-	- page-navi function
-	- removing <p> from around images
-	- customizing the post excerpt
-	- custom google+ integration
-	- adding custom fields to user profiles
-*/
-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)
-*/
-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
-*/
-// require_once( 'library/admin.php' ); // this comes turned off by default
-/*
-4. library/translation/translation.php
-	- adding support for other languages
-*/
-// require_once( 'library/translation/translation.php' ); // this comes turned off by default
+// USE THIS TEMPLATE TO CREATE CUSTOM POST TYPES EASILY
+require_once( 'library/custom-post-type.php' );
+
+// CUSTOMIZE THE WORDPRESS ADMIN (off by default)
+// require_once( 'library/admin.php' );
+
+/*********************
+LAUNCH BONES
+Let's get everything up and running.
+*********************/
+
+function bones_ahoy() {
+
+  // let's get language support going, if you need it
+  load_theme_textdomain( 'bonestheme', get_template_directory() . '/library/translation' );
+
+  // launching operation cleanup
+  add_action( 'init', 'bones_head_cleanup' );
+  // A better title
+  add_filter( 'wp_title', 'rw_title', 10, 3 );
+  // remove WP version from RSS
+  add_filter( 'the_generator', 'bones_rss_version' );
+  // remove pesky injected css for recent comments widget
+  add_filter( 'wp_head', 'bones_remove_wp_widget_recent_comments_style', 1 );
+  // clean up comment styles in the head
+  add_action( 'wp_head', 'bones_remove_recent_comments_style', 1 );
+  // clean up gallery output in wp
+  add_filter( 'gallery_style', 'bones_gallery_style' );
+
+  // enqueue base scripts and styles
+  add_action( 'wp_enqueue_scripts', 'bones_scripts_and_styles', 999 );
+  // ie conditional wrapper
+
+  // launching this stuff after theme setup
+  bones_theme_support();
+
+  // adding sidebars to Wordpress (these are created in functions.php)
+  add_action( 'widgets_init', 'bones_register_sidebars' );
+
+  // cleaning up random code around images
+  add_filter( 'the_content', 'bones_filter_ptags_on_images' );
+  // cleaning up excerpt
+  add_filter( 'excerpt_more', 'bones_excerpt_more' );
+
+} /* end bones ahoy */
+
+// let's get this party started
+add_action( 'after_setup_theme', 'bones_ahoy' );
+
+
+/************* OEMBED SIZE OPTIONS *************/
+
+if ( ! isset( $content_width ) ) {
+	$content_width = 640;
+}
 
 /************* THUMBNAIL SIZE OPTIONS *************/
 
@@ -81,10 +103,10 @@ function bones_custom_image_sizes( $sizes ) {
 }
 
 /*
-The function above adds the ability to use the dropdown menu to select 
-the new images sizes you have just created from within the media manager 
-when you add media to your content blocks. If you add more image sizes, 
-duplicate one of the lines in the array and name it according to your 
+The function above adds the ability to use the dropdown menu to select
+the new images sizes you have just created from within the media manager
+when you add media to your content blocks. If you add more image sizes,
+duplicate one of the lines in the array and name it according to your
 new image size.
 */
 
@@ -128,56 +150,61 @@ function bones_register_sidebars() {
 	*/
 } // don't remove this bracket!
 
+
 /************* COMMENT LAYOUT *********************/
 
 // Comment Layout
 function bones_comments( $comment, $args, $depth ) {
    $GLOBALS['comment'] = $comment; ?>
-	<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>' );
-				*/
-				?>
-				<?php // 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" />
-				<?php // 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>
-			<?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>
-	<?php // </li> is added by WordPress automatically ?>
+  <div id="comment-<?php comment_ID(); ?>" <?php comment_class('cf'); ?>>
+    <article  class="cf">
+      <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>' );
+        */
+        ?>
+        <?php // custom gravatar call ?>
+        <?php
+          // create variable
+          $bgauthemail = get_comment_author_email();
+        ?>
+        <img data-gravatar="http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40" class="load-gravatar avatar avatar-48 photo" height="40" width="40" src="<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif" />
+        <?php // end custom gravatar call ?>
+        <?php printf(__( '<cite class="fn">%1$s</cite> %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),'  ','') ) ?>
+        <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>
+
+      </header>
+      <?php if ($comment->comment_approved == '0') : ?>
+        <div class="alert alert-info">
+          <p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>
+        </div>
+      <?php endif; ?>
+      <section class="comment_content cf">
+        <?php comment_text() ?>
+      </section>
+      <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
+    </article>
+  <?php // </li> is added by WordPress automatically ?>
 <?php
 } // don't remove this bracket!
 
-/************* SEARCH FORM LAYOUT *****************/
 
-// 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;
-} // don't remove this bracket!
+/*
+This is a modification of a function found in the
+twentythirteen theme where we can declare some
+external fonts. If you're using Google Fonts, you
+can replace these fonts, change it in your scss files
+and be up and running in seconds.
+*/
+function bones_fonts() {
+  wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic');
+  wp_enqueue_style( 'googleFonts');
+}
+
+add_action('wp_print_styles', 'bones_fonts');
+
 
 
-?>
+/* DON'T DELETE THIS CLOSING TAG */ ?>

+ 8 - 1
library/admin.php

@@ -13,6 +13,13 @@ Special Thanks for code & inspiration to:
 @jackmcconnell - http://www.voltronik.co.uk/
 Digging into WP - http://digwp.com/2010/10/customize-wordpress-dashboard/
 
+
+	- removing some default WordPress dashboard widgets
+	- an example custom dashboard widget
+	- adding custom login css
+	- changing text in footer of admin
+
+
 */
 
 /************* DASHBOARD WIDGETS *****************/
@@ -54,7 +61,7 @@ http://digwp.com/2010/10/customize-wordpress-dashboard/
 // RSS Dashboard Widget
 function bones_rss_dashboard_widget() {
 	if ( function_exists( 'fetch_feed' ) ) {
-		include_once( ABSPATH . WPINC . '/feed.php' );               // include the required file
+		// include_once( ABSPATH . WPINC . '/feed.php' );               // include the required file
 		$feed = fetch_feed( 'http://themble.com/feed/rss/' );        // specify the source feed
 		$limit = $feed->get_item_quantity(7);                        // specify number of items
 		$items = $feed->get_items(0, $limit);                        // create an array of items

+ 78 - 152
library/bones.php

@@ -7,49 +7,19 @@ in the functions.php file.
 
 Developed by: Eddie Machado
 URL: http://themble.com/bones/
-*/
-
-/*********************
-LAUNCH BONES
-Let's fire off all the functions
-and tools. I put it up here so it's
-right up top and clean.
-*********************/
-
-// we're firing all out initial functions at the start
-add_action( 'after_setup_theme', 'bones_ahoy', 16 );
-
-function bones_ahoy() {
-
-	// launching operation cleanup
-	add_action( 'init', 'bones_head_cleanup' );
-	// remove WP version from RSS
-	add_filter( 'the_generator', 'bones_rss_version' );
-	// remove pesky injected css for recent comments widget
-	add_filter( 'wp_head', 'bones_remove_wp_widget_recent_comments_style', 1 );
-	// clean up comment styles in the head
-	add_action( 'wp_head', 'bones_remove_recent_comments_style', 1 );
-	// clean up gallery output in wp
-	add_filter( 'gallery_style', 'bones_gallery_style' );
-
-	// enqueue base scripts and styles
-	add_action( 'wp_enqueue_scripts', 'bones_scripts_and_styles', 999 );
-	// ie conditional wrapper
-
-	// launching this stuff after theme setup
-	bones_theme_support();
 
-	// adding sidebars to Wordpress (these are created in functions.php)
-	add_action( 'widgets_init', 'bones_register_sidebars' );
-	// adding the bones search form (created in functions.php)
-	add_filter( 'get_search_form', 'bones_wpsearch' );
+  - head cleanup (remove rsd, uri links, junk css, ect)
+  - enqueueing scripts & styles
+  - theme support functions
+  - custom menu output & fallbacks
+  - related post function
+  - page-navi function
+  - removing <p> from around images
+  - customizing the post excerpt
+  - custom google+ integration
+  - adding custom fields to user profiles
 
-	// cleaning up random code around images
-	add_filter( 'the_content', 'bones_filter_ptags_on_images' );
-	// cleaning up excerpt
-	add_filter( 'excerpt_more', 'bones_excerpt_more' );
-
-} /* end bones ahoy */
+*/
 
 /*********************
 WP_HEAD GOODNESS
@@ -85,6 +55,37 @@ function bones_head_cleanup() {
 
 } /* end bones head cleanup */
 
+// A better title
+// http://www.deluxeblogtips.com/2012/03/better-title-meta-tag.html
+function rw_title( $title, $sep, $seplocation ) {
+  global $page, $paged;
+
+  // Don't affect in feeds.
+  if ( is_feed() ) return $title;
+
+  // Add the blog's name
+  if ( 'right' == $seplocation ) {
+    $title .= get_bloginfo( 'name' );
+  } else {
+    $title = get_bloginfo( 'name' ) . $title;
+  }
+
+  // Add the blog description for the home/front page.
+  $site_description = get_bloginfo( 'description', 'display' );
+
+  if ( $site_description && ( is_home() || is_front_page() ) ) {
+    $title .= " {$sep} {$site_description}";
+  }
+
+  // Add a page number if necessary:
+  if ( $paged >= 2 || $page >= 2 ) {
+    $title .= " {$sep} " . sprintf( __( 'Page %s', 'dbt' ), max( $paged, $page ) );
+  }
+
+  return $title;
+
+} // end better title
+
 // remove WP version from RSS
 function bones_rss_version() { return ''; }
 
@@ -122,8 +123,10 @@ SCRIPTS & ENQUEUEING
 
 // loading modernizr and jquery, and reply script
 function bones_scripts_and_styles() {
-	global $wp_styles; // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
-	if (!is_admin()) {
+
+  global $wp_styles; // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
+
+  if (!is_admin()) {
 
 		// modernizr (without media query polyfill)
 		wp_register_script( 'bones-modernizr', get_stylesheet_directory_uri() . '/library/js/libs/modernizr.custom.min.js', array(), '2.5.3', false );
@@ -134,10 +137,10 @@ function bones_scripts_and_styles() {
 		// ie-only style sheet
 		wp_register_style( 'bones-ie-only', get_stylesheet_directory_uri() . '/library/css/ie.css', array(), '' );
 
-		// comment reply script for threaded comments
-		if ( is_singular() AND comments_open() AND (get_option('thread_comments') == 1)) {
-			wp_enqueue_script( 'comment-reply' );
-		}
+    // comment reply script for threaded comments
+    if ( is_singular() AND comments_open() AND (get_option('thread_comments') == 1)) {
+		  wp_enqueue_script( 'comment-reply' );
+    }
 
 		//adding scripts file in the footer
 		wp_register_script( 'bones-js', get_stylesheet_directory_uri() . '/library/js/scripts.js', array( 'jquery' ), '', true );
@@ -175,13 +178,13 @@ function bones_theme_support() {
 
 	// wp custom background (thx to @bransonwerner for update)
 	add_theme_support( 'custom-background',
-		array(
-		'default-image' => '',  // background image default
-		'default-color' => '', // background color default (dont add the #)
-		'wp-head-callback' => '_custom_background_cb',
-		'admin-head-callback' => '',
-		'admin-preview-callback' => ''
-		)
+	    array(
+	    'default-image' => '',    // background image default
+	    'default-color' => '',    // background color default (dont add the #)
+	    'wp-head-callback' => '_custom_background_cb',
+	    'admin-head-callback' => '',
+	    'admin-preview-callback' => ''
+	    )
 	);
 
 	// rss thingy
@@ -217,64 +220,6 @@ function bones_theme_support() {
 } /* end bones theme support */
 
 
-/*********************
-MENUS & NAVIGATION
-*********************/
-
-// the main menu
-function bones_main_nav() {
-	// display the wp3 menu if available
-	wp_nav_menu(array(
-		'container' => false,                           // remove nav container
-		'container_class' => 'menu clearfix',           // class of container (should you choose to use it)
-		'menu' => __( 'The Main Menu', 'bonestheme' ),  // nav name
-		'menu_class' => 'nav top-nav clearfix',         // adding custom nav class
-		'theme_location' => 'main-nav',                 // where it's located in the theme
-		'before' => '',                                 // before the menu
-		'after' => '',                                  // after the menu
-		'link_before' => '',                            // before each link
-		'link_after' => '',                             // after each link
-		'depth' => 0,                                   // limit the depth of the nav
-		'fallback_cb' => 'bones_main_nav_fallback'      // fallback function
-	));
-} /* end bones main nav */
-
-// the footer menu (should you choose to use one)
-function bones_footer_links() {
-	// display the wp3 menu if available
-	wp_nav_menu(array(
-		'container' => '',                              // remove nav container
-		'container_class' => 'footer-links clearfix',   // class of container (should you choose to use it)
-		'menu' => __( 'Footer Links', 'bonestheme' ),   // nav name
-		'menu_class' => 'nav footer-nav clearfix',      // adding custom nav class
-		'theme_location' => 'footer-links',             // where it's located in the theme
-		'before' => '',                                 // before the menu
-		'after' => '',                                  // after the menu
-		'link_before' => '',                            // before each link
-		'link_after' => '',                             // after each link
-		'depth' => 0,                                   // limit the depth of the nav
-		'fallback_cb' => 'bones_footer_links_fallback'  // fallback function
-	));
-} /* end bones footer link */
-
-// this is the fallback for header menu
-function bones_main_nav_fallback() {
-	wp_page_menu( array(
-		'show_home' => true,
-		'menu_class' => 'nav top-nav clearfix',      // adding custom nav class
-		'include'     => '',
-		'exclude'     => '',
-		'echo'        => true,
-		'link_before' => '',                            // before each link
-		'link_after' => ''                             // after each link
-	) );
-}
-
-// this is the fallback for footer menu
-function bones_footer_links_fallback() {
-	/* you can put a default here if you like */
-}
-
 /*********************
 RELATED POSTS FUNCTION
 *********************/
@@ -285,7 +230,7 @@ function bones_related_posts() {
 	global $post;
 	$tags = wp_get_post_tags( $post->ID );
 	if($tags) {
-		foreach( $tags as $tag ) { 
+		foreach( $tags as $tag ) {
 			$tag_arr .= $tag->slug . ',';
 		}
 		$args = array(
@@ -302,7 +247,7 @@ function bones_related_posts() {
 			<?php echo '<li class="no_related_post">' . __( 'No Related Posts Yet!', 'bonestheme' ) . '</li>'; ?>
 		<?php }
 	}
-	wp_reset_query();
+	wp_reset_postdata();
 	echo '</ul>';
 } /* end bones related posts function */
 
@@ -312,26 +257,23 @@ PAGE NAVI
 
 // Numeric Page Navi (built into the theme by default)
 function bones_page_navi() {
-	global $wp_query;
-	$bignum = 999999999;
-	if ( $wp_query->max_num_pages <= 1 )
-		return;
-	
-	echo '<nav class="pagination">';
-	
-		echo paginate_links( array(
-			'base' 			=> str_replace( $bignum, '%#%', esc_url( get_pagenum_link($bignum) ) ),
-			'format' 		=> '',
-			'current' 		=> max( 1, get_query_var('paged') ),
-			'total' 		=> $wp_query->max_num_pages,
-			'prev_text' 	=> '&larr;',
-			'next_text' 	=> '&rarr;',
-			'type'			=> 'list',
-			'end_size'		=> 3,
-			'mid_size'		=> 3
-		) );
-	
-	echo '</nav>';
+  global $wp_query;
+  $bignum = 999999999;
+  if ( $wp_query->max_num_pages <= 1 )
+    return;
+  echo '<nav class="pagination">';
+  echo paginate_links( array(
+    'base'         => str_replace( $bignum, '%#%', esc_url( get_pagenum_link($bignum) ) ),
+    'format'       => '',
+    'current'      => max( 1, get_query_var('paged') ),
+    'total'        => $wp_query->max_num_pages,
+    'prev_text'    => '&larr;',
+    'next_text'    => '&rarr;',
+    'type'         => 'list',
+    'end_size'     => 3,
+    'mid_size'     => 3
+  ) );
+  echo '</nav>';
 } /* end page navi */
 
 /*********************
@@ -347,25 +289,9 @@ function bones_filter_ptags_on_images($content){
 function bones_excerpt_more($more) {
 	global $post;
 	// edit here if you like
-	return '...  <a class="excerpt-read-more" href="'. get_permalink($post->ID) . '" title="'. __( 'Read', 'bonestheme' ) . get_the_title($post->ID).'">'. __( 'Read more &raquo;', 'bonestheme' ) .'</a>';
+	return '...  <a class="excerpt-read-more" href="'. get_permalink($post->ID) . '" title="'. __( 'Read ', 'bonestheme' ) . get_the_title($post->ID).'">'. __( 'Read more &raquo;', 'bonestheme' ) .'</a>';
 }
 
-/*
- * This is a modified the_author_posts_link() which just returns the link.
- *
- * This is necessary to allow usage of the usual l10n process with printf().
- */
-function bones_get_the_author_posts_link() {
-	global $authordata;
-	if ( !is_object( $authordata ) )
-		return false;
-	$link = sprintf(
-		'<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
-		get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
-		esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), // No further l10n needed, core will take care of this one
-		get_the_author()
-	);
-	return $link;
-}
+
 
 ?>