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.
Recently Published Dev Notesdev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include:
a description of the change;
the decision that led to this change
a description of how developers are supposed to work with that change.
Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase.
Got something to propose for the agenda, or a specific item relevant to our standard list above?
Please leave a comment, and say whether or not you’ll be in the chat, so the group can either give you the floor or bring up your topic for you, accordingly.
This meeting happens in the #core channel. To join the meeting, you’ll need an account on the Making WordPress Slack.
The 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/. will see a lot of changes in WordPress 5.5. In an effort to explain each change adequately, a number of these were split out and covered by other dev notesdev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include:
a description of the change;
the decision that led to this change
a description of how developers are supposed to work with that change.
Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase..
Below are some other noteworthy changes that deserve a call out.
Discoverable REST resource links
To aid automated and human discovery of the REST API, a link was added in the <head> of the document and as a LinkheaderHeaderThe 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 REST route for the currently queried document in [48273].
For example, in the <head> of this post, the following <link> appears.
Links are added for post, pages, and other custom post types, as well as terms and author pages. Links are not currently output for post archives or search results.
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.
Three new functions are introduced.
rest_get_route_for_post() retrieves the route for the given post. For instance, /wp/v2/posts/1.
rest_get_route_for_term() retrieves the route for the given term. For instance, /wp/v2/tags/1.
rest_get_queried_resource_route() retrieves the route for the currently queried resource. For instance, /wp/v2/users/1 when on the author page for the user with ID of 1.
All three functions return an empty string if a REST API route cannot be determined. To convert the route to a link, pass the result to the rest_url() function.
For custom post types, only routes using the built-in WP_REST_Posts_Controller controller class will work by default. For custom controllers, the rest_route_for_postfilterFilterFilters 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. can be used to supply the correct route.
Similar logic applies to taxonomies, only the built in WP_REST_Terms_Controller is supported by default. The rest_route_for_term filter can be used for custom controller classes.
These links are output using the existing rest_output_link_wp_head and rest_output_link_header functions. As such, if API discovery has already been disabled, these links will not be rendered.
In [48112], the Link header was added to the list of exposed CORS response headers. Previously, only the X-WP-Total and X-WP-TotalPages headers were exposed which means that clients would have to manually construct the URLURLA specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org to implement pagination instead of using the prev and next Links.
In [48452], the Content-Disposition, Content-MD5 and X-WP-Nonce were added to the list of allowed cors request headers. The Content-Disposition and Content-MD5 headers allow for easier file uploading across domains by using a File/Blob object directly. The X-WP-Nonce header is allowed for making authenticated cross-origin and same-origin requests consistently.
Two filters are introduced, rest_exposed_cors_headers and rest_allowed_cors_headers to simplify the process of plugins modifying the list of cors headers.
The REST API treats routes without a permission_callback as public. Because this happens without any warning to the user, if the permission callback is unintentionally omitted or misspelled, the endpoint can end up being available to the public. Such a scenario has happened multiple times in the wild, and the results can be catastrophic when it occurs.
In [48526] a _doing_it_wrong notice has been added when a permission callback is omitted. For REST API routes that are intended to be public, it is recommended to set the permission callback to the __return_true built in function.
So for instance, this route registration will cause the following warning to appear.
The REST API route definition for my-ns/echo is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback.
If it was intended for this endpoint to be public, you could fix it like this.
When building a REST API route, it is important for the route callback (and permission_callback) to return data instead of directly sending it to the browser. This ensures that the additional processing that the REST API server does, like handling linking/embedding, sending headers, etc… takes place.
// This is incorrect.
echo wp_json_encode( $data );
die;
// And this.
wp_send_json( $data );
// And this.
wp_send_json_error( 'My Error' );
// Instead do this.
return new WP_REST_Response( $data );
// Or this.
return new WP_Error( 'my_error_code', 'My Error Message' );
After [48361], a _doing_it_wrong notice is now issued when any of the wp_send_json family of functions are used during a REST API request.
When using rest_preload_api_request any deprecation errors encountered when processing the request were silenced because the REST API handling took over as soon as the API server was booted.
After [48150], the REST API handling will only apply for actual REST API requests.
Today, 22nd July 2020, in the #coreSlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel the weekly navigation sync meeting was held. This is a CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. meeting about everything Navigation: 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. and the navigation screen.
The agenda for today was:
Navigation screen project triagetriageThe act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors.
Open floor
We triaged all the issues in the Inbox column of the Navigation screen project.
During the open floor the following items were raised:
We discussed the idea of adding a ClassicMenu block to enable the Navigation block to manage blocks and classic menus easier in the Navigation screen.
@ashiishme offered to create an issue for a new ClassicMenu block
It was discussed that during this chat we should also triage issues labeled [Block] Navigation that were opened in the last week, to check for items to add to the Navigation screen project.
Lastly, if you want to get involved in any way – design, code, 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, testing – check out:
As part of the development for the new XML Sitemaps feature in WordPress 5.5, a new esc_xml() function has been added to coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. that filters a string cleaned and escaped for output in XML. This joins the existing set of functions like esc_html() and esc_js().
While all contents in XML sitemaps are already escaped using this new function, existing code in WordPress core can be updated to leverage it in future releases.
wp_kses_normalize_entities() has been updated accordingly to support this, and now can distinguish between HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. and XML context.
Note:l10nL10nLocalization, or the act of translating code into one's own language. Also see internationalization. Often written with an uppercase L so it is not confused with the capital letter i or the numeral 1. WordPress has a capable and dynamic group of polyglots who take WordPress to more than 70 different locales. helpers like esc_xml__() and esc_xml_e() are being proposed separately in #50551, and are not part of this releaseReleaseA release is the distribution of the final version of an application. A software release may be either public or private and generally constitutes the initial or new generation of a new or upgraded application. A release is preceded by the distribution of alpha and then beta versions of the software..
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/ 8.6
Even if you can’t makemakeA collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility). the meeting, you’re encouraged to share anything relevant for the discussion:
If you have anything to share for the Task Coordination section, please leave it as a comment on this post.
If you have anything to propose for the agenda or other specific items related to those listed above, please leave a comment below.
As most people that follow coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development already know, a new feature in WordPress 5.5 is editing of images right in the block editor.
The new image editor looks a lot better and is much easier to use. It comes with several presets allowing the users to quickly adjust the aspect ratio, zoom level, and position.
There are two notable changes:
Image editing is done through the 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/.. The new functionality is in WP_REST_Attachments_Controller and introduces wp_edited_image_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.. Of course all other actions and filters triggered when image sub-sizes are created and saved still work.
After editing, the image is saved separately as a new attachment. This lets the users have full control: see the edited image in the Media Library, edit either the original or the edited image again, or delete any of them if not used. (In the old image editor the edited images are saved in the image metaMetaMeta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. reusing the same attachment, and the users cannot access the original “parent” image).
When creating new attachments for edited images the post_title, post_content (image description), post_excerpt (caption stored in the database), and the alt text (stored in post meta in the database) are copied (if present) from the parent image to the edited image. Also the EXIF data stored in image meta is merged.
For plugins, the new wp_edited_image_metadata filter can also be used to migrate any other meta data 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 may be adding to image attachments, or to save new data.
This meeting will be held in the #core-css channel in the Making WordPress SlackSlackSlack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/..
If there’s any topic you’d like to discuss, please leave a comment below!
CSSCSSCascading Style Sheets. audit status updates
What is the purpose of recurring reports, and what data is useful in recurring reports?
To summarize input from @isabel_brison and @ryelle, the purpose of recurring reports is check on the health of our CSS code regularly, and to monitor the code-base to ensure known problems do not recur. @ryelle‘s CSS audits tool seems like the right one for this job. We discussed stylelint which is good for ensuring issues aren’t committed, but the wp-adminadmin(and super admin) CSS code-base is such that we would have to disable too much for it to be useful. That said, @ryelle pointed out that the potential to write our own rules for autofixing with stylelint.
In terms of what data is useful, @isabel_brison suggested:
new values for e.g. colors, margins, etc. are being introduced as little as possible;
avoiding use of px units;
specificity isn’t increasing.
Action item: Add a comment to the CSS audit ticket with a list of what data should be tracked.
Additional Updates
@ryelle took a look into how Dashicons are added in CSS, but found the need for many edge cases that it would be futile to attempt to standardize. Considering that, and the fact that the icon font is slated to be replaced with SVG, it seems a clear decision to exclude Dashicons from the CSS audit, unless the use of pixels impacts responsivity or 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).
Color scheming updates
Is it useful to distinguish custom properties implementation work as #49930 and keep #49999 for iteration and naming exploration?
I started this conversation by clarifying the question as whether this experimental PR adding custom properties to color schemes in wp-admin based on 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/ implementation was a separate initiative from than the further reaching color scheme work we have been discussing in #49999. We had some differing opinions here – where the implementation work could serve as an 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 for color schemes, but on the flip side, it is not addressing the goals of the color scheme initiative, which are:
Creating a new color scheme should be similar to filling out a form with color values
All colors in the wp-admin should be controlled by the color schemes
Reduce the number of colors in use by providing default color palettes with varying shades
@youknowriad expressed that any scheme will require a main color, so this implementation does get us closer, and @ryelle expressed that we can’t expect a system designed around a main color and variations to work in every color scheme (see this example) when we are looking to support things like dark mode and high contrast color schemes.
The goal of the Gutenberg color scheme implementation was to support admin color schemes in Gutenberg components and UIUIUser interface, and using custom properties to solve issues of duplication in the CSS. By adding this approach to CoreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress., @youknowriad believes we can have more consistency in the way existing color schemes are used (they are currently not consistent).
Review screenshots annotations with options for naming
I shared these *rough* mockups for a start on how we might name colors that would apply consistently across color schemes:
Ectoplasm
Midnight
Light
Given they are very rough mockups, aspects like a namespace and other details will come later – I pointed to the aspects like base__text and base__text-active for feedback. @youknowriad expressed that he does not think that a color name should include its context because the design of wp-admin can change over time, while @ryelle (and I) think the opposite – that it should be possibly more specific that these are menu colors so that they are not unintentionally used in non-menu contexts.
We then discussed an example when changing the menu background color. With this approach, it would be assigning a new value to a variable like --color-menu-bg, but @youknowriad pointed out that that wouldn’t work because all the menus use color: white across admin schemes, which @ryelle pointed out is not the intent for #49999. The intent is that the color would also be controlled by a variable and updated accordingly.
Given this example, @youknowriad mentioned that this capability seems beyond the scope of admin themes and more like a “mode”. And perhaps the different admin theme colors should support a mode. I summarized this as something like Ectoplasm – Light / Ectoplasm – Dark. @ryelle expressed that all of this, regardless of the 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. semantics, needs to be part of the same infrastructure in order to support the flexibility required to implement both high contrast and low contrast color schemes.
This post summarizes the weekly editor chat meeting agenda here. Held on Wednesday, 15th July 2020 held in Slack. Moderated by @itsjusteileen.
WordPress 5.5 BetaBetaA pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 2
The remaining issues are located in the Project board.
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/releaseReleaseA release is the distribution of the final version of an application. A software release may be either public or private and generally constitutes the initial or new generation of a new or upgraded application. A release is preceded by the distribution of alpha and then beta versions of the software. 8.5
Gutenberg 8.5 was released 8th of July. This is the last 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 release that is going to be included entirely (without experimental features) in WordPress 5.5.
Link to the first 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. chat
@mkaz Working on docs, good progress on dev env setup and Create a Block tutorial. An open PR-23946 links up the Create a Block tutorial making it the starting point for block development. Once merged, we need to audit older block tutorial to correct overlap and expand it to be for intermediate topics.
@annezazu Launched the “Versions in WordPress” Doc with help from @mkaz Light triagetriageThe act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. focused on unlabeled & block directory testing. Gave feedback on the language around the block directory checker plugin. Hoping to start work this week on updating the Gutenberg FAQ.
@youknowriad The big priority for me is 5.5: 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, package releases and backports. I helped review several PRs: FocalPointPicker, Perf testing for site editor… Worked on several small performance improvements here and there. Starting to work on dev notesdev noteEach important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include:
a description of the change;
the decision that led to this change
a description of how developers are supposed to work with that change.
Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. for 5.5.
@ItsJonQ Continuing with Design Tool efforts. Continuing research/experiment on improving our (ReactReactReact is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/.-powered) 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/.UIUIUser interface within the Editor.
@cvoell Updating documentation with latest native mobile updates. This includes a new section on troubleshooting new native mobile CI jobs, and improved tracking for any remaining randomly occurring failures.
Open Floor
@jonsurrell The Gutenberg plugin only includes minified JavaScript. The minified JavaScript uses .js extension not .min.js. That diverges from what WordPress conventions and what WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. does. Even the Gutenberg packages bundled into core include readable and minified sources with .js and .min.js extensions, respectively. I have opened this PR to propose that minified JavaScript in Gutenberg use the .min.js extension to align with convention.
@mkaz We updated the GitHub workflows to not run some actions (e2e & unit tests) if only markdown files are changed. Tests had to be removed from required list due to how 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/ Actions work. It is possible for the tests to now fail, but the merge button is allowed. So for those merging, please double check all tests pass. We want to try it out and see if it causes a problem. The change is a good boost to speed up tests and use less resources that helps other tests to run. There is a ticketticketCreated for both bug reports and feature development on the bug tracker. open on GitHub to allow conditionally requiring actions.
@itsjusteileen Did anyone ever propose an iframeiframeiFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser. block? There is no Github issue for this yet. @paaljoachim There is one for iframing all of the content (but none for iframing a block):