Make WordPress Core

Changeset 65374


Ignore:
Timestamp:
11/10/2026 07:48:23 AM (14 hours ago)
Author:
whyisjake
Message:

Plugins: List secrets.php as a drop-in.

wp-content/secrets.php has been loaded on every request since r64337, but it was missing from _get_dropins(). Neither the Drop-ins view of the Plugins screen nor the Drop-ins section of Site Health Info showed it.

Follow-up to r64337.

Props nofearinc, ericmann.
See #66380.

Location:
trunk
Files:
2 edited

Legend:

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

    r64793 r65374  
    485485 *
    486486 * @since 3.0.0
     487 * @since 7.2.0 Added the `secrets.php` drop-in.
    487488 *
    488489 * @return array[] {
    … …  
    508509                'php-error.php'           => array( __( 'Custom PHP error message.' ), true ),       // Auto on error.
    509510                'fatal-error-handler.php' => array( __( 'Custom PHP fatal error handler.' ), true ), // Auto on error.
     511                'secrets.php'             => array( __( 'Custom Secrets API backend.' ), true ),     // Auto on load.
    510512        );
    511513
  • trunk/tests/phpunit/tests/admin/includesPlugin.php

    r65111 r65374  
    700700
    701701        /**
     702         * @ticket 66380
     703         *
     704         * @covers ::get_dropins
     705         */
     706        public function test_get_dropins_includes_secrets_dropin() {
     707                $this->_back_up_drop_ins();
     708
     709                $p1 = $this->_create_plugin( "<?php\n//Test", 'secrets.php', WP_CONTENT_DIR );
     710
     711                $dropins = get_dropins();
     712
     713                unlink( $p1[1] );
     714
     715                $this->assertSame( array( 'secrets.php' ), array_keys( $dropins ) );
     716
     717                // Clean up.
     718                $this->_restore_drop_ins();
     719        }
     720
     721        /**
    702722         * @covers ::is_network_only_plugin
    703723         */
Note: See TracChangeset for help on using the changeset viewer.