Make WordPress Core


Ignore:
Timestamp:
08/26/2025 06:39:06 PM (7 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/admin/includesPlugin.php

    r60253 r60666  
    2323
    2424    public function test_get_plugin_data() {
    25         $data = get_plugin_data( DIR_TESTDATA . '/plugins/hello.php' );
     25        $data = get_plugin_data( DIR_TESTDATA . '/plugins/hello-dolly/hello.php' );
    2626
    2727        $default_headers = array(
     
    375375
    376376    public function test_is_plugin_active_true() {
    377         activate_plugin( 'hello.php' );
    378         $test = is_plugin_active( 'hello.php' );
     377        activate_plugin( 'hello-dolly/hello.php' );
     378        $test = is_plugin_active( 'hello-dolly/hello.php' );
    379379        $this->assertTrue( $test );
    380380
    381         deactivate_plugins( 'hello.php' );
     381        deactivate_plugins( 'hello-dolly/hello.php' );
    382382    }
    383383
    384384    public function test_is_plugin_active_false() {
    385         deactivate_plugins( 'hello.php' );
    386         $test = is_plugin_active( 'hello.php' );
     385        deactivate_plugins( 'hello-dolly/hello.php' );
     386        $test = is_plugin_active( 'hello-dolly/hello.php' );
    387387        $this->assertFalse( $test );
    388388    }
    389389
    390390    public function test_is_plugin_inactive_true() {
    391         deactivate_plugins( 'hello.php' );
    392         $test = is_plugin_inactive( 'hello.php' );
     391        deactivate_plugins( 'hello-dolly/hello.php' );
     392        $test = is_plugin_inactive( 'hello-dolly/hello.php' );
    393393        $this->assertTrue( $test );
    394394    }
    395395
    396396    public function test_is_plugin_inactive_false() {
    397         activate_plugin( 'hello.php' );
    398         $test = is_plugin_inactive( 'hello.php' );
     397        activate_plugin( 'hello-dolly/hello.php' );
     398        $test = is_plugin_inactive( 'hello-dolly/hello.php' );
    399399        $this->assertFalse( $test );
    400400
    401         deactivate_plugins( 'hello.php' );
     401        deactivate_plugins( 'hello-dolly/hello.php' );
    402402    }
    403403
     
    406406     */
    407407    public function test_get_plugin_files_single() {
    408         $name = 'hello.php';
     408        $name = 'hello-dolly/hello.php';
    409409        $this->assertSame( array( $name ), get_plugin_files( $name ) );
    410410    }
     
    551551     */
    552552    public function test_is_network_only_plugin_hello() {
    553         $this->assertFalse( is_network_only_plugin( 'hello.php' ) );
     553        $this->assertFalse( is_network_only_plugin( 'hello-dolly/hello.php' ) );
    554554    }
    555555
     
    571571     */
    572572    public function test_activate_plugins_single_no_array() {
    573         $name = 'hello.php';
     573        $name = 'hello-dolly/hello.php';
    574574        activate_plugins( $name );
    575575        $this->assertTrue( is_plugin_active( $name ) );
     
    581581     */
    582582    public function test_activate_plugins_single_array() {
    583         $name = 'hello.php';
     583        $name = 'hello-dolly/hello.php';
    584584        activate_plugins( array( $name ) );
    585585        $this->assertTrue( is_plugin_active( $name ) );
Note: See TracChangeset for help on using the changeset viewer.