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 our bug tracker.
“What’s new in GutenbergGutenbergThe 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/…” posts (labeled with the #gutenberg-newtagtagA 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.)) are posted following every Gutenberg release on a biweekly basis, discovering new features included in each release. As a reminder, here’s an overview of different ways to keep up with Gutenberg and the Full Site Editing project.
The Gutenberg 13.8 comes with Fluid Typography, 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) improvements, revamped Quote blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience., and Template parts UXUXUser experience enhancements. The release is also packed with 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. fixes and code quality improvements. All these thanks to a fantastic team of contributors, including two first-timers.
It’s now available in the WordPress 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 repository.
This new option allows themers to define text size that can scale and adapt to the screen’s real state available, so your content looks great on any screen.
Note: It’s a new feature, and the Gutenberg team would appreciate your feedback.
Revamped Quote block leveraging inner blocks
After the recent Gallery block improvements, it’s time to re-introduce the Quote block. Thanks to robust nested blocks 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., now you can shape the quotes to your heart’s content, which means that you can place any block inside the quotes 🎉
Template part UX improvements
Template parts are essential for many themes; Gutenberg 13.8 introduces improvements for those who leverage variations and patterns to provide flexibility for their users.
The specific template part variations are now available in the block inserter, making it easy to add “HeaderHeaderThe 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.”, “Footer,” or “Newsletter Subscription” template parts to your site.
Speaking of easy, the new search component in the template parts replacement modal will help you find just the right pattern for the block.
Border controls for Image blocks
The Image block now supports the full range of border controls, including Color, Style, and Width. I’m curious to see what creative folks at the Museum of Block Art can accomplish after this enhancementenhancementEnhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature..
Accessibility enhancements
The Gutenberg team is always trying to make the Gutenberg plugin more accessible with each release, and 13.8 is no different. The release includes iterative accessibility enhancements, including improved and consistent labels and tooltips across the Editor(s), as well as more keyboard-friendly clickable elements in the “Add template” modal.
Other notable highlights
The Post Comments and Comments block are now consolidated into a single block – Comments.
Now it’s possible to exit container blocks like Group blocks using the `Enter` key on an empty paragraph.
The new settings under “Global Styles > Layout” allow users to override content dimensions defined by a theme, giving the users better control over the full-width content.
13.8.0
Enhancements
Block Library
Image: Add border block support for color, width, and style. (31366)
InputControl: Add padding wrapper for prefix/suffix. (42378)
ScrollLock: Improve Storybook story for documentation view. (42344)
ColorPalette: Display checkered preview background when value is transparent. (42232)
Global Styles
Add layout content size controls to global styles. (42309)
CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.CSSCSSCascading Style Sheets. support for root padding and align full blocks. (42085)
Theme.jsonJSONJSON, 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.: Add block support feature level selectors for blocks. (42087)
Theme.json: Add support forw heading / caption elements in theme.json schema. (42433)
Document Settings
Make ‘Move to trashTrashTrash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days.’ button full width. (42577)
Block Editor
Add setting to display rich text toolbar inline. (42399)
Add block variations for individual template parts. (42454)
Button Block: Change text-decoration style to low specificity. (42545)
Cover Block: Prevent transform to Group block when featured imageFeatured imageA featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts. is set. (42638)
Cover block: Adding background-size and background-repeat properties to the block CSS. (42470)
Fix tab/focus order issue in Media & text block. (40806)
Page List: Fetch items with ‘view’ context. (42559)
Social Icons Block: Fix button opacity in template parts. (42641)
Group block: Add context to the word “Row”. (42255)
Post terms: Hide prefix and suffix placeholders in post terms. (42418)
[Media Text]: Fix deprecations regressionregressionA software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5.. (42816)
Components
AnglePickerControl: Fix gap between elements in RTL mode. (42534)
ColorPalette: Fix background image in RTL mode. (42510)
Context System: Don’t explicitly set undefined value to children. (42686)
MaybeCategoryPanel: Update categoryCategoryThe 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. selector. (42663)
Avoid 403 errors for users with low permissions. (42413)
Display post template selection for non-adminadmin(and super admin) users. (42705)
Fix typo in translationtranslationThe process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. string. (42673)
Block Editor
Prevent link control popover from going offscreen. (42389)
Writing flow: Fix caret movement for multiple lines. (42423)
Writing flow: Fix caret placement in corners. (42437)
Writing flow: Esc should enter Nav mode consistently, avoid focus loss when clearing selection. (42530)
Global Styles, CSS & Styling
Elements: Buttons: Fix the path with the css to style the cursor for all button elements. (42129)
Link elements: Add a :where selector to the :Not to lower specificity. (42669)
Element styles: Adding stylesheet to load in the editor. (42132)
Elements: Fix heading and caption element selectors. (42479)
Layout content size controls: Add left alignment to line up with description and other elements. (42576)
Layout: Ensure defaultEditorStyles are still output in Classic themes. (42906)
Theme JSON Resolver: Update cache check to also check that the object is an instance of the Gutenberg version. (42756)
Theme.json: Fix schema for button elements. (42431)
Widgets Editor
Add configuration option to skip autop on freeform blocks when parsing blocks. (42623)
Flex: Remove experimental from documentation and storybook. (42301)
Include section on how to test code for a given WP major. (42390)
Marking internal action as @ignore to remove them from the documentation. (42163)
Theme JSON Docs: Clarify null, true, and false values for blockGap setting. (42447)
ToolsPanel: Add a readme section related to laying out a ToolsPanel. (42615)
Components
Improve documentation for the SpaceInput type. (42376)
BorderControl: Add missing changelog for accessibility enhancements. (42411)
Code Quality
Base Styles: Apply long-content-fade gradient from transparent to color. (42401)
Fix jsx-a11yAccessibilityAccessibility (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) label-has-associated-control configuration. (42671)
Two code issues on navigation link edit missing text. (42440)
Rename WP_Style_Engine_CSS_Rule->set_declarations to add_declarations. (42464)
Update return PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher doc comment and other nitpicks. (42453)
Componentes
ComboboxControl: Refactor onKeyDown to use keyboardEvent.code. (42569)
Elevation: Convert component to TypeScript. (42302)
ScrollLock: Covert component to TypeScript. (42303)
Divider: Complete TypeScript migrationMigrationMoving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. of component. (41991)
Lodash: Refactor a few components away from _.isEmpty(). (42468)
Dimensions Global Styles: Split props into separate 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. to tidy up the panel component. (42620)
Block Library
Remove unnecessary ReactReactReact is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. Fragments. (42529)
Tools
Testing
Added unit testunit testCode written to test a small piece of code or functionality within a larger application. Everything from themes to WordPress core have a series of unit tests. Also see regression. for cover block render function. (42108)
end-to-end Tests: Tweak Comments block tests after migrating to Playwright. (42406)
Utilize WordPress PHPUnit Test Library Included By wp-env. (41852)
Build Tooling
Update to reflect change in Documentation label. (42395)
Add inline documentation on building API documentation to commit block API verify error message. (42432)
Scripts: Exit error code 1 when status value is null. (42396)
Env: Download WordPress PHPUnit Into Container. (41780)
Env: Restrict WP_TESTS_DOMAIN constant to just hostname and not home URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org. (41039)
Performance Benchmark
The following benchmark compares performance for a particularly sizeable post (~36,000 words, ~1,000 blocks) over the last releases. Such a large post isn’t representative of the average editing experience but is adequate for spotting variations in performance.
Post Editor
Version
Time to the first block
KeyPress Event (typing)
Gutenberg 13.8
3.87s
57.86ms
Gutenberg 13.7
3.03s
57.48ms
WordPress 6.0
3.46s
52.23ms
Site Editor
Version
Time to the first block
KeyPress Event (typing)
Gutenberg 13.8
5.12s
26.49ms
Gutenberg 13.7
4.5s
25.72ms
WordPress 6.0
4.56s
20.91ms
Contributor props
The following contributors merged PRs in this release:
On the styles and style engine projects created a PR ready that outputs the presets specific to a section. It is ready for reviewWith it a group blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. e.g: used in a pattern can have its own presets e.g: its own color palette its own gradients etc
On the site editor and templates project, I created a PR that allow the user to create a generic template from the site editor and another that allows creating templates for specific authors.
We have tentative plans to upgrade the ReactReactReact is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. Native version in the upcoming weeks/months
Working on a recap of the latest call for testing for the outreach program (and figuring out what the next one might look like).
Open Floor
@zieladam shared about way to update HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. markup from PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher
Could you use a better way of updating the HTML block markup from your PHP code? You’ll love this proposal of a canonical HTML-processing 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.:WP_HTML_Walker: Inject dynamic data to block HTML markup in PHP it can only move forward with your input! Please read, express your use-case and concerns, and review the code – it’s the only way to get it eventually merged.
The proposal will be shared via make post for better visibility and reach.
Suggested adding coordinate-with-gutenber to some tracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets such as 56228 which involves editing both coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. files and the 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.
Note: Anyone reading this summary outside of the meeting, please drop a comment in the post summary, if you can/want to help with something.
And, remember: devchat is for you! So please say hey if you’re in the house at chat time. It’s a compliment to the entire project when you choose to give WordPress this hour of your valuable time!
[Update: links to TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets mentioned added]
Again, WordPress 6.1 is under way.@costdev invited release leads and squad members to pingPingThe 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.
And @marybaum reported a successful test of the patchpatchA 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.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/ 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.
@shetheliving: Performance 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. scrub will be held Wednesday, August 3, 2022 at 11am EDT
WebP compatibility: add fallback for non-supporting browsers to core – PR #3034 ready for review
Add the new source data to the media REST APIREST APIThe REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. endpoint – PR #3025 merged in WordPress core
Add the original image’s extension to the WebP file name to ensure it is unique – PR #444 need final review
Enhance JSJSJavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. replacement mechanism for WebP to JPEG to more reliably replace full file name – PR #443 need final review
We’re seeking 1-2 POCs for this group; if you’re interested, please comment here or pingPingThe 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.” in SlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/.
We’re seeking 1-2 POCs for this group; if you’re interested, please comment here or ping in Slack
@shetheliving: Reminder about the performance testing environment work started back in March: https://make.wordpress.org/core/2022/03/22/performance-team-meeting-summary-22-march-2022/. This has stalled out since then; if anyone is interested in picking it back up, let us know.
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/.
@olliejones: Proposing a total of eight separate health checks that cover a variety of database issues; more details and mockups here. These would all be in one single module.
@shetheliving: Any issues with having these all in one module as opposed to separate, as we’ve done previously with health checks?
@adamsilverstein: Not an issue, but concerned about the recommendations for adding keys and if they would be actionable by users
@olliejones: The add-keys actions are presented 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/ commands with a copy-to-clipboard function
@adamsilverstein: Right, but what percentage of WP users know what WP-CLI is and use it?
@masteradhoc: Important to describe these very well as they’ll be hard for everyone to understand
@mukeshpanchal27: Are there other ways to add keys outside of CLICLICommand Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress.?
@olliejones: I have a 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 that does this re-keying
@shetheliving: Unfortunately we can’t point users there
@olliejones: What about a separate module for the health checks that generate CLI commands?
@adamsilverstein: Goal here is to build features for core, which means they have to help the majority (80%+) of users, so anything that is specifically for very large sites or uses CLI is plugin territory, not core
@zero4281: Since query speed is dictated by rows in a table, can we only display a health check if a site has a certain number of posts/rows?
@shetheliving: Since everything in Performance Lab should eventually be merged into core, the CLI-related health checks probably should not be in this plugin
@adamsilverstein: Focus on the existing warning to make sure it is “site owner” targeted and maybe drop the keys check entirely. For the advanced part, maybe create a concise guide for the developer handbook to cover important approaches
Could be in https://wordpress.org/support/article/optimization/#database-tuning or perhaps on our Performance site
@seedsca: What is wrong with WP-CLI? It’s a great tool
@adamsilverstein: Agreed, it’s just that it’s not something an average WP user knows about or how to use
@shetheliving: Next step is for @olliejones to revise the proposal to indicate which checks would be included/removed to proceed. Once that update has been made, we can discuss again in a future chat.
Welcome back to a new issue of Week in CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTracAn open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between July 25 and August 1st, 2022.
30 commits
29 contributors
36 tickets created
6 tickets reopened
36 tickets closed
The Core team is currently working on the next major releasemajor releaseA release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope., WP 6.1 🛠
TicketticketCreated for both bug reports and feature development on the bug tracker. numbers are based on the Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.
Correct the escaping in documentation lookup 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 and theme editor – #56007
Remove unused CSSCSSCascading Style Sheets. selectors related to old format menu icons – #35717
Application Passwords
Link a more accurate documentation page in User profile edit screen – #56267
Build/Test Tools
Add tagtagA 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.) pattern matching for the testing NPM workflow – #55652
Correctly detect the first workflow run for a branchbranchA 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". or tag – #55652
Make the GitHubGitHubGitHub is a website that offers online implementation of git repositories that can can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ Action pattern matching for tags more specific – #55652
Add failure messages for site icon and custom logo tests – #55652
Correct the test for passing all expected parameters to the preprocess_commentfilterFilterFilters 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. – #55647, #56244
Declare custom-logo theme support for custom logo tests – #55652
Bundled Themes
Update NPM dependencies for Twenty Twenty and Twenty Nineteen – #55652
Twenty Twenty-One: Add blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. type suggestions to block patterns – #53647
Twenty Twenty-One: Rebuild the IE specific stylesheet – #55989
Cache 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.
Use third-person singular verbs for function descriptions in block-template.php and block-template-utils.php – #55646
Use third-person singular verbs for function descriptions in general-template.php, as per docblocks standards – #55646
Use third-person singular verbs for function descriptions in wp-admin/includes/comment.php, as per docblocks standards – #55646
Editor
Fix register_block_type does not recognise ancestor block setting – #56184
Embeds
Add Pocket Casts as a trusted oEmbed provider – #55860
External Libraries
Update the Moment library to version 2.29.4 – #56031
Formatting
Normalize to Unicode NFC encoding before converting accent characters in remove_accents() – #24661, #47763, #35951, #30130, #52654
Media
Allow filtering audio file metadata in wp_read_audio_metadata() – #55828
Prevent URLs from overflowing their container in the media editor – #55393
Enable generating multiple mime types for image uploads; specifically WebP versions for JPEG images by default – #55443
Plugins
Improve color contrast on plugins screen when recovery mode is activated – #56190
Posts, Post Types
Check if the post type exists in wp_insert_post() – #55877
Correct the check for non-existing post in get_post_permalink() – #45329
REST APIREST APIThe REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/.
Add prepare_links method to WP_REST_Post_Types_Controller class – #56019
Add prepare_links method to WP_REST_Taxonomies_Controller class – #56020
Use wp_get_lastest_revision_id_and_total_count function in WP_REST_Posts_Controller class – #55857
RevisionsRevisionsThe WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.
Correct the function name for retrieving the last revision ID and total count – #55857
Rename the function for retrieving the latest revision ID and total count – #55857
Update the “last revision” wording to “latest revision” in various files – #55857
Themes
Add a hook to filter theme headerHeaderThe 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. image URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org – #56180
An effort is currently underway in the GutenbergGutenbergThe 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/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, to streamline and standardize the way that blocks are styled by moving key blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. styling into Theme JSONJSONJSON, 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.. This post lays out the reasoning behind this change and the impact it will have for both themes and block authors going forward.
What is theme.json?
Theme.json is a file which provides a single place to configure the behavior of themes.
It plays an important role in the Full Site Editing project, by storing information about a site’s appearance and providing this in a machine readable format to be consumed by the Editor interface.
One of the key elements of this is the Global Styles interface within the Site Editor which allows users with a UIUIUser interface to allow them to modify the default appearance settings provided by their chosen Theme.
Why use JSON to represent a theme’s styles?
Expressing a theme’s styles in JSON gives us several benefits:
It enables users to modify the visual appearance of their site via the UI provided by Global Styles, without needing to write any CSSCSSCascading Style Sheets..
We have more control and consistency in how the theme CSS is output, so that we can ensure that user’s settings take priority over theme’s settings, and theme’s settings take priority over coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress.’s settings.
What is changing?
To expand the number of customisation options available to users through the Global Styles UI, we need to configure the default visual appearance of blocks using the same tools that will be used to customize these blocks. This will make it trivial for themes to overwrite the default styles of a block.
In practical terms this means we need to move the rules that define default block appearance from CSS files, to machine readable JSON files, such as `theme.json` & `block.json`.
How can blocks define styles in JSON?
To make the process of moving core block styles into JSON, some new affordances have been created.
One of these is that the JSON rules for a block can be saved in the block.json file under a new `__experimentalStyles` key.
For example margins on the image block were expressed in CSS like this:
.wp-block-image {
margin: 0 0 1em 0;
}
Since this change we can now define margins for image blocks in the block.json file like this:
The driving force of this change is to enable users to modify the visual appearance of their site via the UI provided by Global Styles, without needing to write any CSS.
However this change also has some very important, and useful, side effects.
CSS specificity and performance
For a long time blocks and themes have been struggling with CSS specificity – blocks want to ensure that they provide enough rules that they look good, whilst themes want to override these rules so that different blocks have a consistent appearance (for example ensuring all your buttons look the same).
This has meant that blocks have to be very careful about the specificity of the selectors in the CSS they provide, to enable themes to override them.
By expressing visual styles in JSON, and compiling them as part of the main CSS output of global styles, the order and importance of each rule is clear and computable when the theme.json files are processed.
Global Styles processes the different levels of JSON settings, by merging each of these JSON objects together. Once all of the settings are combined, the Global Styles CSS is generated using the final merged result. This means that the resulting CSS only contains the rules the theme needs.
For those not familiar with how rules in Theme JSON files are turned into valid CSS rules here’s a quick refresher. There are x3 “levels” of JSON file:
WordPress Core Theme JSON – this holds the base level styles for WordPress.
Theme JSON – this is the `theme.json` file from the currently active Theme which provides theme-specific styles.
Custom User Styles – these are rules provided by the Global Styles user interface and have the highest level of importance.
When these different JSON representations of styles are merged together, we only preserve the rules for the uppermost setting for each rule before they are converted to CSS rules.
By moving block CSS rules to JSON we effectively insert a new level into this hierarchy with WordPress Core `theme.json` being overridden by block styles in `block.json` which is overridden by the `theme.json` provided by the theme which is in turn overridden by custom user styles, created in the Global Styles UI.
For clarity the new rules hierarchy is:
WordPress Core Theme JSON
Block styles in Block JSON
Theme styles from Theme JSON
Custom User Styles from Global Styles UI.
This also means that the total CSS output of the system will be smaller, which is a performance benefit.
Exposing default styles
Another benefit of this change is that the default styles for each block are now exposed in the Global Styles UI, before the user makes any changes, so the starting point is obvious and clear. Now that blocks can define most of their styles in JSON, these default styles can be more easily seen and configured using the Global Styles interface.
Not only are the styles of blocks themselves configurable but the lower level elements used within blocks can also be exposed to the Global Styles UI.
What are elements?
Elements are low level components for themes and blocks, which don’t need the complexity of blocks.
Block composition has not reached a level of infinite composability, hence it is not always possible or good to use, say, the heading block instead of a HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. heading element, or a button block instead of a HTML button element.
Some good examples of these are headings, links and buttons.
Links are part of many blocks but do not have a block of their own. Headings and buttons are expressed as blocks but many times the block composition limits us, so we’re better off using an HTML heading or button element.
Also, elements are simpler than blocks; they can be used to express semantic features of blocks and enable users to share styles across multiple blocks. For example style rules for the button element will be used in the search block, the file block and the button block.
The number of elements is currently being expanded. Some new elements we expect to add are a caption element and form elements. It is likely some of them will be absorbed into blocks as the block composition 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. gets better, so the implementation of element support is kept at a minimal state.
Putting it all together – exposing default element styles in the UI
If we put these two new concepts (setting default styles in JSON and element styles) together, we can see how the default styles for button elements are now visible in the Global Styles UI:
This helps users to understand the global styles interface more easily as it shows straight away the relationship between these settings and the visual appearance of the block.
Should I set style rules for blocks or for elements?
Theme authors have the option to set styles in `theme.json` for:
blocks themselves.
elements within blocks
globally for elements shared by blocks.
It’s important to understand the precedence of each of these options, so you know which one to choose.
Global element styles apply to all instances of an element. These rules will apply across all blocks, to ensure a consistent appearance between all blocks. In some cases this will depend on blocks implementing the elements API to take effect. For example, this would be useful if you wanted to create a style rule that applied to all button elements on your site.
Block styles apply to all instances of that specific block. This is useful if you want to target particular properties of the block itself. For example this could be used to modify the color of all the text within the search block.
Element styles within blocks are the most specific use case. These rules will only apply to elements within a specific block. If users modify global element rules, these the specific customizations for elements within blocks will still take precedence due to their higher specificity, so the user’s global changes won’t apply unless they modify the element settings for that particular block. For this reason this use case should be uncommon. For example, this is useful if you wanted the buttons in your search form to be a different color to the other buttons on your site.
What does this mean for block authors?
Block authors can already take advantage of some of these changes.
Blocks can already start to use the elements API for composing their markup. Right now this only works for the button and captions elements, but as the number of elements is expanded, blocks will be able to compose their markup using these common elements, which will in turn enable them to be better supported by Global Styles.
Blocks can also start to define their style using the `block.json` file, which allows themes to override block styles using `theme.json`, rather than relying on CSS. Styling a block’s supported features within their JSON configuration enables users to modify them via the Global Styles UI.
What does this mean for themers?
This approach gives more tools to themers, to make it easier for themes to have a more consistent style across all blocks without the need for complex CSS. By using the elements section of the theme.json, themes can create style rules that will apply across all blocks that take advantage of these elements, which makes these rules simpler and easier to maintain.
Will this replace the theme’s CSS?
While simple themes may one day be able to replace all their CSS with theme.json settings, it is expected that most themes will still need to provide their own CSS for the more advanced aspects of their design – for example animations.
Is supports > __experimentalStyles the right place for this?
These styles were initially added to supports > __experimentalStyles so that we could begin this work, but ideally these settings would belong in the style key of block.json. There is an open PR to make this possible.
GutenbergGutenbergThe 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/ 13.8
The WordPress 6.1 Development Cycle page has been published with an updated timeline and release team and will be kept up to date to reflect any further changes to the release cycle. Check out the new WordPress 6.1 Planning Roundup v2 to stay in the loopLoopThe Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. with the happenings around he next major WP release.
WordPress home and download redesign
Open Call For Comments on redesign and content of WordPress Homepage and Download page. @santanainniss chimed in to encourage everyone to share feedback of all kinds: “It’s a fast moving, fast evolving project so please weigh in!”.
It’s not every day that the home page is being revamped! The last one was in 2016!
The Navigation blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. is getting ready for major updates. @get_dave shared the project updates and also launched a call for help: “we’re actively looking for contributors. Happy to provide help/guidance to anyone who feels able to join us.”
Brought up a serious regressionregressionA software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5. present when using Firefox: Selecting Parent Block Selects Child Block in Firefox. Let’s have this on our radars and help land a fix.
Put a spotlight on the need for custom CSSCSSCascading Style Sheets. in the block editor, a feature the CustomizerCustomizerTool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. had and which now is lost. The issue needs a developer.
Highlighted the discussion about adding a new @ syntax to Theme JSONJSONJSON, 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. to be used to specify custom “states” in the UIUIUser interface which don’t map to CSS pseudo selectors. Details were offered and the discussion is open on the issue.
Also, Dave offered a glimpse into the current evolution of the Navigation block’s default state. If you are a developer of a Theme which uses Page List as a placeholder take note of the current update to respect uncontrolled inner blocks on Navigation block in editor and front of site. In the near future, we expect the block to automaticallyprovide a list of Pages as a fallback so manually providing Page List in your block will not longer be necessary.
Will showcased the great advancements in adding theme.json support for toggling Width settings panel to the button block. There is a blockerblockerA bug which is so severe that it blocks a release. currently where the block_type_metadatafilterFilterFilters 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. does not work with disabling the width attribute in the button block. Also a general review of the PR is also appreciated.
You must be logged in to post a comment.