Speculative Loading in WordPress

The WordPress Performance Team recently published a new plugin called “Speculative Loading” which enables a new technology of the same name to automatically prerender certain URLs on the page, which can lead to near-instant page load times. The functionality is powered by the Speculation Rules APIAPI An 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., a new web API that allows defining rules for which kinds of URLs to prefetch or prerender.

Please install and test the pluginPlugin A 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 to provide feedback to inform further improvements before a potential consideration to include such a feature in WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. You can install the plugin by searching “speculative loading” in WP Adminadmin (and super admin), or via the Performance Lab plugin.

A brief history of prefetch and prerender in WordPress

WordPress core has for several years provided a simple Resource Hints API which allows injecting <link> tags into the HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. document that can be used to prefetch or prerender certain resources, among other actions. While prefetching can be useful for certain sub-resources of an HTML document, such as third-party script providers, prerendering goes as far as processing the resource and already performing some rendering offscreen and thus can be useful for entire web pages.

However, using the approach of injecting link[rel="prefetch|prerender"] tags is not very flexible, as the URLs to prefetch or prerender need to be defined as soon as the HTML is loaded. Providing a <link> tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) for every potential anchor link a user may click on the page would be wasteful, while not providing any misses a great opportunity for performance optimization. So far, solutions like Quicklink could be used to dynamically insert <link> tags to prefetch resources in the user’s viewport, which is more flexible, but still far from ideal as it may still excessively prefetch too many resources and requires a JavaScriptJavaScript JavaScript 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/. library.

More importantly though, link[rel="prerender"] does not actually support prerendering, as the “prerender” value is in fact used for something called NoState Prefetch, which means it is still only prefetching certain resources rather than prerendering them, which for instance would include running JavaScript. Last but not least, the “prerender” value is deprecated at this point.

Introducing the Speculation Rules API

The Speculation Rules API is a new web API that solves the above problems. It allows defining rules to dynamically prefetch and/or prerender URLs of certain structure based on user interaction, in JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. syntax—or in other words, speculatively preload those URLs before the navigation. This API can be used, for example, to prerender any links on a page whenever the user hovers over them. Also, with the Speculation Rules API, “prerender” actually means to prerender the entire page, including running JavaScript. This can lead to near-instant load times once the user clicks on the link as the page would have most likely already been loaded in its entirety. However that is only one of the possible configurations.

The following code example shows the general syntax of the Speculation Rules API JSON spec and outlines a configuration where any links other than WP Admin or login URLs are prerendered.

<script type="speculationrules">
{
	"prerender": [
		{
			"source": "document",
			"where": {
				"and": [
					{
						"href_matches": "/*"
					},
					{
						"not": {
							"href_matches": [
								"/wp-login.php",
								"/wp-admin/*"
							]
						}
					}
				]
			},
			"eagerness": "moderate"
		}
	]
}
</script>

The Speculation Rules API allows defining URL patterns for which kind of URLs should be eligible for speculative loading. Rules can be configured to either prefetch or prerender certain URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org patterns. A so-called “eagerness” value can also be specified which dictates how eagerly the prefetching or prerendering should be applied. For example, a value of “moderate” triggers the speculative loading when the user hovers over the link. A value of “conservative” delays this until the user clicks on the link (which still provides a decent performance benefit), while a value of “eager” acts as soon as there is the slightest suggestion a user may click the link. Note that caution is advised with the “eager” configuration in particular as it increases the likelihood of loading URLs wastefully.

Browser support

While the Speculation Rules API has been available in Chrome and Edge since version 109 in general, the particular subfeature needed to unlock the aforementioned functionality is called “document rules”, which was only recently added in version 121. This post describes the latest enhancements to the API in more depth.

In other words, at the time of writing this post end users will need to use either Chrome 121+ or Edge 121+ to get the benefits of this feature. However there are no adverse effects for users on other browsers, as this is a progressive enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature.. Therefore using the Speculation Rules API on your website is safe regardless of the user base.

The Speculation Rules API was presented at the W3C web standards conference TPAC 2023, with positive reception. At this point, the standard is in draft stage. Positions regarding the API by Firefox and Safari have been requested. To keep track of specifically the required subfeatures for the functionality outlined in this post, you can refer to this “Can I use” table.

