WordPress.org

Make WordPress Core

Ticket #45411: template.php.patch

File template.php.patch, 6.2 KB (added by Hitendra Chopda, 3 years ago)
  • template.php

     
    870870 * @param int         $level   Optional. Page depth level. Default 0.
    871871 * @param int|WP_Post $post    Post ID or WP_Post object.
    872872 *
    873  * @return null|false Boolean False if page has no children, otherwise print out html elements
     873 * @return null|false Boolean False if page has no children, otherwise print out html elements.
    874874 */
    875875function parent_dropdown( $default = 0, $parent = 0, $level = 0, $post = null ) {
    876876        global $wpdb;
     
    12281228}
    12291229
    12301230/**
    1231  * Meta Box Accordion Template Function
     1231 * Meta Box Accordion Template Function.
    12321232 *
    12331233 * Largely made up of abstracted code from do_meta_boxes(), this
    12341234 * function serves to build meta boxes as list items for display as
     
    13081308 *
    13091309 * Part of the Settings API. Use this to define new settings sections for an admin page.
    13101310 * Show settings sections in your admin page callback function with do_settings_sections().
    1311  * Add settings fields to your section with add_settings_field()
     1311 * Add settings fields to your section with add_settings_field().
    13121312 *
    13131313 * The $callback argument should be the name of a function that echoes out any
    13141314 * content you want to show at the top of the settings section before the actual
     
    13161316 *
    13171317 * @since 2.7.0
    13181318 *
    1319  * @global $wp_settings_sections Storage array of all settings sections added to admin pages
     1319 * @global $wp_settings_sections Storage array of all settings sections added to admin pages.
    13201320 *
    13211321 * @param string   $id       Slug-name to identify the section. Used in the 'id' attribute of tags.
    13221322 * @param string   $title    Formatted title of the section. Shown as the heading for the section.
     
    13621362}
    13631363
    13641364/**
    1365  * Add a new field to a section of a settings page
     1365 * Add a new field to a section of a settings page.
    13661366 *
    13671367 * Part of the Settings API. Use this to define a settings field that will show
    13681368 * as part of a settings section inside a settings page. The fields are shown using
     
    13751375 * @since 2.7.0
    13761376 * @since 4.2.0 The `$class` argument was added.
    13771377 *
    1378  * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
     1378 * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections.
    13791379 *
    13801380 * @param string   $id       Slug-name to identify the field. Used in the 'id' attribute of tags.
    13811381 * @param string   $title    Formatted title of the field. Shown as the label for the field
     
    14401440 * to output all the sections and fields that were added to that $page with
    14411441 * add_settings_section() and add_settings_field()
    14421442 *
    1443  * @global $wp_settings_sections Storage array of all settings sections added to admin pages
    1444  * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
     1443 * @global $wp_settings_sections Storage array of all settings sections added to admin pages.
     1444 * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections.
    14451445 * @since 2.7.0
    14461446 *
    1447  * @param string $page The slug name of the page whose settings sections you want to output
     1447 * @param string $page The slug name of the page whose settings sections you want to output.
    14481448 */
    14491449function do_settings_sections( $page ) {
    14501450        global $wp_settings_sections, $wp_settings_fields;
     
    14721472}
    14731473
    14741474/**
    1475  * Print out the settings fields for a particular settings section
     1475 * Print out the settings fields for a particular settings section.
    14761476 *
    14771477 * Part of the Settings API. Use this in a settings page to output
    14781478 * a specific section. Should normally be called by do_settings_sections()
    14791479 * rather than directly.
    14801480 *
    1481  * @global $wp_settings_fields Storage array of settings fields and their pages/sections
     1481 * @global $wp_settings_fields Storage array of settings fields and their pages/sections.
    14821482 *
    14831483 * @since 2.7.0
    14841484 *
     
    15151515}
    15161516
    15171517/**
    1518  * Register a settings error to be displayed to the user
     1518 * Register a settings error to be displayed to the user.
    15191519 *
    15201520 * Part of the Settings API. Use this to show messages to users about settings validation
    15211521 * problems, missing settings or anything else.
     
    15311531 *
    15321532 * @global array $wp_settings_errors Storage array of errors registered during this pageload
    15331533 *
    1534  * @param string $setting Slug title of the setting to which this error applies
     1534 * @param string $setting Slug title of the setting to which this error applies.
    15351535 * @param string $code    Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
    15361536 * @param string $message The formatted message text to display to the user (will be shown inside styled
    15371537 *                        `<div>` and `<p>` tags).
     
    15501550}
    15511551
    15521552/**
    1553  * Fetch settings errors registered by add_settings_error()
     1553 * Fetch settings errors registered by add_settings_error().
    15541554 *
    15551555 * Checks the $wp_settings_errors array for any errors declared during the current
    15561556 * pageload and returns them.
     
    15701570 *
    15711571 * @param string $setting Optional slug title of a specific setting whose errors you want.
    15721572 * @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
    1573  * @return array Array of settings errors
     1573 * @return array Array of settings errors.
    15741574 */
    15751575function get_settings_errors( $setting = '', $sanitize = false ) {
    15761576        global $wp_settings_errors;
     
    20972097 *                                       id attribute is given in $other_attributes below, $name will be
    20982098 *                                       used as the button's id.
    20992099 * @param bool         $wrap             True if the output button should be wrapped in a paragraph tag,
    2100  *                                       false otherwise. Defaults to true
     2100 *                                       false otherwise. Defaults to true.
    21012101 * @param array|string $other_attributes Other attributes that should be output with the button, mapping
    21022102 *                                       attributes to their values, such as setting tabindex to 1, etc.
    21032103 *                                       These key/value attribute pairs will be output as attribute="value",