Ticket #43644: 43644.diff
File 43644.diff, 16.0 KB (added by , 7 years ago) |
---|
-
src/wp-admin/custom-background.php
diff --git src/wp-admin/custom-background.php src/wp-admin/custom-background.php index a813897fe9..8cd7d8d665 100644
if ( current_theme_supports( 'custom-background', 'default-color' ) ) { 579 579 } 580 580 $attachment_id = absint( $_POST['attachment_id'] ); 581 581 /** This filter is documented in wp-admin/includes/media.php */ 582 $sizes = array_keys( 583 apply_filters( 584 'image_size_names_choose', array( 585 'thumbnail' => __( 'Thumbnail' ), 586 'medium' => __( 'Medium' ), 587 'large' => __( 'Large' ), 588 'full' => __( 'Full Size' ), 589 ) 590 ) 591 ); 582 $sizes = array_keys( apply_filters( 'image_size_names_choose', array( 583 'thumbnail' => __( 'Thumbnail' ), 584 'medium' => __( 'Medium' ), 585 'large' => __( 'Large' ), 586 'full' => __( 'Full Size' ), 587 ) ) ); 592 588 $size = 'thumbnail'; 593 589 if ( in_array( $_POST['size'], $sizes ) ) { 594 590 $size = esc_attr( $_POST['size'] ); -
src/wp-admin/includes/class-theme-upgrader.php
diff --git src/wp-admin/includes/class-theme-upgrader.php src/wp-admin/includes/class-theme-upgrader.php index 1a561ab69c..30a70cd2cc 100644
class Theme_Upgrader extends WP_Upgrader { 417 417 wp_clean_themes_cache( $parsed_args['clear_update_cache'] ); 418 418 419 419 /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ 420 do_action( 421 'upgrader_process_complete', $this, array( 422 'action' => 'update', 423 'type' => 'theme', 424 'bulk' => true, 425 'themes' => $themes, 426 ) 427 ); 420 do_action( 'upgrader_process_complete', $this, array( 421 'action' => 'update', 422 'type' => 'theme', 423 'bulk' => true, 424 'themes' => $themes, 425 ) ); 428 426 429 427 $this->skin->bulk_footer(); 430 428 -
src/wp-admin/includes/class-wp-comments-list-table.php
diff --git src/wp-admin/includes/class-wp-comments-list-table.php src/wp-admin/includes/class-wp-comments-list-table.php index 7ab35735a7..0de5d7fdd7 100644
if ( 'top' === $which ) { 383 383 * 384 384 * @param string[] $comment_types An array of comment types. Accepts 'Comments', 'Pings'. 385 385 */ 386 $comment_types = apply_filters( 387 'admin_comment_types_dropdown', array( 388 'comment' => __( 'Comments' ), 389 'pings' => __( 'Pings' ), 390 ) 391 ); 386 $comment_types = apply_filters( 'admin_comment_types_dropdown', array( 387 'comment' => __( 'Comments' ), 388 'pings' => __( 'Pings' ), 389 ) ); 392 390 393 391 foreach ( $comment_types as $type => $label ) { 394 392 echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n"; -
src/wp-admin/includes/file.php
diff --git src/wp-admin/includes/file.php src/wp-admin/includes/file.php index 2b8a4fac1e..f697e0edee 100644
function _wp_handle_upload( &$file, $overrides, $time, $action ) { 889 889 * } 890 890 * @param string $context The type of upload action. Values include 'upload' or 'sideload'. 891 891 */ 892 return apply_filters( 893 'wp_handle_upload', array( 894 'file' => $new_file, 895 'url' => $url, 896 'type' => $type, 897 ), 'wp_handle_sideload' === $action ? 'sideload' : 'upload' 898 ); 892 return apply_filters( 'wp_handle_upload', array( 893 'file' => $new_file, 894 'url' => $url, 895 'type' => $type, 896 ), 'wp_handle_sideload' === $action ? 'sideload' : 'upload' ); 899 897 } 900 898 901 899 /** -
src/wp-admin/includes/media.php
diff --git src/wp-admin/includes/media.php src/wp-admin/includes/media.php index cfc80db8ea..f76d7a7694 100644
function image_size_input_fields( $post, $check = '' ) { 1068 1068 * @param array $size_names Array of image sizes and their names. Default values 1069 1069 * include 'Thumbnail', 'Medium', 'Large', 'Full Size'. 1070 1070 */ 1071 $size_names = apply_filters( 1072 'image_size_names_choose', array( 1073 'thumbnail' => __( 'Thumbnail' ), 1074 'medium' => __( 'Medium' ), 1075 'large' => __( 'Large' ), 1076 'full' => __( 'Full Size' ), 1077 ) 1078 ); 1071 $size_names = apply_filters( 'image_size_names_choose', array( 1072 'thumbnail' => __( 'Thumbnail' ), 1073 'medium' => __( 'Medium' ), 1074 'large' => __( 'Large' ), 1075 'full' => __( 'Full Size' ), 1076 ) ); 1079 1077 1080 1078 if ( empty( $check ) ) { 1081 1079 $check = get_user_setting( 'imgsize', 'medium' ); -
src/wp-admin/includes/ms.php
diff --git src/wp-admin/includes/ms.php src/wp-admin/includes/ms.php index aa12d920a9..3a3eee2ca6 100644
function network_edit_site_nav( $args = array() ) { 1145 1145 * } 1146 1146 * } 1147 1147 */ 1148 $links = apply_filters( 1149 'network_edit_site_nav_links', array( 1150 'site-info' => array( 1151 'label' => __( 'Info' ), 1152 'url' => 'site-info.php', 1153 'cap' => 'manage_sites', 1154 ), 1155 'site-users' => array( 1156 'label' => __( 'Users' ), 1157 'url' => 'site-users.php', 1158 'cap' => 'manage_sites', 1159 ), 1160 'site-themes' => array( 1161 'label' => __( 'Themes' ), 1162 'url' => 'site-themes.php', 1163 'cap' => 'manage_sites', 1164 ), 1165 'site-settings' => array( 1166 'label' => __( 'Settings' ), 1167 'url' => 'site-settings.php', 1168 'cap' => 'manage_sites', 1169 ), 1170 ) 1171 ); 1148 $links = apply_filters( 'network_edit_site_nav_links', array( 1149 'site-info' => array( 1150 'label' => __( 'Info' ), 1151 'url' => 'site-info.php', 1152 'cap' => 'manage_sites', 1153 ), 1154 'site-users' => array( 1155 'label' => __( 'Users' ), 1156 'url' => 'site-users.php', 1157 'cap' => 'manage_sites', 1158 ), 1159 'site-themes' => array( 1160 'label' => __( 'Themes' ), 1161 'url' => 'site-themes.php', 1162 'cap' => 'manage_sites', 1163 ), 1164 'site-settings' => array( 1165 'label' => __( 'Settings' ), 1166 'url' => 'site-settings.php', 1167 'cap' => 'manage_sites', 1168 ), 1169 ) ); 1172 1170 1173 1171 // Parse arguments 1174 1172 $r = wp_parse_args( -
src/wp-admin/includes/template.php
diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php index e7b3a2d6ec..82d7ab4584 100644
function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $ 403 403 * @param string $content The reply-to form content. 404 404 * @param array $args An array of default args. 405 405 */ 406 $content = apply_filters( 407 'wp_comment_reply', '', array( 408 'position' => $position, 409 'checkbox' => $checkbox, 410 'mode' => $mode, 411 ) 412 ); 406 $content = apply_filters( 'wp_comment_reply', '', array( 407 'position' => $position, 408 'checkbox' => $checkbox, 409 'mode' => $mode, 410 ) ); 413 411 414 412 if ( ! empty( $content ) ) { 415 413 echo $content; -
src/wp-includes/class-oembed.php
diff --git src/wp-includes/class-oembed.php src/wp-includes/class-oembed.php index e935a8d807..25c9fcd7e9 100644
class WP_oEmbed { 450 450 * 'text/xml+oembed', and 'application/xml+oembed' (incorrect, 451 451 * used by at least Vimeo). 452 452 */ 453 $linktypes = apply_filters( 454 'oembed_linktypes', array( 455 'application/json+oembed' => 'json', 456 'text/xml+oembed' => 'xml', 457 'application/xml+oembed' => 'xml', 458 ) 459 ); 453 $linktypes = apply_filters( 'oembed_linktypes', array( 454 'application/json+oembed' => 'json', 455 'text/xml+oembed' => 'xml', 456 'application/xml+oembed' => 'xml', 457 ) ); 460 458 461 459 // Strip <body> 462 460 if ( $html_head_end = stripos( $html, '</head>' ) ) { -
src/wp-includes/class-walker-category.php
diff --git src/wp-includes/class-walker-category.php src/wp-includes/class-walker-category.php index 5373b7d6dc..fb8e8702eb 100644
class Walker_Category extends Walker { 97 97 */ 98 98 public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { 99 99 /** This filter is documented in wp-includes/category-template.php */ 100 $cat_name = apply_filters( 101 'list_cats', 102 esc_attr( $category->name ), 103 $category 104 ); 100 $cat_name = apply_filters( 'list_cats', esc_attr( $category->name ), $category ); 105 101 106 102 // Don't generate an element if the category name is empty. 107 103 if ( ! $cat_name ) { -
src/wp-includes/class-wp-editor.php
diff --git src/wp-includes/class-wp-editor.php src/wp-includes/class-wp-editor.php index 7ce043a896..a3451dd28d 100644
final class _WP_Editors { 249 249 $quicktags_toolbar = '<div id="' . $toolbar_id . '" class="quicktags-toolbar"></div>'; 250 250 } 251 251 252 $output = '<div id="wp-' . $editor_id_attr . '-editor-container" class="wp-editor-container">' . 253 $quicktags_toolbar . 254 '<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . esc_attr( $set['textarea_name'] ) . '" ' . 255 'id="' . $editor_id_attr . '">%s</textarea></div>'; 256 252 257 /** 253 258 * Filters the HTML markup output that displays the editor. 254 259 * … … final class _WP_Editors { 256 261 * 257 262 * @param string $output Editor's HTML markup. 258 263 */ 259 $the_editor = apply_filters( 260 'the_editor', '<div id="wp-' . $editor_id_attr . '-editor-container" class="wp-editor-container">' . 261 $quicktags_toolbar . 262 '<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . esc_attr( $set['textarea_name'] ) . '" ' . 263 'id="' . $editor_id_attr . '">%s</textarea></div>' 264 ); 264 $the_editor = apply_filters( 'the_editor', $output ); 265 265 266 266 // Prepare the content for the Visual or Text editor, only when TinyMCE is used (back-compat). 267 267 if ( self::$this_tinymce ) { … … final class _WP_Editors { 792 792 * @param array $to_load An array containing boolean values whether TinyMCE 793 793 * and Quicktags are being loaded. 794 794 */ 795 do_action( 796 'wp_enqueue_editor', array( 797 'tinymce' => ( $default_scripts || self::$has_tinymce ), 798 'quicktags' => ( $default_scripts || self::$has_quicktags ), 799 ) 800 ); 795 do_action( 'wp_enqueue_editor', array( 796 'tinymce' => ( $default_scripts || self::$has_tinymce ), 797 'quicktags' => ( $default_scripts || self::$has_quicktags ), 798 ) ); 801 799 } 802 800 803 801 /** -
src/wp-includes/comment.php
diff --git src/wp-includes/comment.php src/wp-includes/comment.php index 1fabe53b0a..99860beaa8 100644
function wp_allow_comment( $commentdata, $avoid_die = false ) { 722 722 * @param bool $avoid_die Whether to prevent executing wp_die() 723 723 * or die() if a comment flood is occurring. 724 724 */ 725 do_action( 726 'check_comment_flood', 727 $commentdata['comment_author_IP'], 728 $commentdata['comment_author_email'], 729 $commentdata['comment_date_gmt'], 730 $avoid_die 731 ); 725 do_action( 'check_comment_flood', $commentdata['comment_author_IP'], $commentdata['comment_author_email'], $commentdata['comment_date_gmt'], $avoid_die ); 732 726 733 727 /** 734 728 * Filters whether a comment is part of a comment flood. … … function wp_allow_comment( $commentdata, $avoid_die = false ) { 744 738 * @param bool $avoid_die Whether to prevent executing wp_die() 745 739 * or die() if a comment flood is occurring. 746 740 */ 747 $is_flood = apply_filters( 748 'wp_is_comment_flood', 749 false, 750 $commentdata['comment_author_IP'], 751 $commentdata['comment_author_email'], 752 $commentdata['comment_date_gmt'], 753 $avoid_die 754 ); 741 $is_flood = apply_filters( 'wp_is_comment_flood', false, $commentdata['comment_author_IP'], $commentdata['comment_author_email'], $commentdata['comment_date_gmt'], $avoid_die ); 755 742 756 743 if ( $is_flood ) { 757 744 return new WP_Error( 'comment_flood', __( 'You are posting comments too quickly. Slow down.' ), 429 ); -
src/wp-includes/cron.php
diff --git src/wp-includes/cron.php src/wp-includes/cron.php index fbf5a629af..b48afd01f0 100644
function spawn_cron( $gmt_time = 0 ) { 396 396 * } 397 397 * @param string $doing_wp_cron The unix timestamp of the cron lock. 398 398 */ 399 $cron_request = apply_filters( 400 'cron_request', array( 401 'url' => add_query_arg( 'doing_wp_cron', $doing_wp_cron, site_url( 'wp-cron.php' ) ), 402 'key' => $doing_wp_cron, 403 'args' => array( 404 'timeout' => 0.01, 405 'blocking' => false, 406 /** This filter is documented in wp-includes/class-wp-http-streams.php */ 407 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), 408 ), 409 ), $doing_wp_cron 410 ); 399 $cron_request = apply_filters( 'cron_request', array( 400 'url' => add_query_arg( 'doing_wp_cron', $doing_wp_cron, site_url( 'wp-cron.php' ) ), 401 'key' => $doing_wp_cron, 402 'args' => array( 403 'timeout' => 0.01, 404 'blocking' => false, 405 /** This filter is documented in wp-includes/class-wp-http-streams.php */ 406 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), 407 ), 408 ), $doing_wp_cron ); 411 409 412 410 wp_remote_post( $cron_request['url'], $cron_request['args'] ); 413 411 } -
src/wp-includes/embed.php
diff --git src/wp-includes/embed.php src/wp-includes/embed.php index 29ce1b8836..bcf24a7b85 100644
function get_oembed_response_data( $post, $width ) { 521 521 * @type int $max Maximum width. Default 600. 522 522 * } 523 523 */ 524 $min_max_width = apply_filters( 525 'oembed_min_max_width', array( 526 'min' => 200, 527 'max' => 600, 528 ) 529 ); 524 $min_max_width = apply_filters( 'oembed_min_max_width', array( 525 'min' => 200, 526 'max' => 600, 527 ) ); 530 528 531 529 $width = min( max( $min_max_width['min'], $width ), $min_max_width['max'] ); 532 530 $height = max( ceil( $width / 16 * 9 ), 200 ); -
src/wp-includes/formatting.php
diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php index 68b2ccd4e4..5b16e84692 100644
function wp_sprintf_l( $pattern, $args ) { 4842 4842 * 4843 4843 * @param array $delimiters An array of translated delimiters. 4844 4844 */ 4845 $l = apply_filters( 4846 'wp_sprintf_l', array( 4847 /* translators: used to join items in a list with more than 2 items */ 4848 'between' => sprintf( __( '%1$s, %2$s' ), '', '' ), 4849 /* translators: used to join last two items in a list with more than 2 times */ 4850 'between_last_two' => sprintf( __( '%1$s, and %2$s' ), '', '' ), 4851 /* translators: used to join items in a list with only 2 items */ 4852 'between_only_two' => sprintf( __( '%1$s and %2$s' ), '', '' ), 4853 ) 4854 ); 4845 $l = apply_filters( 'wp_sprintf_l', array( 4846 /* translators: used to join items in a list with more than 2 items */ 4847 'between' => sprintf( __( '%1$s, %2$s' ), '', '' ), 4848 /* translators: used to join last two items in a list with more than 2 times */ 4849 'between_last_two' => sprintf( __( '%1$s, and %2$s' ), '', '' ), 4850 /* translators: used to join items in a list with only 2 items */ 4851 'between_only_two' => sprintf( __( '%1$s and %2$s' ), '', '' ), 4852 ) ); 4855 4853 4856 4854 $args = (array) $args; 4857 4855 $result = array_shift( $args ); -
src/wp-includes/functions.php
diff --git src/wp-includes/functions.php src/wp-includes/functions.php index 3f11cce7e0..1d71d0323e 100644
function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { 2251 2251 * 2252 2252 * @param mixed $upload_bits_error An array of upload bits data, or a non-array error to return. 2253 2253 */ 2254 $upload_bits_error = apply_filters( 2255 'wp_upload_bits', array( 2256 'name' => $name, 2257 'bits' => $bits, 2258 'time' => $time, 2259 ) 2260 ); 2254 $upload_bits_error = apply_filters( 'wp_upload_bits', array( 2255 'name' => $name, 2256 'bits' => $bits, 2257 'time' => $time, 2258 ) ); 2261 2259 if ( ! is_array( $upload_bits_error ) ) { 2262 2260 $upload['error'] = $upload_bits_error; 2263 2261 return $upload; … … function wp_upload_bits( $name, $deprecated, $bits, $time = null ) { 2301 2299 $url = $upload['url'] . "/$filename"; 2302 2300 2303 2301 /** This filter is documented in wp-admin/includes/file.php */ 2304 return apply_filters( 2305 'wp_handle_upload', array( 2306 'file' => $new_file, 2307 'url' => $url, 2308 'type' => $wp_filetype['type'], 2309 'error' => false, 2310 ), 'sideload' 2311 ); 2302 return apply_filters( 'wp_handle_upload', array( 2303 'file' => $new_file, 2304 'url' => $url, 2305 'type' => $wp_filetype['type'], 2306 'error' => false, 2307 ), 'sideload' ); 2312 2308 } 2313 2309 2314 2310 /**