The Speculative Loading WordPress plugin

As mentioned in the beginning of this post, the WordPress Performance Team recently published a new feature plugin “Speculative Loading” which enables speculative loading of other frontend URLs linked on the page. It inserts a JSON script similar to the previous code example. By default, any URLs linked on the page are prerendered with an eagerness configuration of “moderate”, which typically triggers when hovering over a link. As such, you don’t need to do anything after activating the plugin: it just works out of the box. The plugin also provides a few customization options to tweak the behavior to the site owner’s preference.

The Speculative Loading plugin’s settings UIUI User interface

The default behavior can be modified via a new “Speculative Loading” section in the Settings > Reading screen. For example, if the site is using JavaScript that is not yet adapted for being loaded while prerendering, the plugin could be configured to only prefetch documents. One could set the eagerness to “conservative” to reduce the likelihood of URLs being loaded without the user navigating to them. Or one could set it to “eager” to increase the chance of the speculative loading already being completed by the time the user lands on the linked URL, which however runs at the risk of wastefully loading several resources. The default of “moderate” strikes a good balance between sustainability and performance.

The rules for which kinds of URLs to speculatively preload can be customized using a filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. called “plsr_speculation_rules_href_exclude_paths”. For example, plugins that add URLs to a WordPress site which modify user state just from being loaded could use that filter to exclude those URLs from being prerendered or prefetched. 

Here is a code example which would would ensure that URLs like https://example.com/cart/ or https://example.com/cart/foo/ would be excluded from prefetching and prerendering:

<?php

add_filter(
    'plsr_speculation_rules_href_exclude_paths',
    function ( $exclude_paths ) {
        $exclude_paths[] = '/cart/*';
        return $exclude_paths;
    }
);

Please refer to the plugin’s FAQ for details on the filter.

Potential next steps

At the moment, the plugin should be used to test the feature, and the Performance Team is eager to receive feedback as well as analyze the plugin’s performance benefits on load times.

Down the road, as the browser API and the plugin mature, the possibility of including the feature in WordPress core will be explored. However, in order to get there, additional feedback is needed.

Testing and feedback

Your testing and feedback is crucial to improve the feature ahead of exploring its potential usage in WordPress core. Please consider the following ways to help:

The WordPress performance team is excited to learn more about how the Speculation Rules API is being used in WordPress sites. Please try the plugin and share your feedback!

Props @adamsilverstein @domenicdenicola @jeremyroman @swissspidy @tunetheweb @tweetythierry @westonruter for review and proofreading.

#feature-projects, #performance, #performance-lab, #speculative-loading

WP Feature Notifications: Request for Feedback on Admin Notices

In order to ensure our solution solves the right problems, and to and steer the future direction of the project, the WP Feature Notifications team is looking for feedback on the current system of notices within the WordPress dashboard.

While the scope of this project involves all forms of notifications (both adminadmin (and super admin) notices and emails), this survey will focus on the experience within the WordPress admin. The team would greatly value any input, both positive and negative.

Please complete the survey at https://forms.gle/XBh1U53MYLni4hsHA to make sure your views are heard.

If you’re interested in contributing, you can join the #feature-notifications channel in the Making WordPress Slack or find out more about the project at  https://github.com/WordPress/wp-feature-notifications.

Props @terragirl for developing the survey.

#feature-notifications

WP Feature Notifications Meeting Notes: 2023-06-14

Cross-posted from https://github.com/WordPress/wp-feature-notifications/discussions/351

Meeting agenda: #349
SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. discussion: https://wordpress.slack.com/archives/C2K1C71FE/p1686754838505239

WCEU debrief

Project visibility

  • There was some discussion during the meeting around visibility; several new contributors were not aware of the project before the Contributor Day. How can we address this as the project?
  • @Sephsekla to work to post more on the Make CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. blogblog (versus network, site), with both meeting notes and other updates
  • How else can we promote the project? Potentially work with other media, e.g. news sites and podcasts.
  • Everyone is encouraged to spread awareness, this doesn’t need to be @Sephsekla‘s area only.
  • Hopefully the upcoming survey will spread awareness as well.

