Permalink
Browse files

Re: Issue #40 documentation updates

  • Loading branch information...
1 parent b528618 commit 884a3ae96dc6afa90774e452ff7c7c0d90594cb0 @chipbennett committed Sep 16, 2011
Showing with 86 additions and 325 deletions.
  1. +11 −266 comments.php
  2. +3 −0 functions/contextual-help.php
  3. +14 −1 functions/theme-setup.php
  4. +42 −16 functions/wordpress-hooks.php
  5. +5 −5 post-header.php
  6. +1 −1 sidebar-navigation.php
  7. +1 −9 sidebar-page.php
  8. +1 −23 sidebar.php
  9. +5 −1 single.php
  10. +3 −3 site-navigation.php
View
@@ -3,9 +3,17 @@
* Template part file the contains the Comments functionality
*
* This template file includes both the comments list and
- * the comment reply form.
*
- * @uses function_name()
+ * @link http://codex.wordpress.org/Function_Reference/comments_number Codex reference: comments_number()
+ * @link http://codex.wordpress.org/Function_Reference/the_title Codex reference: the_title()
+ * @link http://codex.wordpress.org/Function_Reference/get_comments_pages_count Codex reference: get_comment_pages_count()
+ * @link http://codex.wordpress.org/Function_Reference/get_option Codex reference: get_option()
+ * @link http://codex.wordpress.org/Function_Reference/paginate_comments_links Codex reference: paginate_comments_links()
+ * @link http://codex.wordpress.org/Function_Reference/wp_list_comments Codex reference: wp_list_comments()
+ * @link http://codex.wordpress.org/Function_Reference/comment_form Codex reference: comment_form()
+ *
+ * @uses oenology_hook_post_comments_after() Defined in /functions/hooks.php
+ * @uses oenology_hook_post_comments_before()() Defined in /functions/hooks.php
*
* @package Oenology
* @copyright Copyright (c) 2010, Chip Bennett
@@ -87,267 +95,4 @@
?>
</div>
-<!-- Comments End (div#comments) -->
-<?php /*
-Reference:
-=============================================================================
-The following functions, tags, and hooks are used (or referenced) in this Theme template file:
-
-***********************
-comment_form()
-----------------------------------
-comment_form() is a WordPress template tag.
-Codex reference: http://codex.wordpress.org/Template_Tags/comment_form
-
-comment_form() is used to output the comment reply form in the comments section
-of a Post or Page.
-
-comment_form() accepts two arguments:
- - $args: ampersand (&) joined list of arguments. See the Codex reference for full list.
- - $postid: PostID of the post to which the comment form should post comments.
- Defaults to the current post.
-
-Example:
-<?php comment_form(); ?>
-
-comment_form() must be used from within the Loop, unless the $postid parameter is used.
-
-***********************
-comments_number()
-----------------------------------
-comments_number() is a WordPress template tag.
-Codex reference: http://codex.wordpress.org/Function_Reference/comments_number
-
-comments_number() is used to display the number of comments (including
-comments, trackbacks, and pingbacks) on the current post.
-
-comments_number( $a, $b, $c ) accepts three arguments:
- - $a: what to display for 0 comments
- - $b: what to display for 1 comment
- - $c: what to display for multiple comments
-
-Example:
-<?php comments_number('0','1','%'); ?> displays:
- - '0' if 0 comments
- - '1' if 1 comment
- - '#' (actual number of comments) if multiple comments
-
-comments_number() must be used within the Loop.
-
-***********************
-comments_open()
-----------------------------------
-comments_open() is a WordPress template conditional tag.
-Codex reference: http://codex.wordpress.org/Function_Reference/comments_open
-
-comments_open() is a boolean (returns TRUE or FALSE) conditional tag that returns true if
-comments are open for the current post.
-
-comments_open( $postid ) accepts one argument:
- - $postid: PostID of the post being checked. Defaults to the current post.
-
-comments_open() must be used from within the Loop, unless the $postid parameter is used.
-
-***********************
-get_comment_link()
-----------------------------------
-get_comment_link() is a WordPress template tag.
-Codex reference: http://codex.wordpress.org/Function_Reference/get_comment_link
-
-get_comment_link() is used to get the permalink to a given comment
-
-get_comment_link() accepts two arguments:
- - $comment: Id for comment for which to output link. Defaults to current comment.
- - $args: ampersand (&) linked array of options. See Codex for full list.
-
-Example:
-<a href="<?php echo get_comment_link(); ?>">Comment</a>
-
-get_comment_link() must be used from within the Loop, unless the $comment parameter is used.
-
-***********************
-get_comments_number()
-----------------------------------
-get_comments_number() is a WordPress template tag.
-Codex reference: http://codex.wordpress.org/Template_Tags/get_comments_number
-
-get_comments_number() is used to return the number (as a numeric value) of comments (including
-comments, trackbacks, and pingbacks) on the current post.
-
-get_comments_number() accepts no arguments
-
-get_comments_number() must be used within the Loop.
-
-***********************
-get_comment_pages_count()
-----------------------------------
-get_comment_pages_count() is a WordPress function.
-Codex reference: N/A
-
-get_comment_pages_count() is used to return the number of comment pages for a given post. Generally,
-it is used as part a conditional, to display comment-page navigation links only if more than one comment
-page exists.
-
-get_comment_pages_count() accepts no arguments.
-
-Examples:
- - get_comment_pages_count() returns a number equal to the number of comment pages, e.g. '1', '2', etc.
-
- - if (get_comment_pages_count() > 1 ) will return true if more than one comment page exists.
-
-get_comment_pages_count() must be used from within the Loop.
-
-***********************
-get_comment_type()
-----------------------------------
-get_comment_type() is a WordPress function.
-Codex reference: http://codex.wordpress.org/Function_Reference/comment_type
-
-get_comment_type() is used to return (not output or print) the type of a given comment:
-'comment', 'pingback', or 'trackback. To output this value, use comment_type().
-
-get_comment_type() accepts no arguments.
-
-Examples:
- - get_comment_type() will return either 'comment', 'pingback', or 'trackback'
-
- - if ( get_comment_type() != "comment" ) will return true if the current comment type is
- 'pingback' or 'trackback'
-
-get_comment_type() must be used from within the Loop.
-
-***********************
-get_option()
-----------------------------------
-get_option() is a WordPress function.
-Codex reference: http://codex.wordpress.org/Function_Reference/get_option
-
-get_option() is used to return the value of a specified database option.
-If the option does not exist or has no value, the function returns FALSE.
-
-get_option( $show, $default ) accepts two arguments
- - $show: the database option for which to return a value
- - See this Codex reference for full list of options: http://codex.wordpress.org/Option_Reference
- - $default: the value to return if the option does not exist, or has no value. Default is FALSE
-
-Example:
-get_option( 'page_comments' ) returns TRUE is the "Paged Comments" option is true; otherwise returns FALSE
-
-***********************
-have_comments()
-----------------------------------
-have_comments() is a WordPress conditional tag.
-Codex reference: http://codex.wordpress.org/Function_Reference/have_comments
-
-have_comments() is a conditional that returns TRUE if the current post has comments
-associated with it; otherwise, it returns FALSE. The most typical use of this conditional
-is within the comments template, as part of the comments "Loop".
-
-have_comments() accepts no arguments.
-
-Example:
-if ( have_comments() ) is used to begin the comments "Loop", which displays only if the current
-post has comments.
-
-have_comments() must be used from within the Loop.
-
-***********************
-next_comments_link()
-----------------------------------
-next_comments_link() is a WordPress template tag.
-Codex reference: http://codex.wordpress.org/Template_Tags/next_comments_link
-Codex reference: http://codex.wordpress.org/Function_Reference/next_comments_link
-
-next_comments_link() is used to display the next page of comments (older comments)
-
-next_comments_link( $label, $max_page ) accepts two arguments:
- - $label: text label for the link text. Defaults to '' (no label).
- - $max_page: maximum number of comment pages on which to place the link. Defaults to '0' (no limit)
-
-Example:
-<?php previous_comments_link( '<span class="meta-nav">&larr;</span> Older Comments' ); ?>
-returns "<- Older Comments" (with an ASCII left-arrow symbol)
-
-next_comments_link() must be used from within the Loop.
-
-***********************
-post_password_required()
-----------------------------------
-post_password_required() is a WordPress conditional tag.
-Codex reference: N/A
-
-post_password_required() is a conditional that returns TRUE if the current post is password-protected;
-otherwise, it returns FALSE. The most typical use of this conditional is within the comments template, as
-part of the comments "Loop".
-
-post_password_required() accepts no arguments.
-
-Example:
-if ( post_password_required() ) is used to display a "password required" message, and prevents post
-comments from displaying, if the post is password-protected.
-
-post_password_required() must be used from within the Loop.
-
-***********************
-previous_comments_link()
-----------------------------------
-previous_comments_link() is a WordPress template tag.
-
-Codex reference: http://codex.wordpress.org/Template_Tags/previous_comments_link
-Codex reference: http://codex.wordpress.org/Function_Reference/previous_comments_link
-
-previous_comments_link() is used to display the previous page of comments (newer comments)
-
-previous_comments_link( $label, $max_page ) accepts two arguments:
- - $label: text label for the link text. Defaults to '' (no label).
- - $max_page: maximum number of comment pages on which to place the link. Defaults to '0' (no limit)
-
-Example:
-<?php next_comments_link( 'Newer Comments <span class="meta-nav">&rarr;</span>' ); ?>
-returns "Newer Comments ->" (with an ASCII right-arrow symbol)
-
-previous_comments_link() must be used from within the Loop.
-
-***********************
-the_title()
-----------------------------------
-the_title() is a WordPress template tag.
-Codex reference: http://codex.wordpress.org/Function_Reference/the_title
-
-the_title() is used to display the Post Title of the current post.
-
-the_title( $before, $after, $echo ) accepts three arguments:
- - $before: text string to display before the title. Defaults to no text.
- - $after:text string to display after the title. Defautls to no text.
- - $echo: boolean (true/false). 'True' displays the title; 'false' does not (for use in functions, etc.). Defaults to 'true'.
-
-Example:
-<?php the_title(); ?>
-
-the_title() must be used within the Loop.
-
-***********************
-wp_list_comments()
-----------------------------------
-wp_list_comments() is a WordPress template tag.
-Codex reference: http://codex.wordpress.org/Function_Reference/wp_list_comments
-
-wp_list_comments() is used to display the comments associated with a given post.
-
-wp_list_comments( array( 'arg1' => 'value' , 'arg2' => 'value' ) ) accepts several arguments, in the form of an array. Some of the more useful arguments:
- - max_depth: for threaded comments, the maximum thread depth. Defaults to user-configured setting in Settings -> Discussion.
- - style: HTML structure for the comment list. Can be 'ul', 'ol', or 'div'. Defaults to 'ul'.
- - Note: if using 'div' or 'ol', wp_list_comments() must be wrapped in a containing element of the specified type (i.e. <div></div> or <ol></ol>)
- - type: comment type to include. Can be 'all', 'comment', 'trackback', 'pingback', or 'pings' (both trackbacks and pingbacks). Defaults to 'all'
- - avatar_size: size (px) of the user avatar. Can be any interger value between '1' and '512'. Defaults to '32'.
- - per_page: number of comments to display per comments page. Defaults to user-configured setting in Settings -> Discussion.
- - reverse_top_level: if TRUE, will display the newest comments first. Defaults to user-configured setting in Settings -> Discussion.
-
-Example:
-<?php wp_list_comments( 'type=comment&avatar_size=40' ); ?> displays comments that are "comment" type (no pingbacks or trackbacks),
-with an avatar size of 40px.
-
-wp_list_comments() must be used from within the Loop.
-
-=============================================================================
-*/ ?>
+<!-- Comments End (div#comments) -->
@@ -117,6 +117,9 @@ function oenology_get_reference_contextual_help_text() {
case 'support' :
$tabtext .= __( 'Support options and links for the Theme.', 'oenology' );
break;
+ default :
+ $tabtext .= '';
+ break;
}
return $tabtext;
}
View
@@ -34,13 +34,26 @@ function oenology_set_content_width() {
global $pagenow;
if ( ! is_admin() || ( is_admin() && 'post.php' == $pagenow ) ) {
- // Set variables for each layout/context
+ // Content width for three-
+ // column Page layout, and
+ // for two- and three-
+ // column Post layouts
$width_three_column = 635;
+ // Content width for two-
+ // column Page layout
$width_two_column = 810;
+ // Content width for one-
+ // column Page and one-
+ // column Post layouts
$width_one_column = 815;
+ // Content width for
+ // attachment pages
$width_attachment = 900;
+ // content width for full-
+ // width layout
$width_full = 975;
+ // Get the current layout
$layout = oenology_get_current_page_layout();
// Set default content width
Oops, something went wrong.

0 comments on commit 884a3ae

Please sign in to comment.