/wp-includes/general-template.php

Description

General template tags that can go anywhere in a template.

Functions
add_thickbox (line 2116)

Enqueues the default ThickBox js and css.

If any of the settings need to be changed, this can be done with another js file similar to media-upload.js. That file should require array('thickbox') to ensure it is loaded after.

  • since: 2.5.0
void add_thickbox ()
allowed_tags (line 1299)

Display all of the allowed tags in HTML format with attributes.

This is useful for displaying in the comment area, which elements and attributes are supported. As well as any plugins which want to display it.

  • return: HTML allowed tags entity encoded.
  • since: 1.0.1
  • uses: $allowedtags
string allowed_tags ()
bloginfo (line 371)

Display information about the blog.

  • see: get_bloginfo() For possible values for the parameter.
  • since: 0.71
void bloginfo ([string $show = ''])
  • string $show: What to display.
calendar_week_mod (line 1058)

Get number of days since the start of the week.

  • return: Days since the start of the week.
  • since: 1.5.0
int calendar_week_mod (int $num)
  • int $num: Number of day.
checked (line 2226)

Outputs the html checked attribute.

Compares the first two arguments and if identical marks as checked

  • return: html attribute or empty string
  • since: 1.0.0
string checked (mixed $checked, [mixed $current = true], [bool $echo = true])
  • mixed $checked: One of the values to compare
  • mixed $current: (true) The other value to compare if not just true
  • bool $echo: Whether to echo or just return the string
delete_get_calendar_cache (line 1280)

Purge the cached results of get_calendar.

void delete_get_calendar_cache ()
disabled (line 2258)

Outputs the html disabled attribute.

Compares the first two arguments and if identical marks as disabled

  • return: html attribute or empty string
  • since: 3.0.0
string disabled (mixed $disabled, [mixed $current = true], [bool $echo = true])
  • mixed $disabled: One of the values to compare
  • mixed $current: (true) The other value to compare if not just true
  • bool $echo: Whether to echo or just return the string
feed_links (line 1596)

Display the links to the general feeds.

  • since: 2.8.0
void feed_links ([array $args = array()])
  • array $args: Optional arguments.
feed_links_extra (line 1622)

Display the links to the extra feeds such as category feeds.

  • since: 2.8.0
void feed_links_extra ([array $args = array()])
  • array $args: Optional arguments.
get_archives_link (line 832)

Retrieve archive link content based on predefined or custom code.

The format can be one of four styles. The 'link' for head element, 'option' for use in the select element, 'html' for use in list (either ol or ul HTML elements). Custom content is also supported using the before and after parameters.

The 'link' format uses the link HTML element with the <em>archives</em> relationship. The before and after parameters are not used. The text parameter is used to describe the link.

The 'option' format uses the option HTML element for use in select element. The value is the url parameter and the before and after parameters are used between the text description.

The 'html' format, which is the default, uses the li HTML element for use in the list HTML elements. The before parameter is before the link and the after parameter is after the closing link.

The custom format uses the before parameter before the link ('a' HTML element) and the after parameter after the closing link tag. If the above three values for the format are not used, then custom format is assumed.

  • return: HTML link content for archive.
  • since: 1.0.0
string get_archives_link (string $url, string $text, [string $format = 'html'], [string $before = ''], [string $after = ''])
  • string $url: URL to archive.
  • string $text: Archive text description.
  • string $format: Optional, default is 'html'. Can be 'link', 'option', 'html', or custom.
  • string $before: Optional.
  • string $after: Optional.
get_bloginfo (line 400)

Retrieve information about the blog.

Some show parameter values are deprecated and will be removed in future versions. These options will trigger the _deprecated_argument() function. The deprecated blog info options are listed in the function contents.

The possible values for the 'show' parameter are listed below.

  1. <strong>url</strong> - Blog URI to homepage.
  2. <strong>wpurl</strong> - Blog URI path to WordPress.
  3. <strong>description</strong> - Secondary title