Notifications survey

  • At WCEU Contributor Day, @terragirl worked on a survey on the current notices/notifications experience within WordPress.
  • This can inform our direction/user stories.
  • It will also provide potential marketing stats, and raise awareness of the project.
  • Some concerns around data and GDPR, do we want to collect emails to follow up?
  • The consensus is that this should be removed, it’s largely unnecessary and adds unnecessary risk.

Redesign to integrate wordpress/components

Splitting the project

  • In Split this project between the API and Hub #339 @dartiss proposed splitting the project, with the data model and APIAPI An 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. in one feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. and the hub in another.
  • This would allow easier adoption of the new API without finalising the UIUI User interface for the dashboard
  • However there are some concerns about how to handle display if we don’t include the new UI by default
  • The hub could be the default solution, but pluggable and easily disabled, so any custom solution can take over with the same API calls (e.g. Calypso).

AccessibilityAccessibility Accessibility (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) review planning

  • We have a number of A11yAccessibility Accessibility (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) tickets open at present.
  • It would be good to have a full audit of the UI before we continue much further, to ensure we are fully accessible from launch.
  • This would be a good opportuniy to work with the Accessibility Team.

Reduction of repository/endpoint scope for 0.3.0 release

  • @bitmachina had previously recommended reducing the scope of the endpoints for our next release.
  • However with the addition of new contributors, this may no longer be necessary. @terragirl is now also working on the REST endpoints, so we will process on all of them and reevaluate as necessary.

#feature-notifications

WP Feature Notifications at WordCamp Europe Contributor Day

The WP Feature Notifications project will be at WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Europe Contributor DayContributor Day Contributor Days are standalone days, frequently held before or after WordCamps but they can also happen at any time. They are events where people get together to work on various areas of https://make.wordpress.org/ There are many teams that people can participate in, each with a different focus. https://2017.us.wordcamp.org/contributor-day/ https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/., led by @sephsekla. We are a small, focused team, and always on the lookout for new contributors, so we would encourage anyone to get involved!

WP Feature Notifications is a feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins., with a proposal to modernise the way in which WordPress handles emails, adminadmin (and super admin) notices and user notifications. We are working towards the MVPMinimum Viable Product "A minimum viable product (MVP) is a product with just enough features to satisfy early customers, and to provide feedback for future product development." - WikiPedia version of a new, centralised system, with both PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher and REST-based APIs.

Contributing

The project has something for everyone, and all new contributors are very welcome!

For developers and other more technical contributors, we have several areas to focus on:

  • In-progress PHP work for the MVP
  • JavaScriptJavaScript JavaScript 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/. improvements to make better use of WordPress components
  • A provisional TypeScript rewrite of the JavaScript UIUI User interface

We also have a number of areas to cover which are less technically focused:

  • Testing and feedback on our current proof of concept (version 0.2.0)
  • Feedback and pain points on the current WordPress notices and emails
  • Discussion and ideas for future requirements

No setup ahead of the event or prior knowledge is needed to get involved, but for more technical work we would recommend bringing a laptop with Docker, npm and Composer installed.

Find out more

We look forward to seeing you at the event!

If you’re interested in the project, you can also join the #feature-notifications channel in the Making WordPress Slack or find out more about the project at  https://github.com/WordPress/wp-feature-notifications.

#contributor-day, #feature-notifications

WP Feature Notifications Meeting Notes: 2023-05-17

Cross-posted from https://github.com/WordPress/wp-feature-notifications/discussions/329

Meeting agenda: #319
SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. discussion: https://wordpress.slack.com/archives/C2K1C71FE/p1684335622715959

Personal updates

  • A pretty quiet week for the project, the key contributors have all been very busy.
  • @Sephsekla is working on a post for Make CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. around user stories and the problems this should solve, aiming to have that out by the next meeting.
  • @erikyo and @bitmachina are working on the MVPMinimum Viable Product "A minimum viable product (MVP) is a product with just enough features to satisfy early customers, and to provide feedback for future product development." - WikiPedia and switch to TypeScript, no major change

Review of project goals and priorities

@erikyo and @Sephsekla discussed high level goals and current priorities for the project

Project goals

