[ Index ]

PHP Cross Reference of Wordpress 2.9.1

title

Body

[close]

/wp-includes/ -> post-template.php (summary)

WordPress Post Template Functions. Gets content for the current post in the loop.

File Size: 1355 lines (40 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 37 functions

  the_ID()
  get_the_ID()
  the_title()
  the_title_attribute()
  get_the_title()
  the_guid()
  get_the_guid()
  the_content()
  get_the_content()
  the_excerpt()
  get_the_excerpt()
  has_excerpt()
  post_class()
  get_post_class()
  body_class()
  get_body_class()
  post_password_required()
  sticky_class()
  wp_link_pages()
  post_custom()
  the_meta()
  wp_dropdown_pages()
  wp_list_pages()
  wp_page_menu()
  walk_page_tree()
  walk_page_dropdown_tree()
  the_attachment_link()
  wp_get_attachment_link()
  get_the_attachment_link()
  get_attachment_icon_src()
  get_attachment_icon()
  get_attachment_innerHTML()
  prepend_attachment()
  get_the_password_form()
  is_page_template()
  wp_post_revision_title()
  wp_list_post_revisions()

Functions
Functions that are not part of a class:

the_ID()   X-Ref
Display the ID of the current item in the WordPress Loop.


get_the_ID()   X-Ref
Retrieve the ID of the current item in the WordPress Loop.

return: unknown

the_title($before = '', $after = '', $echo = true)   X-Ref
Display or retrieve the current post title with optional content.

param: string $before Optional. Content to prepend to the title.
param: string $after Optional. Content to append to the title.
param: bool $echo Optional, default to true.Whether to display or return.
return: null|string Null on no title. String if $echo parameter is false.

the_title_attribute( $args = '' )   X-Ref
Sanitize the current title when retrieving or displaying.

Works like {@link the_title()}, except the parameters can be in a string or
an array. See the function for what can be override in the $args parameter.

The title before it is displayed will have the tags stripped and {@link
esc_attr()} before it is passed to the user or displayed. The default
as with {@link the_title()}, is to display the title.

param: string|array $args Optional. Override the defaults.
return: string|null Null on failure or display. String when echo is false.

get_the_title( $id = 0 )   X-Ref
Retrieve post title.

If the post is protected and the visitor is not an admin, then "Protected"
will be displayed before the post title. If the post is private, then
"Private" will be located before the post title.

param: int $id Optional. Post ID.
return: string

the_guid( $id = 0 )   X-Ref
Display the Post Global Unique Identifier (guid).

The guid will appear to be a link, but should not be used as an link to the
post. The reason you should not use it as a link, is because of moving the
blog across domains.

param: int $id Optional. Post ID.

get_the_guid( $id = 0 )   X-Ref
Retrieve the Post Global Unique Identifier (guid).

The guid will appear to be a link, but should not be used as an link to the
post. The reason you should not use it as a link, is because of moving the
blog across domains.

param: int $id Optional. Post ID.
return: string

the_content($more_link_text = null, $stripteaser = 0)   X-Ref
Display the post content.

param: string $more_link_text Optional. Content for when there is more text.
param: string $stripteaser Optional. Teaser content before the more text.

get_the_content($more_link_text = null, $stripteaser = 0)   X-Ref
Retrieve the post content.

param: string $more_link_text Optional. Content for when there is more text.
param: string $stripteaser Optional. Teaser content before the more text.
return: string

the_excerpt()   X-Ref
Display the post excerpt.


get_the_excerpt($deprecated = '')   X-Ref
Retrieve the post excerpt.

param: mixed $deprecated Not used.
return: string

has_excerpt( $id = 0 )   X-Ref
Whether post has excerpt.

param: int $id Optional. Post ID.
return: bool

post_class( $class = '', $post_id = null )   X-Ref
Display the classes for the post div.

param: string|array $class One or more classes to add to the class list.
param: int $post_id An optional post ID.

get_post_class( $class = '', $post_id = null )   X-Ref
Retrieve the classes for the post div as an array.

The class names are add are many. If the post is a sticky, then the 'sticky'
class name. The class 'hentry' is always added to each post. For each
category, the class will be added with 'category-' with category slug is
added. The tags are the same way as the categories with 'tag-' before the tag
slug. All classes are passed through the filter, 'post_class' with the list
of classes, followed by $class parameter value, with the post ID as the last
parameter.

param: string|array $class One or more classes to add to the class list.
param: int $post_id An optional post ID.
return: array Array of classes.

body_class( $class = '' )   X-Ref
Display the classes for the body element.

param: string|array $class One or more classes to add to the class list.

get_body_class( $class = '' )   X-Ref
Retrieve the classes for the body element as an array.

param: string|array $class One or more classes to add to the class list.
return: array Array of classes.

post_password_required( $post = null )   X-Ref
Whether post requires password and correct password has been provided.

param: int|object $post An optional post.  Global $post used if not provided.
return: bool false if a password is not required or the correct password cookie is present, true otherwise.

sticky_class( $post_id = null )   X-Ref
Display "sticky" CSS class, if a post is sticky.

param: int $post_id An optional post ID.

wp_link_pages($args = '')   X-Ref
The formatted output of a list of pages.

Displays page links for paginated posts (i.e. includes the <!--nextpage-->.
Quicktag one or more times). This tag must be within The Loop.

The defaults for overwriting are:
'next_or_number' - Default is 'number' (string). Indicates whether page
numbers should be used. Valid values are number and next.
'nextpagelink' - Default is 'Next Page' (string). Text for link to next page.
of the bookmark.
'previouspagelink' - Default is 'Previous Page' (string). Text for link to
previous page, if available.
'pagelink' - Default is '%' (String).Format string for page numbers. The % in
the parameter string will be replaced with the page number, so Page %
generates "Page 1", "Page 2", etc. Defaults to %, just the page number.
'before' - Default is '<p> Pages:' (string). The html or text to prepend to
each bookmarks.
'after' - Default is '</p>' (string). The html or text to append to each
bookmarks.
'link_before' - Default is '' (string). The html or text to prepend to each
Pages link inside the <a> tag.
'link_after' - Default is '' (string). The html or text to append to each
Pages link inside the <a> tag.

param: string|array $args Optional. Overwrite the defaults.
return: string Formatted output in HTML.

post_custom( $key = '' )   X-Ref
Retrieve post custom meta data field.

param: string $key Meta data key name.
return: string|array Array of values or single value, if only one element exists.

the_meta()   X-Ref
Display list of post custom fields.


wp_dropdown_pages($args = '')   X-Ref
Retrieve or display list of pages as a dropdown (select list).

param: array|string $args Optional. Override default arguments.
return: string HTML content, if not displaying.

wp_list_pages($args = '')   X-Ref
Retrieve or display list of pages in list (li) format.

param: array|string $args Optional. Override default arguments.
return: string HTML content, if not displaying.

wp_page_menu( $args = array()   X-Ref
Display or retrieve list of pages with optional home link.

The arguments are listed below and part of the arguments are for {@link
wp_list_pages()} function. Check that function for more info on those
arguments.

<ul>
<li><strong>sort_column</strong> - How to sort the list of pages. Defaults
to page title. Use column for posts table.</li>
<li><strong>menu_class</strong> - Class to use for the div ID which contains
the page list. Defaults to 'menu'.</li>
<li><strong>echo</strong> - Whether to echo list or return it. Defaults to
echo.</li>
<li><strong>link_before</strong> - Text before show_home argument text.</li>
<li><strong>link_after</strong> - Text after show_home argument text.</li>
<li><strong>show_home</strong> - If you set this argument, then it will
display the link to the home page. The show_home argument really just needs
to be set to the value of the text of the link.</li>
</ul>

param: array|string $args

walk_page_tree($pages, $depth, $current_page, $r)   X-Ref
Retrieve HTML list content for page list.


walk_page_dropdown_tree()   X-Ref
Retrieve HTML dropdown (select) content for page list.


the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $permalink = false)   X-Ref
Display an attachment page link using an image or icon.

param: int $id Optional. Post ID.
param: bool $fullsize Optional, default is false. Whether to use full size.
param: bool $deprecated Deprecated. Not used.
param: bool $permalink Optional, default is false. Whether to include permalink.

wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false)   X-Ref
Retrieve an attachment page link using an image or icon, if possible.

param: int $id Optional. Post ID.
param: string $size Optional, default is 'thumbnail'. Size of image, either array or string.
param: bool $permalink Optional, default is false. Whether to add permalink to image.
param: bool $icon Optional, default is false. Whether to include icon.
param: string $text Optional, default is false. If string, then will be link text.
return: string HTML content.

get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false)   X-Ref
Retrieve HTML content of attachment image with link.

param: int $id Optional. Post ID.
param: bool $fullsize Optional, default is false. Whether to use full size image.
param: array $max_dims Optional. Max image dimensions.
param: bool $permalink Optional, default is false. Whether to include permalink to image.
return: string

get_attachment_icon_src( $id = 0, $fullsize = false )   X-Ref
Retrieve icon URL and Path.

param: int $id Optional. Post ID.
param: bool $fullsize Optional, default to false. Whether to have full image.
return: array Icon URL and full path to file, respectively.

get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false )   X-Ref
Retrieve HTML content of icon attachment image element.

param: int $id Optional. Post ID.
param: bool $fullsize Optional, default to false. Whether to have full size image.
param: array $max_dims Optional. Dimensions of image.
return: string HTML content.

get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false)   X-Ref
Retrieve HTML content of image element.

param: int $id Optional. Post ID.
param: bool $fullsize Optional, default to false. Whether to have full size image.
param: array $max_dims Optional. Dimensions of image.
return: string

prepend_attachment($content)   X-Ref
Wrap attachment in <<p>> element before content.

param: string $content
return: string

get_the_password_form()   X-Ref
Retrieve protected post password form content.

return: string HTML content for password form for password protected post.

is_page_template($template = '')   X-Ref
Whether currently in a page template.

This template tag allows you to determine whether or not you are in a page
template. You can optional provide a template name and then the check will be
specific to that template.

param: string $template The specific template name if specific matching is required.
return: bool False on failure, true if success.

wp_post_revision_title( $revision, $link = true )   X-Ref
Retrieve formatted date timestamp of a revision (linked to that revisions's page).

param: int|object $revision Revision ID or revision object.
param: bool $link Optional, default is true. Link to revisions's page?
return: string i18n formatted datetimestamp or localized 'Current Revision'.

wp_list_post_revisions( $post_id = 0, $args = null )   X-Ref
Display list of a post's revisions.

Can output either a UL with edit links or a TABLE with diff interface, and
restore action links.

Second argument controls parameters:
(bool)   parent : include the parent (the "Current Revision") in the list.
(string) format : 'list' or 'form-table'.  'list' outputs UL, 'form-table'
outputs TABLE with UI.
(int)    right  : what revision is currently being viewed - used in
form-table format.
(int)    left   : what revision is currently being diffed against right -
used in form-table format.

param: int|object $post_id Post ID or post object.
param: string|array $args See description {@link wp_parse_args()}.
return: null



Generated: Fri Jan 8 00:19:48 2010 Cross-referenced by PHPXref 0.7