The feed URL options can be retrieved from 'rdf_url' (RSS 0.91), 'rss_url' (RSS 1.0), 'rss2_url' (RSS 2.0), or 'atom_url' (Atom feed). The comment feeds can be retrieved from the 'comments_atom_url' (Atom comment feed) or 'comments_rss2_url' (RSS 2.0 comment feed).

  • return: Mostly string values, might be empty.
  • since: 0.71
string get_bloginfo ([string $show = ''], [string $filter = 'raw'])
  • string $show: Blog info to retrieve.
  • string $filter: How to filter what is retrieved.
get_calendar (line 1074)

Display calendar with days that have posts as links.

The calendar is cached, which will be retrieved, if it exists. If there are no posts for the month, then it will not be displayed.

  • since: 1.0.0
void get_calendar ([bool $initial = true], [bool $echo = true])
  • bool $initial: Optional, default is true. Use initial calendar names.
  • bool $echo: Optional, default is true. Set to false for return.
get_current_blog_id (line 501)

Retrieve the current blog id

  • return: Blog id
  • since: 3.1.0
int get_current_blog_id ()
get_footer (line 53)

Load footer template.

Includes the footer template for a theme or if a name is specified then a specialised footer will be included.

For the parameter, if the file is called "footer-special.php" then specify "special".

void get_footer ([string $name = null])
  • string $name: The name of the specialised footer.
get_header (line 24)

Load header template.

Includes the header template for a theme or if a name is specified then a specialised header will be included.

For the parameter, if the file is called "header-special.php" then specify "special".

void get_header ([string $name = null])
  • string $name: The name of the specialised header.
get_post_modified_time (line 1519)

Retrieve the time at which the post was last modified.

  • return: Returns timestamp
  • since: 2.0.0
string get_post_modified_time ([string $d = 'U'], [bool $gmt = false], [int|object  $post = null], [bool $translate = false])
  • string $d: Optional, default is 'U'. Either 'G', 'U', or php date format.
  • bool $gmt: Optional, default is false. Whether to return the gmt time.
  • int|object $post: Optional, default is global post object. A post_id or post object
  • bool $translate: Optional, default is false. Whether to translate the result
get_post_time (line 1469)

Retrieve the time at which the post was written.

  • since: 2.0.0
string get_post_time ([string $d = 'U'], [bool $gmt = false], [int|object  $post = null], [bool $translate = false])
  • string $d: Optional Either 'G', 'U', or php date format.
  • bool $gmt: Optional, default is false. Whether to return the gmt time.
  • int|object $post: Optional post ID or object. Default is global $post object.
  • bool $translate: Whether to translate the time string
get_search_form (line 151)

Display search form.

Will first attempt to locate the searchform.php file in either the child or the parent, then load it. If it doesn't exist, then the default search form will be displayed. The default search form is HTML, which will be displayed. There is a filter applied to the search form HTML in order to edit or replace it. The filter is 'get_search_form'.

This function is primarily used by themes which want to hardcode the search form into the sidebar and also by the search widget in WordPress.

There is also an action that is called whenever the function is run called, 'get_search_form'. This can be useful for outputting JavaScript that the search relies on or various formatting that applies to the beginning of the search. To give a few examples of what it can be used for.

  • since: 2.7.0
void get_search_form ([boolean $echo = true])
  • boolean $echo: Default to echo and not return the form.
get_search_query (line 1827)

Retrieve the contents of the search WordPress query variable.

The search query string is passed through esc_attr() to ensure that it is safe for placing in an html attribute.

string get_search_query ([bool $escaped = true])
  • bool $escaped: Whether the result is escaped. Default true. Only use when you are later escaping it. Do not use unescaped.
get_sidebar (line 82)

Load sidebar template.

Includes the sidebar template for a theme or if a name is specified then a specialised sidebar will be included.

For the parameter, if the file is called "sidebar-special.php" then specify "special".

void get_sidebar ([string $name = null])
  • string $name: The name of the specialised sidebar.
get_template_part (line 119)

Load a template part into a template

Makes it easy for a theme to reuse sections of code in a easy to overload way for child themes.