@Sephsekla:

  • Create an extensibleExtensible This is the ability to add additional functionality to the code. Plugins extend the WordPress core software. notification system with PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher and REST APIs in WordPress
  • Improve the admin_notices experience by standardising notices through the new system, making things more accessible
  • Create an easier and more robust way for plugins/core to notify users by email, replacing the traditional use of wp_mail
  • Give both users and developers more choice of how notifications are delivered
  • Discussed the use case of improving email notifications:
    • This was always a stated goal early on, but we’ve been more focused on dashboard notifications recently
    • Once the PHP APIAPI An 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 in place, it should be straightforward to add this as a connector for notification channels – this will be a good test case for adding additional implementations

Current priorities

  • Communication and community engagement, e.g. Make Core post re: user stories
  • Complete in-progress MVP work (functional database, PHP API, hooked up to REST endpoints)
  • Complete TypeScript rewrite (since the JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. codebase is fully typed already, this shouldn’t run into issues)
  • Plan for upcoming events

Upcoming events discussions: WCEU and WCUS

  • It’s unclear whether we will have MVP ready for WCEU/WCUS. We’ll evaluate at our next meeting.
  • WCEU is probably too close to have 0.3.0 ready, but WCUS may be doable.
  • @Sephsekla will be running a contributor dayContributor Day Contributor Days are standalone days, frequently held before or after WordCamps but they can also happen at any time. They are events where people get together to work on various areas of https://make.wordpress.org/ There are many teams that people can participate in, each with a different focus. https://2017.us.wordcamp.org/contributor-day/ https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/. table at WCEU (hoping to be able to do the same at WCUS). What are plans for new contributors?
    • @erikyo: Unlikely that we can onboard new contributors onto the project to work on the MVP, can we find more granular work?
    • If we can have PHP API ready, contributors could test building integrations for notification channels (e.g. email, SMS)
    • Lots of opportunities outside code contribution:
    • Design discussion
    • Get feedback on existing prototype
    • Follow up on user stories work: talk to people about their pain points, suggestions
    • Collaborate with GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ Team on Phase 3 work

Any other business

A TBC agenda for next week’s meeting can be found at https://github.com/WordPress/wp-feature-notifications/discussions/328. If you’d like to suggest a topic, or upvote an existing topic, the team would welcome any input from new contributors! Alternatively, feel free to suggest topics to cover in the comments.

#feature-notifications

WP Feature Notifications: 2023 Status Update

The WP Feature Notifications (formerly WP Notify) project was first proposed in 2019 in order to improve and modernise the way in which WordPress handles user notifications.

In the last few months we’ve had a good amount of progress, as well as a number of changes, which have led to the recent publication of prerelease 0.2.0.

0.2.0 – A robust JavaScriptJavaScript JavaScript 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/. system

You can test out the current state of the feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. by downloading the latest release at https://github.com/WordPress/wp-feature-notifications/releases/latest. Please note that you will need to be using WordPress 6.2 or above.

Alternatively, if you’d like to get involved in development, you can clone and build the repo at https://github.com/WordPress/wp-feature-notifications, which includes ongoing work for the 0.3.0 milestone.

What originally started as a UX proof of concept has evolved into a more sophisticated JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors.-based system for displaying notifications based on serialised data. At the moment this uses static dummy data, however in a future update this will interface with the upcoming REST controllers to display persistent data.

Props to @codekraft and @bitmachina for some exceptional work here, which has really progressed the project.

Leadership, planning and the team

After extensive work as project lead, @psykro has decided to step down from the role. On behalf of the whole team, I’d like to thank him for the massive contributions he’s made, and the time and effort he’s put into the project over the last few years. @sephsekla has taken over project leadership in his stead.

In addition to our weekly office hours (15:00 UTC on Wednesday), @sephsekla, @codekraft, @bitmachina and @jason_the_adams have started a monthly planning call, in order to better scope out the future of the projects

To support the project’s long-term goal of becoming part of WP CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., the team is looking for partnership from a core committercommitter A developer with commit access. WordPress has five lead developers and four permanent core developers with commit access. Additionally, the project usually has a few guest or component committers - a developer receiving commit access, generally for a single release cycle (sometimes renewed) and/or for a specific component., who can provide guidance on strategy as well as potential barriers to entry.

