Plugin Directory

Changeset 3421209


Ignore:
Timestamp:
12/16/2025 03:45:09 PM (4 weeks ago)
Author:
jeherve
Message:

Posts on This day version 1.5.6

https://github.com/jeherve/posts-on-this-day/releases/tag/1.5.6

### [1.5.6] - 2025-12-16

  • Widget: add 2 new filters, jeherve_posts_on_this_day_widget_before_posts and jeherve_posts_on_this_day_widget_after_posts, allowing one to add extra markup around the list of posts in the widget.

Use the filter like so:

`php
add_filter(

'jeherve_posts_on_this_day_widget_before_posts',
function () {

return '<ul class="posts-on-this-day-list">';

}

);

add_filter(

'jeherve_posts_on_this_day_widget_after_posts',
function () {

return '</ul>';

}

);

add_filter(

'jeherve_posts_on_this_day_post_markup',
function ( $markup, $post_id, $instance ) {

$permalink = get_permalink( $post_id );
$title = get_the_title( $post_id );
$publishing_date = get_the_date( 'd M Y', $post_id );

return sprintf(

'<li><a href="%1$s">%2$s</a><span class="post-date">%3$s</span></li>',
esc_url( $permalink ),
esc_html( $title ),
esc_html( $publishing_date )

);

},
10,
3

);
`

Location:
posts-on-this-day/trunk
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • posts-on-this-day/trunk/composer.json

    r2904938 r3421209  
    99    },
    1010    "require": {
    11         "automattic/jetpack-autoloader": "2.11.19"
     11        "automattic/jetpack-autoloader": "5.0.1"
    1212    },
    1313    "require-dev": {
    14         "automattic/wordbless": "dev-master",
    15         "automattic/jetpack-codesniffer": "2.6.1",
    16         "dealerdirect/phpcodesniffer-composer-installer": "0.7.2",
    17         "php-parallel-lint/php-parallel-lint": "1.3.2",
    18         "yoast/phpunit-polyfills": "1.0.4"
     14        "automattic/wordbless": "^0.6.0",
     15        "automattic/jetpack-codesniffer": "6.0.1",
     16        "dealerdirect/phpcodesniffer-composer-installer": "*",
     17        "php-parallel-lint/php-parallel-lint": "1.4.0"
    1918    },
    2019    "scripts": {
  • posts-on-this-day/trunk/posts-on-this-day.php

    r2909301 r3421209  
    55 * Description: Widget to display a list of posts published "on this day" in years past. A good little bit of nostalgia for your blog.
    66 * Author: Jeremy Herve
    7  * Version: 1.5.5
     7 * Version: 1.5.6
    88 * Author URI: https://jeremy.hu
    99 * License: GPL2+
  • posts-on-this-day/trunk/readme.txt

    r3281574 r3421209  
    22Contributors: jeherve
    33Tags: widget, on this day
    4 Stable tag: 1.5.5
     4Stable tag: 1.5.6
    55Requires at least: 5.6
    66Requires PHP: 7.1
    7 Tested up to: 6.8
     7Tested up to: 6.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3636= I want to customize the look of my widget =
    3737
    38 You have 2 ways to do so.
     38You have 3 ways to do so.
    3939
    40401. You can add custom CSS to your site, targetting the `.posts_on_this_day` container and its contents to have the widget fit your needs.
    41412. If you're comfortable with PHP, you can add a code snippet that hooks into the `jeherve_posts_on_this_day_post_markup` filter to customize the look of each single post in the widget. That's a good way to change the size of the images displayed for each post, for example.
     423. You can also use the `jeherve_posts_on_this_day_widget_before_posts` and `jeherve_posts_on_this_day_widget_after_posts` filters to add extra markup around the list of posts in the widget.
    4243
    4344== Screenshots ==
     
    4647
    4748== Changelog ==
     49
     50### [1.5.6] - 2025-12-16
     51
     52* Widget: add 2 new filters, `jeherve_posts_on_this_day_widget_before_posts` and `jeherve_posts_on_this_day_widget_after_posts`, allowing one to add extra markup around the list of posts in the widget.
    4853
    4954### [1.5.5] - 2023-05-08
  • posts-on-this-day/trunk/src/class-posts-on-this-day-widget.php

    r2909301 r3421209  
    6666
    6767        // Display posts.
    68         $posts   = ( new Query() )->get_posts( $instance );
    69         $display = new Display();
     68        $posts = ( new Query() )->get_posts( $instance );
    7069        if ( ! empty( $posts ) ) {
    7170            /** This filter is documented in core/src/wp-includes/default-widgets.php */
     
    9796                        esc_html( $year )
    9897                    );
    99 
    100                     foreach ( $ids as $id ) {
    101                         echo $display->display_post( $id, $instance ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    102                     }
    103                 } else {
    104                     foreach ( $ids as $id ) {
    105                         echo $display->display_post( $id, $instance ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    106                     }
    10798                }
     99
     100                echo $this->display_posts( $ids, $instance ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    108101            }
    109102
     
    113106
    114107        echo "\n" . $args['after_widget']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     108    }
     109
     110    /**
     111     * Display the posts themselves.
     112     * Filterable so one can use to display the posts as a list, a grid, etc.
     113     *
     114     * @since 1.5.6
     115     *
     116     * @param array $post_ids Array of post IDs to display.
     117     * @param array $instance Saved widget options.
     118     *
     119     * @return string $output HTML output.
     120     */
     121    public function display_posts( array $post_ids, array $instance ): string {
     122        $display = new Display();
     123
     124        $output = '';
     125
     126        /**
     127         * Allow adding extra markup around the list of posts.
     128         * Can be used to display the posts as a list for example.
     129         *
     130         * @since 1.5.6
     131         *
     132         * @param string $output HTML output.
     133         * @param array  $post_ids Array of post IDs to display.
     134         * @param array  $instance Saved widget options.
     135         */
     136        $output .= apply_filters( 'jeherve_posts_on_this_day_widget_before_posts', '', $post_ids, $instance );
     137
     138        foreach ( $post_ids as $post_id ) {
     139            $output .= $display->display_post( $post_id, $instance );
     140        }
     141
     142        /**
     143         * Allow adding extra markup around the list of posts.
     144         * Can be used to display the posts as a list for example.
     145         *
     146         * @since 1.5.6
     147         *
     148         * @param string $output HTML output.
     149         * @param array  $post_ids Array of post IDs to display.
     150         * @param array  $instance Saved widget options.
     151         */
     152        $output .= apply_filters( 'jeherve_posts_on_this_day_widget_after_posts', '', $post_ids, $instance );
     153
     154        return $output;
    115155    }
    116156
  • posts-on-this-day/trunk/src/class-query.php

    r2904938 r3421209  
    8989            $date_query[] = $this_year_query;
    9090
    91             $i++;
     91            ++$i;
    9292        }
    9393
  • posts-on-this-day/trunk/vendor/autoload.php

    r2909301 r3421209  
    1515        }
    1616    }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
     17    throw new RuntimeException($err);
    2118}
    2219
    2320require_once __DIR__ . '/composer/autoload_real.php';
    2421
    25 return ComposerAutoloaderInitd93ea4de39019a1ed66b1221fd3a3f61::getLoader();
     22return ComposerAutoloaderInit5bb9b0a795043d1024e30250b085ee8d::getLoader();
  • posts-on-this-day/trunk/vendor/autoload_packages.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/.phpcs.dir.xml

    r2904938 r3421209  
    11<?xml version="1.0"?>
    22<ruleset>
    3 
    4     <!-- This doesn't run inside of WordPress, do we don't need to use WordPress's alternative functions. -->
    5     <rule ref="WordPress.WP.AlternativeFunctions">
    6         <severity>0</severity>
    7     </rule>
    8 
     3    <rule ref="Jetpack-NoWP" />
    94</ruleset>
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/CHANGELOG.md

    r2904938 r3421209  
    55The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
    66and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
     7
     8## [5.0.1] - 2025-01-20
     9### Changed
     10- Code: Use function-style exit() and die() with a default status code of 0. [#41167]
     11
     12## [5.0.0] - 2024-11-25
     13### Removed
     14- Drop support for Composer <2.2. [#40297]
     15- Remove support for WordPress 6.5 and earlier. [#40200]
     16
     17## [4.0.0] - 2024-11-14
     18### Removed
     19- General: Update minimum PHP version to 7.2. [#40147]
     20
     21## [3.1.3] - 2024-11-04
     22### Added
     23- Enable test coverage. [#39961]
     24
     25## [3.1.2] - 2024-10-15
     26### Changed
     27- Internal updates.
     28
     29## [3.1.1] - 2024-10-10
     30### Changed
     31- Internal updates.
     32
     33## [3.1.0] - 2024-09-06
     34### Added
     35- Add logic for debugging issues caused by conflicting Composer autoloaders, enabled by setting the `JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS` constant. [#38995]
     36- Add logic for debugging issues caused by early class loads, enabled by setting the `JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS` constant. [#38995]
     37
     38## [3.0.10] - 2024-08-26
     39### Changed
     40- Updated package dependencies. [#39004]
     41
     42## [3.0.9] - 2024-07-10
     43### Fixed
     44- Avoid a deprecation notice in `Autoloader_Locator::find_latest_autoloader()`. [#38245]
     45
     46## [3.0.8] - 2024-05-29
     47### Fixed
     48- `AutoloadGenerator::__construct` no longer pretends `$io` is nullable. That never worked. [#37608]
     49
     50## [3.0.7] - 2024-05-06
     51### Fixed
     52- Avoid deprecation notices when plugin path is null. [#37174]
     53
     54## [3.0.6] - 2024-04-22
     55### Changed
     56- Internal updates.
     57
     58## [3.0.5] - 2024-04-11
     59### Changed
     60- Internal updates.
     61
     62## [3.0.4] - 2024-03-18
     63### Changed
     64- Internal updates.
     65
     66## [3.0.3] - 2024-03-14
     67### Changed
     68- Internal updates.
     69
     70## [3.0.2] - 2023-11-21
     71
     72## [3.0.1] - 2023-11-21
     73
     74## [3.0.0] - 2023-11-20
     75### Changed
     76- Updated required PHP version to >= 7.0. [#34192]
     77
     78## [2.12.0] - 2023-09-28
     79### Added
     80- Add an `AutoloadGenerator::VERSION` constant, and use that for the autoloader's version in preference to whatever Composer has. [#33156]
     81
     82## [2.11.23] - 2023-09-19
     83
     84- Minor internal updates.
     85
     86## [2.11.22] - 2023-08-23
     87### Changed
     88- Updated package dependencies. [#32605]
     89
     90## [2.11.21] - 2023-05-22
     91### Added
     92- Set keywords in `composer.json`. [#30756]
     93
     94## [2.11.20] - 2023-05-11
     95
     96- Updated package dependencies
    797
    898## [2.11.19] - 2023-04-25
     
    313403- Add Custom Autoloader
    314404
     405[5.0.1]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.0...v5.0.1
     406[5.0.0]: https://github.com/Automattic/jetpack-autoloader/compare/v4.0.0...v5.0.0
     407[4.0.0]: https://github.com/Automattic/jetpack-autoloader/compare/v3.1.3...v4.0.0
     408[3.1.3]: https://github.com/Automattic/jetpack-autoloader/compare/v3.1.2...v3.1.3
     409[3.1.2]: https://github.com/Automattic/jetpack-autoloader/compare/v3.1.1...v3.1.2
     410[3.1.1]: https://github.com/Automattic/jetpack-autoloader/compare/v3.1.0...v3.1.1
     411[3.1.0]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.10...v3.1.0
     412[3.0.10]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.9...v3.0.10
     413[3.0.9]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.8...v3.0.9
     414[3.0.8]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.7...v3.0.8
     415[3.0.7]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.6...v3.0.7
     416[3.0.6]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.5...v3.0.6
     417[3.0.5]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.4...v3.0.5
     418[3.0.4]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.3...v3.0.4
     419[3.0.3]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.2...v3.0.3
     420[3.0.2]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.1...v3.0.2
     421[3.0.1]: https://github.com/Automattic/jetpack-autoloader/compare/v3.0.0...v3.0.1
     422[3.0.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.12.0...v3.0.0
     423[2.12.0]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.23...v2.12.0
     424[2.11.23]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.22...v2.11.23
     425[2.11.22]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.21...v2.11.22
     426[2.11.21]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.20...v2.11.21
     427[2.11.20]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.19...v2.11.20
    315428[2.11.19]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.18...v2.11.19
    316429[2.11.18]: https://github.com/Automattic/jetpack-autoloader/compare/v2.11.17...v2.11.18
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/README.md

    r2904938 r3421209  
    2121```json
    2222{
    23     "require-dev": {
     23    "require": {
    2424        "automattic/jetpack-autoloader": "^2"
    2525    }
     
    4747
    4848
     49Autoloader Limitations and Caveats
     50-----
     51
     52### Plugin Updates
     53
     54When moving a package class file, renaming a package class file, or changing a package class namespace, make sure that the class will not be loaded after a plugin update.
     55
     56The autoloader builds the in memory classmap as soon as the autoloader is loaded. The package class file paths in the map are not updated after a plugin update. If a plugins's package class files are moved during a plugin update and a moved file is autoloaded after the update, an error will occur.
     57
     58### Moving classes to a different package
     59
     60Jetpack Autoloader determines the hierarchy of class versions by package version numbers. It can cause problems if a class is moved to a newer package with a lower version number, it will get overshadowed by the old package.
     61
     62For instance, if your newer version of a class comes from a new package versioned 0.1.0, and the older version comes from a different package with a greater version number 2.0.1, the newer class will not get loaded.
     63
     64### Jetpack Autoloader uses transient cache
     65
     66This is a caveat to be aware of when dealing with issues. The JP Autoloader uses transients to cache a list of available plugins to speed up the lookup process. This can sometimes mask problems that arise when loading code too early. See the [Debugging](#debugging) section for more information on how to detect situations like this.
     67
     68Debugging
     69-----
     70
     71A common cause of confusing errors is when a plugin autoloads classes during the plugin load, before the 'plugins_loaded' hook. If that plugin has an older version of the class, that older version may be loaded before a plugin providing the newer version of the class has a chance to register. Even more confusingly, this will likely be intermittent, only showing up when the autoloader's plugin cache is invalidated. To debug this situation, you can set the `JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS` constant to true.
     72
     73Another common cause of confusing errors is when a plugin registers its own autoloader at a higher priority than the Jetpack Autoloader, and that autoloader would load packages that should be handled by the Jetpack Autoloader. Setting the `JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS` constant to true will check for standard Composer autoloaders with such a conflict.
     74
     75
    4976Autoloading Standards
    5077----
     
    6491Supports PSR-4 autoloading. PSR-0 namespaces are converted to classmaps.
    6592
    66 
    67 Autoloader Limitations
    68 -----
    69 
    70 Plugin Updates
    71 
    72 When moving a package class file, renaming a package class file, or changing a package class namespace, make sure that the class will not be loaded after a plugin update.
    73 
    74 The autoloader builds the in memory classmap as soon as the autoloader is loaded. The package class file paths in the map are not updated after a plugin update. If a plugins's package class files are moved during a plugin update and a moved file is autoloaded after the update, an error will occur.
    75 
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/SECURITY.md

    r2904938 r3421209  
    55## Supported Versions
    66
    7 Generally, only the latest version of Jetpack has continued support. If a critical vulnerability is found in the current version of Jetpack, we may opt to backport any patches to previous versions.
     7Generally, only the latest version of Jetpack and its associated plugins have continued support. If a critical vulnerability is found in the current version of a plugin, we may opt to backport any patches to previous versions.
    88
    99## Reporting a Vulnerability
    1010
    11 [Jetpack](https://jetpack.com/) is an open-source plugin for WordPress. Our HackerOne program covers the plugin software, as well as a variety of related projects and infrastructure.
     11Our HackerOne program covers the below plugin software, as well as a variety of related projects and infrastructure:
     12
     13* [Jetpack](https://jetpack.com/)
     14* Jetpack Backup
     15* Jetpack Boost
     16* Jetpack CRM
     17* Jetpack Protect
     18* Jetpack Search
     19* Jetpack Social
     20* Jetpack VideoPress
    1221
    1322**For responsible disclosure of security issues and to be eligible for our bug bounty program, please submit your report via the [HackerOne](https://hackerone.com/automattic) portal.**
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/composer.json

    r2904938 r3421209  
    44    "type": "composer-plugin",
    55    "license": "GPL-2.0-or-later",
     6    "keywords": [
     7        "autoload",
     8        "autoloader",
     9        "composer",
     10        "plugin",
     11        "jetpack",
     12        "wordpress"
     13    ],
    614    "require": {
    7         "composer-plugin-api": "^1.1 || ^2.0"
     15        "php": ">=7.2",
     16        "composer-plugin-api": "^2.2"
    817    },
    918    "require-dev": {
    10         "yoast/phpunit-polyfills": "1.0.4",
    11         "automattic/jetpack-changelogger": "^3.3.2"
     19        "composer/composer": "^2.2",
     20        "yoast/phpunit-polyfills": "^1.1.1",
     21        "automattic/jetpack-changelogger": "^5.1.0"
    1222    },
    1323    "autoload": {
     
    2232        "phpunit": [
    2333            "./vendor/phpunit/phpunit/phpunit --colors=always"
     34        ],
     35        "test-coverage": [
     36            "php -dpcov.directory=. ./vendor/bin/phpunit --coverage-php \"./tests/php/tmp/coverage-report.php\"",
     37            "php ./tests/php/bin/test-coverage.php \"$COVERAGE_DIR/php.cov\""
    2438        ],
    2539        "test-php": [
     
    3650            "link-template": "https://github.com/Automattic/jetpack-autoloader/compare/v${old}...v${new}"
    3751        },
     52        "version-constants": {
     53            "::VERSION": "src/AutoloadGenerator.php"
     54        },
    3855        "branch-alias": {
    39             "dev-trunk": "2.11.x-dev"
     56            "dev-trunk": "5.0.x-dev"
    4057        }
    4158    }
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadFileWriter.php

    r2904938 r3421209  
    1 <?php // phpcs:ignore WordPress.Files.FileName
     1<?php
    22/**
    33 * Autoloader file writer.
     
    66 */
    77
    8 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
    9 // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
    10 // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
    11 // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
    12 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
    13 // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
    14 // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
     8namespace Automattic\Jetpack\Autoloader;
    159
    16 namespace Automattic\Jetpack\Autoloader;
     10use Composer\IO\IOInterface;
    1711
    1812/**
     
    6458            }
    6559
    66             $newFile = isset( $renameList[ $file ] ) ? $renameList[ $file ] : $file;
     60            $newFile = $renameList[ $file ] ?? $file;
    6761            $content = self::prepareAutoloaderFile( $file, $suffix );
    6862
     
    8983        $header  = self::COMMENT;
    9084        $header .= PHP_EOL;
    91         $header .= 'namespace Automattic\Jetpack\Autoloader\jp' . $suffix . ';';
     85        if ( $suffix === 'Current' ) {
     86            // Unit testing.
     87            $header .= 'namespace Automattic\Jetpack\Autoloader\jpCurrent;';
     88        } else {
     89            $header .= 'namespace Automattic\Jetpack\Autoloader\jp' . $suffix . '\al' . preg_replace( '/[^0-9a-zA-Z]/', '_', AutoloadGenerator::VERSION ) . ';';
     90        }
    9291        $header .= PHP_EOL . PHP_EOL;
    9392
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php

    r2904938 r3421209  
    1 <?php // phpcs:ignore WordPress.Files.FileName
     1<?php
    22/**
    33 * Autoloader Generator.
     
    55 * @package automattic/jetpack-autoloader
    66 */
    7 
    8 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
    9 // phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
    10 // phpcs:disable PHPCompatibility.FunctionDeclarations.NewClosure.Found
    11 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
    12 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_dirFound
    13 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
    14 // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
    15 // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
    16 // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
    17 // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
    18 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
    19 // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
    207
    218namespace Automattic\Jetpack\Autoloader;
     
    3522class AutoloadGenerator {
    3623
     24    const VERSION = '5.0.1';
     25
    3726    /**
    3827     * IO object.
     
    5443     * @param IOInterface $io IO object.
    5544     */
    56     public function __construct( IOInterface $io = null ) {
     45    public function __construct( IOInterface $io ) {
    5746        $this->io         = $io;
    5847        $this->filesystem = new Filesystem();
     
    213202        }
    214203
     204        // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
    215205        return $baseDir . ( ( false !== $path ) ? var_export( $path, true ) : '' );
    216206    }
     
    234224            list($package, $installPath) = $item;
    235225            $autoload                    = $package->getAutoload();
     226            $version                     = $package->getVersion(); // Version of the class comes from the package - should we try to parse it?
     227
     228            // Store our own actual package version, not "dev-trunk" or whatever.
     229            if ( $package->getName() === 'automattic/jetpack-autoloader' ) {
     230                $version = self::VERSION;
     231            }
    236232
    237233            if ( $package === $mainPackage ) {
     
    250246                        $autoloads[ $namespace ][] = array(
    251247                            'path'    => $relativePath,
    252                             'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
     248                            'version' => $version,
    253249                        );
    254250                    }
     
    263259                        $autoloads[]  = array(
    264260                            'path'    => $relativePath,
    265                             'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it?
     261                            'version' => $version,
    266262                        );
    267263                    }
     
    275271                        $autoloads[ $this->getFileIdentifier( $package, $path ) ] = array(
    276272                            'path'    => $relativePath,
    277                             'version' => $package->getVersion(), // Version of the file comes from the package - should we try to parse it?
     273                            'version' => $version,
    278274                        );
    279275                    }
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadProcessor.php

    r2904938 r3421209  
    1 <?php // phpcs:ignore WordPress.Files.FileName
     1<?php
    22/**
    33 * Autoload Processor.
     
    55 * @package automattic/jetpack-autoloader
    66 */
    7 
    8 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
    9 // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
    10 // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
    11 // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
    12 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
    13 // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
    147
    158namespace Automattic\Jetpack\Autoloader;
     
    5144     * @param bool  $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
    5245     *
    53      * @return array $processed
     46     * @return array|null $processed
     47     * @phan-param array{classmap:?array{path:string,version:string}[],psr-4:?array<string,array{path:string,version:string}[]>,psr-0:?array<string,array{path:string,version:string}[]>} $autoloads
    5448     */
    5549    public function processClassmap( $autoloads, $scanPsrPackages ) {
     
    131125     * @param bool  $scanPsrPackages Whether or not PSR packages should be converted to a classmap.
    132126     *
    133      * @return array $processed
     127     * @return array|null $processed
    134128     */
    135129    public function processPsr4Packages( $autoloads, $scanPsrPackages ) {
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php

    r2904938 r3421209  
    1 <?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
     1<?php
    22/**
    33 * Custom Autoloader Composer Plugin, hooks into composer events to generate the custom autoloader.
     
    55 * @package automattic/jetpack-autoloader
    66 */
    7 
    8 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_useFound
    9 // phpcs:disable PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound
    10 // phpcs:disable PHPCompatibility.Keywords.NewKeywords.t_namespaceFound
    11 // phpcs:disable WordPress.Files.FileName.NotHyphenatedLowercase
    12 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
    13 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
    147
    158namespace Automattic\Jetpack\Autoloader;
     
    112105            $this->io->writeError( 'The project\'s composer.json or composer environment set a non-default vendor directory.', true );
    113106            $this->io->writeError( 'The default composer vendor directory must be used.</error>', true );
    114             exit();
     107            exit( 0 );
    115108        }
    116109
     
    146139        if ( is_readable( $vendorPath . '/autoload_packages.php' ) ) {
    147140            $content = file_get_contents( $vendorPath . '/autoload_packages.php' );
    148             if ( preg_match( '/^namespace Automattic\\\\Jetpack\\\\Autoloader\\\\jp([^;\s]+);/m', $content, $match ) ) {
     141            if ( preg_match( '/^namespace Automattic\\\\Jetpack\\\\Autoloader\\\\jp([^;\s]+?)(?:\\\\al[^;\s]+)?;/m', $content, $match ) ) {
    149142                return $match[1];
    150143            }
     
    171164        $package  = $this->composer->getPackage();
    172165        $requires = $package->getRequires();
    173         if ( ! is_array( $requires ) ) {
     166        if ( ! is_array( $requires ) ) { // @phan-suppress-current-line PhanRedundantCondition -- Earlier Composer versions may not have guaranteed this.
    174167            $requires = array();
    175168        }
    176169        $devRequires = $package->getDevRequires();
    177         if ( ! is_array( $devRequires ) ) {
     170        if ( ! is_array( $devRequires ) ) { // @phan-suppress-current-line PhanRedundantCondition -- Earlier Composer versions may not have guaranteed this.
    178171            $devRequires = array();
    179172        }
     
    182175        if ( empty( $requires ) ) {
    183176            $this->io->writeError( "\n<error>The package is not required and this should never happen?</error>", true );
    184             exit();
     177            exit( 0 );
    185178        }
    186179
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/ManifestGenerator.php

    r2499380 r3421209  
    1 <?php // phpcs:ignore WordPress.Files.FileName
     1<?php
    22/**
    33 * Manifest Generator.
     
    66 */
    77
    8 // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
    9 // phpcs:disable WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
    10 // phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
    11 // phpcs:disable WordPress.NamingConventions.ValidVariableName.InterpolatedVariableNotSnakeCase
    12 // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
    13 // phpcs:disable WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase
    148// phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
    159
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader-locator.php

    r2499380 r3421209  
    2929     *
    3030     * @param array  $plugin_paths An array of plugin paths.
    31      * @param string $latest_version The latest version reference.
     31     * @param string $latest_version The latest version reference. @phan-output-reference.
    3232     *
    3333     * @return string|null
     
    3838        foreach ( $plugin_paths as $plugin_path ) {
    3939            $version = $this->get_autoloader_version( $plugin_path );
    40             if ( ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
     40            if ( ! $version || ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
    4141                continue;
    4242            }
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-autoloader.php

    r2514138 r3421209  
    7878        $hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) );
    7979
     80        // Register a plugins_loaded handler to check for conflicting autoloaders.
     81        $hook_manager->add_action( 'plugins_loaded', array( $guard, 'check_for_conflicting_autoloaders' ), 1 );
     82
    8083        // phpcs:enable Generic.Commenting.DocComment.MissingShort
    8184    }
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php

    r2499380 r3421209  
    7676        return false;
    7777    }
     78
     79    /**
     80     * Check for conflicting autoloaders.
     81     *
     82     * A common source of strange and confusing problems is when another plugin
     83     * registers a Composer autoloader at a higher priority that us. If enabled,
     84     * check for this problem and warn about it.
     85     *
     86     * Called from the plugins_loaded hook.
     87     *
     88     * @since 3.1.0
     89     * @return void
     90     */
     91    public function check_for_conflicting_autoloaders() {
     92        if ( ! defined( 'JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS' ) || ! JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS ) {
     93            return;
     94        }
     95
     96        global $jetpack_autoloader_loader;
     97        if ( ! isset( $jetpack_autoloader_loader ) ) {
     98            return;
     99        }
     100        $prefixes = array();
     101        foreach ( ( $jetpack_autoloader_loader->get_class_map() ?? array() ) as $classname => $data ) {
     102            $parts = explode( '\\', trim( $classname, '\\' ) );
     103            array_pop( $parts );
     104            while ( $parts ) {
     105                $prefixes[ implode( '\\', $parts ) . '\\' ] = true;
     106                array_pop( $parts );
     107            }
     108        }
     109        foreach ( ( $jetpack_autoloader_loader->get_psr4_map() ?? array() ) as $prefix => $data ) {
     110            $parts = explode( '\\', trim( $prefix, '\\' ) );
     111            while ( $parts ) {
     112                $prefixes[ implode( '\\', $parts ) . '\\' ] = true;
     113                array_pop( $parts );
     114            }
     115        }
     116
     117        $autoload_chain = spl_autoload_functions();
     118        if ( ! $autoload_chain ) {
     119            return;
     120        }
     121
     122        foreach ( $autoload_chain as $autoloader ) {
     123            // No need to check anything after us.
     124            if ( is_array( $autoloader ) && is_string( $autoloader[0] ) && substr( $autoloader[0], 0, strlen( __NAMESPACE__ ) + 1 ) === __NAMESPACE__ . '\\' ) {
     125                break;
     126            }
     127
     128            // We can check Composer autoloaders easily enough.
     129            if ( is_array( $autoloader ) && $autoloader[0] instanceof \Composer\Autoload\ClassLoader && is_callable( array( $autoloader[0], 'getPrefixesPsr4' ) ) ) {
     130                $composer_autoloader = $autoloader[0];
     131                foreach ( $composer_autoloader->getClassMap() as $classname => $path ) {
     132                    if ( $jetpack_autoloader_loader->find_class_file( $classname ) ) {
     133                        $msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the classes we handle (e.g. $classname => $path). This may cause strange and confusing problems.";
     134                        wp_trigger_error( '', $msg );
     135                        continue 2;
     136                    }
     137                }
     138                foreach ( $composer_autoloader->getPrefixesPsr4() as $prefix => $paths ) {
     139                    if ( isset( $prefixes[ $prefix ] ) ) {
     140                        $path = array_pop( $paths );
     141                        $msg  = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems.";
     142                        wp_trigger_error( '', $msg );
     143                        continue 2;
     144                    }
     145                }
     146                foreach ( $composer_autoloader->getPrefixes() as $prefix => $paths ) {
     147                    if ( isset( $prefixes[ $prefix ] ) ) {
     148                        $path = array_pop( $paths );
     149                        $msg  = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems.";
     150                        wp_trigger_error( '', $msg );
     151                        continue 2;
     152                    }
     153                }
     154            }
     155        }
     156    }
    78157}
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-path-processor.php

    r2499380 r3421209  
    122122     */
    123123    private function is_absolute_path( $path ) {
    124         if ( 0 === strlen( $path ) || '.' === $path[0] ) {
     124        if ( empty( $path ) || 0 === strlen( $path ) || '.' === $path[0] ) {
    125125            return false;
    126126        }
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-php-autoloader.php

    r2904938 r3421209  
    7272        global $jetpack_autoloader_loader;
    7373        if ( ! isset( $jetpack_autoloader_loader ) ) {
    74             return;
     74            return false;
    7575        }
    7676
     
    8080        }
    8181
     82        // A common source of strange and confusing problems is when a vendor
     83        // file is autoloaded before all plugins have had a chance to register
     84        // with the autoloader. Detect that, if a development constant is set.
     85        if ( defined( 'JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS' ) && JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS &&
     86            ( strpos( $file, '/vendor/' ) !== false || strpos( $file, '/jetpack_vendor/' ) !== false ) &&
     87            is_callable( 'did_action' ) && ! did_action( 'plugins_loaded' )
     88        ) {
     89            // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_wp_debug_backtrace_summary -- This is a debug log message.
     90            $msg = "Jetpack Autoloader: Autoloading `$class_name` before the plugins_loaded hook may cause strange and confusing problems. " . wp_debug_backtrace_summary( '', 1 );
     91            wp_trigger_error( '', $msg );
     92        }
     93
    8294        require $file;
    8395        return true;
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-plugin-locator.php

    r2904938 r3421209  
    3232    public function find_current_plugin() {
    3333        // Escape from `vendor/__DIR__` to root plugin directory.
    34         $plugin_directory = dirname( dirname( __DIR__ ) );
     34        $plugin_directory = dirname( __DIR__, 2 );
    3535
    3636        // Use the path processor to ensure that this is an autoloader we're referencing.
     
    6868     */
    6969    public function find_using_request_action( $allowed_actions ) {
    70         // phpcs:disable WordPress.Security.NonceVerification.Recommended
    71 
    7270        /**
    7371         * Note: we're not actually checking the nonce here because it's too early
     
    110108        }
    111109
    112         // phpcs:enable WordPress.Security.NonceVerification.Recommended
    113110        return $this->convert_plugins_to_paths( $plugin_slugs );
    114111    }
  • posts-on-this-day/trunk/vendor/automattic/jetpack-autoloader/src/class-version-loader.php

    r2499380 r3421209  
    5151
    5252    /**
     53     * Fetch the classmap.
     54     *
     55     * @since 3.1.0
     56     * @return array<string, array>
     57     */
     58    public function get_class_map() {
     59        return $this->classmap;
     60    }
     61
     62    /**
     63     * Fetch the psr-4 mappings.
     64     *
     65     * @since 3.1.0
     66     * @return array<string, array>
     67     */
     68    public function get_psr4_map() {
     69        return $this->psr4_map;
     70    }
     71
     72    /**
    5373     * Finds the file path for the given class.
    5474     *
     
    5979    public function find_class_file( $class_name ) {
    6080        $data = $this->select_newest_file(
    61             isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] : null,
     81            $this->classmap[ $class_name ] ?? null,
    6282            $this->find_psr4_file( $class_name )
    6383        );
     
    116136     */
    117137    private function find_psr4_file( $class_name ) {
    118         if ( ! isset( $this->psr4_map ) ) {
     138        if ( empty( $this->psr4_map ) ) {
    119139            return null;
    120140        }
  • posts-on-this-day/trunk/vendor/composer/ClassLoader.php

    r2904938 r3421209  
    4646    private static $includeFile;
    4747
    48     /** @var ?string */
     48    /** @var string|null */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array[]
    54      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5554     */
    5655    private $prefixLengthsPsr4 = array();
    5756    /**
    58      * @var array[]
    59      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    6058     */
    6159    private $prefixDirsPsr4 = array();
    6260    /**
    63      * @var array[]
    64      * @psalm-var array<string, string>
     61     * @var list<string>
    6562     */
    6663    private $fallbackDirsPsr4 = array();
     
    6865    // PSR-0
    6966    /**
    70      * @var array[]
    71      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var array[]
    76      * @psalm-var array<string, string>
     75     * @var list<string>
    7776     */
    7877    private $fallbackDirsPsr0 = array();
     
    8281
    8382    /**
    84      * @var string[]
    85      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8684     */
    8785    private $classMap = array();
     
    9189
    9290    /**
    93      * @var bool[]
    94      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9592     */
    9693    private $missingClasses = array();
    9794
    98     /** @var ?string */
     95    /** @var string|null */
    9996    private $apcuPrefix;
    10097
    10198    /**
    102      * @var self[]
     99     * @var array<string, self>
    103100     */
    104101    private static $registeredLoaders = array();
    105102
    106103    /**
    107      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    108105     */
    109106    public function __construct($vendorDir = null)
     
    114111
    115112    /**
    116      * @return string[]
     113     * @return array<string, list<string>>
    117114     */
    118115    public function getPrefixes()
     
    126123
    127124    /**
    128      * @return array[]
    129      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    130126     */
    131127    public function getPrefixesPsr4()
     
    135131
    136132    /**
    137      * @return array[]
    138      * @psalm-return array<string, string>
     133     * @return list<string>
    139134     */
    140135    public function getFallbackDirs()
     
    144139
    145140    /**
    146      * @return array[]
    147      * @psalm-return array<string, string>
     141     * @return list<string>
    148142     */
    149143    public function getFallbackDirsPsr4()
     
    153147
    154148    /**
    155      * @return string[] Array of classname => path
    156      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    157150     */
    158151    public function getClassMap()
     
    162155
    163156    /**
    164      * @param string[] $classMap Class to filename map
    165      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    166158     *
    167159     * @return void
     
    180172     * appending or prepending to the ones previously set for this prefix.
    181173     *
    182      * @param string          $prefix  The prefix
    183      * @param string[]|string $paths   The PSR-0 root directories
    184      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    185177     *
    186178     * @return void
     
    188180    public function add($prefix, $paths, $prepend = false)
    189181    {
     182        $paths = (array) $paths;
    190183        if (!$prefix) {
    191184            if ($prepend) {
    192185                $this->fallbackDirsPsr0 = array_merge(
    193                     (array) $paths,
     186                    $paths,
    194187                    $this->fallbackDirsPsr0
    195188                );
     
    197190                $this->fallbackDirsPsr0 = array_merge(
    198191                    $this->fallbackDirsPsr0,
    199                     (array) $paths
     192                    $paths
    200193                );
    201194            }
     
    206199        $first = $prefix[0];
    207200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    208             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    209202
    210203            return;
     
    212205        if ($prepend) {
    213206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    214                 (array) $paths,
     207                $paths,
    215208                $this->prefixesPsr0[$first][$prefix]
    216209            );
     
    218211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    219212                $this->prefixesPsr0[$first][$prefix],
    220                 (array) $paths
     213                $paths
    221214            );
    222215        }
     
    227220     * appending or prepending to the ones previously set for this namespace.
    228221     *
    229      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    230      * @param string[]|string $paths   The PSR-4 base directories
    231      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    232225     *
    233226     * @throws \InvalidArgumentException
     
    237230    public function addPsr4($prefix, $paths, $prepend = false)
    238231    {
     232        $paths = (array) $paths;
    239233        if (!$prefix) {
    240234            // Register directories for the root namespace.
    241235            if ($prepend) {
    242236                $this->fallbackDirsPsr4 = array_merge(
    243                     (array) $paths,
     237                    $paths,
    244238                    $this->fallbackDirsPsr4
    245239                );
     
    247241                $this->fallbackDirsPsr4 = array_merge(
    248242                    $this->fallbackDirsPsr4,
    249                     (array) $paths
     243                    $paths
    250244                );
    251245            }
     
    257251            }
    258252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    259             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    260254        } elseif ($prepend) {
    261255            // Prepend directories for an already registered namespace.
    262256            $this->prefixDirsPsr4[$prefix] = array_merge(
    263                 (array) $paths,
     257                $paths,
    264258                $this->prefixDirsPsr4[$prefix]
    265259            );
     
    268262            $this->prefixDirsPsr4[$prefix] = array_merge(
    269263                $this->prefixDirsPsr4[$prefix],
    270                 (array) $paths
     264                $paths
    271265            );
    272266        }
     
    277271     * replacing any others previously set for this prefix.
    278272     *
    279      * @param string          $prefix The prefix
    280      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    281275     *
    282276     * @return void
     
    295289     * replacing any others previously set for this namespace.
    296290     *
    297      * @param string          $prefix The prefix/namespace, with trailing '\\'
    298      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    299293     *
    300294     * @throws \InvalidArgumentException
     
    482476
    483477    /**
    484      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    485      *
    486      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    487481     */
    488482    public static function getRegisteredLoaders()
  • posts-on-this-day/trunk/vendor/composer/InstalledVersions.php

    r2904938 r3421209  
    2828{
    2929    /**
     30     * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
     31     * @internal
     32     */
     33    private static $selfDir = null;
     34
     35    /**
    3036     * @var mixed[]|null
    3137     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
    3238     */
    3339    private static $installed;
     40
     41    /**
     42     * @var bool
     43     */
     44    private static $installedIsLocalDir;
    3445
    3546    /**
     
    310321        self::$installed = $data;
    311322        self::$installedByVendor = array();
     323
     324        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
     325        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
     326        // so we have to assume it does not, and that may result in duplicate data being returned when listing
     327        // all installed packages for example
     328        self::$installedIsLocalDir = false;
     329    }
     330
     331    /**
     332     * @return string
     333     */
     334    private static function getSelfDir()
     335    {
     336        if (self::$selfDir === null) {
     337            self::$selfDir = strtr(__DIR__, '\\', '/');
     338        }
     339
     340        return self::$selfDir;
    312341    }
    313342
     
    323352
    324353        $installed = array();
     354        $copiedLocalDir = false;
    325355
    326356        if (self::$canGetVendors) {
     357            $selfDir = self::getSelfDir();
    327358            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     359                $vendorDir = strtr($vendorDir, '\\', '/');
    328360                if (isset(self::$installedByVendor[$vendorDir])) {
    329361                    $installed[] = self::$installedByVendor[$vendorDir];
     
    331363                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332364                    $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
    334                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335                         self::$installed = $installed[count($installed) - 1];
     365                    self::$installedByVendor[$vendorDir] = $required;
     366                    $installed[] = $required;
     367                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
     368                        self::$installed = $required;
     369                        self::$installedIsLocalDir = true;
    336370                    }
     371                }
     372                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
     373                    $copiedLocalDir = true;
    337374                }
    338375            }
     
    351388        }
    352389
    353         if (self::$installed !== array()) {
     390        if (self::$installed !== array() && !$copiedLocalDir) {
    354391            $installed[] = self::$installed;
    355392        }
  • posts-on-this-day/trunk/vendor/composer/autoload_real.php

    r2909301 r3421209  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitd93ea4de39019a1ed66b1221fd3a3f61
     5class ComposerAutoloaderInit5bb9b0a795043d1024e30250b085ee8d
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInitd93ea4de39019a1ed66b1221fd3a3f61', 'loadClassLoader'), true, true);
     25        require __DIR__ . '/platform_check.php';
     26
     27        spl_autoload_register(array('ComposerAutoloaderInit5bb9b0a795043d1024e30250b085ee8d', 'loadClassLoader'), true, true);
    2628        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    27         spl_autoload_unregister(array('ComposerAutoloaderInitd93ea4de39019a1ed66b1221fd3a3f61', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit5bb9b0a795043d1024e30250b085ee8d', 'loadClassLoader'));
    2830
    2931        require __DIR__ . '/autoload_static.php';
    30         call_user_func(\Composer\Autoload\ComposerStaticInitd93ea4de39019a1ed66b1221fd3a3f61::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d::getInitializer($loader));
    3133
    3234        $loader->register(true);
  • posts-on-this-day/trunk/vendor/composer/autoload_static.php

    r2909301 r3421209  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitd93ea4de39019a1ed66b1221fd3a3f61
     7class ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d
    88{
    99    public static $prefixLengthsPsr4 = array (
    10         'A' => 
     10        'A' =>
    1111        array (
    1212            'Automattic\\Jetpack\\Autoloader\\' => 30,
     
    1515
    1616    public static $prefixDirsPsr4 = array (
    17         'Automattic\\Jetpack\\Autoloader\\' => 
     17        'Automattic\\Jetpack\\Autoloader\\' =>
    1818        array (
    1919            0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src',
     
    3232    {
    3333        return \Closure::bind(function () use ($loader) {
    34             $loader->prefixLengthsPsr4 = ComposerStaticInitd93ea4de39019a1ed66b1221fd3a3f61::$prefixLengthsPsr4;
    35             $loader->prefixDirsPsr4 = ComposerStaticInitd93ea4de39019a1ed66b1221fd3a3f61::$prefixDirsPsr4;
    36             $loader->classMap = ComposerStaticInitd93ea4de39019a1ed66b1221fd3a3f61::$classMap;
     34            $loader->prefixLengthsPsr4 = ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d::$prefixLengthsPsr4;
     35            $loader->prefixDirsPsr4 = ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d::$prefixDirsPsr4;
     36            $loader->classMap = ComposerStaticInit5bb9b0a795043d1024e30250b085ee8d::$classMap;
    3737
    3838        }, null, ClassLoader::class);
  • posts-on-this-day/trunk/vendor/composer/installed.json

    r2904938 r3421209  
    33        {
    44            "name": "automattic/jetpack-autoloader",
    5             "version": "v2.11.19",
    6             "version_normalized": "2.11.19.0",
     5            "version": "v5.0.1",
     6            "version_normalized": "5.0.1.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/Automattic/jetpack-autoloader.git",
    10                 "reference": "d7a251cf7f1cff782508a46d13991e72fe7ebbf1"
     10                "reference": "ba3f5146426367c718312a0da87ebd596ed9cf33"
    1111            },
    1212            "dist": {
    1313                "type": "zip",
    14                 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/d7a251cf7f1cff782508a46d13991e72fe7ebbf1",
    15                 "reference": "d7a251cf7f1cff782508a46d13991e72fe7ebbf1",
     14                "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/ba3f5146426367c718312a0da87ebd596ed9cf33",
     15                "reference": "ba3f5146426367c718312a0da87ebd596ed9cf33",
    1616                "shasum": ""
    1717            },
    1818            "require": {
    19                 "composer-plugin-api": "^1.1 || ^2.0"
     19                "composer-plugin-api": "^2.2",
     20                "php": ">=7.2"
    2021            },
    2122            "require-dev": {
    22                 "automattic/jetpack-changelogger": "^3.3.2",
    23                 "yoast/phpunit-polyfills": "1.0.4"
     23                "automattic/jetpack-changelogger": "^5.1.0",
     24                "composer/composer": "^2.2",
     25                "yoast/phpunit-polyfills": "^1.1.1"
    2426            },
    25             "time": "2023-04-25T15:05:38+00:00",
     27            "time": "2025-01-20T16:46:39+00:00",
    2628            "type": "composer-plugin",
    2729            "extra": {
     30                "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",
    2831                "autotagger": true,
    29                 "class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",
    3032                "mirror-repo": "Automattic/jetpack-autoloader",
     33                "branch-alias": {
     34                    "dev-trunk": "5.0.x-dev"
     35                },
    3136                "changelogger": {
    3237                    "link-template": "https://github.com/Automattic/jetpack-autoloader/compare/v${old}...v${new}"
    3338                },
    34                 "branch-alias": {
    35                     "dev-trunk": "2.11.x-dev"
     39                "version-constants": {
     40                    "::VERSION": "src/AutoloadGenerator.php"
    3641                }
    3742            },
     
    5055            ],
    5156            "description": "Creates a custom autoloader for a plugin or theme.",
     57            "keywords": [
     58                "autoload",
     59                "autoloader",
     60                "composer",
     61                "jetpack",
     62                "plugin",
     63                "wordpress"
     64            ],
    5265            "support": {
    53                 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v2.11.19"
     66                "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.1"
    5467            },
    5568            "install-path": "../automattic/jetpack-autoloader"
  • posts-on-this-day/trunk/vendor/composer/installed.php

    r2909301 r3421209  
    22    'root' => array(
    33        'name' => 'jeherve/posts-on-this-day',
    4         'pretty_version' => '1.5.5',
    5         'version' => '1.5.5.0',
    6         'reference' => '20a100a9a521f74697913fff13c81f4f2d9c6cbe',
     4        'pretty_version' => 'dev-trunk',
     5        'version' => 'dev-trunk',
     6        'reference' => '99941160c54a969e08f2aed975bcaece3efe2426',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'automattic/jetpack-autoloader' => array(
    14             'pretty_version' => 'v2.11.19',
    15             'version' => '2.11.19.0',
    16             'reference' => 'd7a251cf7f1cff782508a46d13991e72fe7ebbf1',
     14            'pretty_version' => 'v5.0.1',
     15            'version' => '5.0.1.0',
     16            'reference' => 'ba3f5146426367c718312a0da87ebd596ed9cf33',
    1717            'type' => 'composer-plugin',
    1818            'install_path' => __DIR__ . '/../automattic/jetpack-autoloader',
     
    2121        ),
    2222        'jeherve/posts-on-this-day' => array(
    23             'pretty_version' => '1.5.5',
    24             'version' => '1.5.5.0',
    25             'reference' => '20a100a9a521f74697913fff13c81f4f2d9c6cbe',
     23            'pretty_version' => 'dev-trunk',
     24            'version' => 'dev-trunk',
     25            'reference' => '99941160c54a969e08f2aed975bcaece3efe2426',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
  • posts-on-this-day/trunk/vendor/composer/jetpack_autoload_classmap.php

    r2909301 r3421209  
    88return array(
    99    'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array(
    10         'version' => '2.11.19.0',
     10        'version' => '5.0.1',
    1111        'path'    => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php'
    1212    ),
    1313    'Jeherve\\Posts_On_This_Day\\Display' => array(
    14         'version' => '1.5.5.0',
     14        'version' => 'dev-trunk',
    1515        'path'    => $baseDir . '/src/class-display.php'
    1616    ),
    1717    'Jeherve\\Posts_On_This_Day\\Posts_On_This_Day_Widget' => array(
    18         'version' => '1.5.5.0',
     18        'version' => 'dev-trunk',
    1919        'path'    => $baseDir . '/src/class-posts-on-this-day-widget.php'
    2020    ),
    2121    'Jeherve\\Posts_On_This_Day\\Query' => array(
    22         'version' => '1.5.5.0',
     22        'version' => 'dev-trunk',
    2323        'path'    => $baseDir . '/src/class-query.php'
    2424    ),
  • posts-on-this-day/trunk/vendor/composer/jetpack_autoload_psr4.php

    r2904938 r3421209  
    88return array(
    99    'Automattic\\Jetpack\\Autoloader\\' => array(
    10         'version' => '2.11.19.0',
     10        'version' => '5.0.1',
    1111        'path'    => array( $vendorDir . '/automattic/jetpack-autoloader/src' )
    1212    ),
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-autoloader-handler.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-autoloader-locator.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
     
    3737     *
    3838     * @param array  $plugin_paths An array of plugin paths.
    39      * @param string $latest_version The latest version reference.
     39     * @param string $latest_version The latest version reference. @phan-output-reference.
    4040     *
    4141     * @return string|null
     
    4646        foreach ( $plugin_paths as $plugin_path ) {
    4747            $version = $this->get_autoloader_version( $plugin_path );
    48             if ( ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
     48            if ( ! $version || ! $this->version_selector->is_version_update_required( $latest_version, $version ) ) {
    4949                continue;
    5050            }
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-autoloader.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
     
    8686        $hook_manager->add_action( 'shutdown', new Shutdown_Handler( $plugins_handler, $cached_plugins, $was_included_by_autoloader ) );
    8787
     88        // Register a plugins_loaded handler to check for conflicting autoloaders.
     89        $hook_manager->add_action( 'plugins_loaded', array( $guard, 'check_for_conflicting_autoloaders' ), 1 );
     90
    8891        // phpcs:enable Generic.Commenting.DocComment.MissingShort
    8992    }
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-container.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-hook-manager.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-latest-autoloader-guard.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
     
    8484        return false;
    8585    }
     86
     87    /**
     88     * Check for conflicting autoloaders.
     89     *
     90     * A common source of strange and confusing problems is when another plugin
     91     * registers a Composer autoloader at a higher priority that us. If enabled,
     92     * check for this problem and warn about it.
     93     *
     94     * Called from the plugins_loaded hook.
     95     *
     96     * @since 3.1.0
     97     * @return void
     98     */
     99    public function check_for_conflicting_autoloaders() {
     100        if ( ! defined( 'JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS' ) || ! JETPACK_AUTOLOAD_DEBUG_CONFLICTING_LOADERS ) {
     101            return;
     102        }
     103
     104        global $jetpack_autoloader_loader;
     105        if ( ! isset( $jetpack_autoloader_loader ) ) {
     106            return;
     107        }
     108        $prefixes = array();
     109        foreach ( ( $jetpack_autoloader_loader->get_class_map() ?? array() ) as $classname => $data ) {
     110            $parts = explode( '\\', trim( $classname, '\\' ) );
     111            array_pop( $parts );
     112            while ( $parts ) {
     113                $prefixes[ implode( '\\', $parts ) . '\\' ] = true;
     114                array_pop( $parts );
     115            }
     116        }
     117        foreach ( ( $jetpack_autoloader_loader->get_psr4_map() ?? array() ) as $prefix => $data ) {
     118            $parts = explode( '\\', trim( $prefix, '\\' ) );
     119            while ( $parts ) {
     120                $prefixes[ implode( '\\', $parts ) . '\\' ] = true;
     121                array_pop( $parts );
     122            }
     123        }
     124
     125        $autoload_chain = spl_autoload_functions();
     126        if ( ! $autoload_chain ) {
     127            return;
     128        }
     129
     130        foreach ( $autoload_chain as $autoloader ) {
     131            // No need to check anything after us.
     132            if ( is_array( $autoloader ) && is_string( $autoloader[0] ) && substr( $autoloader[0], 0, strlen( __NAMESPACE__ ) + 1 ) === __NAMESPACE__ . '\\' ) {
     133                break;
     134            }
     135
     136            // We can check Composer autoloaders easily enough.
     137            if ( is_array( $autoloader ) && $autoloader[0] instanceof \Composer\Autoload\ClassLoader && is_callable( array( $autoloader[0], 'getPrefixesPsr4' ) ) ) {
     138                $composer_autoloader = $autoloader[0];
     139                foreach ( $composer_autoloader->getClassMap() as $classname => $path ) {
     140                    if ( $jetpack_autoloader_loader->find_class_file( $classname ) ) {
     141                        $msg = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the classes we handle (e.g. $classname => $path). This may cause strange and confusing problems.";
     142                        wp_trigger_error( '', $msg );
     143                        continue 2;
     144                    }
     145                }
     146                foreach ( $composer_autoloader->getPrefixesPsr4() as $prefix => $paths ) {
     147                    if ( isset( $prefixes[ $prefix ] ) ) {
     148                        $path = array_pop( $paths );
     149                        $msg  = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems.";
     150                        wp_trigger_error( '', $msg );
     151                        continue 2;
     152                    }
     153                }
     154                foreach ( $composer_autoloader->getPrefixes() as $prefix => $paths ) {
     155                    if ( isset( $prefixes[ $prefix ] ) ) {
     156                        $path = array_pop( $paths );
     157                        $msg  = "A Composer autoloader is registered with a higher priority than the Jetpack Autoloader and would also handle some of the namespaces we handle (e.g. $prefix => $path). This may cause strange and confusing problems.";
     158                        wp_trigger_error( '', $msg );
     159                        continue 2;
     160                    }
     161                }
     162            }
     163        }
     164    }
    86165}
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-manifest-reader.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-path-processor.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
     
    130130     */
    131131    private function is_absolute_path( $path ) {
    132         if ( 0 === strlen( $path ) || '.' === $path[0] ) {
     132        if ( empty( $path ) || 0 === strlen( $path ) || '.' === $path[0] ) {
    133133            return false;
    134134        }
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-php-autoloader.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
     
    8080        global $jetpack_autoloader_loader;
    8181        if ( ! isset( $jetpack_autoloader_loader ) ) {
    82             return;
     82            return false;
    8383        }
    8484
     
    8888        }
    8989
     90        // A common source of strange and confusing problems is when a vendor
     91        // file is autoloaded before all plugins have had a chance to register
     92        // with the autoloader. Detect that, if a development constant is set.
     93        if ( defined( 'JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS' ) && JETPACK_AUTOLOAD_DEBUG_EARLY_LOADS &&
     94            ( strpos( $file, '/vendor/' ) !== false || strpos( $file, '/jetpack_vendor/' ) !== false ) &&
     95            is_callable( 'did_action' ) && ! did_action( 'plugins_loaded' )
     96        ) {
     97            // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_wp_debug_backtrace_summary -- This is a debug log message.
     98            $msg = "Jetpack Autoloader: Autoloading `$class_name` before the plugins_loaded hook may cause strange and confusing problems. " . wp_debug_backtrace_summary( '', 1 );
     99            wp_trigger_error( '', $msg );
     100        }
     101
    90102        require $file;
    91103        return true;
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-plugin-locator.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
     
    4040    public function find_current_plugin() {
    4141        // Escape from `vendor/__DIR__` to root plugin directory.
    42         $plugin_directory = dirname( dirname( __DIR__ ) );
     42        $plugin_directory = dirname( __DIR__, 2 );
    4343
    4444        // Use the path processor to ensure that this is an autoloader we're referencing.
     
    7676     */
    7777    public function find_using_request_action( $allowed_actions ) {
    78         // phpcs:disable WordPress.Security.NonceVerification.Recommended
    79 
    8078        /**
    8179         * Note: we're not actually checking the nonce here because it's too early
     
    118116        }
    119117
    120         // phpcs:enable WordPress.Security.NonceVerification.Recommended
    121118        return $this->convert_plugins_to_paths( $plugin_slugs );
    122119    }
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-plugins-handler.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-shutdown-handler.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-version-loader.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
     
    5959
    6060    /**
     61     * Fetch the classmap.
     62     *
     63     * @since 3.1.0
     64     * @return array<string, array>
     65     */
     66    public function get_class_map() {
     67        return $this->classmap;
     68    }
     69
     70    /**
     71     * Fetch the psr-4 mappings.
     72     *
     73     * @since 3.1.0
     74     * @return array<string, array>
     75     */
     76    public function get_psr4_map() {
     77        return $this->psr4_map;
     78    }
     79
     80    /**
    6181     * Finds the file path for the given class.
    6282     *
     
    6787    public function find_class_file( $class_name ) {
    6888        $data = $this->select_newest_file(
    69             isset( $this->classmap[ $class_name ] ) ? $this->classmap[ $class_name ] : null,
     89            $this->classmap[ $class_name ] ?? null,
    7090            $this->find_psr4_file( $class_name )
    7191        );
     
    124144     */
    125145    private function find_psr4_file( $class_name ) {
    126         if ( ! isset( $this->psr4_map ) ) {
     146        if ( empty( $this->psr4_map ) ) {
    127147            return null;
    128148        }
  • posts-on-this-day/trunk/vendor/jetpack-autoloader/class-version-selector.php

    r2909301 r3421209  
    66 */
    77
    8 namespace Automattic\Jetpack\Autoloader\jpd93ea4de39019a1ed66b1221fd3a3f61;
     8namespace Automattic\Jetpack\Autoloader\jp5bb9b0a795043d1024e30250b085ee8d\al5_0_1;
    99
    1010 // phpcs:ignore
Note: See TracChangeset for help on using the changeset viewer.