Includes the named template part for a theme or if a name is specified then a specialised part will be included. If the theme contains no {slug}.php file then no template will be included.

The template is included using require, not require_once, so you may include the same template part multiple times.

For the $name parameter, if the file is called "{slug}-special.php" then specify "special".

void get_template_part (string $slug, [string $name = null])
  • string $slug: The slug name for the generic template.
  • string $name: The name of the specialised template.
get_the_date (line 1377)

Retrieve the date the current $post was written.

Unlike the_date() this function will always return the date. Modify output with 'get_the_date' filter.

  • return: Null if displaying, string if retrieving.
  • since: 3.0.0
  • usedby: the_date()
string|null get_the_date ([string $d = ''])
  • string $d: Optional. PHP date format defaults to the date_format option if not specified.
get_the_generator (line 2161)

Creates the generator XML or Comment for RSS, ATOM, etc.

Returns the correct generator type for the requested output format. Allows for a plugin to filter generators on an individual basis using the 'get_the_generator_{$type}' filter.

  • return: The HTML content for the generator.
  • since: 2.5.0
  • uses: apply_filters() - Calls 'get_the_generator_$type' hook.
string get_the_generator ([string $type = ''])
  • string $type: The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export).
get_the_modified_date (line 1420)

Retrieve the date on which the post was last modified.

  • since: 2.1.0
string get_the_modified_date ([string $d = ''])
  • string $d: Optional. PHP date format. Defaults to the "date_format" option
get_the_modified_time (line 1500)

Retrieve the time at which the post was last modified.

  • since: 2.0.0
string get_the_modified_time ([string $d = ''])
  • string $d: Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
get_the_time (line 1448)

Retrieve the time at which the post was written.

  • since: 1.5.0
string get_the_time ([string $d = ''], [int|object  $post = null])
  • string $d: Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
  • int|object $post: Optional post ID or object. Default is global $post object.
language_attributes (line 1857)

Display the language attributes for the html tag.

Builds up a set of html attributes containing the text direction and language information for the page.

  • since: 2.1.0
void language_attributes ([string $doctype = 'html'])
  • string $doctype: The type of html document (xhtml|html).
noindex (line 1704)

Display a noindex meta tag if required by the blog configuration.

If a blog is marked as not being public then the noindex meta tag will be output to tell web robots not to index the page content. Add this to the wp_head action. Typical usage is as a wp_head callback. add_action( 'wp_head', 'noindex' );

void noindex ()
paginate_links (line 1922)

Retrieve paginated link for archive post pages.

Technically, the function can be used to create paginated link list for any area. The 'base' argument is used to reference the url, which will be used to create the paginated links. The 'format' argument is then used for replacing the page number. It is however, most likely and by default, to be used on the archive post pages.

The 'type' argument controls format of the returned value. The default is 'plain', which is just a string with the links separated by a newline character. The other possible values are either 'array' or 'list'. The 'array' value will return an array of the paginated link list to offer full control of display. The 'list' value will place all of the paginated links in an unordered HTML list.

The 'total' argument is the total amount of pages and is an integer. The 'current' argument is the current page number and is also an integer.

An example of the 'base' argument is "http://example.com/all_posts.php%_%" and the '%_%' is required. The '%_%' will be replaced by the contents of in the 'format' argument. An example for the 'format' argument is "?page=%#%" and the '%#%' is also required. The '%#%' will be replaced with the page number.

You can include the previous and next links in the list by setting the 'prev_next' argument to true, which it is by default. You can set the previous text, by using the 'prev_text' argument. You can set the next text by setting the 'next_text' argument.

If the 'show_all' argument is set to true, then it will show all of the pages instead of a short list of the pages near the current page. By default, the 'show_all' is set to false and controlled by the 'end_size' and 'mid_size' arguments. The 'end_size' argument is how many numbers on either the start and the end list edges, by default is 1. The 'mid_size' argument is how many numbers to either side of current page, but not including current page.

It is possible to add query vars to the link by using the 'add_args' argument and see add_query_arg() for more information.

  • return: String of page links or array of page links.
  • since: 2.1.0
