[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

WordPress Link Template Functions

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

Defines 115 functions

  the_permalink()
  user_trailingslashit()
  permalink_anchor()
  wp_force_plain_post_permalink()
  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()
  is_avatar_comment_type()
  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.

since: 1.2.0
since: 4.4.0 Added the `$post` parameter.
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.

since: 2.2.0
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.

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

wp_force_plain_post_permalink( $post = null, $sample = null )   X-Ref
Determine whether post should always use a plain permalink structure.

since: 5.7.0
return: bool Whether to use a plain permalink structure.
param: WP_Post|int|null $post   Optional. Post ID or post object. Defaults to global $post.
param: bool|null        $sample Optional. Whether to force consideration based on sample links.

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().

since: 3.9.0
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.

since: 1.0.0
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.

since: 3.0.0
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. Whether to keep post name. Default false.
param: bool        $sample    Optional. 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.

since: 1.5.0
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.

since: 2.1.0
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.

since: 2.0.0
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.

since: 1.5.0
return: string The permalink for the specified year archive.
param: int|false $year Integer of year. False for current year.

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

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

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

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

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

since: 3.0.0
param: string $anchor The link's anchor text.
param: string $feed   Optional. Feed type. Possible values include 'rss2', 'atom'.

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

since: 1.5.0
return: string The feed permalink.
param: string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.

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

since: 2.2.0
return: string The permalink for the comments feed for the given post on success, empty string on failure.
param: int    $post_id Optional. Post ID. Default is the ID of the global `$post`.
param: string $feed    Optional. Feed type. Possible values include 'rss2', 'atom'.

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.

since: 2.5.0
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 type. Possible values include 'rss2', 'atom'.

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.

since: 2.5.0
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. Possible values include 'rss2', 'atom'.

get_category_feed_link( $cat, $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.

since: 2.5.0
return: string Link to the feed for the category specified by `$cat`.
param: int|WP_Term|object $cat  The ID or category object whose feed link will be retrieved.
param: string             $feed Optional. Feed type. Possible values include 'rss2', 'atom'.

get_term_feed_link( $term, $taxonomy = '', $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.

since: 3.0.0
return: string|false Link to the feed for the term specified by `$term` and `$taxonomy`.
param: int|WP_Term|object $term     The ID or term object whose feed link will be retrieved.
param: string             $taxonomy Optional. Taxonomy of `$term_id`.
param: string             $feed     Optional. Feed type. Possible values include 'rss2', 'atom'.

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

since: 2.3.0
return: string                  The feed permalink for the given tag.
param: int|WP_Term|object $tag  The ID or term object whose feed link will be retrieved.
param: string             $feed Optional. Feed type. Possible values include 'rss2', 'atom'.

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

since: 2.7.0
return: string The edit tag link URL for the given tag.
param: int|WP_Term|object $tag      The ID or term object whose edit link will be retrieved.
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.

since: 2.7.0
param: string  $link   Optional. Anchor text. If empty, default is 'Edit This'. 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, $taxonomy = '', $object_type = '' )   X-Ref
Retrieves the URL for editing a given term.

since: 3.1.0
since: 4.5.0 The `$taxonomy` parameter was made optional.
return: string|null The edit term link URL for the given term, or null on failure.
param: int|WP_Term|object $term        The ID or term object whose edit link will be retrieved.
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.

since: 3.1.0
return: string|void HTML content.
param: string           $link   Optional. Anchor text. If empty, default is 'Edit This'. Default empty.
param: string           $before Optional. Display before edit link. Default empty.
param: string           $after  Optional. Display after edit link. Default empty.
param: int|WP_Term|null $term   Optional. Term ID or 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.

since: 3.0.0
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.

since: 2.5.0
return: string The search results feed permalink.
param: string $search_query Optional. Search query. Default empty.
param: string $feed         Optional. Feed type. Possible values include 'rss2', 'atom'.

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

since: 2.5.0
return: string The comments feed search results permalink.
param: string $search_query Optional. Search query. Default empty.
param: string $feed         Optional. Feed type. Possible values include 'rss2', 'atom'.

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

since: 3.1.0
since: 4.5.0 Support for posts was added.
return: string|false The post type archive permalink. False if the post type
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.

since: 3.1.0
return: string|false The post type feed permalink. False if the post type
param: string $post_type Post type.
param: string $feed      Optional. Feed type. Possible values include 'rss2', 'atom'.

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.

since: 4.4.0
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.

since: 2.3.0
return: string|null The edit post link for the given post. Null if the post type does not exist
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.

since: 1.0.0
since: 4.4.0 The `$class` argument was added.
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.

since: 2.9.0
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.

since: 2.3.0
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.

since: 1.0.0
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.

since: 2.7.0
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.

since: 2.7.0
param: string $link     Optional. Anchor text. If empty, default is 'Edit This'. 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.

since: 3.5.0
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.

since: 1.5.0
return: WP_Post|null|string 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: int[]|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.

since: 1.5.0
return: WP_Post|null|string 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: int[]|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.

since: 2.5.0
return: WP_Post|null|string 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: int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty string.
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.

since: 2.8.0
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: int[]|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.

since: 2.8.0
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: int[]|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.

since: 3.0.0
since: 5.6.0 No longer used in core.

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.

since: 2.8.0
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: int[]|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.

since: 2.8.0
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: int[]|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.

since: 2.8.0
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: int[]|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.

since: 3.7.0
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: int[]|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.

since: 1.5.0
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: int[]|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.

since: 3.7.0
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: int[]|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.

since: 1.5.0
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: int[]|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.

since: 3.7.0
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: int[]|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.

since: 2.5.0
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: int[]|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.

since: 1.5.0
return: string The link URL for the given page number.
param: int  $pagenum Optional. Page number. 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.

since: 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.

since: 0.71
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.

since: 2.7.0
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.

since: 0.71
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.

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

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

since: 0.71
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.

since: 2.7.0
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.

since: 0.71
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.

since: 2.8.0
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.

since: 0.71
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.

since: 4.1.0
since: 4.4.0 Introduced the `in_same_term`, `excluded_terms`, and `taxonomy` arguments.
since: 5.3.0 Added the `aria_label` parameter.
since: 5.5.0 Added the `class` parameter.
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.

since: 4.1.0
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.

since: 4.1.0
since: 5.3.0 Added the `aria_label` parameter.
since: 5.5.0 Added the `class` parameter.
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.

since: 4.1.0
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.

since: 4.1.0
since: 5.3.0 Added the `aria_label` parameter.
since: 5.5.0 Added the `class` parameter.
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.

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

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

since: 4.1.0
since: 5.3.0 Added the `aria_label` parameter.
return: string Navigation template tag.
param: string $links              Navigational links.
param: string $class              Optional. Custom class for the nav element.
param: string $screen_reader_text Optional. Screen reader text for the nav element.
param: string $aria_label         Optional. ARIA label for the nav element.

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

since: 2.7.0
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.

since: 2.7.1
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.

since: 2.7.0
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.

since: 2.7.1
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.

since: 2.7.0
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.

since: 2.7.0
return: void|string|array Void if 'echo' argument is true and 'type' is not an array,
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.

since: 4.4.0
since: 5.3.0 Added the `aria_label` parameter.
since: 5.5.0 Added the `class` parameter.
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.

since: 4.4.0
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.

since: 4.4.0
since: 5.3.0 Added the `aria_label` parameter.
since: 5.5.0 Added the `class` parameter.
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.

since: 4.4.0
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.

since: 3.0.0
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.

since: 3.0.0
return: string Home URL link with optional path appended.
param: int|null    $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.

since: 3.0.0
return: string Site URL link with optional path appended.
param: string      $path   Optional. Path relative to the site URL. Default empty.
param: string|null $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.

since: 3.0.0
return: string Site URL link with optional path appended.
param: int|null    $blog_id Optional. Site ID. Default null (current site).
param: string      $path    Optional. Path relative to the site URL. Default empty.
param: string|null $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.

since: 2.6.0
return: string Admin URL link with optional path appended.
param: string $path   Optional. Path relative to the admin URL. Default 'admin'.
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.

since: 3.0.0
return: string Admin URL link with optional path appended.
param: int|null $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.

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

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

since: 2.6.0
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.

since: 2.6.0
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.

since: 3.0.0
return: string Site URL link with optional path appended.
param: string      $path   Optional. Path relative to the site URL. Default empty.
param: string|null $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.

since: 3.0.0
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

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

since: 3.0.0
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.

since: 3.0.0
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.

since: 3.1.0
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.

since: 3.4.0
since: 4.4.0 The 'rest' scheme was added.
return: string 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.

since: 3.1.0
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.

since: 3.1.0
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.

since: 4.6.0
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.

since: 2.9.0
since: 4.6.0 Adjusted to use `wp_get_canonical_url()`.

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.

since: 3.0.0
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.

since: 3.0.0

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.

since: 3.0.0

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' ) )

since: 3.0.0
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.

since: 4.2.0
return: string|false The URL of the avatar on success, false on failure.
param: mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash,
param: array $args {

is_avatar_comment_type( $comment_type )   X-Ref
Check if this comment type allows avatars to be retrieved.

since: 5.1.0
return: bool Whether the comment type is allowed for retrieving avatars.
param: string $comment_type Comment type to check.

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

since: 4.2.0
return: array {
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.

since: 4.7.0
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.

since: 4.7.0
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.

since: 4.7.0
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.

since: 4.7.0
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.

since: 4.9.6
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.

since: 4.9.6
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.

since: 4.9.6
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: Tue Mar 19 01:00:02 2024 Cross-referenced by PHPXref 0.7.1