source: trunk/www.guidonia.net/wp/wp-content/plugins/wordpress-mobile-edition/carrington-mobile-1.0.2/comment/README.txt@ 44

Last change on this file since 44 was 44, checked in by luciano, 14 years ago
File size: 1.9 KB
Line 
1## comment/
2
3### Overview
4
5This directory holds templates for displaying a comment in it's entirety. These templates do not hold the comment loop, or the "Comments" title or the form to allow commenting; they just show a single comment.
6
7Typically these templates will be brought in to a template in _comments/_, but can also be used to display single comments as needed.
8
9
10## Comment Context
11
12When choosing a template to use in the Comment Context, the Carrington engine looks at the type of comment and the author of the comment to choose which template to use.
13
14A "default" template is required, and will be used when there are no other templates that match a given comment. This could be because no other templates have been created, or because the comment in question doesn't match the templates that are available.
15
16The order in which these conditions are checked defaults to the following:
17
181. ping
192. author
203. user
214. role
225. default
23
24however this order can be overridden with a plugin using the `cfct_comment_match_order` hook.
25
26Once a template match has been found, no other processing is done.
27
28
29### Supported Templates (Comment Context)
30
31- *comment-default.php* - Used when there are no other templates that match for a given comment.
32- *ping.php* - Used if the comment is a pingback or a trackback.
33- *author.php* - Used when the author of the post leaves a comment.
34- *user-{username}.php* - Used when a user with that username leaves a comment. For example, a template with a file name of _user-jsmith.php_ would be used for a comment by user _jsmith_. Any WordPres username can take the place of {username} in the file name.
35- *role-{role}.php* - Used when a comment is made by a user with a certain role. For example, a template with a file name of _role-subscriber.php_ would be used for a user with a role of "subscriber" (typical for a registered commentor who is not an author or an admin). Any WordPress role can take the place of {role} in the file name.
Note: See TracBrowser for help on using the repository browser.