array|string paginate_links ([string|array $args = ''])
  • string|array $args: Optional. Override defaults.
post_type_archive_title (line 660)

Display or retrieve title for a post type archive.

This is optimized for archive.php and archive-{$post_type}.php template files for displaying the title of the post type.

  • return: Title when retrieving, null when displaying or failure.
  • since: 3.1.0
string|null post_type_archive_title ([string $prefix = ''], [bool $display = true])
  • string $prefix: Optional. What to display before the title.
  • bool $display: Optional, default is true. Whether to display or retrieve title.
register_admin_color_schemes (line 2037)

Registers the default Admin color schemes

  • since: 3.0.0
void register_admin_color_schemes ()
rich_edit_exists (line 1731)

Determine if TinyMCE is available.

Checks to see if the user has deleted the tinymce files to slim down there WordPress install.

  • return: Whether TinyMCE exists.
  • since: 2.1.0
bool rich_edit_exists ()
rsd_link (line 1678)

Display the link to the Really Simple Discovery service endpoint.

void rsd_link ()
selected (line 2242)

Outputs the html selected attribute.

Compares the first two arguments and if identical marks as selected

  • return: html attribute or empty string
  • since: 1.0.0
string selected (mixed $selected, [mixed $current = true], [bool $echo = true])
  • mixed $selected: One of the values to compare
  • mixed $current: (true) The other value to compare if not just true
  • bool $echo: Whether to echo or just return the string
single_cat_title (line 690)

Display or retrieve page title for category archive.

This is useful for category template file or files, because it is optimized for category page title and with less overhead than wp_title().

It does not support placing the separator after the title, but by leaving the prefix parameter empty, you can set the title separator manually. The prefix does not automatically place a space between the prefix, so if there should be a space, the parameter value will need to have it at the end.

  • return: Title when retrieving, null when displaying or failure.
  • since: 0.71
string|null single_cat_title ([string $prefix = ''], [bool $display = true])
  • string $prefix: Optional. What to display before the title.
  • bool $display: Optional, default is true. Whether to display or retrieve title.
single_month_title (line 774)

Display or retrieve page title for post archive based on date.

Useful for when the template only needs to display the month and year, if either are available. Optimized for just this purpose, so if it is all that is needed, should be better than wp_title().

It does not support placing the separator after the title, but by leaving the prefix parameter empty, you can set the title separator manually. The prefix does not automatically place a space between the prefix, so if there should be a space, the parameter value will need to have it at the end.

  • return: Title when retrieving, null when displaying or failure.
  • since: 0.71
string|null single_month_title ([string $prefix = ''], [bool $display = true])
  • string $prefix: Optional. What to display before the title.
  • bool $display: Optional, default is true. Whether to display or retrieve title.
single_post_title (line 635)

Display or retrieve page title for post.

This is optimized for single.php template file for displaying the post title.

It does not support placing the separator after the title, but by leaving the prefix parameter empty, you can set the title separator manually. The prefix does not automatically place a space between the prefix, so if there should be a space, the parameter value will need to have it at the end.

  • return: Title when retrieving, null when displaying or failure.
  • since: 0.71
string|null single_post_title ([string $prefix = ''], [bool $display = true])
  • string $prefix: Optional. What to display before the title.
  • bool $display: Optional, default is true. Whether to display or retrieve title.
single_tag_title (line 711)

Display or retrieve page title for tag post archive.

Useful for tag template files for displaying the tag page title. It has less overhead than wp_title(), because of its limited implementation.

It does not support placing the separator after the title, but by leaving the prefix parameter empty, you can set the title separator manually. The prefix does not automatically place a space between the prefix, so if there should be a space, the parameter value will need to have it at the end.

  • return: Title when retrieving, null when displaying or failure.
  • since: 2.3.0
string|null single_tag_title ([string $prefix = ''], [bool $display = true])
  • string $prefix: Optional. What to display before the title.
  • bool $display: Optional, default is true. Whether to display or retrieve title.
single_term_title (line 732)

Display or retrieve page title for taxonomy term archive.

