The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.?Create a ticket in the bug tracker.
PluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party Dependencies
Notes from today’s meeting:
When Plugin Dependencies landed, @costdev posted a comment on the ticket to ask if there are any bugs or enhancements, to open a new ticketticketCreated for both bug reports and feature development on the bug tracker.. While this was partially influenced by the sheer size of the original ticket, the main aim was to make sure each issue could be tracked, discussed, investigated and patched more easily. This is a big feature, and we anticipated that increased testing could reveal some additional issues or ideas.
PR incoming:#60501 is a plugin card issue that was detected during one of the closed ticket’s investigations.
Awaiting re-review:#60465 and #60472 have pull requests awaiting re-review.
Awaiting review:#60540 is an edge case with a simple fix and has a PR awaiting review.
Needs further discussion:#60504 deals with Must-Use plugins as dependencies, which was not part of the feature and discussion has been reopened.
Please join the discussion on #60504 to help reach consensus on whether to support Must-Use plugins as dependencies and if so, how best to achieve it.
We’ll also continue working on the Dev Notedev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. for Plugin Dependencies to get it ready for review by the Documentation Team ahead of RC1.
Rollback Auto-Update
Notes from today’s meeting:
@afragen reminded everyone that the PR for Rollback Auto-Update (#58281) would benefit from further testing.
Testing instructions can be found in this comment on the ticket.
@costdev proposed that we prepare a post for Make/CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. to outline the feature and draw more feedback and testing.
Note: This post was updated to add the “Third-party plugins not hosted on WordPress.orgWordPress.orgThe community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/” section. 15th February, 2024 – @costdev
View the kickoff post, the Trac ticket and the feature plugin for PluginPluginA plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party Dependencies.
Purpose & Goals
Extensibility of WordPress through plugins and the HooksHooksIn WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same.APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. is one of its most beneficial features. There are many plugins that act purely as extensions of others, building functionality on top. The Plugin Dependencies feature aims to make the process of installing/activating addons (dependents) and the plugins they rely on (dependencies) consistent and easy to use.
Plugin authors are currently implementing their own ways of informing users about other plugins that they depend on. The implementations are inconsistent and sometimes incomplete. Users are often left to search for and install the other required plugins themselves.
The feature does not intend to replace the need for defensive coding within dependent plugins, or ensure version compatibility with their dependencies; nor does it seek to mitigate the vast array of potential plugin interactions. For WordPress and/or PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher incompatibilities, CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. already has handling for preventing installing, updating, or activating plugins with unmet requirements.
Implementation Details
A plugin’s dependencies can be declared by the use of a new Requires PluginsheaderHeaderThe header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. in the dependent plugin’s main file. This must contain a comma-separated list of WordPress.org slugs for its dependencies, such as jetpack (jetpack/jetpack.php is not supported). It does not support commas in plugin slugs.
Example
/** * Plugin Name: Bridge for Foo and Bar * Requires Plugins: foo, bar */
Version management support, such as providing specific minimum and maximum version numbers through the Requires Plugins header value, is not currently supported.
Requirements
Declaring a plugin dependency places the following requirements:
Bridge for Foo and Bar can only be installed once Foo and Bar have been installed.
Bridge for Foo and Bar can only be activated once Foo and Bar have been activated.
Foo and Bar can only be deactivated once Bridge for Foo and Bar has been deactivated.
Foo and Bar can only be deleted once Bridge for Foo and Bar has been deleted.
Viewing, installing and activating dependencies
In the Plugins > Add New screen, dependencies are listed in the dependent’s plugin card. Next to these is a View Details link to open a dependency’s information modal. The dependency can be installed and activated using the buttons in the modal’s footer.
Previously, the modal would close upon clicking the Install Now or Activate button. The feature makes the modal persistent, and the buttons used in the plugin cards and modal now use the same underlying markup and functionality for consistency and reduced maintenance burden.
The side effect of this shared functionality is that automatic redirection upon activating a plugin from Plugins > Add New is no longer available. This has the benefit of not redirecting a user away from the Plugins > Add New screen for each plugin, removing them from their current context. Users can therefore install and activate multiple plugins without leaving their current context.
For plugins with onboarding experiences, they often have additional logic in case a plugin is installed and activated through a tool such as WP-CLIWP-CLIWP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/https://make.wordpress.org/cli/, so that the user is still presented with the onboarding experience upon navigating to a screen deemed an appropriate starting place.
Automatic deactivation of dependent plugins
As currently implemented, plugins with unmet dependencies are automatically deactivated. While this was the approach suggested in initial discussions, there were valid concerns raised about this behavior after merging into trunk. These have been weighed and discussed, and a decision was made to remove this behavior.
Third-party plugins not hosted on WordPress.org
Defining plugins not hosted on WordPress.org as dependencies will enforce and display the dependencies to the user. However, there will be no ability to install the missing plugins through the UIUIUser interface changes, and these will need to be installed manually.
UI changes
The feature makes changes to the UI on two screens: Plugins > Installed plugins, and Plugins > Add New.
Dependent plugin rows now contain a list of their dependencies, linked to the respective plugin modal to install and activate the dependency.
Dependency plugin rows now contain a list of their dependents.
If a plugin has dependencies that are not installed and active, the Activate link is disabled.
If a plugin has dependents that are active, the Deactivate and Delete links are disabled.
Before
After
Plugins > Add New
The following changes are made:
If a plugin has unmet dependencies, the Install Now and Activate buttons are disabled, both in their plugin card and their plugin information modal.
Dependent plugin cards now contain a notice listing their dependencies, with a View Details link to the dependency’s information modal which contains Install Now or Activate buttons based on their current installation status.
Plugin information modals are now persistent after button clicks, and modal-based plugin installation and activation are now performed through AJAX directly within the modal.
Before
After
User Testing
The feature team released calls for testing in October 2022 and March 2023. Additional user testing was performed during design and technical feedback with reports on the ticket and in the #core-upgrade-installSlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel up to the day of commit.
Outcomes
Based on responses to calls for testing, and design and technical feedback, the following UI changes were made:
Adminadmin(and super admin) notices for each unmet dependency were reduced to a single notice informing the user that there were plugins with unmet dependencies.
A dedicated Dependencies tab was removed from the Plugins > Add New screen in favour of an integrated solution in plugin rows on Plugins > Installed plugins and plugin cards on Plugins > Add New.
The plugin row on Plugins > Installed plugins had a Manage Dependencies action link removed, which linked to the removed Dependencies tab.
Messaging was improved to inform the user about missing dependencies.
Security
A security review was performed by @costdev during the development of the feature following WordPress security best practices of escaping output, sanitizing input (slugs, POST, etc.), verifying AJAX referrers and using nonces where appropriate. Comparisons were also done with existing functionality to avoid missed opportunity for hardening the feature.
AccessibilityAccessibilityAccessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility)
The feature was reviewed by the team for accessibility concerns. In addition, @costdev reached out to @joedolson regarding the use of links (<a>) as buttons, rather than <button> elements.
It was deemed that this approach, though likely not ideal, is consistent with the patterns throughout the code base today. A wider conversation is needed before a decision can be made about this specific accessibility pattern at a later date.
wp.a11y.speak() is implemented where appropriate in JavascriptJavaScriptJavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/., consistent with prior functionality in Core.
Unit Tests
In addition to user testing, testing by Core developers, and the feature team, unit tests have been written for the feature and the public API is covered. There are plans to continue increasing test coverage during the 6.5 BetaBetaA pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. period.
You must be logged in to post a comment.