Explorar el Código

organized functions file

eddiemachado hace 13 años
padre
commit
08ece840fd
Se han modificado 1 ficheros con 44 adiciones y 9 borrados
  1. 44 9
      functions.php

+ 44 - 9
functions.php

@@ -8,13 +8,42 @@ just edit things like thumbnail sizes, header images,
 sidebars, comments, ect.
 */
 
-// Get Bones Core Up & Running!
-require_once('library/bones.php');            // core functions (don't remove)
-require_once('library/plugins.php');          // plugins & extra functions (optional)
-require_once('library/custom-post-type.php'); // custom post type example
+/************* INCLUDE NEEDED FILES ***************/
 
-// Admin Functions (commented out by default)
-// require_once('library/admin.php');         // custom admin functions
+/*
+1. library/bones.php
+    - head cleanup (remove rsd, uri links, junk css, ect)
+	- enqeueing 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
 
 /************* THUMBNAIL SIZE OPTIONS *************/
 
@@ -89,14 +118,20 @@ function bones_comments($comment, $args, $depth) {
 	<li <?php comment_class(); ?>>
 		<article id="comment-<?php comment_ID(); ?>" class="clearfix">
 			<header class="comment-author vcard">
-				<?php echo get_avatar($comment,$size='32',$default='<path_to_url>' ); ?>
+			    <?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 -->
+			    <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>'), 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'); ?> </a></time>
 				<?php edit_comment_link(__('(Edit)'),'  ','') ?>
 			</header>
 			<?php if ($comment->comment_approved == '0') : ?>
-       			<div class="help">
-          			<p><?php _e('Your comment is awaiting moderation.') ?></p>
+       			<div class="alert info">
+          			<p><?php __('Your comment is awaiting moderation.') ?></p>
           		</div>
 			<?php endif; ?>
 			<section class="comment_content clearfix">