Useful for taxonomy term template files for displaying the taxonomy term page title. It has less overhead than wp_title(), because of its limited implementation.

It does not support placing the separator after the title, but by leaving the prefix parameter empty, you can set the title separator manually. The prefix does not automatically place a space between the prefix, so if there should be a space, the parameter value will need to have it at the end.

  • return: Title when retrieving, null when displaying or failure.
  • since: 3.1.0
string|null single_term_title ([string $prefix = ''], [bool $display = true])
  • string $prefix: Optional. What to display before the title.
  • bool $display: Optional, default is true. Whether to display or retrieve title.
the_date (line 1346)

Display or Retrieve the date the current $post was written (once per date)

Will only output the date if the current post's date is different from the previous one output.

i.e. Only one date listing will show per day worth of posts shown in the loop, even if the function is called several times for each post.

HTML output can be filtered with 'the_date'. Date string output can be filtered with 'get_the_date'.

  • return: Null if displaying, string if retrieving.
  • since: 0.71
  • uses: get_the_date()
string|null the_date ([string $d = ''], [string $before = ''], [string $after = ''], [bool $echo = true])
  • string $d: Optional. PHP date format defaults to the date_format option if not specified.
  • string $before: Optional. Output before the date.
  • string $after: Optional. Output after the date.
  • bool $echo: Optional, default is display. Whether to echo the date or return it.
the_date_xml (line 1321)

Outputs the date in iso8601 format for xml files.

  • since: 1.0.0
void the_date_xml ()
the_generator (line 2144)

Display the generator XML or Comment for RSS, ATOM, etc.

Returns the correct generator type for the requested output format. Allows for a plugin to filter generators overall the the_generator filter.

void the_generator (string $type)
  • string $type: The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export).
the_modified_date (line 1400)

Display the date on which the post was last modified.

  • return: Null if displaying, string if retrieving.
  • since: 2.1.0
string|null the_modified_date ([string $d = ''], [string $before = ''], [string $after = ''], [bool $echo = true])
  • string $d: Optional. PHP date format defaults to the date_format option if not specified.
  • string $before: Optional. Output before the date.
  • string $after: Optional. Output after the date.
  • bool $echo: Optional, default is display. Whether to echo the date or return it.
the_modified_time (line 1488)

Display the time at which the post was last modified.

  • since: 2.0.0
void the_modified_time ([string $d = ''])
  • string $d: Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
the_search_query (line 1843)

Display the contents of the search query variable.

The search query string is passed through esc_attr() to ensure that it is safe for placing in an html attribute.

void the_search_query ()
the_time (line 1435)

Display the time at which the post was written.

  • since: 0.71
void the_time ([string $d = ''])
  • string $d: Either 'G', 'U', or php date format.
the_weekday (line 1538)

Display the weekday on which the post was written.

  • since: 0.71
  • uses: $wp_locale
  • uses: $post
void the_weekday ()
the_weekday_date (line 1556)

Display the weekday on which the post was written.

Will only output the weekday if the current post's weekday is different from the previous one output.

  • since: 0.71
void the_weekday_date ([string $before = ''], [string $after = ''])
  • string $before: Optional Output before the date.
  • string $after: Optional Output after the date.
user_can_richedit (line 1748)

Whether the user should have a WYSIWIG editor.

Checks that the user requires a WYSIWIG editor and that the editor is supported in the users browser.

  • since: 2.0.0
bool user_can_richedit ()
wlwmanifest_link (line 1688)

Display the link to the Windows Live Writer manifest file.

void wlwmanifest_link ()
wp_admin_css (line 2086)

Enqueues or directly prints a stylesheet link to the specified CSS file.

"Intelligently" decides to enqueue or to print the CSS file. If the 'wp_print_styles' action has *not* yet been called, the CSS file will be enqueued. If the wp_print_styles action *has* been called, the CSS link will be printed. Printing may be forced by passing true as the $force_echo (second) parameter.