Core Feature vs Canonical PluginPlugin A 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

Matt’s post around Canonical Plugins late last year sparked some discussion as to whether this should be an option to consider for the future of the project. While this is a valuable concept, and indeed the approach taken for development, the team are in strong agreement that the update to notifications should be merged when ready, and not kept as a separate plugin.

To quote the original project proposal by @psykro and @schlessera:

WordPress is currently lacking a fundamental mechanism: sending notifications to users to give them feedback about state changes in the system.

Notification functionality is indeed fundamental, and already in constant use via the admin_notices hook, a workaround that has major issues of standardisation and accessibility. The new APIAPI An 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. needs to be universal, and available by default, otherwise admin_notices will remain the de facto option.

GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ Phase 3

The team was excited to see the upcoming evolution of the adminadmin (and super admin) experience, which was recently detailed in https://make.wordpress.org/core/2023/03/24/phase-3-collaboration/. As the WordPress dashboard continues to modernise, we are keen to play our part in improving the current admin_notices experience. It’s crucial to ensure that our designs and functionality mesh with the work being done here.

Roadmap and Next steps

The team has recently picked up momentum, but there is still much to be done in order to achieve the project’s goals. Currently the focus is on refining scope and transforming the demo into a minimum viable productMinimum Viable Product "A minimum viable product (MVP) is a product with just enough features to satisfy early customers, and to provide feedback for future product development." - WikiPedia (MVPMinimum Viable Product "A minimum viable product (MVP) is a product with just enough features to satisfy early customers, and to provide feedback for future product development." - WikiPedia). The upcoming 0.3.0 prerelease is planned to be a minimal, but functional notification system, with all demo content removed.

The next (and largest) piece of the puzzle is persistent database storage of notification data. We’re working on finalising the proposed schema, as well as discussing other issues such as retention, translations, multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site support and more.

As we move on to this major phase, the team would greatly welcome additional contributors onto the project, particularly developers specialising in PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher and SQL.

Expect a consultation and call for feedback on how we approach this database architecture soon!

Get involved

The project is always on the lookout for new contributors. If you would like to contribute to the project, we invite you to join the #feature-notifications channel in the Making WordPress Slack for our weekly office hours, every Wednesday at 15:00 UTC.

We will have a presence at the WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Europe Contributor DayContributor Day Contributor Days are standalone days, frequently held before or after WordCamps but they can also happen at any time. They are events where people get together to work on various areas of https://make.wordpress.org/ There are many teams that people can participate in, each with a different focus. https://2017.us.wordcamp.org/contributor-day/ https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/., where we would love to see some new contributors. Regardless of skill set or expertise, Developers, designers, users or any other interested parties are very welcome!

Props to @erikyo and @bitmachina for their collaboration writing this post, and and @bacoords and @psykro for reviewing.

#feature-notifications

Call for Testing: Plugin Dependencies UX

We are seeking basic workflow feedback for the Plugin Dependencies feature. Testing should be very straightforward.

The testing pluginPlugin A 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 was chosen because it fulfilled the following criteria:

  • Plugin is in the plugin repository.
  • Plugin has the required Requires Plugins headerHeader The 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. for Plugin Dependencies.

How to Test

  1. Install and activate the Plugin Dependencies feature plugin.
  2. Install and activate The Events Calendar CategoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. Colors plugin.

The goal is to see how intuitive the process is or might become.

Feedback

  • What did you do?
  • Did you get stuck? Where?
    • Were you able to figure out the path forward?
    • What did you do?
  • Did the experience feel “natural” to WordPress?

Thanks for testing. Testing should last for 3 weeks.

Please add your feedback in the comments.

+make.wordpress.org/test/

#call-for-testing, #feature-plugins

Call for Testing: Plugin Dependencies

The Plugin Dependencies feature plugin is available for testing.

This feature allows pluginPlugin A 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 authors to identify which other plugins must be installed so that their plugin functions as expected. This is done by adding a “Requires Plugins” headerHeader The 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. to the docblockdocblock (phpdoc, xref, inline docs) of the main plugin file which contains a comma-separated list of slugs for the required plugins.

