X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7f1521bf193b382565eb753043c161f4cb3fcda7..refs/tags/wordpress-4.3:/wp-admin/includes/template.php diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 03ff4e7d..d1a85870 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -436,10 +436,12 @@ function get_inline_data($post) { * * @since 2.7.0 * - * @param int $position - * @param bool $checkbox + * @global WP_List_Table $wp_list_table + * + * @param int $position + * @param bool $checkbox * @param string $mode - * @param bool $table_row + * @param bool $table_row */ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $table_row = true ) { global $wp_list_table; @@ -603,17 +605,19 @@ function list_meta( $meta ) { * * @since 2.5.0 * + * @staticvar string $update_nonce + * * @param array $entry * @param int $count * @return string */ function _list_meta_row( $entry, &$count ) { - static $update_nonce = false; + static $update_nonce = ''; if ( is_protected_meta( $entry['meta_key'], 'post' ) ) return ''; - if ( !$update_nonce ) + if ( ! $update_nonce ) $update_nonce = wp_create_nonce( 'add-meta' ); $r = ''; @@ -656,6 +660,8 @@ function _list_meta_row( $entry, &$count ) { * * @since 1.2.0 * + * @global wpdb $wpdb + * * @param WP_Post $post Optional. The post being edited. */ function meta_form( $post = null ) { @@ -671,9 +677,9 @@ function meta_form( $post = null ) { * @param int $limit Number of custom fields to retrieve. Default 30. */ $limit = apply_filters( 'postmeta_form_limit', 30 ); - $sql = "SELECT meta_key + $sql = "SELECT DISTINCT meta_key FROM $wpdb->postmeta - GROUP BY meta_key + WHERE meta_key NOT BETWEEN '_' AND '_z' HAVING meta_key NOT LIKE %s ORDER BY meta_key LIMIT %d"; @@ -737,6 +743,9 @@ function meta_form( $post = null ) { * * @since 0.71 * + * @global WP_Locale $wp_locale + * @global object $comment + * * @param int|bool $edit Accepts 1|true for editing the date, 0|false for adding the date. * @param int|bool $for_post Accepts 1|true for applying the date to a post, 0|false for a comment. * @param int $tab_index The tabindex attribute to add. Default 0. @@ -772,23 +781,24 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { $cur_hh = gmdate( 'H', $time_adj ); $cur_mn = gmdate( 'i', $time_adj ); - $month = '\n"; for ( $i = 1; $i < 13; $i = $i +1 ) { $monthnum = zeroise($i, 2); - $month .= "\t\t\t" . '\n"; + $month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $monthtext ) . "\n"; } - $month .= ''; + $month .= ''; - $day = ''; - $year = ''; - $hour = ''; - $minute = ''; + $day = ''; + $year = ''; + $hour = ''; + $minute = ''; echo '
'; /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ - printf( __( '%1$s %2$s, %3$s @ %4$s : %5$s' ), $month, $day, $year, $hour, $minute ); + printf( __( '%1$s %2$s, %3$s @ %4$s:%5$s' ), $month, $day, $year, $hour, $minute ); echo '
'; @@ -839,6 +849,8 @@ function page_template_dropdown( $default = '' ) { * * @since 1.5.0 * + * @global wpdb $wpdb + * * @param int $default Optional. The default page ID to be pre-selected. Default 0. * @param int $parent Optional. The parent page ID. Default 0. * @param int $level Optional. Page depth level. Default 0. @@ -934,6 +946,8 @@ function wp_import_upload_form( $action ) { * * @since 2.5.0 * + * @global array $wp_meta_boxes + * * @param string $id String for use in the 'id' attribute of tags. * @param string $title Title of the meta box. * @param callback $callback Function that fills the box with the desired content. @@ -1022,10 +1036,12 @@ function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advan * * @since 2.5.0 * + * @global array $wp_meta_boxes + * * @staticvar bool $already_sorted - * @param string|WP_Screen $screen Screen identifier - * @param string $context box context - * @param mixed $object gets passed to the box callback function as first parameter + * @param string|WP_Screen $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 */ function do_meta_boxes( $screen, $context, $object ) { @@ -1090,9 +1106,11 @@ function do_meta_boxes( $screen, $context, $object ) { * * @since 2.6.0 * - * @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'). + * @global array $wp_meta_boxes + * + * @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'). */ function remove_meta_box($id, $screen, $context) { global $wp_meta_boxes; @@ -1126,9 +1144,9 @@ function remove_meta_box($id, $screen, $context) { * * @uses global $wp_meta_boxes Used to retrieve registered meta boxes. * - * @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. + * @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. */ function do_accordion_sections( $screen, $context, $object ) { @@ -1204,10 +1222,10 @@ function do_accordion_sections( $screen, $context, $object ) { * * @global $wp_settings_sections Storage array of all settings sections added to admin pages * - * @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 $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(); + * @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(); */ function add_settings_section($id, $title, $callback, $page) { global $wp_settings_sections; @@ -1465,9 +1483,9 @@ function get_settings_errors( $setting = '', $sanitize = false ) { * * @since 3.0.0 * - * @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. + * @param string $setting Optional slug title of a specific setting who's errors you want. + * @param bool $sanitize Whether to re-sanitize the setting value before returning errors. + * @param bool $hide_on_update If set to true errors will not be shown if the settings page has already been submitted. */ function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) { @@ -1576,6 +1594,10 @@ function _admin_search_query() { * * @since 2.7.0 * + * @global string $hook_suffix + * @global string $admin_body_class + * @global WP_Locale $wp_locale + * * @param string $title Optional. Title of the Iframe page. Default empty. * @param bool $deprecated Not used. */ @@ -1637,7 +1659,11 @@ if ( is_rtl() ) /** This filter is documented in wp-admin/admin-header.php */ $admin_body_classes = apply_filters( 'admin_body_class', '' ); ?> - class="wp-admin wp-core-ui no-js iframe "> + class="wp-admin wp-core-ui no-js iframe ">