[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

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

WordPress Link Template Functions

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

Defines 113 functions

  the_permalink()
  user_trailingslashit()
  permalink_anchor()
  get_the_permalink()
  get_permalink()
  get_post_permalink()
  get_page_link()
  _get_page_link()
  get_attachment_link()
  get_year_link()
  get_month_link()
  get_day_link()
  the_feed_link()
  get_feed_link()
  get_post_comments_feed_link()
  post_comments_feed_link()
  get_author_feed_link()
  get_category_feed_link()
  get_term_feed_link()
  get_tag_feed_link()
  get_edit_tag_link()
  edit_tag_link()
  get_edit_term_link()
  edit_term_link()
  get_search_link()
  get_search_feed_link()
  get_search_comments_feed_link()
  get_post_type_archive_link()
  get_post_type_archive_feed_link()
  get_preview_post_link()
  get_edit_post_link()
  edit_post_link()
  get_delete_post_link()
  get_edit_comment_link()
  edit_comment_link()
  get_edit_bookmark_link()
  edit_bookmark_link()
  get_edit_user_link()
  get_previous_post()
  get_next_post()
  get_adjacent_post()
  get_adjacent_post_rel_link()
  adjacent_posts_rel_link()
  adjacent_posts_rel_link_wp_head()
  next_post_rel_link()
  prev_post_rel_link()
  get_boundary_post()
  get_previous_post_link()
  previous_post_link()
  get_next_post_link()
  next_post_link()
  get_adjacent_post_link()
  adjacent_post_link()
  get_pagenum_link()
  get_next_posts_page_link()
  next_posts()
  get_next_posts_link()
  next_posts_link()
  get_previous_posts_page_link()
  previous_posts()
  get_previous_posts_link()
  previous_posts_link()
  get_posts_nav_link()
  posts_nav_link()
  get_the_post_navigation()
  the_post_navigation()
  get_the_posts_navigation()
  the_posts_navigation()
  get_the_posts_pagination()
  the_posts_pagination()
  _navigation_markup()
  get_comments_pagenum_link()
  get_next_comments_link()
  next_comments_link()
  get_previous_comments_link()
  previous_comments_link()
  paginate_comments_links()
  get_the_comments_navigation()
  the_comments_navigation()
  get_the_comments_pagination()
  the_comments_pagination()
  home_url()
  get_home_url()
  site_url()
  get_site_url()
  admin_url()
  get_admin_url()
  includes_url()
  content_url()
  plugins_url()
  network_site_url()
  network_home_url()
  network_admin_url()
  user_admin_url()
  self_admin_url()
  set_url_scheme()
  get_dashboard_url()
  get_edit_profile_url()
  wp_get_canonical_url()
  rel_canonical()
  wp_get_shortlink()
  wp_shortlink_wp_head()
  wp_shortlink_header()
  the_shortlink()
  get_avatar_url()
  get_avatar_data()
  get_theme_file_uri()
  get_parent_theme_file_uri()
  get_theme_file_path()
  get_parent_theme_file_path()
  get_privacy_policy_url()
  the_privacy_policy_link()
  get_the_privacy_policy_link()

Functions
Functions that are not part of a class:

the_permalink( $post = 0 )   X-Ref
Displays the permalink for the current post.

param: int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`.

user_trailingslashit( $string, $type_of_url = '' )   X-Ref
Retrieves a trailing-slashed string if the site is set for adding trailing slashes.

Conditionally adds a trailing slash if the permalink structure has a trailing
slash, strips the trailing slash if not. The string is passed through the
{@see 'user_trailingslashit'} filter. Will remove trailing slash from string, if
site is not set to have them.

return: string The URL with the trailing slash appended or stripped.
param: string $string      URL with or without a trailing slash.
param: string $type_of_url Optional. The type of URL being considered (e.g. single, category, etc)

permalink_anchor( $mode = 'id' )   X-Ref
Displays the permalink anchor for the current post.

The permalink mode title will use the post title for the 'a' element 'id'
attribute. The id mode uses 'post-' with the post ID for the 'id' attribute.

param: string $mode Optional. Permalink mode. Accepts 'title' or 'id'. Default 'id'.

get_the_permalink( $post = 0, $leavename = false )   X-Ref
Retrieves the full permalink for the current post or post ID.

This function is an alias for get_permalink().

return: string|false The permalink URL or false if post does not exist.
param: int|WP_Post $post      Optional. Post ID or post object. Default is the global `$post`.
param: bool        $leavename Optional. Whether to keep post name or page name. Default false.

get_permalink( $post = 0, $leavename = false )   X-Ref
Retrieves the full permalink for the current post or post ID.

return: string|false The permalink URL or false if post does not exist.
param: int|WP_Post $post      Optional. Post ID or post object. Default is the global `$post`.
param: bool        $leavename Optional. Whether to keep post name or page name. Default false.

get_post_permalink( $id = 0, $leavename = false, $sample = false )   X-Ref
Retrieves the permalink for a post of a custom post type.

return: string|WP_Error The post permalink.
param: int|WP_Post $id        Optional. Post ID or post object. Default is the global `$post`.
param: bool        $leavename Optional, defaults to false. Whether to keep post name. Default false.
param: bool        $sample    Optional, defaults to false. Is it a sample permalink. Default false.

get_page_link( $post = false, $leavename = false, $sample = false )   X-Ref
Retrieves the permalink for the current page or page ID.

Respects page_on_front. Use this one.

return: string The page permalink.
param: int|WP_Post $post      Optional. Post ID or object. Default uses the global `$post`.
param: bool        $leavename Optional. Whether to keep the page name. Default false.
param: bool        $sample    Optional. Whether it should be treated as a sample permalink.

_get_page_link( $post = false, $leavename = false, $sample = false )   X-Ref
Retrieves the page permalink.

Ignores page_on_front. Internal use only.

return: string The page permalink.
param: int|WP_Post $post      Optional. Post ID or object. Default uses the global `$post`.
param: bool        $leavename Optional. Whether to keep the page name. Default false.
param: bool        $sample    Optional. Whether it should be treated as a sample permalink.

get_attachment_link( $post = null, $leavename = false )   X-Ref
Retrieves the permalink for an attachment.

This can be used in the WordPress Loop or outside of it.

return: string The attachment permalink.
param: int|object $post      Optional. Post ID or object. Default uses the global `$post`.
param: bool       $leavename Optional. Whether to keep the page name. Default false.

get_year_link( $year )   X-Ref
Retrieves the permalink for the year archives.

return: string The permalink for the specified year archive.
param: int|bool $year False for current year or year for permalink.

get_month_link( $year, $month )   X-Ref
Retrieves the permalink for the month archives with year.

return: string The permalink for the specified month and year archive.
param: bool|int $year  False for current year. Integer of year.
param: bool|int $month False for current month. Integer of month.

get_day_link( $year, $month, $day )   X-Ref
Retrieves the permalink for the day archives with year and month.

return: string The permalink for the specified day, month, and year archive.
param: bool|int $year  False for current year. Integer of year.
param: bool|int $month False for current month. Integer of month.
param: bool|int $day   False for current day. Integer of day.

the_feed_link( $anchor, $feed = '' )   X-Ref
Displays the permalink for the feed type.

param: string $anchor The link's anchor text.
param: string $feed   Optional. Feed type. Default empty.

get_feed_link( $feed = '' )   X-Ref
Retrieves the permalink for the feed type.

return: string The feed permalink.
param: string $feed Optional. Feed type. Default empty.

get_post_comments_feed_link( $post_id = 0, $feed = '' )   X-Ref
Retrieves the permalink for the post comments feed.

return: string The permalink for the comments feed for the given post.
param: int    $post_id Optional. Post ID. Default is the ID of the global `$post`.
param: string $feed    Optional. Feed type. Default empty.

post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' )   X-Ref
Displays the comment feed link for a post.

Prints out the comment feed link for a post. Link text is placed in the
anchor. If no link text is specified, default text is used. If no post ID is
specified, the current post is used.

param: string $link_text Optional. Descriptive link text. Default 'Comments Feed'.
param: int    $post_id   Optional. Post ID. Default is the ID of the global `$post`.
param: string $feed      Optional. Feed format. Default empty.

get_author_feed_link( $author_id, $feed = '' )   X-Ref
Retrieves the feed link for a given author.

Returns a link to the feed for all posts by a given author. A specific feed
can be requested or left blank to get the default feed.

return: string Link to the feed for the author specified by $author_id.
param: int    $author_id Author ID.
param: string $feed      Optional. Feed type. Default empty.

get_category_feed_link( $cat_id, $feed = '' )   X-Ref
Retrieves the feed link for a category.

Returns a link to the feed for all posts in a given category. A specific feed
can be requested or left blank to get the default feed.

return: string Link to the feed for the category specified by $cat_id.
param: int    $cat_id Category ID.
param: string $feed   Optional. Feed type. Default empty.

get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' )   X-Ref
Retrieves the feed link for a term.

Returns a link to the feed for all posts in a given term. A specific feed
can be requested or left blank to get the default feed.

return: string|false Link to the feed for the term specified by $term_id and $taxonomy.
param: int    $term_id  Term ID.
param: string $taxonomy Optional. Taxonomy of `$term_id`. Default 'category'.
param: string $feed     Optional. Feed type. Default empty.

get_tag_feed_link( $tag_id, $feed = '' )   X-Ref
Retrieves the permalink for a tag feed.

return: string The feed permalink for the given tag.
param: int    $tag_id Tag ID.
param: string $feed   Optional. Feed type. Default empty.

get_edit_tag_link( $tag_id, $taxonomy = 'post_tag' )   X-Ref
Retrieves the edit link for a tag.

return: string The edit tag link URL for the given tag.
param: int    $tag_id   Tag ID.
param: string $taxonomy Optional. Taxonomy slug. Default 'post_tag'.

edit_tag_link( $link = '', $before = '', $after = '', $tag = null )   X-Ref
Displays or retrieves the edit link for a tag with formatting.

param: string  $link   Optional. Anchor text. Default empty.
param: string  $before Optional. Display before edit link. Default empty.
param: string  $after  Optional. Display after edit link. Default empty.
param: WP_Term $tag    Optional. Term object. If null, the queried object will be inspected.

get_edit_term_link( $term_id, $taxonomy = '', $object_type = '' )   X-Ref
Retrieves the URL for editing a given term.

return: string|null The edit term link URL for the given term, or null on failure.
param: int    $term_id     Term ID.
param: string $taxonomy    Optional. Taxonomy. Defaults to the taxonomy of the term identified
param: string $object_type Optional. The object type. Used to highlight the proper post type

edit_term_link( $link = '', $before = '', $after = '', $term = null, $echo = true )   X-Ref
Displays or retrieves the edit term link with formatting.

return: string|void HTML content.
param: string $link   Optional. Anchor text. Default empty.
param: string $before Optional. Display before edit link. Default empty.
param: string $after  Optional. Display after edit link. Default empty.
param: object $term   Optional. Term object. If null, the queried object will be inspected. Default null.
param: bool   $echo   Optional. Whether or not to echo the return. Default true.

get_search_link( $query = '' )   X-Ref
Retrieves the permalink for a search.

return: string The search permalink.
param: string $query Optional. The query string to use. If empty the current query is used. Default empty.

get_search_feed_link( $search_query = '', $feed = '' )   X-Ref
Retrieves the permalink for the search results feed.

return: string The search results feed permalink.
param: string $search_query Optional. Search query. Default empty.
param: string $feed         Optional. Feed type. Default empty.

get_search_comments_feed_link( $search_query = '', $feed = '' )   X-Ref
Retrieves the permalink for the search results comments feed.

return: string The comments feed search results permalink.
param: string $search_query Optional. Search query. Default empty.
param: string $feed         Optional. Feed type. Default empty.

get_post_type_archive_link( $post_type )   X-Ref
Retrieves the permalink for a post type archive.

return: string|false The post type archive permalink.
param: string $post_type Post type.

get_post_type_archive_feed_link( $post_type, $feed = '' )   X-Ref
Retrieves the permalink for a post type archive feed.

return: string|false The post type feed permalink.
param: string $post_type Post type
param: string $feed      Optional. Feed type. Default empty.

get_preview_post_link( $post = null, $query_args = array()   X-Ref
Retrieves the URL used for the post preview.

Allows additional query args to be appended.

return: string|null URL used for the post preview, or null if the post does not exist.
param: int|WP_Post $post         Optional. Post ID or `WP_Post` object. Defaults to global `$post`.
param: array       $query_args   Optional. Array of additional query args to be appended to the link.
param: string      $preview_link Optional. Base preview link to be used if it should differ from the

get_edit_post_link( $id = 0, $context = 'display' )   X-Ref
Retrieves the edit post link for post.

Can be used within the WordPress loop or outside of it. Can be used with
pages, posts, attachments, and revisions.

return: string|null The edit post link for the given post. null if the post type is invalid or does
param: int|WP_Post $id      Optional. Post ID or post object. Default is the global `$post`.
param: string      $context Optional. How to output the '&' character. Default '&'.

edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' )   X-Ref
Displays the edit post link for post.

param: string      $text   Optional. Anchor text. If null, default is 'Edit This'. Default null.
param: string      $before Optional. Display before edit link. Default empty.
param: string      $after  Optional. Display after edit link. Default empty.
param: int|WP_Post $id     Optional. Post ID or post object. Default is the global `$post`.
param: string      $class  Optional. Add custom class to link. Default 'post-edit-link'.

get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false )   X-Ref
Retrieves the delete posts link for post.

Can be used within the WordPress loop or outside of it, with any post type.

return: string|void The delete post link URL for the given post.
param: int|WP_Post $id           Optional. Post ID or post object. Default is the global `$post`.
param: string      $deprecated   Not used.
param: bool        $force_delete Optional. Whether to bypass trash and force deletion. Default false.

get_edit_comment_link( $comment_id = 0 )   X-Ref
Retrieves the edit comment link.

return: string|void The edit comment link URL for the given comment.
param: int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object.

edit_comment_link( $text = null, $before = '', $after = '' )   X-Ref
Displays the edit comment link with formatting.

param: string $text   Optional. Anchor text. If null, default is 'Edit This'. Default null.
param: string $before Optional. Display before edit link. Default empty.
param: string $after  Optional. Display after edit link. Default empty.

get_edit_bookmark_link( $link = 0 )   X-Ref
Displays the edit bookmark link.

return: string|void The edit bookmark link URL.
param: int|stdClass $link Optional. Bookmark ID. Default is the id of the current bookmark.

edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null )   X-Ref
Displays the edit bookmark link anchor content.

param: string $link     Optional. Anchor text. Default empty.
param: string $before   Optional. Display before edit link. Default empty.
param: string $after    Optional. Display after edit link. Default empty.
param: int    $bookmark Optional. Bookmark ID. Default is the current bookmark.

get_edit_user_link( $user_id = null )   X-Ref
Retrieves the edit user link.

return: string URL to edit user page or empty string.
param: int $user_id Optional. User ID. Defaults to the current user.

get_previous_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Retrieves the previous post that is adjacent to the current post.

return: null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
param: bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Retrieves the next post that is adjacent to the current post.

return: null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
param: bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' )   X-Ref
Retrieves the adjacent post.

Can either be next or previous post.

return: null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
param: bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: bool         $previous       Optional. Whether to retrieve previous post. Default true
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' )   X-Ref
Retrieves the adjacent post relational link.

Can either be next or previous post relational link.

return: string|void The adjacent post relational link URL.
param: string       $title          Optional. Link title format. Default '%title'.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: bool         $previous       Optional. Whether to display link to previous or next post. Default true.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

adjacent_posts_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Displays the relational links for the posts adjacent to the current post.

param: string       $title          Optional. Link title format. Default '%title'.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

adjacent_posts_rel_link_wp_head()   X-Ref
Displays relational links for the posts adjacent to the current post for single post pages.

This is meant to be attached to actions like 'wp_head'. Do not call this directly in plugins
or theme templates.


next_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Displays the relational link for the next post adjacent to the current post.

param: string       $title          Optional. Link title format. Default '%title'.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

prev_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Displays the relational link for the previous post adjacent to the current post.

param: string       $title          Optional. Link title format. Default '%title'.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default true.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

get_boundary_post( $in_same_term = false, $excluded_terms = '', $start = true, $taxonomy = 'category' )   X-Ref
Retrieves the boundary post.

Boundary being either the first or last post by publish date within the constraints specified
by $in_same_term or $excluded_terms.

return: null|array Array containing the boundary post object if successful, null otherwise.
param: bool         $in_same_term   Optional. Whether returned post should be in a same taxonomy term.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
param: bool         $start          Optional. Whether to retrieve first or last post. Default true
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

get_previous_post_link( $format = '« %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Retrieves the previous post link that is adjacent to the current post.

return: string The link URL of the previous post in relation to the current post.
param: string       $format         Optional. Link anchor format. Default '« %link'.
param: string       $link           Optional. Link permalink format. Default '%title'.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

previous_post_link( $format = '« %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Displays the previous post link that is adjacent to the current post.

param: string       $format         Optional. Link anchor format. Default '« %link'.
param: string       $link           Optional. Link permalink format. Default '%title'.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

get_next_post_link( $format = '%link »', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Retrieves the next post link that is adjacent to the current post.

return: string The link URL of the next post in relation to the current post.
param: string       $format         Optional. Link anchor format. Default '« %link'.
param: string       $link           Optional. Link permalink format. Default '%title'.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

next_post_link( $format = '%link »', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' )   X-Ref
Displays the next post link that is adjacent to the current post.

param: string       $format         Optional. Link anchor format. Default '« %link'.
param: string       $link           Optional. Link permalink format. Default '%title'
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

get_adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' )   X-Ref
Retrieves the adjacent post link.

Can be either next post link or previous.

return: string The link URL of the previous or next post in relation to the current post.
param: string       $format         Link anchor format.
param: string       $link           Link permalink format.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs. Default empty.
param: bool         $previous       Optional. Whether to display link to previous or next post. Default true.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' )   X-Ref
Displays the adjacent post link.

Can be either next post link or previous.

param: string       $format         Link anchor format.
param: string       $link           Link permalink format.
param: bool         $in_same_term   Optional. Whether link should be in a same taxonomy term. Default false.
param: array|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty.
param: bool         $previous       Optional. Whether to display link to previous or next post. Default true.
param: string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.

get_pagenum_link( $pagenum = 1, $escape = true )   X-Ref
Retrieves the link for a page number.

return: string The link URL for the given page number.
param: int  $pagenum Optional. Page ID. Default 1.
param: bool $escape  Optional. Whether to escape the URL for display, with esc_url(). Defaults to true.

get_next_posts_page_link( $max_page = 0 )   X-Ref
Retrieves the next posts page link.

Backported from 2.1.3 to 2.0.10.

return: string|void The link URL for next posts page.
param: int $max_page Optional. Max pages. Default 0.

next_posts( $max_page = 0, $echo = true )   X-Ref
Displays or retrieves the next posts page link.

return: string|void The link URL for next posts page if `$echo = false`.
param: int   $max_page Optional. Max pages. Default 0.
param: bool  $echo     Optional. Whether to echo the link. Default true.

get_next_posts_link( $label = null, $max_page = 0 )   X-Ref
Retrieves the next posts page link.

return: string|void HTML-formatted next posts page link.
param: string $label    Content for link text.
param: int    $max_page Optional. Max pages. Default 0.

next_posts_link( $label = null, $max_page = 0 )   X-Ref
Displays the next posts page link.

param: string $label    Content for link text.
param: int    $max_page Optional. Max pages. Default 0.

get_previous_posts_page_link()   X-Ref
Retrieves the previous posts page link.

Will only return string, if not on a single page or post.

Backported to 2.0.10 from 2.1.3.

return: string|void The link for the previous posts page.

previous_posts( $echo = true )   X-Ref
Displays or retrieves the previous posts page link.

return: string|void The previous posts page link if `$echo = false`.
param: bool $echo Optional. Whether to echo the link. Default true.

get_previous_posts_link( $label = null )   X-Ref
Retrieves the previous posts page link.

return: string|void HTML-formatted previous page link.
param: string $label Optional. Previous page link text.

previous_posts_link( $label = null )   X-Ref
Displays the previous posts page link.

param: string $label Optional. Previous page link text.

get_posts_nav_link( $args = array()   X-Ref
Retrieves the post pages link navigation for previous and next pages.

return: string The posts link navigation.
param: string|array $args {

posts_nav_link( $sep = '', $prelabel = '', $nxtlabel = '' )   X-Ref
Displays the post pages link navigation for previous and next pages.

param: string $sep      Optional. Separator for posts navigation links. Default empty.
param: string $prelabel Optional. Label for previous pages. Default empty.
param: string $nxtlabel Optional Label for next pages. Default empty.

get_the_post_navigation( $args = array()   X-Ref
Retrieves the navigation to next/previous post, when applicable.

return: string Markup for post links.
param: array $args {

the_post_navigation( $args = array()   X-Ref
Displays the navigation to next/previous post, when applicable.

param: array $args Optional. See get_the_post_navigation() for available arguments.

get_the_posts_navigation( $args = array()   X-Ref
Returns the navigation to next/previous set of posts, when applicable.

return: string Markup for posts links.
param: array $args {

the_posts_navigation( $args = array()   X-Ref
Displays the navigation to next/previous set of posts, when applicable.

param: array $args Optional. See get_the_posts_navigation() for available arguments.

get_the_posts_pagination( $args = array()   X-Ref
Retrieves a paginated navigation to next/previous set of posts, when applicable.

return: string Markup for pagination links.
param: array $args {

the_posts_pagination( $args = array()   X-Ref
Displays a paginated navigation to next/previous set of posts, when applicable.

param: array $args Optional. See get_the_posts_pagination() for available arguments.

_navigation_markup( $links, $class = 'posts-navigation', $screen_reader_text = '' )   X-Ref
Wraps passed links in navigational markup.

return: string Navigation template tag.
param: string $links              Navigational links.
param: string $class              Optional. Custom class for nav element. Default: 'posts-navigation'.
param: string $screen_reader_text Optional. Screen reader text for nav element. Default: 'Posts navigation'.

get_comments_pagenum_link( $pagenum = 1, $max_page = 0 )   X-Ref
Retrieves the comments page number link.

return: string The comments page number link URL.
param: int $pagenum  Optional. Page number. Default 1.
param: int $max_page Optional. The maximum number of comment pages. Default 0.

get_next_comments_link( $label = '', $max_page = 0 )   X-Ref
Retrieves the link to the next comments page.

return: string|void HTML-formatted link for the next page of comments.
param: string $label    Optional. Label for link text. Default empty.
param: int    $max_page Optional. Max page. Default 0.

next_comments_link( $label = '', $max_page = 0 )   X-Ref
Displays the link to the next comments page.

param: string $label    Optional. Label for link text. Default empty.
param: int    $max_page Optional. Max page. Default 0.

get_previous_comments_link( $label = '' )   X-Ref
Retrieves the link to the previous comments page.

return: string|void HTML-formatted link for the previous page of comments.
param: string $label Optional. Label for comments link text. Default empty.

previous_comments_link( $label = '' )   X-Ref
Displays the link to the previous comments page.

param: string $label Optional. Label for comments link text. Default empty.

paginate_comments_links( $args = array()   X-Ref
Displays or retrieves pagination links for the comments on the current post.

return: string|array|void Markup for comment page links or array of comment page links.
param: string|array $args Optional args. See paginate_links(). Default empty array.

get_the_comments_navigation( $args = array()   X-Ref
Retrieves navigation to next/previous set of comments, when applicable.

return: string Markup for comments links.
param: array $args {

the_comments_navigation( $args = array()   X-Ref
Displays navigation to next/previous set of comments, when applicable.

param: array $args See get_the_comments_navigation() for available arguments. Default empty array.

get_the_comments_pagination( $args = array()   X-Ref
Retrieves a paginated navigation to next/previous set of comments, when applicable.

return: string Markup for pagination links.
param: array $args {

the_comments_pagination( $args = array()   X-Ref
Displays a paginated navigation to next/previous set of comments, when applicable.

param: array $args See get_the_comments_pagination() for available arguments. Default empty array.

home_url( $path = '', $scheme = null )   X-Ref
Retrieves the URL for the current site where the front end is accessible.

Returns the 'home' option with the appropriate protocol. The protocol will be 'https'
if is_ssl() evaluates to true; otherwise, it will be the same as the 'home' option.
If `$scheme` is 'http' or 'https', is_ssl() is overridden.

return: string Home URL link with optional path appended.
param: string      $path   Optional. Path relative to the home URL. Default empty.
param: string|null $scheme Optional. Scheme to give the home URL context. Accepts

get_home_url( $blog_id = null, $path = '', $scheme = null )   X-Ref
Retrieves the URL for a given site where the front end is accessible.

Returns the 'home' option with the appropriate protocol. The protocol will be 'https'
if is_ssl() evaluates to true; otherwise, it will be the same as the 'home' option.
If `$scheme` is 'http' or 'https', is_ssl() is overridden.

return: string Home URL link with optional path appended.
param: int         $blog_id Optional. Site ID. Default null (current site).
param: string      $path    Optional. Path relative to the home URL. Default empty.
param: string|null $scheme  Optional. Scheme to give the home URL context. Accepts

site_url( $path = '', $scheme = null )   X-Ref
Retrieves the URL for the current site where WordPress application files
(e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.

Returns the 'site_url' option with the appropriate protocol, 'https' if
is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
overridden.

return: string Site URL link with optional path appended.
param: string $path   Optional. Path relative to the site URL. Default empty.
param: string $scheme Optional. Scheme to give the site URL context. See set_url_scheme().

get_site_url( $blog_id = null, $path = '', $scheme = null )   X-Ref
Retrieves the URL for a given site where WordPress application files
(e.g. wp-blog-header.php or the wp-admin/ folder) are accessible.

Returns the 'site_url' option with the appropriate protocol, 'https' if
is_ssl() and 'http' otherwise. If `$scheme` is 'http' or 'https',
`is_ssl()` is overridden.

return: string Site URL link with optional path appended.
param: int    $blog_id Optional. Site ID. Default null (current site).
param: string $path    Optional. Path relative to the site URL. Default empty.
param: string $scheme  Optional. Scheme to give the site URL context. Accepts

admin_url( $path = '', $scheme = 'admin' )   X-Ref
Retrieves the URL to the admin area for the current site.

return: string Admin URL link with optional path appended.
param: string $path   Optional path relative to the admin URL.
param: string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl().

get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' )   X-Ref
Retrieves the URL to the admin area for a given site.

return: string Admin URL link with optional path appended.
param: int    $blog_id Optional. Site ID. Default null (current site).
param: string $path    Optional. Path relative to the admin URL. Default empty.
param: string $scheme  Optional. The scheme to use. Accepts 'http' or 'https',

includes_url( $path = '', $scheme = null )   X-Ref
Retrieves the URL to the includes directory.

return: string Includes URL link with optional path appended.
param: string $path   Optional. Path relative to the includes URL. Default empty.
param: string $scheme Optional. Scheme to give the includes URL context. Accepts

content_url( $path = '' )   X-Ref
Retrieves the URL to the content directory.

return: string Content URL link with optional path appended.
param: string $path Optional. Path relative to the content URL. Default empty.

plugins_url( $path = '', $plugin = '' )   X-Ref
Retrieves a URL within the plugins or mu-plugins directory.

Defaults to the plugins directory URL if no arguments are supplied.

return: string Plugins URL link with optional paths appended.
param: string $path   Optional. Extra path appended to the end of the URL, including
param: string $plugin Optional. A full path to a file inside a plugin or mu-plugin.

network_site_url( $path = '', $scheme = null )   X-Ref
Retrieves the site URL for the current network.

Returns the site URL with the appropriate protocol, 'https' if
is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
overridden.

return: string Site URL link with optional path appended.
param: string $path   Optional. Path relative to the site URL. Default empty.
param: string $scheme Optional. Scheme to give the site URL context. Accepts

network_home_url( $path = '', $scheme = null )   X-Ref
Retrieves the home URL for the current network.

Returns the home URL with the appropriate protocol, 'https' is_ssl()
and 'http' otherwise. If `$scheme` is 'http' or 'https', `is_ssl()` is
overridden.

return: string Home URL link with optional path appended.
param: string $path   Optional. Path relative to the home URL. Default empty.
param: string $scheme Optional. Scheme to give the home URL context. Accepts

network_admin_url( $path = '', $scheme = 'admin' )   X-Ref
Retrieves the URL to the admin area for the network.

return: string Admin URL link with optional path appended.
param: string $path   Optional path relative to the admin URL. Default empty.
param: string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()

user_admin_url( $path = '', $scheme = 'admin' )   X-Ref
Retrieves the URL to the admin area for the current user.

return: string Admin URL link with optional path appended.
param: string $path   Optional. Path relative to the admin URL. Default empty.
param: string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()

self_admin_url( $path = '', $scheme = 'admin' )   X-Ref
Retrieves the URL to the admin area for either the current site or the network depending on context.

return: string Admin URL link with optional path appended.
param: string $path   Optional. Path relative to the admin URL. Default empty.
param: string $scheme Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()

set_url_scheme( $url, $scheme = null )   X-Ref
Sets the scheme for a URL.

return: string $url URL with chosen scheme.
param: string      $url    Absolute URL that includes a scheme
param: string|null $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login',

get_dashboard_url( $user_id = 0, $path = '', $scheme = 'admin' )   X-Ref
Retrieves the URL to the user's dashboard.

If a user does not belong to any site, the global user dashboard is used. If the user
belongs to the current site, the dashboard for the current site is returned. If the user
cannot edit the current site, the dashboard to the user's primary site is returned.

return: string Dashboard URL link with optional path appended.
param: int    $user_id Optional. User ID. Defaults to current user.
param: string $path    Optional path relative to the dashboard. Use only paths known to
param: string $scheme  The scheme to use. Default is 'admin', which obeys force_ssl_admin()

get_edit_profile_url( $user_id = 0, $scheme = 'admin' )   X-Ref
Retrieves the URL to the user's profile editor.

return: string Dashboard URL link with optional path appended.
param: int    $user_id Optional. User ID. Defaults to current user.
param: string $scheme  Optional. The scheme to use. Default is 'admin', which obeys force_ssl_admin()

wp_get_canonical_url( $post = null )   X-Ref
Returns the canonical URL for a post.

When the post is the same as the current requested page the function will handle the
pagination arguments too.

return: string|false The canonical URL, or false if the post does not exist or has not
param: int|WP_Post $post Optional. Post ID or object. Default is global `$post`.

rel_canonical()   X-Ref
Outputs rel=canonical for singular queries.


wp_get_shortlink( $id = 0, $context = 'post', $allow_slugs = true )   X-Ref
Returns a shortlink for a post, page, attachment, or site.

This function exists to provide a shortlink tag that all themes and plugins can target.
A plugin must hook in to provide the actual shortlinks. Default shortlink support is
limited to providing ?p= style links for posts. Plugins can short-circuit this function
via the {@see 'pre_get_shortlink'} filter or filter the output via the {@see 'get_shortlink'}
filter.

return: string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks
param: int    $id          Optional. A post or site id. Default is 0, which means the current post or site.
param: string $context     Optional. Whether the id is a 'site' id, 'post' id, or 'media' id. If 'post',
param: bool   $allow_slugs Optional. Whether to allow post slugs in the shortlink. It is up to the plugin how

wp_shortlink_wp_head()   X-Ref
Injects rel=shortlink into the head if a shortlink is defined for the current page.

Attached to the {@see 'wp_head'} action.


wp_shortlink_header()   X-Ref
Sends a Link: rel=shortlink header if a shortlink is defined for the current page.

Attached to the {@see 'wp'} action.


the_shortlink( $text = '', $title = '', $before = '', $after = '' )   X-Ref
Displays the shortlink for a post.

Must be called from inside "The Loop"

Call like the_shortlink( __( 'Shortlinkage FTW' ) )

param: string $text   Optional The link text or HTML to be displayed. Defaults to 'This is the short link.'
param: string $title  Optional The tooltip for the link. Must be sanitized. Defaults to the sanitized post title.
param: string $before Optional HTML to display before the link. Default empty.
param: string $after  Optional HTML to display after the link. Default empty.

get_avatar_url( $id_or_email, $args = null )   X-Ref
Retrieves the avatar URL.

return: false|string The URL of the avatar we found, or false if we couldn't find an avatar.
param: mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash,
param: array $args {

get_avatar_data( $id_or_email, $args = null )   X-Ref
Retrieves default data about the avatar.

return: array $processed_args {
param: mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
param: array $args {

get_theme_file_uri( $file = '' )   X-Ref
Retrieves the URL of a file in the theme.

Searches in the stylesheet directory before the template directory so themes
which inherit from a parent theme can just override one file.

return: string The URL of the file.
param: string $file Optional. File to search for in the stylesheet directory.

get_parent_theme_file_uri( $file = '' )   X-Ref
Retrieves the URL of a file in the parent theme.

return: string The URL of the file.
param: string $file Optional. File to return the URL for in the template directory.

get_theme_file_path( $file = '' )   X-Ref
Retrieves the path of a file in the theme.

Searches in the stylesheet directory before the template directory so themes
which inherit from a parent theme can just override one file.

return: string The path of the file.
param: string $file Optional. File to search for in the stylesheet directory.

get_parent_theme_file_path( $file = '' )   X-Ref
Retrieves the path of a file in the parent theme.

return: string The path of the file.
param: string $file Optional. File to return the path for in the template directory.

get_privacy_policy_url()   X-Ref
Retrieves the URL to the privacy policy page.

return: string The URL to the privacy policy page. Empty string if it doesn't exist.

the_privacy_policy_link( $before = '', $after = '' )   X-Ref
Displays the privacy policy link with formatting, when applicable.

param: string $before Optional. Display before privacy policy link. Default empty.
param: string $after  Optional. Display after privacy policy link. Default empty.

get_the_privacy_policy_link( $before = '', $after = '' )   X-Ref
Returns the privacy policy link with formatting, when applicable.

return: string Markup for the link and surrounding elements. Empty string if it
param: string $before Optional. Display before privacy policy link. Default empty.
param: string $after  Optional. Display after privacy policy link. Default empty.



Generated: Wed Aug 15 08:20:01 2018 Cross-referenced by PHPXref 0.7