add_meta_box (line 814)
Add a meta box to an edit form.
void
add_meta_box
(string $id, string $title, string $callback, [string|object $screen = null], [string $context = 'advanced'], [string $priority = 'default'], [array $callback_args = null])
-
string
$id: String for use in the 'id' attribute of tags.
-
string
$title: Title of the meta box.
-
string
$callback: Function that fills the box with the desired content. The function should echo its output.
-
string|object
$screen: Optional. The screen on which to show the box (post, page, link). Defaults to current screen.
-
string
$context: Optional. The context within the page where the boxes should show ('normal', 'advanced').
-
string
$priority: Optional. The priority within the context where the boxes should show ('high', 'low').
-
array
$callback_args: Optional. Data that should be set as the "args" property of the box array (which is the second parameter passed to your callback).
add_settings_error (line 1210)
Register a settings error to be displayed to the user
Part of the Settings API. Use this to show messages to users about settings validation problems, missing settings or anything else.
Settings errors should be added inside the $sanitize_callback function defined in register_setting() for a given setting to give feedback about the submission.
By default messages will show immediately after the submission that generated the error. Additional calls to settings_errors() can be used to show errors even when the settings page is first accessed.
void
add_settings_error
(string $setting, string $code, string $message, [string $type = 'error'])
-
string
$setting: Slug title of the setting to which this error applies
-
string
$code: Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
-
string
$message: The formatted message text to display to the user (will be shown inside styled <div> and <p>)
-
string
$type: The type of message it is, controls HTML class. Use 'error' or 'updated'.
add_settings_field (line 1098)
Add a new field to a section of a settings page
Part of the Settings API. Use this to define a settings field that will show as part of a settings section inside a settings page. The fields are shown using do_settings_fields() in do_settings-sections()
The $callback argument should be the name of a function that echoes out the html input tags for this setting field. Use get_option() to retrieve existing values to show.
void
add_settings_field
(string $id, string $title, string $callback, string $page, [string $section = 'default'], [array $args = array()])
-
string
$id: Slug-name to identify the field. Used in the 'id' attribute of tags.
-
string
$title: Formatted title of the field. Shown as the label for the field during output.
-
string
$callback: Function that fills the field with the desired form inputs. The function should echo its output.
-
string
$page: The slug-name of the settings page on which to show the section (general, reading, writing, ...).
-
string
$section: The slug-name of the section of the settings page in which to show the box (default, ...).
-
array
$args: Additional arguments
add_settings_section (line 1053)
Add a new section to a settings page.
Part of the Settings API. Use this to define new settings sections for an admin page. Show settings sections in your admin page callback function with do_settings_sections(). Add settings fields to your section with add_settings_field()
The $callback argument should be the name of a function that echoes out any content you want to show at the top of the settings section before the actual fields. It can output nothing if you want.
void
add_settings_section
(string $id, string $title, string $callback, string $page)
-
string
$id: Slug-name to identify the section. Used in the 'id' attribute of tags.
-
string
$title: Formatted title of the section. Shown as the heading for the section.
-
string
$callback: Function that echos out any content at the top of the section (between heading and fields).
-
string
$page: The slug-name of the settings page on which to show the section. Built-in pages include 'general', 'reading', 'writing', 'discussion', 'media', etc. Create your own using add_options_page();
compression_test (line 1555)
Test support for compressing JavaScript from PHP
Outputs JavaScript that tests if compression from PHP works as expected and sets an option with the result. Has no effect when the current user is not an administrator. To run the test again the option 'can_compress_scripts' has to be deleted.
void
compression_test
()
convert_to_screen (line 1915)
Convert a screen string to a screen object
WP_Screen
convert_to_screen
(
string $hook_name)
-
string
$hook_name: The hook name (also known as the hook suffix) used to determine the screen.
do_accordion_sections (line 985)
Meta Box Accordion Template Function
Largely made up of abstracted code from do_meta_boxes(), this function serves to build meta boxes as list items for display as a collapsible accordion.
int
do_accordion_sections
(string|object $screen, string $context, mixed $object)
-
string|object
$screen: The screen identifier.
-
string
$context: The meta box context.
-
mixed
$object: gets passed to the section callback function as first parameter.
do_meta_boxes (line 882)
Meta-Box template function
int
do_meta_boxes
(string|object $screen, string $context, mixed $object)
-
string|object
$screen: Screen identifier
-
string
$context: box context
-
mixed
$object: gets passed to the box callback function as first parameter
do_settings_fields (line 1169)
Print out the settings fields for a particular settings section
Part of the Settings API. Use this in a settings page to output a specific section. Should normally be called by do_settings_sections() rather than directly.
void
do_settings_fields
(string $page, section $section)
-
string
$page: Slug title of the admin page who's settings fields you want to show.
-
section
$section: Slug title of the settings section who's fields you want to show.
do_settings_sections (line 1134)
Prints out all settings sections added to a particular settings page
Part of the Settings API. Use this in a settings page callback function to output all the sections and fields that were added to that $page with add_settings_section() and add_settings_field()
void
do_settings_sections
(string $page)
-
string
$page: The slug name of the page whos settings sections you want to output
find_posts_div (line 1329)
void
find_posts_div
([unknown_type $found_action = ''])
-
unknown_type
$found_action
get_inline_data (line 241)
void
get_inline_data
(unknown_type $post)
get_settings_errors (line 1247)
Fetch settings errors registered by add_settings_error()
Checks the $wp_settings_errors array for any errors declared during the current pageload and returns them.
If changes were just submitted ($_GET['settings-updated']) and settings errors were saved to the 'settings_errors' transient then those errors will be returned instead. This is used to pass errors back across pageloads.
Use the $sanitize argument to manually re-sanitize the option before returning errors. This is useful if you have errors or notices you want to show even when the user hasn't submitted data (i.e. when they first load an options page, or in admin_notices action hook)
array
get_settings_errors
([string $setting = ''], [boolean $sanitize = false])
-
string
$setting: Optional slug title of a specific setting who's errors you want.
-
boolean
$sanitize: Whether to re-sanitize the setting value before returning errors.
get_submit_button (line 1648)
Returns a submit button, with provided text and appropriate class
void
get_submit_button
([string $text = null], [string $type = 'primary large'], [string $name = 'submit'], [bool $wrap = true], [array|string $other_attributes = null])
-
string
$text: The text of the button (defaults to 'Save Changes')
-
string
$type: The type of button. One of: primary, secondary, delete
-
string
$name: The HTML name of the submit button. Defaults to "submit". If no id attribute is given in $other_attributes below, $name will be used as the button's id.
-
bool
$wrap: True if the output button should be wrapped in a paragraph tag, false otherwise. Defaults to true
-
array|string
$other_attributes: Other attributes that should be output with the button, mapping attributes to their values, such as array( 'tabindex' => '1' ). These attributes will be output as attribute="value", such as tabindex="1". Defaults to no other attributes. Other attributes can also be provided as a string such as 'tabindex="1"', though the array format is typically cleaner.
iframe_footer (line 1468)
Generic Iframe footer for use with Thickbox
void
iframe_footer
()
iframe_header (line 1410)
Generic Iframe header for use with Thickbox
void
iframe_header
([string $title = ''], [bool $limit_styles = false])
-
string
$title: Title of the Iframe page.
-
bool
$limit_styles: Limit styles to colour-related styles only (unless others are enqueued).
list_meta (line 409)
void
list_meta
(unknown_type $meta)
meta_form (line 507)
void
meta_form
()
page_template_dropdown (line 651)
void
page_template_dropdown
([unknown_type $default = ''])
parent_dropdown (line 673)
unknown
parent_dropdown
([unknown_type $default = 0], [unknown_type $parent = 0], [unknown_type $level = 0])
-
unknown_type
$default
-
unknown_type
$parent
-
unknown_type
$level
remove_meta_box (line 948)
Remove a meta box from an edit form.
void
remove_meta_box
(string $id, string|object $screen, string $context)
-
string
$id: String for use in the 'id' attribute of tags.
-
string|object
$screen: The screen on which to show the box (post, page, link).
-
string
$context: The context within the page where the boxes should show ('normal', 'advanced').
settings_errors (line 1301)
Display settings errors registered by add_settings_error()
Part of the Settings API. Outputs a <div> for each error retrieved by get_settings_errors().
This is called automatically after a settings page based on the Settings API is submitted. Errors should be added during the validation callback function for a setting defined in register_setting()
The $sanitize option is passed into get_settings_errors() and will re-run the setting sanitization on its current value.
The $hide_on_update option will cause errors to only show when the settings page is first loaded. if the user has already saved new values it will be hidden to avoid repeating messages already shown in the default error reporting after submission. This is useful to show general errors like missing settings when the user arrives at the settings page.
void
settings_errors
([string $setting = ''], [boolean $sanitize = false], [boolean $hide_on_update = false])
-
string
$setting: Optional slug title of a specific setting who's errors you want.
-
boolean
$sanitize: Whether to re-sanitize the setting value before returning errors.
-
boolean
$hide_on_update: If set to true errors will not be shown if the settings page has already been submitted.
submit_button (line 1627)
Echos a submit button, with provided text and appropriate class
void
submit_button
([string $text = null], [string $type = 'primary'], [string $name = 'submit'], [bool $wrap = true], [array|string $other_attributes = null])
-
string
$text: The text of the button (defaults to 'Save Changes')
-
string
$type: The type of button. One of: primary, secondary, delete
-
string
$name: The HTML name of the submit button. Defaults to "submit". If no id attribute is given in $other_attributes below, $name will be used as the button's id.
-
bool
$wrap: True if the output button should be wrapped in a paragraph tag, false otherwise. Defaults to true
-
array|string
$other_attributes: Other attributes that should be output with the button, mapping attributes to their values, such as array( 'tabindex' => '1' ). These attributes will be output as attribute="value", such as tabindex="1". Defaults to no other attributes. Other attributes can also be provided as a string such as 'tabindex="1"', though the array format is typically cleaner.
the_attachment_links (line 706)
unknown
the_attachment_links
([unknown_type $id = false])
the_post_password (line 1365)
Display the post password.
The password is passed through esc_attr() to ensure that it is safe for placing in an html attribute.
void
the_post_password
()
touch_time (line 577)
void
touch_time
([unknown_type $edit = 1], [unknown_type $for_post = 1], [unknown_type $tab_index = 0], [unknown_type $multi = 0])
-
unknown_type
$edit
-
unknown_type
$for_post
-
unknown_type
$tab_index
-
unknown_type
$multi
wp_category_checklist (line 70)
Output an unordered list of checkbox <input> elements labelled with category names.
void
wp_category_checklist
([int $post_id = 0], [int $descendants_and_self = 0], [bool|array $selected_cats = false], [bool|array $popular_cats = false], [object $walker = null], [bool $checked_ontop = true])
-
int
$post_id: Mark categories associated with this post as checked. $selected_cats must not be an array.
-
int
$descendants_and_self: ID of the category to output along with its descendents.
-
bool|array
$selected_cats: List of categories to mark as checked.
-
bool|array
$popular_cats: Override the list of categories that receive the "popular-category" class.
-
object
$walker: Walker object to use to build the output.
-
bool
$checked_ontop: Move checked items out of the hierarchy and to the top of the list.
wp_comment_reply (line 304)
void
wp_comment_reply
([unknown_type $position = '1'], [unknown_type $checkbox = false], [unknown_type $mode = 'single'], [ $table_row = true])
-
unknown_type
$position
-
unknown_type
$checkbox
-
unknown_type
$mode
-
$table_row
wp_comment_trashnotice (line 391)
Output 'undo move to trash' text for comments
void
wp_comment_trashnotice
()
wp_dropdown_roles (line 756)
Print out <option> html elements for role selectors
void
wp_dropdown_roles
([string $selected = false])
-
string
$selected: slug for the role that should be already selected
wp_import_upload_form (line 779)
Outputs the form used by the importers to accept the data to be imported
void
wp_import_upload_form
(string $action)
-
string
$action: The action attribute for the form.
wp_link_category_checklist (line 208)
void
wp_link_category_checklist
([unknown_type $link_id = 0])
wp_popular_terms_checklist (line 168)
Retrieve a list of the most popular terms from the specified taxonomy.
If the $echo argument is true then the elements for a list of checkbox <input> elements labelled with the names of the selected terms is output. If the $post_ID global isn't empty then the terms associated with that post will be marked as checked.
array
wp_popular_terms_checklist
(string $taxonomy, [int $default = 0], [int $number = 10], [bool $echo = true])
-
string
$taxonomy: Taxonomy to retrieve terms from.
-
int
$default: Unused.
-
int
$number: Number of terms to retrieve. Defaults to 10.
-
bool
$echo: Optionally output the list as well. Defaults to true.
wp_terms_checklist (line 90)
Output an unordered list of checkbox <input> elements labelled with term names. Taxonomy independent version of wp_category_checklist().
void
wp_terms_checklist
([int $post_id = 0], [array $args = array()])
_admin_search_query (line 1398)
Display the search query.
A simple wrapper to display the "s" parameter in a GET URI. This function should only be used when the_search_query() cannot.
void
_admin_search_query
()
_draft_or_post_title (line 1381)
Get the post title.
The post title is fetched and if it is blank then a default string is returned.
string
_draft_or_post_title
([mixed $post = 0])
-
mixed
$post: Post id or object. If not supplied the global $post is used.
_list_meta_row (line 454)
unknown
_list_meta_row
(unknown_type $entry, &$count, unknown_type $count)
-
unknown_type
$entry
-
unknown_type
$count
-
&$count
_media_states (line 1515)
void
_media_states
( $post)
_post_states (line 1481)
void
_post_states
( $post)
_wp_admin_html_begin (line 1692)
void
_wp_admin_html_begin
()