[ Index ]

WordPress Cross Reference

title

Body

[close]

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

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

File Size: 1445 lines (43 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 wp-includes/class-phpass.php

Defines 2 classes

Walker_Page:: (4 methods):
  start_lvl()
  end_lvl()
  start_el()
  end_el()

Walker_PageDropdown:: (10 methods):
  start_el()
  the_attachment_link()
  wp_get_attachment_link()
  prepend_attachment()
  get_the_password_form()
  is_page_template()
  get_page_template_slug()
  wp_post_revision_title()
  wp_post_revision_title_expanded()
  wp_list_post_revisions()

Defines 10 functions

  the_ID()
  get_the_ID()
  the_title()
  the_title_attribute()
  get_the_title()
  the_guid()
  get_the_guid()
  the_content()
  get_the_content()
  _convert_urlencoded_to_entities()
  the_excerpt()
  get_the_excerpt()
  has_excerpt()
  post_class()
  get_post_class()
  body_class()
  get_body_class()
  post_password_required()
  wp_link_pages()
  _wp_link_page()
  post_custom()
  the_meta()
  wp_dropdown_pages()
  wp_list_pages()
  wp_page_menu()
  walk_page_tree()
  walk_page_dropdown_tree()

Class: Walker_Page  - X-Ref

Create HTML list of pages.

start_lvl( &$output, $depth = 0, $args = array()   X-Ref

param: string $output Passed by reference. Used to append additional content.
param: int $depth Depth of page. Used for padding.
param: array $args

end_lvl( &$output, $depth = 0, $args = array()   X-Ref

param: string $output Passed by reference. Used to append additional content.
param: int $depth Depth of page. Used for padding.
param: array $args

start_el( &$output, $page, $depth = 0, $args = array()   X-Ref

param: string $output Passed by reference. Used to append additional content.
param: object $page Page data object.
param: int $depth Depth of page. Used for padding.
param: int $current_page Page ID.
param: array $args

end_el( &$output, $page, $depth = 0, $args = array()   X-Ref

param: string $output Passed by reference. Used to append additional content.
param: object $page Page data object. Not used.
param: int $depth Depth of page. Not Used.
param: array $args

Class: Walker_PageDropdown  - X-Ref

Create HTML dropdown list of pages.

start_el( &$output, $page, $depth = 0, $args = array()   X-Ref

param: string $output Passed by reference. Used to append additional content.
param: object $page Page data object.
param: int $depth Depth of page in reference to parent pages. Used for padding.
param: array $args Uses 'selected' argument for selected page to set selected HTML attribute for option element.
param: int $id

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|bool $text Optional, default is false. If string, then will be link text.
return: string HTML content.

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

param: string $content
return: string

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

param: int|WP_Post $post Optional. A post id or post object. Defaults to the current post when in The Loop, undefined otherwise.
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 if you are in a page template.
You can optionally 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 True on success, false on failure.

get_page_template_slug( $post_id = null )   X-Ref
Get the specific template name for a page.

param: int $post_id Optional. The page ID to check. Defaults to the current post, when used in the loop.
return: string|bool Page template filename. Returns an empty string when the default page template

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_post_revision_title_expanded( $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 gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'.

wp_list_post_revisions( $post_id = 0, $type = 'all' )   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.

param: int|object $post_id Post ID or post object.
param: string $type 'all' (default), 'revision' or 'autosave'
return: null

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: int

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( $post = 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|object $post Optional. Post ID or object.
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.

Url is escaped to make it xml safe

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, $strip_teaser = false)   X-Ref
Display the post content.

param: string $more_link_text Optional. Content for when there is more text.
param: bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.

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

param: string $more_link_text Optional. Content for when there is more text.
param: bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
return: string

_convert_urlencoded_to_entities( $match )   X-Ref
Preview fix for javascript bug with foreign languages

param: array $match Match array from preg_replace_callback
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|WP_Post $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.

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:
'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. Also prepended to the current item, which
is not linked.
'link_after' - Default is '' (string). The html or text to append to each
Pages link inside the <a> tag. Also appended to the current item, which
is not linked.
'next_or_number' - Default is 'number' (string). Indicates whether page
numbers should be used. Valid values are number and next.
'separator' - Default is ' ' (string). Text used between pagination links.
'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.
'echo' - Default is 1 (integer). When not 0, this triggers the HTML to be
echoed and then returned.

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

_wp_link_page( $i )   X-Ref
Helper function for wp_link_pages().

param: int $i Page number.
return: string Link.

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

param: string $key Meta data key name.
return: bool|string|array Array of values or single value, if only one element exists. False will be returned if key does not exist.

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 'menu_order, post_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
return: string html menu

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.




Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu