use containing folder, just like guidelines suggest#1330
use containing folder, just like guidelines suggest#1330afragen wants to merge 18 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
# Conflicts: # src/wp-admin/includes/update-core.php
|
This will require an upgrade routine to check if For the last few years, Akismet has been automatically updated as part of the build process. This allows for a single source of truth and makes code changes to the plugin easier. I think the approach may be helpful for Hello Dolly once it's moved in to a sub-folder as it will allow for a single source of truth for the code ratehr than having to update both the plugin and the copy in this repo. It would require a systems request but given there is prior art it should be simple enough to introduce. |
|
Does it really matter if the single file hello.php plugin is disabled? If there is ever an update to Hello Dolly it would also disable as the update would install with a containing folder. Since the plugin has no significant effect on the running of the site, I think a seamless transition is overkill. |
|
@peterwilsoncc maybe I'm not understanding. If you check in the Playground a new WP installation will have Hello Dolly in a containing folder. |
|
Given it's possible to have a seamless transition with a few lines of code, I think it's worth the effort. $active_plugins = get_option( 'active_plugins', array() );
$hello_dolly = array_search( 'hello.php', $active_plugins );
if ( false !== $hello_dolly ) {
$active_plugins[ $hello_dolly ] = 'hello-dolly/hello.php';
update_option( 'active_plugins', $active_plugins );
}I'm not sure what you mean by your second question, are you able to clarify? |
|
If you have |
@afragen I'm not seeing that, I modified the version number of Even though it's a single file plugin, I think WP should handle moving the files as gracefully as it does when other files are relocated. The plugin is active on 700,000+ sites so even when the percentage of sites affected is small, the raw number is large. |
|
I yield. Simply giving a counter argument 😉 |
|
Clean merge and passing tests. |

Currently Hello Dolly is installed as a single file plugin during a WP core installation. According to Plugin Handbook Best Practices, plugins should be in containing folders. https://developer.wordpress.org/plugins/plugin-basics/best-practices/#folder-structure
This is a simple PR to fix this issue with Hello Dolly. Having this means that things like r51064 are not necessary.
Related #49338
Trac ticket: https://core.trac.wordpress.org/ticket/53323
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.