Make WordPress Core


Ignore:
Timestamp:
09/30/2024 10:48:16 PM (14 months ago)
Author:
SergeyBiryukov
Message:

External Libraries: Update the SimplePie library to version 1.8.0.

The most notable change in this update is that all code is now namespaced and uses PSR-4 classes, though there is a compatibility layer available for extenders using the older class names, so plugin or theme authors directly using SimplePie can decide for themselves when they want to change to using the namespaced names for SimplePie classes.

Note: This commit includes additional fixes for PHP 8.4 compatibility (PR 875, PR 888) from the one-dot-eight branch of SimplePie, which is expected to be released as SimplePie 1.8.1 soon.

References:

Follow-up to [47733], [49176], [52393], [52413].

Props jrf, peterwilsoncc, chaion07, cu121, markparnell, audrasjb, costdev, Presskopp, desrosj, faisal03, mukesh27, SergeyBiryukov.
See #55604.

File:
1 edited

Legend:

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

    r58409 r59141  
    792792 *                             using SimplePie's multifeed feature.
    793793 *                             See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas}
    794  * @return SimplePie|WP_Error SimplePie object on success or WP_Error object on failure.
     794 * @return SimplePie\SimplePie|WP_Error SimplePie object on success or WP_Error object on failure.
    795795 */
    796796function fetch_feed( $url ) {
    797     if ( ! class_exists( 'SimplePie', false ) ) {
     797    if ( ! class_exists( 'SimplePie\SimplePie', false ) ) {
    798798        require_once ABSPATH . WPINC . '/class-simplepie.php';
    799799    }
     
    803803    require_once ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php';
    804804
    805     $feed = new SimplePie();
     805    $feed = new SimplePie\SimplePie();
    806806
    807807    $feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
     
    833833     * @since 3.0.0
    834834     *
    835      * @param SimplePie      $feed SimplePie feed object (passed by reference).
    836      * @param string|string[] $url  URL of feed or array of URLs of feeds to retrieve.
     835     * @param SimplePie\SimplePie $feed SimplePie feed object (passed by reference).
     836     * @param string|string[]     $url  URL of feed or array of URLs of feeds to retrieve.
    837837     */
    838838    do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
Note: See TracChangeset for help on using the changeset viewer.