Make WordPress Core


Ignore:
Timestamp:
08/26/2025 06:39:06 PM (15 months ago)
Author:
whyisjake
Message:

Upgrade/Install: Move Hello Dolly plugin to directory structure.

Changes the Hello Dolly plugin from a single file structure to a proper plugin directory structure, moving from hello.php to hello-dolly/hello.php to align with Plugin Handbook Best Practices.

  • Adds proper Text Domain: hello-dolly header to Hello Dolly plugin
  • Updates core files to remove special case handling for hello.php
  • Updates plugin dependency system to handle new directory structure
  • Adds upgrade routine to migrate active plugin references and keep plugin active
  • Updates all tests to use new plugin path format hello-dolly/hello.php
  • Updates build configuration and .gitignore for new directory structure
  • Adds hello.php to old files list for cleanup during core updates
  • Adds plugins/hello-dolly/ to new bundled directories list

Props afragen, SergeyBiryukov, peterwilsoncc, SirLouen, matt, davidbaumwald, desrosj, hellofromtonya, justinahinon,audrasjb, oglekler, whyisjake.
Fixes #53323.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11# Configuration files with possibly sensitive information
         2# Files and folders related to build/test tools
         3# Files for local environment config
         4.claude
         5.env
         6.git
        27.htaccess
        3 # Files and folders related to build/test tools
         8.phpcs.xml
        49.phpunit.result.cache
        5 phpunit.xml
        6 phpcs.xml
        7 .phpcs.xml
         10/docker-compose.override.yml
         11artifacts
         12build
         13composer.lock
         14coverage
         15jsdoc
        816node_modules
        917npm-debug.log
        10 build
         18packagehash.txt
         19phpcs.xml
         20phpunit.xml
         21vendor
        1122wp-cli.local.yml
        12 .git
        13 jsdoc
        14 composer.lock
        15 vendor
        16 packagehash.txt
        17 artifacts
        18 # Files for local environment config
        19 /docker-compose.override.yml
        20 .env
        21 coverage
  • trunk/tests/phpunit/tests/multisite/network.php

    r60148 r60666  
    270270
    271271        public function test_active_network_plugins() {
    272                 $path = 'hello.php';
     272                $path = 'hello-dolly/hello.php';
    273273
    274274                // Local activate, should be invisible for the network.
    … …  
    282282                activate_plugin( $path, '', true ); // Enable the plugin for all sites in the network.
    283283                $active_plugins = wp_get_active_network_plugins();
    284                 $this->assertSame( array( WP_PLUGIN_DIR . '/hello.php' ), $active_plugins );
     284                $this->assertSame( array( WP_PLUGIN_DIR . '/hello-dolly/hello.php' ), $active_plugins );
    285285
    286286                // Deactivate the plugin.
    … …  
    301301         */
    302302        public function test_duplicate_network_active_plugin() {
    303                 $path = 'hello.php';
     303                $path = 'hello-dolly/hello.php';
    304304                $mock = new MockAction();
    305305                add_action( 'activate_' . $path, array( $mock, 'action' ) );
    … …  
    321321
    322322        public function test_is_plugin_active_for_network_true() {
    323                 activate_plugin( 'hello.php', '', true );
    324                 $this->assertTrue( is_plugin_active_for_network( 'hello.php' ) );
     323                activate_plugin( 'hello-dolly/hello.php', '', true );
     324                $this->assertTrue( is_plugin_active_for_network( 'hello-dolly/hello.php' ) );
    325325        }
    326326
    327327        public function test_is_plugin_active_for_network_false() {
    328                 deactivate_plugins( 'hello.php', false, true );
    329                 $this->assertFalse( is_plugin_active_for_network( 'hello.php' ) );
     328                deactivate_plugins( 'hello-dolly/hello.php', false, true );
     329                $this->assertFalse( is_plugin_active_for_network( 'hello-dolly/hello.php' ) );
    330330        }
    331331
Note: See TracChangeset for help on using the changeset viewer.