For backward compatibility with WordPress 2.3 calling method: If the $file (first) parameter does not correspond to a registered CSS file, we assume $file is a file relative to wp-admin/ without its ".css" extension. A stylesheet link to that generated URL is printed.

  • since: 2.3.0
  • uses: $wp_styles - WordPress Styles Object
void wp_admin_css ([string $file = 'wp-admin'], [bool $force_echo = false])
  • string $file: Optional. Style handle name or file name (without ".css" extension) relative to wp-admin/. Defaults to 'wp-admin'.
  • bool $force_echo: Optional. Force the stylesheet link to be printed rather than enqueued.
wp_admin_css_color (line 2023)

Registers an admin colour scheme css file.

Allows a plugin to register a new admin colour scheme. For example:

  1.  wp_admin_css_color('classic'__('Classic')admin_url("css/colors-classic.css"),
  2.  array('#07273E''#14568A''#D54E21''#2683AE'));

  • since: 2.5.0
void wp_admin_css_color (string $key, string $name, string $url, [array $colors = array()])
  • string $key: The unique key for this theme.
  • string $name: The name of the theme.
  • string $url: The url of the css file containing the colour scheme.
  • array $colors: Optional An array of CSS color definitions which are used to give the user a feel for the theme.
wp_admin_css_uri (line 2053)

Display the URL of a WordPress admin CSS file.

  • see: WP_Styles::_css_href and its style_loader_src filter.
  • since: 2.3.0
void wp_admin_css_uri ([string $file = 'wp-admin'])
  • string $file: file relative to wp-admin/ without its ".css" extension.
wp_default_editor (line 1779)

Find out which editor should be displayed by default.

Works out which of the two editors to display as the current editor for a user.

  • return: Either 'tinymce', or 'html', or 'test'
  • since: 2.5.0
string wp_default_editor ()
wp_editor (line 1807)

Renders an editor.

Using this function is the proper way to output all needed components for both TinyMCE and Quicktags. _WP_Editors should not be used directly. See http://core.trac.wordpress.org/ticket/17144.

NOTE: Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason running wp_editor() inside of a metabox is not a good idea unless only Quicktags is used. On the post edit screen several actions can be used to include additional editors containing TinyMCE: 'edit_page_form', 'edit_form_advanced' and 'dbx_post_sidebar'. See http://core.trac.wordpress.org/ticket/19173 for more information.

  • see: wp-includes/class-wp-editor.php
  • since: 3.3.0
void wp_editor (string $content, string $editor_id, [array $settings = array()])
  • string $content: Initial content for the editor.
  • string $editor_id: HTML ID attribute value for the textarea and TinyMCE. Can only be /[a-z]+/.
  • array $settings: See _WP_Editors::editor().
wp_footer (line 1585)

Fire the wp_footer action

  • since: 1.5.1
  • uses: do_action() - Calls 'wp_footer' hook.
void wp_footer ()
wp_generator (line 2129)

Display the XHTML generator that is generated on the wp_head hook.

  • since: 2.5.0
void wp_generator ()
wp_get_archives (line 877)

Display archive links based on type and format.

The 'type' argument offers a few choices and by default will display monthly archive links. The other options for values are 'daily', 'weekly', 'monthly', 'yearly', 'postbypost' or 'alpha'. Both 'postbypost' and 'alpha' display the same archive link list, the difference between the two is that 'alpha' will order by post title and 'postbypost' will order by post date.

The date archives will logically display dates with links to the archive post page. The 'postbypost' and 'alpha' values for 'type' argument will display the post titles.

The 'limit' argument will only display a limited amount of links, specified by the 'limit' integer value. By default, there is no limit. The 'show_post_count' argument will show how many posts are within the archive. By default, the 'show_post_count' argument is set to false.

For the 'format', 'before', and 'after' arguments, see get_archives_link(). The values of these arguments have to do with that function.

  • since: 1.2.0
void wp_get_archives ([string|array $args = ''])
  • string|array $args: Optional. Override defaults.
wp_head (line 1575)

Fire the wp_head action

  • since: 1.2.0
  • uses: do_action() - Calls 'wp_head' hook.
