| [ Index ] |
PHP Cross Reference of Wordpress 2.9.1 |
[Source view] [Print] [Project Stats]
WordPress Link Template Functions
| File Size: | 1878 lines (54 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| the_permalink() X-Ref |
| Display the permalink for the current post. |
| user_trailingslashit($string, $type_of_url = '') X-Ref |
| Retrieve trailing slash string, if blog 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 'user_trailingslashit' filter. Will remove trailing slash from string, if blog is not set to have them. param: $string String a URL with or without a trailing slash. param: $type_of_url String the type of URL being considered (e.g. single, category, etc) for use in the filter. return: string |
| permalink_anchor($mode = 'id') X-Ref |
| Display permalink anchor for 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 Permalink mode can be either 'title', 'id', or default, which is 'id'. |
| get_permalink($id = 0, $leavename = false) X-Ref |
| Retrieve full permalink for current post or post ID. param: int $id Optional. Post ID. param: bool $leavename Optional, defaults to false. Whether to keep post name or page name. return: string |
| post_permalink($post_id = 0, $deprecated = '') X-Ref |
| Retrieve permalink from post ID. param: int $post_id Optional. Post ID. param: mixed $deprecated Not used. return: string |
| get_page_link( $id = false, $leavename = false, $sample = false ) X-Ref |
| Retrieve the permalink for current page or page ID. Respects page_on_front. Use this one. param: int $id Optional. Post ID. param: bool $leavename Optional, defaults to false. Whether to keep page name. param: bool $sample Optional, defaults to false. Is it a sample permalink. return: string |
| _get_page_link( $id = false, $leavename = false, $sample = false ) X-Ref |
| Retrieve the page permalink. Ignores page_on_front. Internal use only. param: int $id Optional. Post ID. param: bool $leavename Optional. Leave name. param: bool $sample Optional. Sample permalink. return: string |
| get_attachment_link($id = false) X-Ref |
| Retrieve permalink for attachment. This can be used in the WordPress Loop or outside of it. param: int $id Optional. Post ID. return: string |
| get_year_link($year) X-Ref |
| Retrieve the permalink for the year archives. param: int|bool $year False for current year or year for permalink. return: string |
| get_month_link($year, $month) X-Ref |
| Retrieve the permalink for the month archives with year. param: bool|int $year False for current year. Integer of year. param: bool|int $month False for current month. Integer of month. return: string |
| get_day_link($year, $month, $day) X-Ref |
| Retrieve the permalink for the day archives with year and month. param: bool|int $year False for current year. Integer of year. param: bool|int $month False for current month. Integer of month. param: bool|int $day False for current day. Integer of day. return: string |
| get_feed_link($feed = '') X-Ref |
| Retrieve the permalink for the feed type. param: string $feed Optional, defaults to default feed. Feed type. return: string |
| get_post_comments_feed_link($post_id = '', $feed = '') X-Ref |
| Retrieve the permalink for the post comments feed. param: int $post_id Optional. Post ID. param: string $feed Optional. Feed type. return: string |
| post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) X-Ref |
| Display 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 Descriptive text. param: int $post_id Optional post ID. Default to current post. param: string $feed Optional. Feed format. return: string Link to the comment feed for the current post. |
| get_author_feed_link( $author_id, $feed = '' ) X-Ref |
| Retrieve 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 ID of an author. param: string $feed Optional. Feed type. return: string Link to the feed for the author specified by $author_id. |
| get_category_feed_link($cat_id, $feed = '') X-Ref |
| Retrieve the feed link for a category. Returns a link to the feed for all post in a given category. A specific feed can be requested or left blank to get the default feed. param: int $cat_id ID of a category. param: string $feed Optional. Feed type. return: string Link to the feed for the category specified by $cat_id. |
| get_tag_feed_link($tag_id, $feed = '') X-Ref |
| Retrieve permalink for feed of tag. param: int $tag_id Tag ID. param: string $feed Optional. Feed type. return: string |
| get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) X-Ref |
| Retrieve edit tag link. param: int $tag_id Tag ID return: string |
| edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) X-Ref |
| Display or retrieve edit tag link with formatting. param: string $link Optional. Anchor text. param: string $before Optional. Display before edit link. param: string $after Optional. Display after edit link. param: int|object $tag Tag object or ID return: string|null HTML content, if $echo is set to false. |
| get_search_feed_link($search_query = '', $feed = '') X-Ref |
| Retrieve the permalink for the feed of the search results. param: string $search_query Optional. Search query. param: string $feed Optional. Feed type. return: string |
| get_search_comments_feed_link($search_query = '', $feed = '') X-Ref |
| Retrieve the permalink for the comments feed of the search results. param: string $search_query Optional. Search query. param: string $feed Optional. Feed type. return: string |
| get_edit_post_link( $id = 0, $context = 'display' ) X-Ref |
| Retrieve edit posts 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 $id Optional. Post ID. param: string $context Optional, default to display. How to write the '&', defaults to '&'. return: string |
| edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) X-Ref |
| Display edit post link for post. param: string $link Optional. Anchor text. param: string $before Optional. Display before edit link. param: string $after Optional. Display after edit link. param: int $id Optional. Post ID. |
| get_delete_post_link($id = 0, $context = 'display') X-Ref |
| Retrieve delete posts 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 $id Optional. Post ID. param: string $context Optional, default to display. How to write the '&', defaults to '&'. return: string |
| get_edit_comment_link( $comment_id = 0 ) X-Ref |
| Retrieve edit comment link. param: int $comment_id Optional. Comment ID. return: string |
| edit_comment_link( $link = null, $before = '', $after = '' ) X-Ref |
| Display or retrieve edit comment link with formatting. param: string $link Optional. Anchor text. param: string $before Optional. Display before edit link. param: string $after Optional. Display after edit link. return: string|null HTML content, if $echo is set to false. |
| get_edit_bookmark_link( $link = 0 ) X-Ref |
| Display edit bookmark (literally a URL external to blog) link. param: int $link Optional. Bookmark ID. return: string |
| edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) X-Ref |
| Display edit bookmark (literally a URL external to blog) link anchor content. param: string $link Optional. Anchor text. param: string $before Optional. Display before edit link. param: string $after Optional. Display after edit link. param: int $bookmark Optional. Bookmark ID. |
| get_previous_post($in_same_cat = false, $excluded_categories = '') X-Ref |
| Retrieve previous post link that is adjacent to current post. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. return: string |
| get_next_post($in_same_cat = false, $excluded_categories = '') X-Ref |
| Retrieve next post link that is adjacent to current post. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. return: string |
| get_adjacent_post($in_same_cat = false, $excluded_categories = '', $previous = true) X-Ref |
| Retrieve adjacent post link. Can either be next or previous post link. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. param: bool $previous Optional. Whether to retrieve previous post. return: string |
| get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $previous = true) X-Ref |
| Get adjacent post relational link. Can either be next or previous post relational link. param: string $title Optional. Link title format. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. param: bool $previous Optional, default is true. Whether display link to previous post. return: string |
| adjacent_posts_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') X-Ref |
| Display relational links for the posts adjacent to the current post. param: string $title Optional. Link title format. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. |
| next_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') X-Ref |
| Display relational link for the next post adjacent to the current post. param: string $title Optional. Link title format. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. |
| prev_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') X-Ref |
| Display relational link for the previous post adjacent to the current post. param: string $title Optional. Link title format. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. |
| get_boundary_post($in_same_cat = false, $excluded_categories = '', $start = true) X-Ref |
| Retrieve boundary post. Boundary being either the first or last post by publish date within the contraitns specified by in same category or excluded categories. param: bool $in_same_cat Optional. Whether returned post should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. param: bool $previous Optional. Whether to retrieve first post. return: object |
| get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) X-Ref |
| Get boundary post relational link. Can either be start or end post relational link. param: string $title Optional. Link title format. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. param: bool $start Optional, default is true. Whether display link to first post. return: string |
| start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') X-Ref |
| Display relational link for the first post. param: string $title Optional. Link title format. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. |
| get_index_rel_link() X-Ref |
| Get site index relational link. return: string |
| index_rel_link() X-Ref |
| Display relational link for the site index. |
| get_parent_post_rel_link($title = '%title') X-Ref |
| Get parent post relational link. param: string $title Optional. Link title format. return: string |
| parent_post_rel_link($title = '%title') X-Ref |
| Display relational link for parent item |
| previous_post_link($format='« %link', $link='%title', $in_same_cat = false, $excluded_categories = '') X-Ref |
| Display previous post link that is adjacent to the current post. param: string $format Optional. Link anchor format. param: string $link Optional. Link permalink format. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. |
| next_post_link($format='%link »', $link='%title', $in_same_cat = false, $excluded_categories = '') X-Ref |
| Display next post link that is adjacent to the current post. param: string $format Optional. Link anchor format. param: string $link Optional. Link permalink format. param: bool $in_same_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. |
| adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) X-Ref |
| Display 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_cat Optional. Whether link should be in same category. param: string $excluded_categories Optional. Excluded categories IDs. param: bool $previous Optional, default is true. Whether display link to previous post. |
| get_pagenum_link($pagenum = 1) X-Ref |
| Retrieve get links for page numbers. param: int $pagenum Optional. Page ID. return: string |
| get_next_posts_page_link($max_page = 0) X-Ref |
| Retrieve next posts pages link. Backported from 2.1.3 to 2.0.10. param: int $max_page Optional. Max pages. return: string |
| next_posts( $max_page = 0, $echo = true ) X-Ref |
| Display or return the next posts pages link. param: int $max_page Optional. Max pages. param: boolean $echo Optional. Echo or return; |
| get_next_posts_link( $label = 'Next Page »', $max_page = 0 ) X-Ref |
| Return the next posts pages link. param: string $label Content for link text. param: int $max_page Optional. Max pages. return: string|null |
| next_posts_link( $label = 'Next Page »', $max_page = 0 ) X-Ref |
| Display the next posts pages link. param: string $label Content for link text. param: int $max_page Optional. Max pages. |
| get_previous_posts_page_link() X-Ref |
| Retrieve previous post pages link. Will only return string, if not on a single page or post. Backported to 2.0.10 from 2.1.3. return: string|null |
| previous_posts( $echo = true ) X-Ref |
| Display or return the previous posts pages link. param: boolean $echo Optional. Echo or return; |
| get_previous_posts_link( $label = '« Previous Page' ) X-Ref |
| Return the previous posts pages link. param: string $label Optional. Previous page link text. return: string|null |
| previous_posts_link( $label = '« Previous Page' ) X-Ref |
| Display the previous posts page link. param: string $label Optional. Previous page link text. |
| get_posts_nav_link( $args = array() X-Ref |
| Return post pages link navigation for previous and next pages. param: string|array $args Optional args. return: string The posts link navigation. |
| posts_nav_link( $sep = '', $prelabel = '', $nxtlabel = '' ) X-Ref |
| Display post pages link navigation for previous and next pages. param: string $sep Optional. Separator for posts navigation links. param: string $prelabel Optional. Label for previous pages. param: string $nxtlabel Optional Label for next pages. |
| get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) X-Ref |
| Retrieve page numbers links. param: int $pagenum Optional. Page number. return: string |
| get_next_comments_link( $label = '', $max_page = 0 ) X-Ref |
| Return the link to next comments pages. param: string $label Optional. Label for link text. param: int $max_page Optional. Max page. return: string|null |
| next_comments_link( $label = '', $max_page = 0 ) X-Ref |
| Display the link to next comments pages. param: string $label Optional. Label for link text. param: int $max_page Optional. Max page. |
| get_previous_comments_link( $label = '' ) X-Ref |
| Return the previous comments page link. param: string $label Optional. Label for comments link text. return: string|null |
| previous_comments_link( $label = '' ) X-Ref |
| Display the previous comments page link. param: string $label Optional. Label for comments link text. |
| paginate_comments_links($args = array() X-Ref |
| Create pagination links for the comments on the current post. param: string|array $args Optional args. See paginate_links. return: string Markup for pagination links. |
| get_shortcut_link() X-Ref |
| Retrieve shortcut link. Use this in 'a' element 'href' attribute. return: string |
| site_url($path = '', $scheme = null) X-Ref |
| Retrieve the site url. 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. param: string $scheme Optional. Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'. return: string Site url link with optional path appended. |
| admin_url($path = '') X-Ref |
| Retrieve the url to the admin area. param: string $path Optional path relative to the admin url return: string Admin url link with optional path appended |
| includes_url($path = '') X-Ref |
| Retrieve the url to the includes directory. param: string $path Optional. Path relative to the includes url. return: string Includes url link with optional path appended. |
| content_url($path = '') X-Ref |
| Retrieve the url to the content directory. param: string $path Optional. Path relative to the content url. return: string Content url link with optional path appended. |
| plugins_url($path = '', $plugin = '') X-Ref |
| Retrieve the url to the plugins directory or to a specific file within that directory. You can hardcode the plugin slug in $path or pass __FILE__ as a second argument to get the correct folder name. param: string $path Optional. Path relative to the plugins url. param: string $plugin Optional. The plugin file that you want to be relative to - i.e. pass in __FILE__ return: string Plugins url link with optional path appended. |
| rel_canonical() X-Ref |
| Output rel=canonical for singular queries |
| Generated: Fri Jan 8 00:19:48 2010 | Cross-referenced by PHPXref 0.7 |