WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/06/2016 03:23:38 AM (6 years ago)
Author:
rmccue
Message:

Autoload: Introduce shim for SPL autoloading.

For PHP 5.2, SPL can be disabled. As SPL provides the support for multiple autoloaders, this needs to be shimmed if not available.

Fixes #36926.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-simplepie.php

    r34348 r37636  
    3030}
    3131
    32 if ( function_exists( 'spl_autoload_register' ) ) {
    33     /**
    34      * We autoload classes we may not need.
    35      *
    36      * If SPL is disabled, we load all of SimplePie manually.
    37      *
    38      * Core.php is not loaded manually, because SimplePie_Core (a deprecated class)
    39      * was never included in WordPress core.
    40      */
    41     spl_autoload_register( 'wp_simplepie_autoload' );
    42 } else {
    43     require ABSPATH . WPINC . '/SimplePie/Cache/Base.php';
    44     require ABSPATH . WPINC . '/SimplePie/Cache/DB.php';
    45     require ABSPATH . WPINC . '/SimplePie/Cache/File.php';
    46     require ABSPATH . WPINC . '/SimplePie/Cache/Memcache.php';
    47     require ABSPATH . WPINC . '/SimplePie/Cache/MySQL.php';
    48     require ABSPATH . WPINC . '/SimplePie/Caption.php';
    49     require ABSPATH . WPINC . '/SimplePie/Category.php';
    50     require ABSPATH . WPINC . '/SimplePie/Copyright.php';
    51     require ABSPATH . WPINC . '/SimplePie/Credit.php';
    52     require ABSPATH . WPINC . '/SimplePie/Decode/HTML/Entities.php';
    53     require ABSPATH . WPINC . '/SimplePie/Enclosure.php';
    54     require ABSPATH . WPINC . '/SimplePie/gzdecode.php';
    55     require ABSPATH . WPINC . '/SimplePie/HTTP/Parser.php';
    56     require ABSPATH . WPINC . '/SimplePie/Net/IPv6.php';
    57     require ABSPATH . WPINC . '/SimplePie/Rating.php';
    58     require ABSPATH . WPINC . '/SimplePie/Restriction.php';
    59     require ABSPATH . WPINC . '/SimplePie/Source.php';
    60 }
     32/**
     33 * We autoload classes we may not need.
     34 */
     35spl_autoload_register( 'wp_simplepie_autoload' );
    6136
    6237/**
Note: See TracChangeset for help on using the changeset viewer.