void wp_head ()
wp_loginout (line 185)

Display the Log In/Out link.

Displays a link, which allows users to navigate to the Log In page to log in or log out depending on whether they are currently logged in.

  • since: 1.5.0
  • uses: apply_filters() - Calls 'loginout' hook on HTML link content.
void wp_loginout ([string $redirect = ''], [boolean $echo = true])
  • string $redirect: Optional path to redirect to on login/logout.
  • boolean $echo: Default to echo and not return the link.
wp_login_form (line 254)

Provides a simple login form for use anywhere within WordPress. By default, it echoes the HTML immediately. Pass array('echo'=>false) to return the string instead.

  • return: or string containing the form
  • since: 3.0.0
Void, wp_login_form ([array $args = array()])
  • array $args: Configuration options to modify the form output
wp_login_url (line 234)

Returns the Log In URL.

Returns the URL that allows the user to log in to the site

  • return: A log in url
  • since: 2.7.0
  • uses: site_url() - To generate the log in URL
  • uses: apply_filters() - calls 'login_url' hook on final login url
string wp_login_url ([string $redirect = ''], [bool $force_reauth = false])
  • string $redirect: Path to redirect to on login.
  • bool $force_reauth: Whether to force reauthorization, even if a cookie is present. Default is false.
wp_logout_url (line 209)

Returns the Log Out URL.

Returns the URL that allows the user to log out of the site

void wp_logout_url ([string $redirect = ''])
  • string $redirect: Path to redirect to on logout.
wp_lostpassword_url (line 309)

Returns the Lost Password URL.

Returns the URL that allows the user to retrieve the lost password

  • since: 2.8.0
  • uses: site_url() - To generate the lost password URL
  • uses: apply_filters() - calls 'lostpassword_url' hook on the lostpassword url
void wp_lostpassword_url ([string $redirect = ''])
  • string $redirect: Path to redirect to on login.
wp_meta (line 359)

Theme container function for the 'wp_meta' action.

The 'wp_meta' action can have several purposes, depending on how you use it, but one purpose might have been to allow for theme switching.

void wp_meta ()
wp_no_robots (line 1718)

Display a noindex meta tag.

Outputs a noindex meta tag that tells web robots not to index the page content. Typical usage is as a wp_head callback. add_action( 'wp_head', 'wp_no_robots' );

  • since: 3.3.0
void wp_no_robots ()
wp_register (line 332)

Display the Registration or Admin link.

Display a link which allows the user to navigate to the registration page if not logged in and registration is enabled or to the dashboard if logged in.

  • since: 1.5.0
  • uses: apply_filters() - Calls 'register' hook on register / admin link content.
void wp_register ([string $before = '&lt;li&gt;'], [string $after = '&lt;/li&gt;'], [boolean $echo = true])
  • string $before: Text to output before the link (defaults to <li>).
  • string $after: Text to output after the link (defaults to </li>).
  • boolean $echo: Default to echo and not return the link.
wp_title (line 528)

Display or retrieve page title for all areas of blog.

By default, the page title will display the separator before the page title, so that the blog title will be before the page title. This is not good for title display, since the blog title shows up on most tabs and not what is important, which is the page that the user is looking at.

There are also SEO benefits to having the blog title after or to the 'right' or the page title. However, it is mostly common sense to have the blog title to the right with most browsers supporting tabs. You can achieve this by using the seplocation parameter and setting the value to 'right'. This change was introduced around 2.5.0, in case backwards compatibility of themes is important.

  • return: String on retrieve, null when displaying.
  • since: 1.0.0
  • usedby: get_wp_title_rss() - See function for $sep parameter usage.
string|null wp_title ([string $sep = '&amp;raquo;'], [bool $display = true], [string $seplocation = ''])
  • string $sep: Optional, default is '&raquo;'. How to separate the various items within the page title.
  • bool $display: Optional, default is true. Whether to display or retrieve title.
  • string $seplocation: Optional. Direction to display title, 'right'.

Documentation generated on Tue, 15 May 2012 23:18:05 +0000 by phpDocumentor 1.4.1