The feature is not intended to work with Must-Use plugins, nor does it impact them.

You can find out more about this feature project in the original Make post.

Test Setup

  • Install and activate the Plugin Dependencies feature plugin.
  • Delete the Hello Dolly plugin, a single file plugin cannot be a dependency
  • Copy the three test plugin files from /plugins/wp-plugin-dependencies/test-plugins to the /plugins directory.
  • Navigate to Plugins > Installed Plugins.

Test Instructions / Key Features

  • Confirm that a new adminadmin (and super admin) notice is displayed if there are additional plugins that must be installed if dependencies are missing.
  • Confirm that individual plugins with dependency relationships on Plugins > Installed Plugins display Requires or Required by: under the version information.
  • Add (install/activate) needed dependencies.
  • Confirm that admin notice goes away once all the dependencies have been installed. Dependencies don’t need to be activated for the admin notice to be satisfied and go away.
  • After installing all dependencies, confirm that the new admin notice disappears.
  • Confirm that the Deactivate link and checkbox are not available for plugins that are dependencies with active dependent plugins.
  • Once all dependent plugins are deactivated, confirm that plugin dependencies can then be deactivated and deleted.
  • Confirm that the Add Plugins > Dependencies page lists correct plugins, including non-WordPress.orgWordPress.org The 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/ plugins that are and aren’t supported.

Other Things to Test

  • In a test plugin, try to add a dependency using a plugin’s full name (not slug).
    • No dependency should be noted
  • Add a dependency for a non-wordpress.org plugin slug that is installed/active.
  • Hook the Plugins APIAPI An 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. to register a non-wordpress.org plugin.
    • This is done with the GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/. Updater plugin
  • Test adding “Requires Plugins” to the DocBlock of a plugin in mu-plugins.
    • Nothing should happen as mu-plugins are not supported for this feature.

What’s New?

In the main plugin file’s docblock:

  • A Requires Plugins header has been introduced.
  • List the slugs of the dependencies in a comma separated string. For example:

Requires Plugins: hello-dolly, akismet, wp-plugin-dependencies

On the Plugins admin page:

  • An admin notice informs site owners if there are additional plugins that must be installed. It will display as long as there are uninstalled dependencies.
  • Each plugin that requires other plugins has a new line in the plugin description. For example:

Requires: <dependency-1>, <dependency-2>, <dependency-3>

Required plugins that are available on wordpress.org are linked to their plugin page.

  • Each plugin required by other plugins has a new line in the plugin description. For example:

Required by: <dependent-1>, <dependent-2>, <dependent-3>

  • Each plugin that is a dependency, and is also dependent on other plugins, has both lines above.
  • If all the dependencies of a plugin have not been installed and activated then the dependent plugin will not be able to be activated.
Plugins page

On the Plugins > Add New > Dependencies tab:

  • The above Requires and Required by data will display in the plugin card.
  • This tab shows a card for each plugin that is required for other plugins to work.
  • Familiar Install Now, Activate and Active buttons are provided so that site owners can manage these plugins.
  • If a dependency is not available on wordpress.org and does not integrate with the Plugin Dependencies feature, it will not be possible to install or activate via this tab. The plugin will display in a generic card.
  • It is possible to integrate a dependency that is not available on wordpress.org with the Plugin Dependencies feature. This requires hooking into the plugins_api_request filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. and returning a valid plugins_api() response. This type of code was added to the feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. as a composer dependency with afragen/add-plugin-dependency-api, and a filter to the endpoint returning valid plugins_api() response for the Git Updater plugin. 
Plugin > Add New page

Instructions for Reporting Issues

Please leave feedback in the comments below this post.

If you find an issue:

Thanks for testing! Testing should be completed by December 1, 2022.

Thanks @costdev and @ironprogrammer for assistance.

+make.wordpress.org/test/

#call-for-testing, #core, #feature-plugins, #feature-projects

Dev chat summary, July 27, 2022

[Update: links to TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets mentioned added]

1. Welcome

@marybaum and @webcommsat led the meeting on this agenda. If you’re interested, you can also check out the summary from the July 20 meeting.

@marybaum welcomed new people and observers.

2. Announcements

