[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
WordPress Link Template Functions
File Size: | 4615 lines (149 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
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`. since: 1.2.0 since: 4.4.0 Added the `$post` parameter. |
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. 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) return: string The URL with the trailing slash appended or stripped. since: 2.2.0 |
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'. since: 0.71 |
wp_force_plain_post_permalink( $post = null, $sample = null ) X-Ref |
Determine whether post should always 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. return: bool Whether to use a plain permalink structure. since: 5.7.0 |
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(). 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. return: string|false The permalink URL or false if post does not exist. since: 3.9.0 |
get_permalink( $post = 0, $leavename = false ) X-Ref |
Retrieves the full permalink for the current post or post ID. 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. return: string|false The permalink URL or false if post does not exist. since: 1.0.0 |
get_post_permalink( $id = 0, $leavename = false, $sample = false ) X-Ref |
Retrieves the permalink for a post of a custom post type. 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. return: string|WP_Error The post permalink. since: 3.0.0 |
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. 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. return: string The page permalink. since: 1.5.0 |
_get_page_link( $post = false, $leavename = false, $sample = false ) X-Ref |
Retrieves the page permalink. Ignores page_on_front. Internal use only. 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. return: string The page permalink. since: 2.1.0 |
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. 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. return: string The attachment permalink. since: 2.0.0 |
get_year_link( $year ) X-Ref |
Retrieves the permalink for the year archives. param: int|false $year Integer of year. False for current year. return: string The permalink for the specified year archive. since: 1.5.0 |
get_month_link( $year, $month ) X-Ref |
Retrieves the permalink for the month archives with year. param: int|false $year Integer of year. False for current year. param: int|false $month Integer of month. False for current month. return: string The permalink for the specified month and year archive. since: 1.0.0 |
get_day_link( $year, $month, $day ) X-Ref |
Retrieves the permalink for the day archives with year and month. 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. return: string The permalink for the specified day, month, and year archive. since: 1.0.0 |
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. Possible values include 'rss2', 'atom'. since: 3.0.0 |
get_feed_link( $feed = '' ) X-Ref |
Retrieves the permalink for the feed type. param: string $feed Optional. Feed type. Possible values include 'rss2', 'atom'. return: string The feed permalink. since: 1.5.0 |
get_post_comments_feed_link( $post_id = 0, $feed = '' ) X-Ref |
Retrieves the permalink for the post 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'. return: string The permalink for the comments feed for the given post on success, empty string on failure. since: 2.2.0 |
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 type. Possible values include 'rss2', 'atom'. since: 2.5.0 |
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. param: int $author_id Author ID. param: string $feed Optional. Feed type. Possible values include 'rss2', 'atom'. return: string Link to the feed for the author specified by $author_id. since: 2.5.0 |
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. 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'. return: string Link to the feed for the category specified by `$cat`. since: 2.5.0 |
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. 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'. return: string|false Link to the feed for the term specified by `$term` and `$taxonomy`. since: 3.0.0 |
get_tag_feed_link( $tag, $feed = '' ) X-Ref |
Retrieves the permalink for a tag feed. 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'. return: string The feed permalink for the given tag. since: 2.3.0 |
get_edit_tag_link( $tag, $taxonomy = 'post_tag' ) X-Ref |
Retrieves the edit link for a 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'. return: string The edit tag link URL for the given tag. since: 2.7.0 |
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. 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. since: 2.7.0 |
get_edit_term_link( $term, $taxonomy = '', $object_type = '' ) X-Ref |
Retrieves the URL for editing a given term. 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 return: string|null The edit term link URL for the given term, or null on failure. since: 3.1.0 since: 4.5.0 The `$taxonomy` parameter was made optional. |
edit_term_link( $link = '', $before = '', $after = '', $term = null, $echo = true ) X-Ref |
Displays or retrieves the edit term link with formatting. 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. return: string|void HTML content. since: 3.1.0 |
get_search_link( $query = '' ) X-Ref |
Retrieves the permalink for a search. param: string $query Optional. The query string to use. If empty the current query is used. Default empty. return: string The search permalink. since: 3.0.0 |
get_search_feed_link( $search_query = '', $feed = '' ) X-Ref |
Retrieves the permalink for the search results feed. param: string $search_query Optional. Search query. Default empty. param: string $feed Optional. Feed type. Possible values include 'rss2', 'atom'. return: string The search results feed permalink. since: 2.5.0 |
get_search_comments_feed_link( $search_query = '', $feed = '' ) X-Ref |
Retrieves the permalink for the search results comments feed. param: string $search_query Optional. Search query. Default empty. param: string $feed Optional. Feed type. Possible values include 'rss2', 'atom'. return: string The comments feed search results permalink. since: 2.5.0 |
get_post_type_archive_link( $post_type ) X-Ref |
Retrieves the permalink for a post type archive. param: string $post_type Post type. return: string|false The post type archive permalink. False if the post type since: 3.1.0 since: 4.5.0 Support for posts was added. |
get_post_type_archive_feed_link( $post_type, $feed = '' ) X-Ref |
Retrieves the permalink for a post type archive feed. param: string $post_type Post type. param: string $feed Optional. Feed type. Possible values include 'rss2', 'atom'. return: string|false The post type feed permalink. False if the post type since: 3.1.0 |
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. 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 return: string|null URL used for the post preview, or null if the post does not exist. since: 4.4.0 |
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. 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 '&'. return: string|null The edit post link for the given post. Null if the post type does not exist since: 2.3.0 |
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'. since: 1.0.0 since: 4.4.0 The `$class` argument was added. |
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. 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. return: string|void The delete post link URL for the given post. since: 2.9.0 |
get_edit_comment_link( $comment_id = 0 ) X-Ref |
Retrieves the edit comment link. param: int|WP_Comment $comment_id Optional. Comment ID or WP_Comment object. return: string|void The edit comment link URL for the given comment. since: 2.3.0 |
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. since: 1.0.0 |
get_edit_bookmark_link( $link = 0 ) X-Ref |
Displays the edit bookmark link. param: int|stdClass $link Optional. Bookmark ID. Default is the ID of the current bookmark. return: string|void The edit bookmark link URL. since: 2.7.0 |
edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) X-Ref |
Displays the edit bookmark link anchor 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 $bookmark Optional. Bookmark ID. Default is the current bookmark. since: 2.7.0 |
get_edit_user_link( $user_id = null ) X-Ref |
Retrieves the edit user link. param: int $user_id Optional. User ID. Defaults to the current user. return: string URL to edit user page or empty string. since: 3.5.0 |
get_previous_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) X-Ref |
Retrieves the previous post that is adjacent to the current post. 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'. return: WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no since: 1.5.0 |
get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) X-Ref |
Retrieves the next post that is adjacent to the current post. 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'. return: WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no since: 1.5.0 |
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. 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'. return: WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no since: 2.5.0 |
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. 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'. return: string|void The adjacent post relational link URL. since: 2.8.0 |
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: 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'. since: 2.8.0 |
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. 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'. since: 2.8.0 |
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: 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'. since: 2.8.0 |
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. 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'. return: null|array Array containing the boundary post object if successful, null otherwise. since: 2.8.0 |
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. 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'. return: string The link URL of the previous post in relation to the current post. since: 3.7.0 |
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: 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'. since: 1.5.0 |
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. 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'. return: string The link URL of the next post in relation to the current post. since: 3.7.0 |
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: 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'. since: 1.5.0 |
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. 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'. return: string The link URL of the previous or next post in relation to the current post. since: 3.7.0 |
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: 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'. since: 2.5.0 |
get_pagenum_link( $pagenum = 1, $escape = true ) X-Ref |
Retrieves the link for a 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. return: string The link URL for the given page number. since: 1.5.0 |
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. param: int $max_page Optional. Max pages. Default 0. return: string|void The link URL for next posts page. since: 2.0.10 |
next_posts( $max_page = 0, $echo = true ) X-Ref |
Displays or retrieves the next posts page link. param: int $max_page Optional. Max pages. Default 0. param: bool $echo Optional. Whether to echo the link. Default true. return: string|void The link URL for next posts page if `$echo = false`. since: 0.71 |
get_next_posts_link( $label = null, $max_page = 0 ) X-Ref |
Retrieves the next posts page link. param: string $label Content for link text. param: int $max_page Optional. Max pages. Default 0. return: string|void HTML-formatted next posts page link. since: 2.7.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. since: 0.71 |
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. since: 2.0.10 |
previous_posts( $echo = true ) X-Ref |
Displays or retrieves the previous posts page link. param: bool $echo Optional. Whether to echo the link. Default true. return: string|void The previous posts page link if `$echo = false`. since: 0.71 |
get_previous_posts_link( $label = null ) X-Ref |
Retrieves the previous posts page link. param: string $label Optional. Previous page link text. return: string|void HTML-formatted previous page link. since: 2.7.0 |
previous_posts_link( $label = null ) X-Ref |
Displays the previous posts page link. param: string $label Optional. Previous page link text. since: 0.71 |
get_posts_nav_link( $args = array() X-Ref |
Retrieves the post pages link navigation for previous and next pages. param: string|array $args { return: string The posts link navigation. since: 2.8.0 |
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. since: 0.71 |
get_the_post_navigation( $args = array() X-Ref |
Retrieves the navigation to next/previous post, when applicable. param: array $args { return: string Markup for post links. 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. |
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. since: 4.1.0 |
get_the_posts_navigation( $args = array() X-Ref |
Returns the navigation to next/previous set of posts, when applicable. param: array $args { return: string Markup for posts links. since: 4.1.0 since: 5.3.0 Added the `aria_label` parameter. since: 5.5.0 Added the `class` parameter. |
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. since: 4.1.0 |
get_the_posts_pagination( $args = array() X-Ref |
Retrieves a paginated navigation to next/previous set of posts, when applicable. param: array $args { return: string Markup for pagination links. since: 4.1.0 since: 5.3.0 Added the `aria_label` parameter. since: 5.5.0 Added the `class` parameter. |
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. since: 4.1.0 |
_navigation_markup( $links, $class = 'posts-navigation', $screen_reader_text = '', $aria_label = '' ) X-Ref |
Wraps passed links in navigational markup. 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. return: string Navigation template tag. since: 4.1.0 since: 5.3.0 Added the `aria_label` parameter. |
get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) X-Ref |
Retrieves the comments page number link. param: int $pagenum Optional. Page number. Default 1. param: int $max_page Optional. The maximum number of comment pages. Default 0. return: string The comments page number link URL. since: 2.7.0 |
get_next_comments_link( $label = '', $max_page = 0 ) X-Ref |
Retrieves 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. return: string|void HTML-formatted link for the next page of comments. since: 2.7.1 |
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. since: 2.7.0 |
get_previous_comments_link( $label = '' ) X-Ref |
Retrieves the link to the previous comments page. param: string $label Optional. Label for comments link text. Default empty. return: string|void HTML-formatted link for the previous page of comments. since: 2.7.1 |
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. since: 2.7.0 |
paginate_comments_links( $args = array() X-Ref |
Displays or retrieves pagination links for the comments on the current post. param: string|array $args Optional args. See paginate_links(). Default empty array. return: void|string|array Void if 'echo' argument is true and 'type' is not an array, since: 2.7.0 |
get_the_comments_navigation( $args = array() X-Ref |
Retrieves navigation to next/previous set of comments, when applicable. param: array $args { return: string Markup for comments links. since: 4.4.0 since: 5.3.0 Added the `aria_label` parameter. since: 5.5.0 Added the `class` parameter. |
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. since: 4.4.0 |
get_the_comments_pagination( $args = array() X-Ref |
Retrieves a paginated navigation to next/previous set of comments, when applicable. param: array $args { return: string Markup for pagination links. since: 4.4.0 since: 5.3.0 Added the `aria_label` parameter. since: 5.5.0 Added the `class` parameter. |
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. since: 4.4.0 |
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. 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 return: string Home URL link with optional path appended. since: 3.0.0 |
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. 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 return: string Home URL link with optional path appended. since: 3.0.0 |
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. 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(). return: string Site URL link with optional path appended. since: 3.0.0 |
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. 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 return: string Site URL link with optional path appended. since: 3.0.0 |
admin_url( $path = '', $scheme = 'admin' ) X-Ref |
Retrieves the URL to the admin area for the current site. 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(). return: string Admin URL link with optional path appended. since: 2.6.0 |
get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) X-Ref |
Retrieves the URL to the admin area for a given site. 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', return: string Admin URL link with optional path appended. since: 3.0.0 |
includes_url( $path = '', $scheme = null ) X-Ref |
Retrieves the URL to the includes directory. 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 return: string Includes URL link with optional path appended. since: 2.6.0 |
content_url( $path = '' ) X-Ref |
Retrieves the URL to the content directory. param: string $path Optional. Path relative to the content URL. Default empty. return: string Content URL link with optional path appended. since: 2.6.0 |
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. 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. return: string Plugins URL link with optional paths appended. since: 2.6.0 |
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. 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 return: string Site URL link with optional path appended. since: 3.0.0 |
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. 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 return: string Home URL link with optional path appended. since: 3.0.0 |
network_admin_url( $path = '', $scheme = 'admin' ) X-Ref |
Retrieves the URL to the admin area for the network. 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() return: string Admin URL link with optional path appended. since: 3.0.0 |
user_admin_url( $path = '', $scheme = 'admin' ) X-Ref |
Retrieves the URL to the admin area for the current user. 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() return: string Admin URL link with optional path appended. since: 3.0.0 |
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. 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() return: string Admin URL link with optional path appended. since: 3.1.0 |
set_url_scheme( $url, $scheme = null ) X-Ref |
Sets the scheme for a URL. param: string $url Absolute URL that includes a scheme param: string|null $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login', return: string URL with chosen scheme. since: 3.4.0 since: 4.4.0 The 'rest' scheme was added. |
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. 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() return: string Dashboard URL link with optional path appended. since: 3.1.0 |
get_edit_profile_url( $user_id = 0, $scheme = 'admin' ) X-Ref |
Retrieves the URL to the user's profile editor. 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() return: string Dashboard URL link with optional path appended. since: 3.1.0 |
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. param: int|WP_Post $post Optional. Post ID or object. Default is global `$post`. return: string|false The canonical URL, or false if the post does not exist or has not since: 4.6.0 |
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. 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 return: string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks since: 3.0.0 |
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' ) ) 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. since: 3.0.0 |
get_avatar_url( $id_or_email, $args = null ) X-Ref |
Retrieves the avatar URL. param: mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash, param: array $args { return: string|false The URL of the avatar on success, false on failure. since: 4.2.0 |
is_avatar_comment_type( $comment_type ) X-Ref |
Check if this comment type allows avatars to be retrieved. param: string $comment_type Comment type to check. return: bool Whether the comment type is allowed for retrieving avatars. since: 5.1.0 |
get_avatar_data( $id_or_email, $args = null ) X-Ref |
Retrieves default data about the avatar. param: mixed $id_or_email The Gravatar to retrieve. Accepts a user ID, Gravatar MD5 hash, param: array $args { return: array { since: 4.2.0 |
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. param: string $file Optional. File to search for in the stylesheet directory. return: string The URL of the file. since: 4.7.0 |
get_parent_theme_file_uri( $file = '' ) X-Ref |
Retrieves the URL of a file in the parent theme. param: string $file Optional. File to return the URL for in the template directory. return: string The URL of the file. since: 4.7.0 |
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. param: string $file Optional. File to search for in the stylesheet directory. return: string The path of the file. since: 4.7.0 |
get_parent_theme_file_path( $file = '' ) X-Ref |
Retrieves the path of a file in the parent theme. param: string $file Optional. File to return the path for in the template directory. return: string The path of the file. since: 4.7.0 |
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. since: 4.9.6 |
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. since: 4.9.6 |
get_the_privacy_policy_link( $before = '', $after = '' ) X-Ref |
Returns 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. return: string Markup for the link and surrounding elements. Empty string if it since: 4.9.6 |
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |