Changeset 56174 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 07/09/2023 07:50:52 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r56031 r56174 299 299 $return = array(); 300 300 301 // Check the type of request. 302 // Current allowed values are `add` and `search`. 301 /* 302 * Check the type of request. 303 * Current allowed values are `add` and `search`. 304 */ 303 305 if ( isset( $_REQUEST['autocomplete_type'] ) && 'search' === $_REQUEST['autocomplete_type'] ) { 304 306 $type = $_REQUEST['autocomplete_type']; … … 307 309 } 308 310 309 // Check the desired field for value. 310 // Current allowed values are `user_email` and `user_login`. 311 /* 312 * Check the desired field for value. 313 * Current allowed values are `user_email` and `user_login`. 314 */ 311 315 if ( isset( $_REQUEST['autocomplete_field'] ) && 'user_email' === $_REQUEST['autocomplete_field'] ) { 312 316 $field = $_REQUEST['autocomplete_field']; … … 1521 1525 require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; 1522 1526 1523 // For performance reasons, we omit some object properties from the checklist. 1524 // The following is a hacky way to restore them when adding non-custom items. 1527 /* 1528 * For performance reasons, we omit some object properties from the checklist. 1529 * The following is a hacky way to restore them when adding non-custom items. 1530 */ 1525 1531 $menu_items_data = array(); 1526 1532 … … 2513 2519 } 2514 2520 2515 // Set a custom header with the attachment_id. 2516 // Used by the browser/client to resume creating image sub-sizes after a PHP fatal error. 2521 /* 2522 * Set a custom header with the attachment_id. 2523 * Used by the browser/client to resume creating image sub-sizes after a PHP fatal error. 2524 */ 2517 2525 if ( ! headers_sent() ) { 2518 2526 header( 'X-WP-Upload-Attachment-ID: ' . $attachment_id ); 2519 2527 } 2520 2528 2521 // This can still be pretty slow and cause timeout or out of memory errors. 2522 // The js that handles the response would need to also handle HTTP 500 errors. 2529 /* 2530 * This can still be pretty slow and cause timeout or out of memory errors. 2531 * The js that handles the response would need to also handle HTTP 500 errors. 2532 */ 2523 2533 wp_update_image_subsizes( $attachment_id ); 2524 2534 … … 3770 3780 3771 3781 if ( is_ssl() && str_starts_with( $url, 'http://' ) ) { 3772 // Admin is ssl and the user pasted non-ssl URL. 3773 // Check if the provider supports ssl embeds and use that for the preview. 3782 /* 3783 * Admin is ssl and the user pasted non-ssl URL. 3784 * Check if the provider supports ssl embeds and use that for the preview. 3785 */ 3774 3786 $ssl_shortcode = preg_replace( '%^(\\[embed[^\\]]*\\])http://%i', '$1https://', $shortcode ); 3775 3787 $parsed = $wp_embed->run_shortcode( $ssl_shortcode );
Note: See TracChangeset
for help on using the changeset viewer.