summaryrefslogtreecommitdiffstatshomepage
path: root/tests/qunit
Commit message (Collapse)AuthorAge
...
* REST API: Bring new endpoints for Block Patterns from Gutenberg pluginGreg Ziółkowski2022-04-12
| | | | | | | | | | | | | | | | | | Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/39889. Backporting changes from the Gutenberg plugin: - new Block Patterns REST API endpoint - new Block Pattern Categories REST API endpoint - updates to Query Loop related patterns - support for custom taxonomies in Query Loop block Props hellofromtonya, peterwilsoncc, ntsekouras, zieladam, ironprogrammer, spacedmonkey, timothyblynjacobs, antonvlasenko, jsnajdr. See #55505. git-svn-id: https://develop.svn.wordpress.org/trunk@53152 602fd350-edb4-49c9-b593-d223f7449a82
* Administration: Replace "can not" with "cannot" after [53131].Jb Audras2022-04-11
| | | | | | | Follow-up to [53132], [53131], [52979]. git-svn-id: https://develop.svn.wordpress.org/trunk@53136 602fd350-edb4-49c9-b593-d223f7449a82
* Administration: Remove self-reference ("we") in WordPress Admin.Jb Audras2022-04-11
| | | | | | | | | | | | | | This changes updates many strings to remove self-references to an undefined "we" collective across the WordPress Administration. The goal of this change is to better match the guidelines and recommendations set forth in the make/core handbook, specifically: > the word "we" should be avoided (…) unless its made very clear which group is speaking. Props johnbillion, shital-patel, audrasjb, marybaum, SergeyBiryukov, peterwilsoncc, johnjamesjacoby, kebbet, costdev, chaion07, davidbaumwald. Fixes #46057. git-svn-id: https://develop.svn.wordpress.org/trunk@53131 602fd350-edb4-49c9-b593-d223f7449a82
* Block Editor: Backport the Global Styles Variations endpoint.Riad Benguella2022-04-05
| | | | | | | | | | | This include the /global-styles/themes/{theme}/variations rest endpoint into core. The endpoint will be used by the site editor to display alternative theme styles to the user. Props gziolo, oandregal. See #55505. git-svn-id: https://develop.svn.wordpress.org/trunk@53072 602fd350-edb4-49c9-b593-d223f7449a82
* Administration: Replace contracted verb forms for better consistency.Jb Audras2022-03-22
| | | | | | | | | | | This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings. Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya. Fixes #38913. See #39176. git-svn-id: https://develop.svn.wordpress.org/trunk@52978 602fd350-edb4-49c9-b593-d223f7449a82
* Tests: Update qUnit test fixtures after [52535].Jb Audras2022-01-06
| | | | | | | See #54745. git-svn-id: https://develop.svn.wordpress.org/trunk@52536 602fd350-edb4-49c9-b593-d223f7449a82
* Update @wordpress packagesRobert Anderson2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update packages to include these bug fixes from Gutenberg: - Site Logo: Add option to set site icon from Site Logo block - Navigation: Enable even more compact setup state. - Remove template parts from post content inserter an __unstable filter - Template Editor Mode: Hide editor mode switcher - Avoid using CSS variables for block gap styles - Try to fix auto resizing in template part focus mode - Lower the specificity of font size CSS Custom Properties in the editor - Site icon: Fix site icon styling to display non-square site icons within a square button - [Site Editor]: Register block editor shortcuts - Update regex to handle 404 template slug - Site Editor: Remove dead code - [Block Editor]: Restrict delete multi selected blocks shortcut - Fix: Gradients are not being applied by class - Update: Make the global styles subtitles font smaller - Post Content/Title: Reflect changes when previewing post - ServerSideRender: Fix loading state - [Block Library]: Fix editable post blocks in Query Loop with zero queryId - Post Excerpt: Fix previews - WP59: Contextualize "Export" string to differentiate it from other occurrences in WP Core - Tools Panel: Fix race conditions caused by conditionally displayed ToolsPanelItems - ToolsPanel: Allow items to register when panelId is null - Font Size Picker: Allow non-integers as simple CSS values and in hints - [Components - FontSizePicker]: Use incremental sequence of numbers as labels for the available font-sizes at the segmented control (conditionally) See #54487. git-svn-id: https://develop.svn.wordpress.org/trunk@52434 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Support `.` in theme directory names in ↵Tonya Mork2021-12-21
| | | | | | | | | | | | | | | | | | | `WP_REST_Global_Styles_Controller`, `WP_REST_Templates_Controller`, and `WP_REST_Themes_Controller`. Regex changes from [52376] are reverted to restore the original regex patterns. Why? [52376] used an include characters pattern, which was too limiting. It did not account for localized characters, such as `é`, or other valid directory name characters. The original theme directory regex pattern, i.e. `[^.\/]+(?:\/[^.\/]+)?` excluded the period `.` character. Removing the `.` character resolves the reported issue by allowing matching for `themes/theme-dirname-1.0/` or `themes/<subdirname>/theme-dirname-1.0/`. As the pattern used an exclude approach, all characters are valid for matching except for `/`. However, not all characters are cross-platform valid for directory names. For example, the characters `/:<>*?"|` are not valid on Windows OS. The pattern now excludes those characters. The theme's directory (or subdirectory) name pattern matching is now used in `WP_REST_Global_Styles_Controller`, `WP_REST_Templates_Controller`, and `WP_REST_Themes_Controller`. Follow-up to [51003], [52051], [52275], [52376]. Props costdev, hellofromTonya, spacedmonkey, TimothyBlynJacobs, bijayyadav, kafleg. Fixes #54596. git-svn-id: https://develop.svn.wordpress.org/trunk@52399 602fd350-edb4-49c9-b593-d223f7449a82
* Application Passwords: Show HTTPS required message without filtering when ↵Tonya Mork2021-12-21
| | | | | | | | | | | | | | | | | not enabled or not in local environment. When `add_filter( 'wp_is_application_passwords_available', '__return_false' )` exists, HTTPS requirement message is shown even if HTTPS is enabled on the site. This happens because `wp_is_application_passwords_available_for_user()` first invokes `wp_is_application_passwords_available()` which is filterable. The situation could happen if the `'wp_is_application_passwords_available_for_user'` filter returns `false`. To fix this, the check for HTTPS (or if in a 'local' environment) is moved to a new function called `wp_is_application_passwords_supported()`. Then the return from this function is used as an OR condition for the Application Passwords section and for displaying the HTTPS required message. Tests are included for both `wp_is_application_passwords_supported()` and `wp_is_application_passwords_available()`. Follow-up to [51980], [51988]. Props davidbinda, SergeyBiryukov, ocean90, felipeelia, costdev, hellofromTonya. Fixes #53658. git-svn-id: https://develop.svn.wordpress.org/trunk@52398 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add block theme support for valid non-alphanumeric characters in ↵Tonya Mork2021-12-14
| | | | | | | | | | | | | | | theme's directory name. Themes whose `wp-content/themes/<dirname>` include valid non-alphanumeric (cross-platform) characters work for non-block themes, but did not previously resolve for block themes. For example, a block theme in `wp-content/themes/twentytwentytwo-0.4.0/` directory resulted a 404 "No route was found matching the URL and request method" response when attempting to customize it in the Site Editor. This commit adds support for the following characters in a theme's root directory: `_`, `.`, `@`, `[`, `]`, `(`, and `)`. Subdirectory themes and `-` are already supported. Follow-up to [51003], [52051], [52275]. Props mkaz, costdev, hellofromTonya, jffng, justinahinon, peterwilsoncc, spacedmonkey, TimothyBlynJacobs. Fixes #54596. git-svn-id: https://develop.svn.wordpress.org/trunk@52376 602fd350-edb4-49c9-b593-d223f7449a82
* Site Editor: Add site export REST API endpoint. Jonny Harris2021-11-30
| | | | | | | | | | | Add a REST API to export site templates and template part as html files. When the REST API is requested, it responds by downloading a single ZIP file and exits early, without completing full request. To create the exported zip, the ZipArchive class is required. If this class is not present then the export will gracefully fail, returning a `WP_Error` object and 500 status error code. Props spacedmonkey, youknowriad, Mamaduka, walbo, peterwilsoncc. Fixes #54448 . git-svn-id: https://develop.svn.wordpress.org/trunk@52286 602fd350-edb4-49c9-b593-d223f7449a82
* Update @wordpress packagesRobert Anderson2021-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update packages to include these bug fixes from Gutenberg: - Update Pattern block category and add documentation - Fix non existent menu handling in nav block - Make Reusable blocks available in the Site Editor - Add caching to WP_Theme_JSON_Resolver_Gutenberg::get_user_data_from_custom_post_type() - theme.json: add appearanceTools flag to opt-in into appearance UI controls - Update the block theme folders to templates and parts - Remove reference to gutenberg_, swap with wp_ - Use table layout in templates list screen - Update featured image placeholder graphic. - [Inserter]: Adjust order of theme blocks and reorder inserter items - Implement suitable fallback for Nav block on front end of site when no menu selected - Toggle Group Control: add tooltip - Use first non-empty Nav post as primary fallback for Nav block - Change .nvmrc and documentation for Node.js version (LTS to 14.18.1) - Update: Migrate global styles user database data on the rest endpoint - Update global styles public API - Update: Rename user preset origin to custom - Try always generating navigation post title - Show all templates and template parts on the site editor list screens - Highlight "Site" in the navigation panel - Fix template part slug generation when creating through the block placeholder - [Block Library - Post Title]: Fix render error when setting Page to homepage - Add 'Clear customizations' button to template list page - Gallery v1: Allow clicks within replace media placeholder state - Site Editor: Set the <title> on the list page to be same as the CPT name - Gallery: Fix stuck image size options loader - Cover: Fix undo trap - Add success and error snackbars to the templates list page - Fix: theme colors cannot override defaults - Fix: Color palette is not being stored - Add elements support to the typography panel in global styles - Make links plural in global styles - Add: Gradient palette editor - Update some small style regressions in the template list - Add: Transparency support on global styles colors - Fix: apply by slug on all origins - Render empty Nav block if no fallback block can be utilised - Allow filtering of Nav block fallback - Fix Nav block fallback DB query to match on full block grammar start tag - Remove unstable max pages attribute from Nav block - DateTimePicker: set PM hours correctly - Update delete template button - Site Editor: Template list add rename action - Fix Nav block editing wrong entity on creation of new Menu - [REST] Restore the missing double slash in the ID received by /templates - Add icons to navigation sidebar items - Update function names for the public global styles API functions - Templates Controller: Add missing 'is_custom' prop - Rename gutenberg_ to wp_ for some functions that land in WordPress 5.9 - [Block Library - Template Part]:Remove support for conversion to Reusable block - Global Styles: Call "palettes" and not "color palettes" on panel label - Add button text when no colors found - Update: Global Styes: Count all color palette origins on the palette counter - Rename navigationMenuId to ref - Offset the parent iframe when computing Popover position - Fix: Failing PHPUnit test - Show theme, plugin or author in Added By column with appropriate icon or avatar - Add origin and author to template rest api See #54487. Props talldanwp, mamaduka, oandregal. git-svn-id: https://develop.svn.wordpress.org/trunk@52275 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Remove Navigation AreasJonny Harris2021-11-29
| | | | | | | | | | | Navigation area were merged as part of full site editing and the new navigation block. This functionality is experimental and not currently used in WordPress core, so should be removed. Props noisysocks, spacedmonkey, get_dave, zieladam. Fixes #54506. git-svn-id: https://develop.svn.wordpress.org/trunk@52272 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Make the templates controller follow core REST patterns.Jonny Harris2021-11-16
| | | | | | | | | | | | The templates controller now respects the `_fields` parameter and filters the response accordingly. The schema has been updated to include all the fields returned. The `content.block_version` field has been added. The controller now returns WP_Error objects for improved error handling. Add new unit tests. Props TimothyBlynJacobs, hellofromtonya, zieladam. Fixes #54422. git-svn-id: https://develop.svn.wordpress.org/trunk@52186 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Remove experimental block menu item types. Jonny Harris2021-11-16
| | | | | | | | | | | The menu items REST API controller was added in [52079]. This included functionality to add a "block" menu item type. This functionality is experimental and not currently used in WordPress core, so should be removed. Props noisysocks. See #40878. git-svn-id: https://develop.svn.wordpress.org/trunk@52184 602fd350-edb4-49c9-b593-d223f7449a82
* Menus: Add audible notice on menu item add or remove.Joe Dolson2021-11-15
| | | | | | | | | Call `wp.a11y.speak()` to add audible notification when a menu item is added or removed from a menu. Props joedolson, costdev, hellofromTonya. Fixes #53840. git-svn-id: https://develop.svn.wordpress.org/trunk@52166 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Add Navigation Area infrastructureRobert Anderson2021-11-12
| | | | | | | | | | | | Copies Navigation Area infrastrucutre from lib/navigation.php in Gutenberg. This allows a Navigation block to be associated with a particular area which persists when switching theme. Props antonvlasenko, mamaduka, spacedmonkey. See #54337. git-svn-id: https://develop.svn.wordpress.org/trunk@52145 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add /wp/v2/block-navigation-areas endpointRobert Anderson2021-11-11
| | | | | | | | | | | | Copies WP_REST_Block_Navigation_Areas_Controller from the Gutenberg plugin. This provides the /wp/v2/block-navigation-areas endpoint used by the Navigation block. Props antonvlasenko, TimothyBlynJacobs. Fixes #54393. git-svn-id: https://develop.svn.wordpress.org/trunk@52133 602fd350-edb4-49c9-b593-d223f7449a82
* Tests: Update qUnit test fixtures after [52128].Jonathan Desrosiers2021-11-10
| | | | | | See #54336. git-svn-id: https://develop.svn.wordpress.org/trunk@52129 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Expose the site icon in the REST API index.Timothy Jacobs2021-11-09
| | | | | | | | Props spacedmonkey, palmiak. Fixes #52321. git-svn-id: https://develop.svn.wordpress.org/trunk@52080 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Introduce Menu management endpoints.Timothy Jacobs2021-11-09
| | | | | | | | | | | | | | | | This commit introduces the `/wp/v2/menus`, `/wp/v2/menu-items` and `/wp/v2/menu-locations` REST API endpoints. These endpoints are fully available to users with the `edit_theme_options` capability, but can be read by any user who can edit a REST API available post type. The `nav_menu` taxonomy and `nav_menu_item` post type now map their capabilities to the `edit_theme_options` primitive capability. This allows developers to provide more fine-grained access control. However, if a developer is currently dynamically removing the `edit_theme_options` capability using `map_meta_cap`, they should use the `user_has_cap` filter instead. The `wp_update_nav_menu_item()` function has been adjusted to return an error if saving the menu item post or assigning the menu item to a menu generate an error. Lastly, a new menu item type is introduced, `block`, that can be used to store a Block as a menu item. Props andraganescu, antonvlasenko, dingo_d, dlh, isabel_brison, kadamwhite, Mamaduka, NateWr, noisysocks, peterwilsoncc, ryelle, schlessera, soean, Spacedmonkey, talldanwp, TimothyBlynJacobs, tobifjellner, westonruter, wpscholar, zieladam. Fixes #40878. git-svn-id: https://develop.svn.wordpress.org/trunk@52079 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Regenerate wp-api-generated.js after [52068].Timothy Jacobs2021-11-09
| | | | | | | See #53063. git-svn-id: https://develop.svn.wordpress.org/trunk@52070 602fd350-edb4-49c9-b593-d223f7449a82
* Add Site Editor and PHP changes from Gutenberg 10.1 - 11.9Robert Anderson2021-11-09
| | | | | | | | | | | | | - First pass at adding the site editor from the Gutenberg plugin to wp-admin/site-editor.php. - Adds miscellaneous PHP changes from Gutenberg 10.1 - 11.9. Follows [52042]. See #54337. Props youknowriad, aristath, hellofromtonya, gziolo. git-svn-id: https://develop.svn.wordpress.org/trunk@52069 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add batch support for posts and terms controllers.Timothy Jacobs2021-11-09
| | | | | | | | | | | | This also exposes the value of `allow_batch` in `OPTIONS` requests to a route. A future commit will add batch support to more resources. Props spacedmonkey, chrisvanpatten. See #53063. git-svn-id: https://develop.svn.wordpress.org/trunk@52068 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Add block theme infrastructureRobert Anderson2021-11-08
| | | | | | | | | | | Adds the required infrastructure to render block-based themes. This is sourced from the Gutenberg plugin. Fixes #54335. Props bernhard-reiter, youknowriad, ntsekouras, hellofromtonya. git-svn-id: https://develop.svn.wordpress.org/trunk@52062 602fd350-edb4-49c9-b593-d223f7449a82
* Add: Global Styles Rest endpoints.Jorge Costa2021-11-08
| | | | | | | | | This commit ports the global styles rest endpoints from the Gutenberg plugin into the core. See #54336. Props oandregal, aristath, timothyblynjacobs, spacedmonkey, youknowriad. git-svn-id: https://develop.svn.wordpress.org/trunk@52051 602fd350-edb4-49c9-b593-d223f7449a82
* Media: Remove security messaging in media upload failures.Anthony Burchell2021-11-07
| | | | | | | | | | | Previously, when uploading a media item type that is not supported, the default error message claims that the reason it cannot upload is due to security reasons. This is not always true. Now the warning says that the type is not allowed, which is always true. Props antpb, Presskopp, peterwilsoncc, desrosj, iluy, circlecube, mikeschroder. Fixes #53626. git-svn-id: https://develop.svn.wordpress.org/trunk@52032 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Support subdirectory themes in the Themes controller.Timothy Jacobs2021-11-05
| | | | | | | | | This allows for themes that are included inside of a subdirectory, for example `subdir/my-theme`, to be accessed via the single item route of the `/wp/v2/themes` controller. Fixes #54349. git-svn-id: https://develop.svn.wordpress.org/trunk@52017 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Allow sidebars and their widgets to be public.Timothy Jacobs2021-11-05
| | | | | | | | | | | | By default, only users with the `edit_theme_options` capability can access the sidebars and widgets REST API endpoints. In this commit, A new `show_in_rest` parameter is added to the `register_sidebar` function. When enabled, all users will be able to access that sidebar and any widgets belonging to that sidebar. This commit reduces the `context` for a widget's `instance` information to only `edit`. This is to ensure that internal widget data is not inadvertently exposed to the public. A future ticket may expose additional APIs to allow widget authors to indicate that their instance data can be safely exposed. REST API consumers intending to access this `instance` information should take care to explicitly set the `context` parameter to `edit`. Props spacedmonkey, zieladam. Fixes #53915. git-svn-id: https://develop.svn.wordpress.org/trunk@52016 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add URL Details endpoint.Tonya Mork2021-11-02
| | | | | | | | | | | | | | | | | | Adds a new REST API endpoint (`/wp-block-editor/v1/url-details`) for retrieving information from an external URL. Information retrieved: * Title: content of the `<title>` element * Icon: favicon image link * Description: content of the `description` or `og:description` meta element * Image: OG image link This endpoint is used by the block editor for link previews. Props get_dave, aduth, andraganescu, beaulebens, hellofromTonya, kevin940726, mamaduka, marekhrabe, mnelson4, noisysocks, obenland, ocean90, retrofox, shaunandrews, spacedmonkey, swissspidy, timothyblynjacobs, xknown, youknowriad. Fixes #54358. git-svn-id: https://develop.svn.wordpress.org/trunk@51973 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Support custom namespaces for taxonomies.Timothy Jacobs2021-11-01
| | | | | | | | | | | | | | | While a taxonomy can define a custom route by using the rest_base argument, a namespace of wp/v2 was assumed. This commit introduces support for a rest_namespace argument. A new rest_get_route_for_taxonomy_items function has been introduced and the rest_get_route_for_term function updated to facilitate getting the correct route for taxonomies. For maximum compatibility sticking with the default wp/v2 namespace is recommended until the API functions see wider use. Props spacedmonkey. Fixes #54267. See [51962]. git-svn-id: https://develop.svn.wordpress.org/trunk@51964 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Support custom namespaces for custom post types.Timothy Jacobs2021-10-31
| | | | | | | | | | | | | | While a custom post type can define a custom route by using the `rest_base` argument, a namespace of `wp/v2` was assumed. This commit introduces support for a `rest_namespace` argument. A new `rest_get_route_for_post_type_items` function has been introduced and the `rest_get_route_for_post` function updated to facilitate getting the correct route for custom post types. While the WordPress Core Block Editor bootstrap code has been updated to use these API functions, for maximum compatibility sticking with the default `wp/v2` namespace is recommended until the API functions see wider use. Props spacedmonkey, swissspidy. Fixes #53656. git-svn-id: https://develop.svn.wordpress.org/trunk@51962 602fd350-edb4-49c9-b593-d223f7449a82
* Role/Capability: Add support for capability queries in `WP_User_Query`.Pascal Birchler2021-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the existing `role`/`role__in`/`role__not_in` query arguments, this adds support for three new query arguments in `WP_User_Query`: * `capability` * `capability__in` * `capability__not_in` These can be used to fetch users with (or without) a specific set of capabilities, for example to get all users with the capability to edit a certain post type. Under the hood, this will check all existing roles on the site and perform a `LIKE` query against the `capabilities` user meta field to find: * all users with a role that has this capability * all users with the capability being assigned directly Note: In WordPress, not all capabilities are stored in the database. Capabilities can also be modified using filters like `map_meta_cap`. These new query arguments do NOT work for such capabilities. The prime use case for capability queries is to get all "authors", i.e. users with the capability to edit a certain post type. Until now, `'who' => 'authors'` was used for this, which relies on user levels. However, user levels were deprecated a long time ago and thus never added to custom roles. This led to constant frustration due to users with custom roles missing from places like author dropdowns. This updates any usage of `'who' => 'authors'` in core to use capability queries instead. Subsequently, `'who' => 'authors'` queries are being **deprecated** in favor of these new query arguments. Also adds a new `capabilities` parameter (mapping to `capability__in` in `WP_User_Query`) to the REST API users controller. Also updates `twentyfourteen_list_authors()` in Twenty Fourteen to make use of this new functionality, adding a new `twentyfourteen_list_authors_query_args` filter to make it easier to override this behavior. Props scribu, lgladdly, boonebgorges, spacedmonkey, peterwilsoncc, SergeyBiryukov, swissspidy. Fixes #16841. git-svn-id: https://develop.svn.wordpress.org/trunk@51943 602fd350-edb4-49c9-b593-d223f7449a82
* Application Passwords: Improve various user-facing and developer-facing ↵John Blackbourn2021-07-19
| | | | | | | | | terminology. Fixes #53503, #53691 git-svn-id: https://develop.svn.wordpress.org/trunk@51463 602fd350-edb4-49c9-b593-d223f7449a82
* Tests: Update the `wp-api-generated.js` fixture.Jonathan Desrosiers2021-07-06
| | | | | | | | | Follow up to [51241]. Props johnbillion. See #53606. git-svn-id: https://develop.svn.wordpress.org/trunk@51351 602fd350-edb4-49c9-b593-d223f7449a82
* Block Editor: Add the Site Logo block's server implementation.Riad Benguella2021-06-08
| | | | | | | | Props aristath, timothyblynjacobs, ocean90. Fixes #53247. git-svn-id: https://develop.svn.wordpress.org/trunk@51091 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add support for modifying the term relation when querying posts.Timothy Jacobs2021-05-26
| | | | | | | | | | | | By default, a post most contain any of the requested terms to be included in the response. This commit adds a new `operator` property that can be set to `AND` to require a post to contain all of the requested terms. For example, `/wp/v2/posts?tags[terms]=1,2,3&tags[operator]=AND` will return posts that have tags with the ids of 1, 2, and 3. Props dlh, earnjam, Clorith, jnylen0, sebbb. Fixes #41287. git-svn-id: https://develop.svn.wordpress.org/trunk@51026 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add widget endpointsRobert Anderson2021-05-25
| | | | | | | | | | | Adds the sidebars, widgets and widget-types REST API endpoints from the Gutenberg plugin. Fixes #41683. Props TimothyBlynJacobs, spacedmonkey, zieladam, jorgefilipecosta, youknowriad, kevin940726. git-svn-id: https://develop.svn.wordpress.org/trunk@50995 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Revert widget endpointsRobert Anderson2021-05-25
| | | | | | | | | | Reverts [50993] as it has missing props. Reverts [50993]. See #41683. git-svn-id: https://develop.svn.wordpress.org/trunk@50994 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add widget endpointsRobert Anderson2021-05-25
| | | | | | | | | | | Adds the sidebars, widgets and widget-types REST API endpoints from the Gutenberg plugin. Fixes #41683. Props TimothyBlynJacobs. git-svn-id: https://develop.svn.wordpress.org/trunk@50993 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Enqueue script and style assets only for blocks present on the pageGreg Ziółkowski2021-05-11
| | | | | | | | | | | | | Adds styles for individual core blocks to make it possible to render only styles for those blocks that are rendered on the page (frontend). This is optinal functionality for start that can be controlled with the new `separate_core_block_assets` filter. In addition to that, styles can be inlined when `path` is passed when registering an individual styles. This functionality can be changed with the new `styles_inline_size_limit` filter. The maximum size of inlined styles in bytes defaults to 20 000. Props aristath, aduth, westonruter, mcsf. Fixes #50328, #52620. git-svn-id: https://develop.svn.wordpress.org/trunk@50836 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Update WordPress packages to use with WordPress 5.8Greg Ziółkowski2021-04-15
| | | | | | | | | | | | | In the response to the discussion during the Dev Chat, I'm doing a first pass to keep WordPress packages up to date in the WordPress 5.8 release cycle. See https://github.com/WordPress/wordpress-develop/pull/1176 for more details. Props youknowriad, aristath, andraganescu. See #52991. git-svn-id: https://develop.svn.wordpress.org/trunk@50761 602fd350-edb4-49c9-b593-d223f7449a82
* Build/Test & External Libraries : Fix jQuery deprecation.Aaron Jorbin2021-03-31
| | | | | | | | | jQuery.isArray is deprecated. Array.isArray is safe and used in other parts of the code base. See: #51812 git-svn-id: https://develop.svn.wordpress.org/trunk@50627 602fd350-edb4-49c9-b593-d223f7449a82
* Build/Test Tools: Switch back to running the PHPUnit test suite against the ↵John Blackbourn2021-02-26
| | | | | | | | | | | | | | | | | | `src` directory instead of `build`. Some PHPUnit tests were concerned with the state of files in the `build` directory. In order to allow the tests to run without requiring a build to be run first, these have been moved into assertions that run after the build step (and therefore cause it to fail if they do not pass), or into QUnit tests as necessary. Various other PHPUnit tests implictly depend on built JavaScript files being present. These files are now touched during the test setup to avoid PHP warnings if the `build` files are not present. The `wp-tests-config-sample.php` file and the GitHub Actions configuration have also been changed so `ABSPATH` uses `src` instead of `build`, therefore allowing the PHPUnit tests to be run without a build having to be run first. This means all new local installations of WordPress will use `src` for PHPUnit testing. If you would like to switch your existing installation over then change the location of `ABSPATH` in `wp-tests-config.php` to point to `src` instead of `build`. Props peterwilsoncc, iandunn, gziolo, desroj, johnbillion Fixes #51734 See #45863 git-svn-id: https://develop.svn.wordpress.org/trunk@50441 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Allow for the posts endpoint include/exclude terms query to ↵Timothy Jacobs2021-02-02
| | | | | | | | | | | | `include_children`. For example the `categories` or `categories_exclude` parameters can now optionally accept an object with a `terms` property that accepts the list of term ids and a new `include_children` property which controls the Tax Query `include_children` field. Props jason_the_adams, jnylen0, birgire, dlh. Fixes #39494. git-svn-id: https://develop.svn.wordpress.org/trunk@50157 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Update @wordpress npm packagesRobert Anderson2021-02-02
| | | | | | | | | | Update @wordpress npm packages to the latest published versions. This means that the block editor includes functionality that exists in Gutenberg 9.9. Fixes #52334. git-svn-id: https://develop.svn.wordpress.org/trunk@50137 602fd350-edb4-49c9-b593-d223f7449a82
* Security, Site Health: Improve accuracy in messaging about HTTPS support.Felix Arntz2021-01-29
| | | | | | | | | | | | | | | | | Following up on [49904], this changeset focuses mainly on improving the guidance about the current state of HTTPS in Site Health. * Correct the existing copy to indicate that both the Site Address and the WordPress Address need to be changed to fully switch to HTTPS. * Link to the respective input fields via anchor links rather than to the overall General Settings screen. * Show different copy if the site is using HTTPS for the WordPress Address (for example to have only the administration panel in HTTPS), but not for the Site Address. * Inform the user about potential problems even when the site is already using HTTPS, for example if the SSL certificate was no longer valid. * Always rely on fresh information for determining HTTPS support issues in Site Health, and therefore change the `https_status` test to become asynchronous. * Rename the new private `wp_is_owned_html_output()` function to a more appropriate `wp_is_local_html_output()`. Props adamsilverstein, flixos90, johnjamesjacoby, timothyblynjacobs. See #47577. git-svn-id: https://develop.svn.wordpress.org/trunk@50072 602fd350-edb4-49c9-b593-d223f7449a82
* App Passwords: Introduce introspection endpoint.Timothy Jacobs2021-01-29
| | | | | | | | | | This introduces a new endpoint, `wp/v2/users/me/application-passwords/introspect`, that will return details about the App Password being used to authenticate the current request. This allows for an application to disambiguate between multiple installations of their application which would all share the same `app_id`. Props xkon, peterwilsoncc, TimothyBlynJacobs. Fixes #52275. git-svn-id: https://develop.svn.wordpress.org/trunk@50065 602fd350-edb4-49c9-b593-d223f7449a82
* App Passwords: Improve validation and sanitization of the application name.Timothy Jacobs2021-01-27
| | | | | | | | | | Application names are now required to be unique and cannot contain solely whitespace characters. Additionally, invalid characters are now stripped from the application name using `sanitize_text_field()`. Props Boniu91, hellofromTonya, engahmeds3ed, xkon, francina. Fixes #51941. git-svn-id: https://develop.svn.wordpress.org/trunk@50030 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Introduce `modified_before` and `modified_after` query parameters ↵John Blackbourn2021-01-26
| | | | | | | | | | | | | for the posts endpoints. These parameters work just the same as `before` and `after` except they operate on the post modified date instead of the post published date. Props claytoncollie, TimothyBlynJacobs, hellofromTonya Fixes #50617 git-svn-id: https://develop.svn.wordpress.org/trunk@50024 602fd350-edb4-49c9-b593-d223f7449a82