[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
General template tags that can go anywhere in a template.
File Size: | 4929 lines (160 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 2 files wp-includes/class-wp-editor.php wp-includes/php-compat/readonly.php |
get_header( $name = null, $args = array() X-Ref |
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". param: string $name The name of the specialised header. param: array $args Optional. Additional arguments passed to the header template. return: void|false Void on success, false if the template does not exist. since: 1.5.0 since: 5.5.0 A return value was added. since: 5.5.0 The `$args` parameter was added. |
get_footer( $name = null, $args = array() X-Ref |
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". param: string $name The name of the specialised footer. param: array $args Optional. Additional arguments passed to the footer template. return: void|false Void on success, false if the template does not exist. since: 1.5.0 since: 5.5.0 A return value was added. since: 5.5.0 The `$args` parameter was added. |
get_sidebar( $name = null, $args = array() X-Ref |
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". param: string $name The name of the specialised sidebar. param: array $args Optional. Additional arguments passed to the sidebar template. return: void|false Void on success, false if the template does not exist. since: 1.5.0 since: 5.5.0 A return value was added. since: 5.5.0 The `$args` parameter was added. |
get_template_part( $slug, $name = null, $args = array() X-Ref |
Loads a template part into a template. Provides a simple mechanism for child themes to overload reusable sections of code in the theme. 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". param: string $slug The slug name for the generic template. param: string $name The name of the specialised template. param: array $args Optional. Additional arguments passed to the template. return: void|false Void on success, false if the template does not exist. since: 3.0.0 since: 5.5.0 A return value was added. since: 5.5.0 The `$args` parameter was added. |
get_search_form( $args = array() X-Ref |
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 {@see '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, {@see 'pre_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. param: array $args { return: void|string Void if 'echo' argument is true, search form HTML if 'echo' is false. since: 2.7.0 since: 5.2.0 The `$args` array parameter was added in place of an `$echo` boolean flag. |
wp_loginout( $redirect = '', $echo = true ) X-Ref |
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. param: string $redirect Optional path to redirect to on login/logout. param: bool $echo Default to echo and not return the link. return: void|string Void if `$echo` argument is true, log in/out link if `$echo` is false. since: 1.5.0 |
wp_logout_url( $redirect = '' ) X-Ref |
Retrieves the logout URL. Returns the URL that allows the user to log out of the site. param: string $redirect Path to redirect to on logout. return: string The logout URL. Note: HTML-encoded via esc_html() in wp_nonce_url(). since: 2.7.0 |
wp_login_url( $redirect = '', $force_reauth = false ) X-Ref |
Retrieves the login URL. param: string $redirect Path to redirect to on log in. param: bool $force_reauth Whether to force reauthorization, even if a cookie is present. return: string The login URL. Not HTML-encoded. since: 2.7.0 |
wp_registration_url() X-Ref |
Returns the URL that allows the user to register on the site. return: string User registration URL. since: 3.6.0 |
wp_login_form( $args = array() X-Ref |
Provides a simple login form for use anywhere within WordPress. The login form HTML is echoed by default. Pass a false value for `$echo` to return it instead. param: array $args { return: void|string Void if 'echo' argument is true, login form HTML if 'echo' is false. since: 3.0.0 |
wp_lostpassword_url( $redirect = '' ) X-Ref |
Returns the URL that allows the user to retrieve the lost password param: string $redirect Path to redirect to on login. return: string Lost password URL. since: 2.8.0 |
wp_register( $before = '<li>', $after = '</li>', $echo = true ) X-Ref |
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. param: string $before Text to output before the link. Default `<li>`. param: string $after Text to output after the link. Default `</li>`. param: bool $echo Default to echo and not return the link. return: void|string Void if `$echo` argument is true, registration or admin link since: 1.5.0 |
wp_meta() X-Ref |
Theme container function for the 'wp_meta' action. The {@see 'wp_meta'} action can have several purposes, depending on how you use it, but one purpose might have been to allow for theme switching. since: 1.5.0 |
bloginfo( $show = '' ) X-Ref |
Displays information about the current site. param: string $show Optional. Site information to display. Default empty. since: 0.71 |
get_bloginfo( $show = '', $filter = 'raw' ) X-Ref |
Retrieves information about the current site. Possible values for `$show` include: - 'name' - Site title (set in Settings > General) - 'description' - Site tagline (set in Settings > General) - 'wpurl' - The WordPress address (URL) (set in Settings > General) - 'url' - The Site address (URL) (set in Settings > General) - 'admin_email' - Admin email (set in Settings > General) - 'charset' - The "Encoding for pages and feeds" (set in Settings > Reading) - 'version' - The current WordPress version - 'html_type' - The content-type (default: "text/html"). Themes and plugins can override the default value using the {@see 'pre_option_html_type'} filter - 'text_direction' - The text direction determined by the site's language. is_rtl() should be used instead - 'language' - Language code for the current site - 'stylesheet_url' - URL to the stylesheet for the active theme. An active child theme will take precedence over this value - 'stylesheet_directory' - Directory path for the active theme. An active child theme will take precedence over this value - 'template_url' / 'template_directory' - URL of the active theme's directory. An active child theme will NOT take precedence over this value - 'pingback_url' - The pingback XML-RPC file URL (xmlrpc.php) - 'atom_url' - The Atom feed URL (/feed/atom) - 'rdf_url' - The RDF/RSS 1.0 feed URL (/feed/rdf) - 'rss_url' - The RSS 0.92 feed URL (/feed/rss) - 'rss2_url' - The RSS 2.0 feed URL (/feed) - 'comments_atom_url' - The comments Atom feed URL (/comments/feed) - 'comments_rss2_url' - The comments RSS 2.0 feed URL (/comments/feed) Some `$show` values are deprecated and will be removed in future versions. These options will trigger the _deprecated_argument() function. Deprecated arguments include: - 'siteurl' - Use 'url' instead - 'home' - Use 'url' instead param: string $show Optional. Site info to retrieve. Default empty (site name). param: string $filter Optional. How to filter what is retrieved. Default 'raw'. return: string Mostly string values, might be empty. since: 0.71 |
get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) X-Ref |
Returns the Site Icon URL. param: int $size Optional. Size of the site icon. Default 512 (pixels). param: string $url Optional. Fallback url if no site icon is found. Default empty. param: int $blog_id Optional. ID of the blog to get the site icon for. Default current blog. return: string Site Icon URL. since: 4.3.0 |
site_icon_url( $size = 512, $url = '', $blog_id = 0 ) X-Ref |
Displays the Site Icon URL. param: int $size Optional. Size of the site icon. Default 512 (pixels). param: string $url Optional. Fallback url if no site icon is found. Default empty. param: int $blog_id Optional. ID of the blog to get the site icon for. Default current blog. since: 4.3.0 |
has_site_icon( $blog_id = 0 ) X-Ref |
Whether the site has a Site Icon. param: int $blog_id Optional. ID of the blog in question. Default current blog. return: bool Whether the site has a site icon or not. since: 4.3.0 |
has_custom_logo( $blog_id = 0 ) X-Ref |
Determines whether the site has a custom logo. param: int $blog_id Optional. ID of the blog in question. Default is the ID of the current blog. return: bool Whether the site has a custom logo or not. since: 4.5.0 |
get_custom_logo( $blog_id = 0 ) X-Ref |
Returns a custom logo, linked to home unless the theme supports removing the link on the home page. param: int $blog_id Optional. ID of the blog in question. Default is the ID of the current blog. return: string Custom logo markup. since: 4.5.0 since: 5.5.0 Added option to remove the link on the home page with `unlink-homepage-logo` theme support since: 5.5.1 Disabled lazy-loading by default. |
the_custom_logo( $blog_id = 0 ) X-Ref |
Displays a custom logo, linked to home unless the theme supports removing the link on the home page. param: int $blog_id Optional. ID of the blog in question. Default is the ID of the current blog. since: 4.5.0 |
wp_get_document_title() X-Ref |
Returns document title for the current page. return: string Tag with the document title. since: 4.4.0 |
_wp_render_title_tag() X-Ref |
Displays title tag with content. since: 4.1.0 since: 4.4.0 Improved title output replaced `wp_title()`. |
wp_title( $sep = '»', $display = true, $seplocation = '' ) X-Ref |
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' of 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 backward compatibility of themes is important. param: string $sep Optional. How to separate the various items within the page title. param: bool $display Optional. Whether to display or retrieve title. Default true. param: string $seplocation Optional. Location of the separator ('left' or 'right'). return: string|void String when `$display` is false, nothing otherwise. since: 1.0.0 |
single_post_title( $prefix = '', $display = true ) X-Ref |
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. param: string $prefix Optional. What to display before the title. param: bool $display Optional. Whether to display or retrieve title. Default true. return: string|void Title when retrieving. since: 0.71 |
post_type_archive_title( $prefix = '', $display = true ) X-Ref |
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. param: string $prefix Optional. What to display before the title. param: bool $display Optional. Whether to display or retrieve title. Default true. return: string|void Title when retrieving, null when displaying or failure. since: 3.1.0 |
single_cat_title( $prefix = '', $display = true ) X-Ref |
Display or retrieve page title for category archive. Useful for category template files for displaying the category page title. 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. param: string $prefix Optional. What to display before the title. param: bool $display Optional. Whether to display or retrieve title. Default true. return: string|void Title when retrieving. since: 0.71 |
single_tag_title( $prefix = '', $display = true ) X-Ref |
Display or retrieve page title for tag post archive. Useful for tag template files for displaying the tag page title. 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. param: string $prefix Optional. What to display before the title. param: bool $display Optional. Whether to display or retrieve title. Default true. return: string|void Title when retrieving. since: 2.3.0 |
single_term_title( $prefix = '', $display = true ) X-Ref |
Display or retrieve page title for taxonomy term archive. Useful for taxonomy term template files for displaying the taxonomy term page title. 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. param: string $prefix Optional. What to display before the title. param: bool $display Optional. Whether to display or retrieve title. Default true. return: string|void Title when retrieving. since: 3.1.0 |
single_month_title( $prefix = '', $display = true ) X-Ref |
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. 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. param: string $prefix Optional. What to display before the title. param: bool $display Optional. Whether to display or retrieve title. Default true. return: string|false|void False if there's no valid title for the month. Title when retrieving. since: 0.71 |
the_archive_title( $before = '', $after = '' ) X-Ref |
Display the archive title based on the queried object. param: string $before Optional. Content to prepend to the title. Default empty. param: string $after Optional. Content to append to the title. Default empty. since: 4.1.0 |
get_the_archive_title() X-Ref |
Retrieve the archive title based on the queried object. return: string Archive title. since: 4.1.0 since: 5.5.0 The title part is wrapped in a `<span>` element. |
the_archive_description( $before = '', $after = '' ) X-Ref |
Display category, tag, term, or author description. param: string $before Optional. Content to prepend to the description. Default empty. param: string $after Optional. Content to append to the description. Default empty. since: 4.1.0 |
get_the_archive_description() X-Ref |
Retrieves the description for an author, post type, or term archive. return: string Archive description. since: 4.1.0 since: 4.7.0 Added support for author archives. since: 4.9.0 Added support for post type archives. |
get_the_post_type_description() X-Ref |
Retrieves the description for a post type archive. return: string The post type description. since: 4.9.0 |
get_archives_link( $url, $text, $format = 'html', $before = '', $after = '', $selected = false ) X-Ref |
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 **archives** 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. param: string $url URL to archive. param: string $text Archive text description. param: string $format Optional. Can be 'link', 'option', 'html', or custom. Default 'html'. param: string $before Optional. Content to prepend to the description. Default empty. param: string $after Optional. Content to append to the description. Default empty. param: bool $selected Optional. Set to true if the current page is the selected archive page. return: string HTML link content for archive. since: 1.0.0 since: 5.2.0 Added the `$selected` parameter. |
wp_get_archives( $args = '' ) X-Ref |
Display archive links based on type and format. param: string|array $args { return: void|string Void if 'echo' argument is true, archive links if 'echo' is false. since: 1.2.0 since: 4.4.0 The `$post_type` argument was added. since: 5.2.0 The `$year`, `$monthnum`, `$day`, and `$w` arguments were added. |
calendar_week_mod( $num ) X-Ref |
Get number of days since the start of the week. param: int $num Number of day. return: float Days since the start of the week. since: 1.5.0 |
get_calendar( $initial = true, $echo = true ) X-Ref |
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. param: bool $initial Optional. Whether to use initial calendar names. Default true. param: bool $echo Optional. Whether to display the calendar output. Default true. return: void|string Void if `$echo` argument is true, calendar HTML if `$echo` is false. since: 1.0.0 |
delete_get_calendar_cache() X-Ref |
Purge the cached results of get_calendar. since: 2.1.0 |
allowed_tags() X-Ref |
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: string HTML allowed tags entity encoded. since: 1.0.1 |
the_date_xml() X-Ref |
Outputs the date in iso8601 format for xml files. since: 1.0.0 |
the_date( $format = '', $before = '', $after = '', $echo = true ) X-Ref |
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'. param: string $format Optional. PHP date format. Defaults to the 'date_format' option. param: string $before Optional. Output before the date. Default empty. param: string $after Optional. Output after the date. Default empty. param: bool $echo Optional. Whether to echo the date or return it. Default true. return: string|void String if retrieving. since: 0.71 |
get_the_date( $format = '', $post = null ) X-Ref |
Retrieve the date on which the post was written. Unlike the_date() this function will always return the date. Modify output with the {@see 'get_the_date'} filter. param: string $format Optional. PHP date format. Defaults to the 'date_format' option. param: int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. return: string|int|false Date the current post was written. False on failure. since: 3.0.0 |
the_modified_date( $format = '', $before = '', $after = '', $echo = true ) X-Ref |
Display the date on which the post was last modified. param: string $format Optional. PHP date format. Defaults to the 'date_format' option. param: string $before Optional. Output before the date. Default empty. param: string $after Optional. Output after the date. Default empty. param: bool $echo Optional. Whether to echo the date or return it. Default true. return: string|void String if retrieving. since: 2.1.0 |
get_the_modified_date( $format = '', $post = null ) X-Ref |
Retrieve the date on which the post was last modified. param: string $format Optional. PHP date format. Defaults to the 'date_format' option. param: int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. return: string|int|false Date the current post was modified. False on failure. since: 2.1.0 since: 4.6.0 Added the `$post` parameter. |
the_time( $format = '' ) X-Ref |
Display the time at which the post was written. param: string $format Optional. Format to use for retrieving the time the post since: 0.71 |
get_the_time( $format = '', $post = null ) X-Ref |
Retrieve the time at which the post was written. param: string $format Optional. Format to use for retrieving the time the post param: int|WP_Post $post WP_Post object or ID. Default is global `$post` object. return: string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. since: 1.5.0 |
get_post_time( $format = 'U', $gmt = false, $post = null, $translate = false ) X-Ref |
Retrieve the time at which the post was written. param: string $format Optional. Format to use for retrieving the time the post param: bool $gmt Optional. Whether to retrieve the GMT time. Default false. param: int|WP_Post $post WP_Post object or ID. Default is global `$post` object. param: bool $translate Whether to translate the time string. Default false. return: string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. since: 2.0.0 |
get_post_datetime( $post = null, $field = 'date', $source = 'local' ) X-Ref |
Retrieve post published or modified time as a `DateTimeImmutable` object instance. The object will be set to the timezone from WordPress settings. For legacy reasons, this function allows to choose to instantiate from local or UTC time in database. Normally this should make no difference to the result. However, the values might get out of sync in database, typically because of timezone setting changes. The parameter ensures the ability to reproduce backwards compatible behaviors in such cases. param: int|WP_Post $post Optional. WP_Post object or ID. Default is global `$post` object. param: string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'. param: string $source Optional. Local or UTC time to use from database. Accepts 'local' or 'gmt'. return: DateTimeImmutable|false Time object on success, false on failure. since: 5.3.0 |
get_post_timestamp( $post = null, $field = 'date' ) X-Ref |
Retrieve post published or modified time as a Unix timestamp. Note that this function returns a true Unix timestamp, not summed with timezone offset like older WP functions. param: int|WP_Post $post Optional. WP_Post object or ID. Default is global `$post` object. param: string $field Optional. Published or modified time to use from database. Accepts 'date' or 'modified'. return: int|false Unix timestamp on success, false on failure. since: 5.3.0 |
the_modified_time( $format = '' ) X-Ref |
Display the time at which the post was last modified. param: string $format Optional. Format to use for retrieving the time the post since: 2.0.0 |
get_the_modified_time( $format = '', $post = null ) X-Ref |
Retrieve the time at which the post was last modified. param: string $format Optional. Format to use for retrieving the time the post param: int|WP_Post $post Optional. Post ID or WP_Post object. Default current post. return: string|int|false Formatted date string or Unix timestamp. False on failure. since: 2.0.0 since: 4.6.0 Added the `$post` parameter. |
get_post_modified_time( $format = 'U', $gmt = false, $post = null, $translate = false ) X-Ref |
Retrieve the time at which the post was last modified. param: string $format Optional. Format to use for retrieving the time the post param: bool $gmt Optional. Whether to retrieve the GMT time. Default false. param: int|WP_Post $post WP_Post object or ID. Default is global `$post` object. param: bool $translate Whether to translate the time string. Default false. return: string|int|false Formatted date string or Unix timestamp if `$format` is 'U' or 'G'. since: 2.0.0 |
the_weekday() X-Ref |
Display the weekday on which the post was written. since: 0.71 |
the_weekday_date( $before = '', $after = '' ) X-Ref |
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. param: string $before Optional. Output before the date. Default empty. param: string $after Optional. Output after the date. Default empty. since: 0.71 |
wp_head() X-Ref |
Fire the wp_head action. See {@see 'wp_head'}. since: 1.2.0 |
wp_footer() X-Ref |
Fire the wp_footer action. See {@see 'wp_footer'}. since: 1.5.1 |
wp_body_open() X-Ref |
Fire the wp_body_open action. See {@see 'wp_body_open'}. since: 5.2.0 |
feed_links( $args = array() X-Ref |
Display the links to the general feeds. param: array $args Optional arguments. since: 2.8.0 |
feed_links_extra( $args = array() X-Ref |
Display the links to the extra feeds such as category feeds. param: array $args Optional arguments. since: 2.8.0 |
rsd_link() X-Ref |
Display the link to the Really Simple Discovery service endpoint. since: 2.0.0 |
wlwmanifest_link() X-Ref |
Display the link to the Windows Live Writer manifest file. since: 2.3.1 |
wp_strict_cross_origin_referrer() X-Ref |
Displays a referrer `strict-origin-when-cross-origin` meta tag. Outputs a referrer `strict-origin-when-cross-origin` meta tag that tells the browser not to send the full URL as a referrer to other sites when cross-origin assets are loaded. Typical usage is as a {@see 'wp_head'} callback: add_action( 'wp_head', 'wp_strict_cross_origin_referrer' ); since: 5.7.0 |
wp_site_icon() X-Ref |
Display site icon meta tags. since: 4.3.0 |
wp_resource_hints() X-Ref |
Prints resource hints to browsers for pre-fetching, pre-rendering and pre-connecting to web sites. Gives hints to browsers to prefetch specific pages or render them in the background, to perform DNS lookups or to begin the connection handshake (DNS, TCP, TLS) in the background. These performance improving indicators work by using `<link rel"…">`. since: 4.6.0 |
wp_dependencies_unique_hosts() X-Ref |
Retrieves a list of unique hosts of all enqueued scripts and styles. return: string[] A list of unique hosts of enqueued scripts and styles. since: 4.6.0 |
user_can_richedit() X-Ref |
Whether the user can access the visual editor. Checks if the user can access the visual editor and that it's supported by the user's browser. return: bool True if the user can access the visual editor, false otherwise. since: 2.0.0 |
wp_default_editor() X-Ref |
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. The 'html' setting is for the "Text" editor tab. return: string Either 'tinymce', or 'html', or 'test' since: 2.5.0 |
wp_editor( $content, $editor_id, $settings = array() X-Ref |
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 https://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 meta box 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 https://core.trac.wordpress.org/ticket/19173 for more information. param: string $content Initial content for the editor. param: string $editor_id HTML ID attribute value for the textarea and TinyMCE. param: array $settings See _WP_Editors::parse_settings() for description. since: 3.3.0 |
wp_enqueue_editor() X-Ref |
Outputs the editor scripts, stylesheets, and default settings. The editor can be initialized when needed after page load. See wp.editor.initialize() in wp-admin/js/editor.js for initialization options. since: 4.8.0 |
wp_enqueue_code_editor( $args ) X-Ref |
Enqueue assets needed by the code editor for the given settings. param: array $args { return: array|false Settings for the enqueued code editor, or false if the editor was not enqueued. since: 4.9.0 |
wp_get_code_editor_settings( $args ) X-Ref |
Generate and return code editor settings. param: array $args { return: array|false Settings for the code editor. since: 5.0.0 |
get_search_query( $escaped = true ) X-Ref |
Retrieves 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. param: bool $escaped Whether the result is escaped. Default true. return: string since: 2.3.0 |
the_search_query() X-Ref |
Displays 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. since: 2.1.0 |
get_language_attributes( $doctype = 'html' ) X-Ref |
Gets the language attributes for the 'html' tag. Builds up a set of HTML attributes containing the text direction and language information for the page. param: string $doctype Optional. The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'. since: 4.3.0 |
language_attributes( $doctype = 'html' ) X-Ref |
Displays the language attributes for the 'html' tag. Builds up a set of HTML attributes containing the text direction and language information for the page. param: string $doctype Optional. The type of HTML document. Accepts 'xhtml' or 'html'. Default 'html'. since: 2.1.0 since: 4.3.0 Converted into a wrapper for get_language_attributes(). |
paginate_links( $args = '' ) X-Ref |
Retrieves paginated links 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. The 'before_page_number' and 'after_page_number' arguments allow users to augment the links themselves. Typically this might be to add context to the numbered links so that screen reader users understand what the links are for. The text strings are added before and after the page number - within the anchor tag. param: string|array $args { return: string|array|void String of page links or array of page links, depending on 'type' argument. since: 2.1.0 since: 4.9.0 Added the `aria_current` argument. |
wp_admin_css_color( $key, $name, $url, $colors = array() X-Ref |
Registers an admin color scheme css file. Allows a plugin to register a new admin color scheme. For example: wp_admin_css_color( 'classic', __( 'Classic' ), admin_url( "css/colors-classic.css" ), array( '#07273E', '#14568A', '#D54E21', '#2683AE' ) ); param: string $key The unique key for this theme. param: string $name The name of the theme. param: string $url The URL of the CSS file containing the color scheme. param: array $colors Optional. An array of CSS color definition strings which are used param: array $icons { since: 2.5.0 |
register_admin_color_schemes() X-Ref |
Registers the default admin color schemes. Registers the initial set of eight color schemes in the Profile section of the dashboard which allows for styling the admin menu and toolbar. since: 3.0.0 |
wp_admin_css_uri( $file = 'wp-admin' ) X-Ref |
Displays the URL of a WordPress admin CSS file. param: string $file file relative to wp-admin/ without its ".css" extension. return: string since: 2.3.0 |
wp_admin_css( $file = 'wp-admin', $force_echo = false ) X-Ref |
Enqueues or directly prints a stylesheet link to the specified CSS file. "Intelligently" decides to enqueue or to print the CSS file. If the {@see 'wp_print_styles'} action has *not* yet been called, the CSS file will be enqueued. If the {@see '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. param: string $file Optional. Style handle name or file name (without ".css" extension) relative param: bool $force_echo Optional. Force the stylesheet link to be printed rather than enqueued. since: 2.3.0 |
add_thickbox() X-Ref |
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 |
wp_generator() X-Ref |
Displays the XHTML generator that is generated on the wp_head hook. See {@see 'wp_head'}. since: 2.5.0 |
the_generator( $type ) X-Ref |
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 {@see 'the_generator'} filter. param: string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export). since: 2.5.0 |
get_the_generator( $type = '' ) X-Ref |
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 {@see 'get_the_generator_$type'} filter. param: string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export). return: string|void The HTML content for the generator. since: 2.5.0 |
checked( $checked, $current = true, $echo = true ) X-Ref |
Outputs the HTML checked attribute. Compares the first two arguments and if identical marks as checked. param: mixed $checked One of the values to compare. param: mixed $current Optional. The other value to compare if not just true. param: bool $echo Optional. Whether to echo or just return the string. return: string HTML attribute or empty string. since: 1.0.0 |
selected( $selected, $current = true, $echo = true ) X-Ref |
Outputs the HTML selected attribute. Compares the first two arguments and if identical marks as selected. param: mixed $selected One of the values to compare. param: mixed $current Optional. The other value to compare if not just true. param: bool $echo Optional. Whether to echo or just return the string. return: string HTML attribute or empty string. since: 1.0.0 |
disabled( $disabled, $current = true, $echo = true ) X-Ref |
Outputs the HTML disabled attribute. Compares the first two arguments and if identical marks as disabled. param: mixed $disabled One of the values to compare. param: mixed $current Optional. The other value to compare if not just true. param: bool $echo Optional. Whether to echo or just return the string. return: string HTML attribute or empty string. since: 3.0.0 |
wp_readonly( $readonly, $current = true, $echo = true ) X-Ref |
Outputs the HTML readonly attribute. Compares the first two arguments and if identical marks as readonly. param: mixed $readonly One of the values to compare. param: mixed $current Optional. The other value to compare if not just true. param: bool $echo Optional. Whether to echo or just return the string. return: string HTML attribute or empty string. since: 5.9.0 |
__checked_selected_helper( $helper, $current, $echo, $type ) X-Ref |
Private helper function for checked, selected, disabled and readonly. Compares the first two arguments and if identical marks as `$type`. param: mixed $helper One of the values to compare. param: mixed $current The other value to compare if not just true. param: bool $echo Whether to echo or just return the string. param: string $type The type of checked|selected|disabled|readonly we are doing. return: string HTML attribute or empty string. since: 2.8.0 |
wp_heartbeat_settings( $settings ) X-Ref |
Default settings for heartbeat Outputs the nonce used in the heartbeat XHR param: array $settings return: array Heartbeat settings. since: 3.6.0 |
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |