[ Index ]

WordPress Cross Reference

title

Body

[close]

/wp-admin/includes/ -> template.php (summary)

Template WordPress Administration API. A Big Mess. Also some neat functions that are nicely written.

File Size: 2024 lines (73 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Walker_Category_Checklist:: (57 methods):
  start_lvl()
  end_lvl()
  start_el()
  end_el()
  wp_category_checklist()
  wp_terms_checklist()
  wp_popular_terms_checklist()
  wp_link_category_checklist()
  get_inline_data()
  wp_comment_reply()
  wp_comment_trashnotice()
  list_meta()
  _list_meta_row()
  meta_form()
  touch_time()
  page_template_dropdown()
  parent_dropdown()
  wp_dropdown_roles()
  wp_import_upload_form()
  add_meta_box()
  do_meta_boxes()
  remove_meta_box()
  do_accordion_sections()
  add_settings_section()
  add_settings_field()
  do_settings_sections()
  do_settings_fields()
  add_settings_error()
  get_settings_errors()
  settings_errors()
  find_posts_div()
  the_post_password()
  _draft_or_post_title()
  _admin_search_query()
  iframe_header()
  tb_close()
  iframe_footer()
  _post_states()
  _media_states()
  compression_test()
  submit_button()
  get_submit_button()
  _wp_admin_html_begin()
  enqueue_scripts()
  print_js()
  pointer_wp330_toolbar()
  pointer_wp330_media_uploader()
  pointer_wp330_saving_widgets()
  pointer_wp340_customize_current_theme_link()
  pointer_wp340_choose_image_from_library()
  pointer_wp350_media()
  pointer_wp360_revisions()
  pointer_wp360_locks()
  dismiss_pointers_for_new_users()
  convert_to_screen()
  _local_storage_notice()
  wp_star_rating()


Class: Walker_Category_Checklist  - X-Ref

Walker to output an unordered list of category checkbox <input> elements.

start_lvl( &$output, $depth = 0, $args = array()   X-Ref
Starts the list before the elements are added.

param: string $output Passed by reference. Used to append additional content.
param: int    $depth  Depth of category. Used for tab indentation.
param: array  $args   An array of arguments. @see wp_terms_checklist()

end_lvl( &$output, $depth = 0, $args = array()   X-Ref
Ends the list of after the elements are added.

param: string $output Passed by reference. Used to append additional content.
param: int    $depth  Depth of category. Used for tab indentation.
param: array  $args   An array of arguments. @see wp_terms_checklist()

start_el( &$output, $category, $depth = 0, $args = array()   X-Ref
Start the element output.

param: string $output   Passed by reference. Used to append additional content.
param: object $category The current term object.
param: int    $depth    Depth of the term in reference to parents. Default 0.
param: array  $args     An array of arguments. @see wp_terms_checklist()
param: int    $id       ID of the current term.

end_el( &$output, $category, $depth = 0, $args = array()   X-Ref
Ends the element output, if needed.

param: string $output   Passed by reference. Used to append additional content.
param: object $category The current term object.
param: int    $depth    Depth of the term in reference to parents. Default 0.
param: array  $args     An array of arguments. @see wp_terms_checklist()

wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true )   X-Ref
Output an unordered list of checkbox <input> elements labelled
with category names.

param: int $post_id Mark categories associated with this post as checked. $selected_cats must not be an array.
param: int $descendants_and_self ID of the category to output along with its descendents.
param: bool|array $selected_cats List of categories to mark as checked.
param: bool|array $popular_cats Override the list of categories that receive the "popular-category" class.
param: object $walker Walker object to use to build the output.
param: bool $checked_ontop Move checked items out of the hierarchy and to the top of the list.

wp_terms_checklist($post_id = 0, $args = array()   X-Ref
Output an unordered list of checkbox <input> elements labelled
with term names. Taxonomy independent version of wp_category_checklist().

param: int $post_id
param: array $args

wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true )   X-Ref
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.

param: string $taxonomy Taxonomy to retrieve terms from.
param: int $default Unused.
param: int $number Number of terms to retrieve. Defaults to 10.
param: bool $echo Optionally output the list as well. Defaults to true.
return: array List of popular term IDs.

wp_link_category_checklist( $link_id = 0 )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $link_id

get_inline_data($post)   X-Ref
{@internal Missing Short Description}}

param: unknown_type $post

wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true)   X-Ref
{@internal Missing Short Description}}

param: unknown_type $position
param: unknown_type $checkbox
param: unknown_type $mode

wp_comment_trashnotice()   X-Ref
Output 'undo move to trash' text for comments


list_meta( $meta )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $meta

_list_meta_row( $entry, &$count )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $entry
param: unknown_type $count
return: unknown

meta_form( $post = null )   X-Ref
Prints the form in the Custom Fields meta box.

param: WP_Post $post Optional. The post being edited.

touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $edit
param: unknown_type $for_post
param: unknown_type $tab_index
param: unknown_type $multi

page_template_dropdown( $default = '' )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $default

parent_dropdown( $default = 0, $parent = 0, $level = 0 )   X-Ref
{@internal Missing Short Description}}

