Make WordPress Core

Changeset 57450

Timestamp:
01/30/2024 06:00:03 PM (6 months ago)
Author:
jorbin
Message:

General: Backport polyfills for str_ends_with() and str_starts_with().

Uses src/wp-includes/functions.php becouse commiting to src/wp-includes/compat.php fails due to the presence of __autoload.

Merges [52040], [56016], and [56015] to 4.6 branch.

Props ocean90, SergeyBiryukov, desrosj, joemcgill, jorbin, mukesh27.

Location:
branches/4.6/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.6/src

  • branches/4.6/src/wp-includes/functions.php

    r54561 r57450  
    55 * @package WordPress
    66 */
     7
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
    759
    860require( ABSPATH . WPINC . '/option.php' );
     
    23582410            if ( $type !== $real_mime ) {
    23592411                /*
    2360                  * Everything else including image/* and application/*: 
     2412                 * Everything else including image/* and application/*:
    23612413                 * If the real content type doesn't match the file extension, assume it's dangerous.
    23622414                 */
     
    23672419    }
    23682420
    2369     // The mime type must be allowed 
     2421    // The mime type must be allowed
    23702422    if ( $type ) {
    23712423        $allowed = get_allowed_mime_types();
Note: See TracChangeset for help on using the changeset viewer.