Changeset 60666
- Timestamp:
- 08/26/2025 06:39:06 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 14 edited
- . (modified) (1 prop)
- .gitignore (modified) (1 diff)
- Gruntfile.js (modified) (1 diff)
- src/wp-admin/includes/plugin.php (modified) (2 diffs)
- src/wp-admin/includes/update-core.php (modified) (2 diffs)
- src/wp-admin/includes/upgrade.php (modified) (2 diffs)
- src/wp-content/plugins/hello.php (modified) (1 diff)
- src/wp-includes/class-wp-plugin-dependencies.php (modified) (1 diff)
- tests/phpunit/tests/admin/includesPlugin.php (modified) (6 diffs)
- tests/phpunit/tests/admin/plugin-dependencies/hasDependents.php (modified) (1 diff)
- tests/phpunit/tests/admin/plugin-dependencies/initialize.php (modified) (1 diff)
- tests/phpunit/tests/ajax/wpAjaxUpdatePlugin.php (modified) (2 diffs)
- tests/phpunit/tests/dependencies/scripts.php (modified) (1 diff)
- tests/phpunit/tests/multisite/network.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 # 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 2 7 .htaccess 3 # Files and folders related to build/test tools 8 .phpcs.xml 4 9 .phpunit.result.cache 5 phpunit.xml 6 phpcs.xml 7 .phpcs.xml 10 /docker-compose.override.yml 11 artifacts 12 build 13 composer.lock 14 coverage 15 jsdoc 8 16 node_modules 9 17 npm-debug.log 10 build 18 packagehash.txt 19 phpcs.xml 20 phpunit.xml 21 vendor 11 22 wp-cli.local.yml 12 .git13 jsdoc14 composer.lock15 vendor16 packagehash.txt17 artifacts18 # Files for local environment config19 /docker-compose.override.yml20 .env21 coverage
-
- Property svn:ignore
-
trunk/.gitignore
r59666 r60666 51 51 /src/wp-content/languages 52 52 /src/wp-content/mu-plugins 53 /src/wp-content/plugins 53 /src/wp-content/plugins/* 54 !/src/wp-content/plugins/hello-dolly 54 55 /src/wp-content/themes/* 55 56 !/src/wp-content/themes/twentyten -
trunk/Gruntfile.js
r60281 r60666 29 29 'wp-content/themes/twenty*/**', 30 30 'wp-content/plugins/index.php', 31 'wp-content/plugins/hello .php',31 'wp-content/plugins/hello-dolly/**', 32 32 'wp-content/plugins/akismet/**', 33 33 '!wp-content/themes/twenty*/node_modules/**', -
trunk/src/wp-admin/includes/plugin.php
r59488 r60666 154 154 } 155 155 } 156 } elseif ( 'hello.php' === basename( $plugin_file ) ) {157 $textdomain = 'default';158 156 } 159 157 if ( $textdomain ) { … … 1008 1006 1009 1007 $plugin_slug = dirname( $plugin_file ); 1010 1011 if ( 'hello.php' === $plugin_file ) {1012 $plugin_slug = 'hello-dolly';1013 }1014 1008 1015 1009 // Remove language files, silently. -
trunk/src/wp-admin/includes/update-core.php
r60265 r60666 842 842 'wp-includes/js/dist/fields.min.js', 843 843 'wp-includes/js/dist/fields.js', 844 // 6.9 845 'wp-content/plugins/hello.php', 844 846 ); 845 847 … … 974 976 'themes/twentytwentyfour/' => '6.4', 975 977 'themes/twentytwentyfive/' => '6.7', 978 'plugins/hello-dolly/' => '6.9', 976 979 ); 977 980 -
trunk/src/wp-admin/includes/upgrade.php
r60497 r60666 881 881 if ( $wp_current_db_version < 58975 ) { 882 882 upgrade_670(); 883 upgrade_690(); 883 884 } 884 885 … … 2415 2416 } 2416 2417 } 2418 2419 /** 2420 * Executes changes made in WordPress 6.9.0. 2421 * 2422 * @ignore 2423 * @since 6.9.0 2424 * 2425 * @global int $wp_current_db_version The old (current) database version. 2426 */ 2427 function upgrade_690() { 2428 global $wp_current_db_version; 2429 2430 // Switch Hello Dolly from file to directory format. See #53323 2431 $active_plugins = get_option( 'active_plugins' ); 2432 $old_plugin = 'hello.php'; 2433 $new_plugin = 'hello-dolly/hello.php'; 2434 $key = array_search( $old_plugin, $active_plugins, true ); 2435 2436 if ( $key ) { 2437 $active_plugins[ $key ] = $new_plugin; 2438 update_option( 'active_plugins', $active_plugins ); 2439 } 2440 } 2417 2441 /** 2418 2442 * Executes changes made in WordPress 6.7.0. -
trunk/src/wp-content/plugins/hello.php
r59943 r60666 11 11 Version: 1.7.2 12 12 Author URI: http://ma.tt/ 13 Text Domain: hello-dolly 13 14 */ 14 15 -
trunk/src/wp-includes/class-wp-plugin-dependencies.php
r60034 r60666 871 871 */ 872 872 protected static function convert_to_slug( $plugin_file ) { 873 if ( 'hello.php' === $plugin_file ) {874 return 'hello-dolly';875 }876 873 return str_contains( $plugin_file, '/' ) ? dirname( $plugin_file ) : str_replace( '.php', '', $plugin_file ); 877 874 } -
trunk/tests/phpunit/tests/admin/includesPlugin.php
r60253 r60666 23 23 24 24 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' ); 26 26 27 27 $default_headers = array( … … 375 375 376 376 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' ); 379 379 $this->assertTrue( $test ); 380 380 381 deactivate_plugins( 'hello .php' );381 deactivate_plugins( 'hello-dolly/hello.php' ); 382 382 } 383 383 384 384 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' ); 387 387 $this->assertFalse( $test ); 388 388 } 389 389 390 390 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' ); 393 393 $this->assertTrue( $test ); 394 394 } 395 395 396 396 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' ); 399 399 $this->assertFalse( $test ); 400 400 401 deactivate_plugins( 'hello .php' );401 deactivate_plugins( 'hello-dolly/hello.php' ); 402 402 } 403 403 … … 406 406 */ 407 407 public function test_get_plugin_files_single() { 408 $name = 'hello .php';408 $name = 'hello-dolly/hello.php'; 409 409 $this->assertSame( array( $name ), get_plugin_files( $name ) ); 410 410 } … … 551 551 */ 552 552 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' ) ); 554 554 } 555 555 … … 571 571 */ 572 572 public function test_activate_plugins_single_no_array() { 573 $name = 'hello .php';573 $name = 'hello-dolly/hello.php'; 574 574 activate_plugins( $name ); 575 575 $this->assertTrue( is_plugin_active( $name ) ); … … 581 581 */ 582 582 public function test_activate_plugins_single_array() { 583 $name = 'hello .php';583 $name = 'hello-dolly/hello.php'; 584 584 activate_plugins( array( $name ) ); 585 585 $this->assertTrue( is_plugin_active( $name ) ); -
trunk/tests/phpunit/tests/admin/plugin-dependencies/hasDependents.php
r57545 r60666 54 54 public function test_should_convert_hellophp_to_hello_dolly() { 55 55 $this->set_property_value( 'dependency_slugs', array( 'hello-dolly' ) ); 56 $this->assertTrue( self::$instance::has_dependents( 'hello .php' ) );56 $this->assertTrue( self::$instance::has_dependents( 'hello-dolly/hello.php' ) ); 57 57 } 58 58 } -
trunk/tests/phpunit/tests/admin/plugin-dependencies/initialize.php
r57658 r60666 282 282 foreach ( $plugins as $plugin_file => &$headers ) { 283 283 // Create the expected slugs. 284 if ( 'hello.php' === $plugin_file ) { 285 $slug = 'hello-dolly'; 286 } else { 287 $slug = str_replace( '.php', '', explode( '/', $plugin_file )[0] ); 288 } 284 $slug = str_replace( '.php', '', explode( '/', $plugin_file )[0] ); 289 285 290 286 $expected_slugs[ $plugin_file ] = $slug; -
trunk/tests/phpunit/tests/ajax/wpAjaxUpdatePlugin.php
r54723 r60666 139 139 140 140 $_POST['_ajax_nonce'] = wp_create_nonce( 'updates' ); 141 $_POST['plugin'] = 'hello .php';141 $_POST['plugin'] = 'hello-dolly/hello.php'; 142 142 $_POST['slug'] = 'hello-dolly'; 143 143 … … 164 164 'oldVersion' => 'Version 1.7.2', 165 165 'newVersion' => '', 166 'plugin' => 'hello .php',166 'plugin' => 'hello-dolly/hello.php', 167 167 'pluginName' => 'Hello Dolly', 168 168 'debug' => array( 'The plugin is at the latest version.' ), -
trunk/tests/phpunit/tests/dependencies/scripts.php
r60295 r60666 2625 2625 */ 2626 2626 public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() { 2627 $real_file = WP_PLUGIN_DIR . '/hello .php';2627 $real_file = WP_PLUGIN_DIR . '/hello-dolly/hello.php'; 2628 2628 $wp_enqueue_code_editor = wp_enqueue_code_editor( array( 'file' => $real_file ) ); 2629 2629 $this->assertNonEmptyMultidimensionalArray( $wp_enqueue_code_editor ); -
trunk/tests/phpunit/tests/multisite/network.php
r60148 r60666 270 270 271 271 public function test_active_network_plugins() { 272 $path = 'hello .php';272 $path = 'hello-dolly/hello.php'; 273 273 274 274 // Local activate, should be invisible for the network. … … 282 282 activate_plugin( $path, '', true ); // Enable the plugin for all sites in the network. 283 283 $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 ); 285 285 286 286 // Deactivate the plugin. … … 301 301 */ 302 302 public function test_duplicate_network_active_plugin() { 303 $path = 'hello .php';303 $path = 'hello-dolly/hello.php'; 304 304 $mock = new MockAction(); 305 305 add_action( 'activate_' . $path, array( $mock, 'action' ) ); … … 321 321 322 322 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' ) ); 325 325 } 326 326 327 327 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' ) ); 330 330 } 331 331
Note: See TracChangeset for help on using the changeset viewer.