param: unknown_type $default
param: unknown_type $parent
param: unknown_type $level
return: unknown

wp_dropdown_roles( $selected = false )   X-Ref
Print out <option> html elements for role selectors

param: string $selected slug for the role that should be already selected

wp_import_upload_form( $action )   X-Ref
Outputs the form used by the importers to accept the data to be imported

param: string $action The action attribute for the form.

add_meta_box( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null )   X-Ref
Add a meta box to an edit form.

param: string $id String for use in the 'id' attribute of tags.
param: string $title Title of the meta box.
param: string $callback Function that fills the box with the desired content. The function should echo its output.
param: string|object $screen Optional. The screen on which to show the box (post, page, link). Defaults to current screen.
param: string $context Optional. The context within the page where the boxes should show ('normal', 'advanced').
param: string $priority Optional. The priority within the context where the boxes should show ('high', 'low').
param: 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).

do_meta_boxes( $screen, $context, $object )   X-Ref
Meta-Box template function

param: string|object $screen Screen identifier
param: string $context box context
param: mixed $object gets passed to the box callback function as first parameter
return: int number of meta_boxes

remove_meta_box($id, $screen, $context)   X-Ref
Remove a meta box from an edit form.

param: string $id String for use in the 'id' attribute of tags.
param: string|object $screen The screen on which to show the box (post, page, link).
param: string $context The context within the page where the boxes should show ('normal', 'advanced').

do_accordion_sections( $screen, $context, $object )   X-Ref
Meta Box Accordion Template Function

Largely made up of abstracted code from {@link do_meta_boxes()}, this
function serves to build meta boxes as list items for display as
a collapsible accordion.

param: string|object $screen The screen identifier.
param: string $context The meta box context.
param: mixed $object gets passed to the section callback function as first parameter.
return: int number of meta boxes as accordion sections.

add_settings_section($id, $title, $callback, $page)   X-Ref
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.

param: string $id Slug-name to identify the section. Used in the 'id' attribute of tags.
param: string $title Formatted title of the section. Shown as the heading for the section.
param: string $callback Function that echos out any content at the top of the section (between heading and fields).
param: 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();

add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()   X-Ref
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.

param: string $id Slug-name to identify the field. Used in the 'id' attribute of tags.
param: string $title Formatted title of the field. Shown as the label for the field during output.
param: string $callback Function that fills the field with the desired form inputs. The function should echo its output.
param: string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...).
param: string $section The slug-name of the section of the settings page in which to show the box (default, ...).
param: array $args Additional arguments

do_settings_sections( $page )   X-Ref
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()

param: string $page The slug name of the page whos settings sections you want to output

do_settings_fields($page, $section)   X-Ref
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.

param: string $page Slug title of the admin page who's settings fields you want to show.
param: section $section Slug title of the settings section who's fields you want to show.

add_settings_error( $setting, $code, $message, $type = 'error' )   X-Ref
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.

param: string $setting Slug title of the setting to which this error applies
param: string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
param: string $message The formatted message text to display to the user (will be shown inside styled <div> and <p>)
param: string $type The type of message it is, controls HTML class. Use 'error' or 'updated'.

get_settings_errors( $setting = '', $sanitize = false )   X-Ref
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)

param: string $setting Optional slug title of a specific setting who's errors you want.
param: boolean $sanitize Whether to re-sanitize the setting value before returning errors.
return: array Array of settings errors