WordPress 6.1 has a schedule and a squad!

3. Blogblog (versus network, site) posts

@webcommsat posted these links of note:

@audrasjb published A week in Core for July 25

@audrasjb reports in with A week in Core.

Core Editor improvement: deeper customization with more template options, from @greenshady

@critterverse proposes A new kind of default theme.

@pbearne proposes adding a dominant color background for images.

@bacoords would like feedback on this proof of concept: feature notifications.

In case you missed it last week, @bph shares what’s new in Gutenberg 13.7.

And @chanthaboune opened a conversation about renaming FSE.

@jeffpaul introduced @pbearne and invited the group to ask questions about his post on dominant-color image backgrounds. @pbearne kicked off a discussion on the Core Slack.

4. Upcoming releases

Again, WordPress 6.1 is under way. @costdev invited release leads and squad members to pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” him if they need extra eyes on tickets or help with anything else.

@annezazu volunteered to, as she put it, “shake things loose” to get the next minor, 6.0.2, moving.

5. Open floor

@afragen asked for testing help on two fronts: the rollback feature he has been working on with @costdev and @pbiron, and the feature plugin that’s all about plugin dependencies.

@sergeybiryukov reported on his components. In particular, he called out tickets #55652 and #45329.

@costdev asked for eyes on #54582.

And @marybaum reported a successful test of the patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. on #50886. Her co-maintainer on Help/About, @webcommsat, asked for further tests on the patch.

Finally, @webcommsat highlighted a request from the Marketing team: please keep sharing WordPress.orgWordPress.org The 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/ social posts related to releases! That single act really helps keep the project in users’ hearts and minds.

Thanks to @webcommsat for cohosting the chat and for reviewing this summary.

[Request for feedback] Feature Notifications Proof of Concept

The goal of the WP Feature Notifications project is to create a new and better way to manage and deliver notifications to the relevant audience. The admin_notices hook has served WordPress well and will continue to do so for the foreseeable future. This project is focused on building a new framework for notifications from the ground up, and potentially providing a tool that encourages consistency in presentation, follows best practices in standards and accessibilityAccessibility Accessibility (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), and discourages spammy or disruptive interactions in the WordPress adminadmin (and super admin) screens.

The end result will be a RESTful model and APIAPI An 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. to be utilized by coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. but would also enable third-party developers to further extend the functionality. Possibilities could range from pulling in updates from relevant SaaS integrations and hosting platforms, to enabling mobile push or SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. notifications outward from your WordPress website.

After approximately three years of discussion, scaffolding, and design, the WordPress Notifications feature project is ready to begin collecting feedback on a static demo of the previously reviewed designs. We’re inviting users to install the feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. on a test environment, view the static mockups, and provide feedback to the team. 

How To Install

The pluginPlugin A 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 zip file can be downloaded from the Releases page of the Github repository, and installed like any other WordPress plugin.

Alternatively, it can be installed via Composer:

First add the repository to your composer.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML.

{
    "type": "vcs",
    "url": "https://github.com/WordPress/wp-feature-notifications"
}

Then install the develop branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". using the command composer require wordpress/wp-feature-notifications:dev-develop.

How To Test

Once installed and activated, the plugin will display three demo user interface elements for review:

  1. On-page notifications – Similar to the current admin_notices hook, on-page notifications appear at the top of the Dashboard screen.
  2. The Hub – A new “bell” notifications icon on the right-hand side of the admin bar will open the “hub”, a drawer of notifications.
  3. Notification Settings – Users can visit Settings > Notifications or click the link at the bottom of the Hub to see a preliminary draft of a settings table for managing notifications.

It is important to note that this is a static, front-end demo, and the team is mainly looking for overall feedback about the initial direction of these components. For more context on the project, we recommend reviewing the Project Requirements and reviewing the initial Project designs

Looking Ahead

We look forward to collecting your feedback in the comments below or in our Github issues. If you would like to contribute to the project, we invite you to join the #feature-notifications channel in the Making WordPress Slack for our weekly office hours every Wednesday at 14:00 UTC and are happy to welcome new contributors to the project.

Props @psykro for editing and proofreading and @codekraft and @sephsekla for providing content.

#feature-notifications