settings_errors( $setting = '', $sanitize = false, $hide_on_update = false )   X-Ref
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.

param: string $setting Optional slug title of a specific setting who's errors you want.
param: boolean $sanitize Whether to re-sanitize the setting value before returning errors.
param: boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.

find_posts_div($found_action = '')   X-Ref
{@internal Missing Short Description}}

param: unknown_type $found_action

the_post_password()   X-Ref
Display the post password.

The password is passed through {@link esc_attr()} to ensure that it
is safe for placing in an html attribute.


_draft_or_post_title( $post = 0 )   X-Ref
Get the post title.

The post title is fetched and if it is blank then a default string is
returned.

param: mixed $post Post id or object. If not supplied the global $post is used.
return: string The post title if set

_admin_search_query()   X-Ref
Display the search query.

A simple wrapper to display the "s" parameter in a GET URI. This function
should only be used when {@link the_search_query()} cannot.


iframe_header( $title = '', $limit_styles = false )   X-Ref
Generic Iframe header for use with Thickbox

param: string $title Title of the Iframe page.
param: bool $limit_styles Limit styles to colour-related styles only (unless others are enqueued).

tb_close()   X-Ref
No description

iframe_footer()   X-Ref
Generic Iframe footer for use with Thickbox


_post_states($post)   X-Ref
No description

_media_states( $post )   X-Ref
No description

compression_test()   X-Ref
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.


submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null )   X-Ref
Echos a submit button, with provided text and appropriate class

param: string $text The text of the button (defaults to 'Save Changes')
param: string $type The type of button. One of: primary, secondary, delete
param: string $name The HTML name of the submit button. Defaults to "submit". If no id attribute
param: bool $wrap True if the output button should be wrapped in a paragraph tag,
param: array|string $other_attributes Other attributes that should be output with the button,

get_submit_button( $text = null, $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = null )   X-Ref
Returns a submit button, with provided text and appropriate class

param: string $text The text of the button (defaults to 'Save Changes')
param: string $type The type of button. One of: primary, secondary, delete
param: string $name The HTML name of the submit button. Defaults to "submit". If no id attribute
param: bool $wrap True if the output button should be wrapped in a paragraph tag,
param: array|string $other_attributes Other attributes that should be output with the button,

_wp_admin_html_begin()   X-Ref
No description

enqueue_scripts( $hook_suffix )   X-Ref
Initializes the new feature pointers.


print_js( $pointer_id, $selector, $args )   X-Ref
Print the pointer javascript data.

param: string $pointer_id The pointer ID.
param: string $selector The HTML elements, on which the pointer should be attached.
param: array  $args Arguments to be passed to the pointer JS (see wp-pointer.js).

pointer_wp330_toolbar()   X-Ref
No description

pointer_wp330_media_uploader()   X-Ref
Print 'Updated Media Uploader' for 3.3.0.


pointer_wp330_saving_widgets()   X-Ref
Print 'New Feature: Saving Widgets' for 3.3.0.


pointer_wp340_customize_current_theme_link()   X-Ref
Print 'New Feature: Current Theme Customize Link' for 3.4.0.


pointer_wp340_choose_image_from_library()   X-Ref
Print 'New Feature: Choose Image from Library' for 3.4.0.


pointer_wp350_media()   X-Ref
No description

pointer_wp360_revisions()   X-Ref
No description

pointer_wp360_locks()   X-Ref
No description

dismiss_pointers_for_new_users( $user_id )   X-Ref
Prevents new users from seeing existing 'new feature' pointers.


convert_to_screen( $hook_name )   X-Ref
Convert a screen string to a screen object

param: string $hook_name The hook name (also known as the hook suffix) used to determine the screen.
return: WP_Screen Screen object.

_local_storage_notice()   X-Ref
Output the HTML for restoring the post data from DOM storage


wp_star_rating( $args = array()   X-Ref
Output a HTML element with a star rating for a given rating.

Outputs a HTML element with the star rating exposed on a 0..5 scale in
half star increments (ie. 1, 1.5, 2 stars). Optionally, if specified, the
number of ratings may also be displayed by passing the $number parameter.

param: array $args {



Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu