summaryrefslogtreecommitdiffstatshomepage
path: root/tests/qunit
Commit message (Collapse)AuthorAge
* REST API: Change posts endpoint to ignore_sticky=true by defaultAaron Jorbin43 hours
| | | | | | | | | | | | This restores the 6.7 and below behavior for the posts endpoint which did not include sticky posts by default. Follow-up to [59801]. Props nikunj8866, SirLouen, ankitmaru, wildworks, karthikeya01, Mamaduka, spacedmonkey, jorbin. Fixes #63307. See #35907. git-svn-id: https://develop.svn.wordpress.org/trunk@60197 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add support for `search_columns` to the user endpoint.Joe McGill2025-02-28
| | | | | | | | | | This adds support for passing a `search_columns` argument to the user controller so that users with `list_users` caps can specify which field is being searched. Props youknowriad, joemcgill, ntsekouras, mreishus, mamaduka. Fixes 62596. git-svn-id: https://develop.svn.wordpress.org/trunk@59892 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add the site reading options to the index.George Mamadashvili2025-02-27
| | | | | | | | | Exposes `page_for_posts`, `page_on_front` and `show_on_front` reading settings via REST API index. Props mamaduka, audrasjb, spacedmonkey, timothyblynjacobs. Fixes #63023. git-svn-id: https://develop.svn.wordpress.org/trunk@59880 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add support for the `ignore_sticky_posts` argument.Peter Wilson2025-02-10
| | | | | | | | | | | Introduce `ignore_sticky` as a boolean argument for the posts endpoint for requests without the sticky posts being stuck. The new argument defaults to `false` with the value of the argument passed to `WP_Query`'s `ignore_sticky_posts` parameter. Props audrasjb, danielbachhuber, joemcgill, johnbillion, jorbin, mamaduka, rmccue. Fixes #35907. git-svn-id: https://develop.svn.wordpress.org/trunk@59801 602fd350-edb4-49c9-b593-d223f7449a82
* Administration: Remove useless arrow icon from WordPress admin menu.Jb Audras2025-01-22
| | | | | | | | | | | | This changeset deletes the arrow that is typically added next to WordPress admin menu items that have submenus. The `.wp-menu-arrow` element is no longer visible since the WP 3.8 redesign, but the HTML and CSS remained. With this changeset, the HTML generating the arrow is removed, and the corresponding CSS styling is deleted. Props helen, azaozz, jbkkd, pbearne, flixos90. Fixes #26960. git-svn-id: https://develop.svn.wordpress.org/trunk@59690 602fd350-edb4-49c9-b593-d223f7449a82
* Privacy: Use SHA-256 hashing algorithm for Gravatar.Sergey Biryukov2024-12-17
| | | | | | | | | | | This aims to improve privacy by switching to a more secure algorithm, as an MD5 string can be reversed. Follow-up to [6748], [31107]. Props henry.wright, jucaduca, haozi, desrosj, dd32, SergeyBiryukov. See #60638. git-svn-id: https://develop.svn.wordpress.org/trunk@59532 602fd350-edb4-49c9-b593-d223f7449a82
* REST API/Editor: Support post formats in Query Block & Posts API.Peter Wilson2024-09-30
| | | | | | | | | | | | Introduces post format support for both the Query Block with the new parameter `format`. In the `build_query_vars_from_query_block()` function, this is converted to a `post_format` taxonomy query passed to `WP_Query`. Also introduces the `format` parameter to the REST API's Posts controller to support the feature in the Query block. The parameter type is an enumerated string accepted the post formats supported by each post type. Props poena, mukesh27, mamaduka, noisysocks, TimothyBlynJacobs. Fixes #62014. git-svn-id: https://develop.svn.wordpress.org/trunk@59115 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Support exact search in the REST API posts endpoint.Felix Arntz2024-09-17
| | | | | | | | | | This changeset adds support for a new `search_semantics` enum query parameter that can be passed alongside the `search` string parameter. At this point, it only supports "exact" as possible value, but an enum is used for forward compatibility with potential enhancements like "sentence" search support. If `search_semantics=exact` is passed, it will look for an exact match rather than do a full text search, which for some use-cases is more appropriate and more performant. Props mehulkaklotar, timothyblynjacobs, jimmyh61, ironprogrammer, johnregan3, mukesh27, costdev. Fixes #56350. git-svn-id: https://develop.svn.wordpress.org/trunk@59034 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Automatically populate targetHints for the Allow header.Timothy Jacobs2024-09-17
| | | | | | | | | | | | The REST API uses the "Allow" header to communicate what methods a user is authorized to perform on a resource. This works great when operating on a single item route, but can break down when needing to determine authorization over a collection of items. This commit uses the "targetHints" property of JSON Hyper Schema to provide access to the "allow" header for "self" links. This alleviates needing to make a separate network request for each item in a collection. Props mamaduka, noisysocks, peterwilsoncc, spacedmonkey, swissspidy, timothyblynjacobs, tyxla, youknowriad. Fixes #61739. git-svn-id: https://develop.svn.wordpress.org/trunk@59032 602fd350-edb4-49c9-b593-d223f7449a82
* Users: Always use HTTPS URLs for Gravatar links.Peter Wilson2024-07-29
| | | | | | | | | | | | | | | Modifies gravatar image URLs to always use the HTTPS version from secure.gravatar.com. Gravatar now redirects HTTP image requests to their HTTPS equivalent, resulting in redirects for sites running over an HTTP connection (`is_ssl() === false`). Since the introduction of HTTP/2 the use of sub-domains for different hashes ([1-3].gravatar.com) now represents a performance hinderance rather than improvement. The scheme passed to `get_avatar_data()` is now ignored for the generation of Gravatar URLs but the setting retained to avoid introducing bugs for sites using either local avatars or third party providers. Props neoxx, SergeyBiryukov, sippis, peterwilsoncc, mukesh27, costdev, dd32. Fixes #37454. git-svn-id: https://develop.svn.wordpress.org/trunk@58822 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add template and template_lock to post types endpoint.Jorge Costa2024-06-21
| | | | | | | | | | Adds template and template_lock property of the post type to post types REST API endpoint. This change allows us to fix a bug where the template of a page is not respected when creating a new page on the site editor. Props jorgefilipecosta, oandregal, timothyblynjacobs, mukesh27. Fixes #61477. git-svn-id: https://develop.svn.wordpress.org/trunk@58452 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: improve code quality for class_list field fixtures.André2024-06-05
| | | | | | | | | | Follow-up to [58326], #61360. Props antonvlasenko, oandregal. Fixes #61369. git-svn-id: https://develop.svn.wordpress.org/trunk@58340 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Add theme.json v3 migrations.Ella2024-06-04
| | | | | | | | | | | | | | | | | | See https://github.com/WordPress/wordpress-develop/pull/6616. See also the original Gutenberg PRs: * https://github.com/WordPress/gutenberg/pull/58409 * https://github.com/WordPress/gutenberg/pull/61328 * https://github.com/WordPress/gutenberg/pull/61842 * https://github.com/WordPress/gutenberg/pull/62199 * https://github.com/WordPress/gutenberg/pull/62252 Fixes #61282. Props ajlende, talldanwp, ramonopoly, ellatrix. git-svn-id: https://develop.svn.wordpress.org/trunk@58328 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add post class list field.Ella2024-06-04
| | | | | | | | | | | | | See https://github.com/WordPress/gutenberg/pull/60642. See https://github.com/WordPress/wordpress-develop/pull/6716. Fixes #61360. Props antonvlasenko, timothyblynjacobs, ellatrix, oandregal. git-svn-id: https://develop.svn.wordpress.org/trunk@58326 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add batch support to the Users API.Timothy Jacobs2024-06-02
| | | | | | | | | | Developers can now include /wp/v2/users routes when making a batch API request. Props alexminza, timothyblynjacobs, mukesh27. Fixes #60895. git-svn-id: https://develop.svn.wordpress.org/trunk@58283 602fd350-edb4-49c9-b593-d223f7449a82
* Tests: Update the generated fixture for REST APIGreg Ziółkowski2024-05-29
| | | | | | | | | | Follow-up [58227]. See #61137. git-svn-id: https://develop.svn.wordpress.org/trunk@58232 602fd350-edb4-49c9-b593-d223f7449a82
* Options: Add 'label' argument to register_setting.Ella2024-05-29
| | | | | | | | | | | | | | The 'label' will displayed to users when editing core or custom settings via block editors. It avoids hardcoding Settings labels and improves extensibility. Backports https://github.com/WordPress/gutenberg/pull/59243. Props mamaduka, timothyblynjacobs, ellatrix. Fixes #61023. git-svn-id: https://develop.svn.wordpress.org/trunk@58230 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Refactor global styles endpoints in REST API to register with post ↵Pascal Birchler2024-05-28
| | | | | | | | | | | | | type. Updated the global styles endpoints in the REST API to extend from existing posts and revisions controllers. This reduces duplicated code and inconsistencies. The revisions controller is now a subclass of the `WP_REST_Revisions_Controller`. Related redundant methods were removed and schema generation and collection parameters were adjusted to suit the global styles context. Updated permission checks, constructor, and collection parameters accordingly. This change allows for easy override of these classes using the `register_post_type_args` filter. This reintroduces [57624] (reverted in [57628]) with improved backward compatibility and further enhancements. Props ramonopoly, spacedmonkey, mukesh27, swissspidy. Fixes #60131. git-svn-id: https://develop.svn.wordpress.org/trunk@58225 602fd350-edb4-49c9-b593-d223f7449a82
* Build/Test Tools: Update REST API fixtures after [58211].Pascal Birchler2024-05-27
| | | | | | See #41172. git-svn-id: https://develop.svn.wordpress.org/trunk@58216 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Add `excerpt` support to the `wp_block` post type.Sergey Biryukov2024-05-23
| | | | | | | | | | | | | | | | The purpose is to enable using the excerpt as a description for user-created patterns on the Site Editor Pattern screens. This commit backports the original PR from Gutenberg repository: * [[https://github.com/WordPress/gutenberg/pull/60549|#60549: [Data Views] User patterns: Use excerpt as description]] Reference: [[https://github.com/WordPress/gutenberg/issues/55244|#55244: Patterns: Add descriptions to user-created patterns]]. Follow-up to [44146], [44150], [50835], [56030]. Props poena, ntsekouras, krupalpanchal. Fixes #61250. git-svn-id: https://develop.svn.wordpress.org/trunk@58184 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: allow overriding excerpt length.Pascal Birchler2024-04-30
| | | | | | | | | This can be used by the excerpt block in the editor to change the excerpt length without filtering `excerpt_length` in a conflicting way. This enhancement still needs a corresponding change on the Gutenberg side. Props swissspidy, antonvlasenko, mukesh27, azaozz, andraganescu, timothyblynjacobs. Fixes #59043. git-svn-id: https://develop.svn.wordpress.org/trunk@58065 602fd350-edb4-49c9-b593-d223f7449a82
* I18N: Actually add all the files for [58061], not just the test fixtures.Pascal Birchler2024-04-30
| | | | | | | | | | | | | | Improve support for using only PHP translation files. This builds on top of the PHP translation file support added in WordPress 6.5, improving the behavior for projects using solely `.l10n.php` translation files and no `.mo.` and `.po` files. Updates `wp_get_installed_translations()`, which is used when updating language packs and when uninstalling plugins/themes (to remove the translations again), to look for PHP translation files and read metadata from them. Additionally, the file lookup is now cached thanks to using `WP_Textdomain_Registry`. Updates `Language_Pack_Upgrader::check_package()` to allow language packs that only contain PHP translation files. While WordPress.org continues to serve `.mo` and `.po` files, third-party services might want to only use the PHP file format. See #60554. git-svn-id: https://develop.svn.wordpress.org/trunk@58062 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Fix various typos and spelling mistakes.Pascal Birchler2024-04-12
| | | | | | | Props swissspidy, jucaduca, sergeybiryukov. See #60699. git-svn-id: https://develop.svn.wordpress.org/trunk@57987 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Revert the refactor of global styles endpoints in REST API in [57624].David Baumwald2024-02-13
| | | | | | | | | | [57624] introduced some E2E test failures which are the result of an incompatibility with the Gutenberg plugin. Props jorbin, spacedmonkey, swissspidy, hellofromTonya, youknowriad, costdev. See #60131. git-svn-id: https://develop.svn.wordpress.org/trunk@57628 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Refactor global styles endpoints in REST API to register with post ↵Jonny Harris2024-02-13
| | | | | | | | | | | type. Updated the global styles endpoints in the REST API to extend from existing posts and revisions controllers. This reduces duplicated code and inconsistencies. The revisions controller is now a subclass of the WP_REST_Revisions_Controller. Related redundant methods were removed and schema generation and collection parameters were adjusted to suit the global styles context. Updated permission checks, constructor, and collection parameters accordingly. This change allows for easy override of these classes using the `register_post_type_args` filter. Props ramonopoly, spacedmonkey, mukesh27. Fixes #60131. git-svn-id: https://develop.svn.wordpress.org/trunk@57624 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add `featured_media` field to attachments endpoint.Pascal Birchler2024-02-12
| | | | | | | | | Audio and video attachments can have a featured image, also known as a poster image. This functionality is now properly exposed by the `wp/v2/media` endpoint. Props swissspidy, timothyblynjacobs, wonderboymusic, dlh, spacedmonkey. Fixes #41692. git-svn-id: https://develop.svn.wordpress.org/trunk@57603 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Introduce the necessary endpoints for the font library.Riad Benguella2024-02-07
| | | | | | | | | | This commits add three endpoints to retrieve and manipulate fonts in WordPress. This commit also means that we now have a fully functional Font Library in the site editor. Props get_dave, youknowriad, mmaattiiaass, grantmkin, swissspidy, mcsf, jorbin, ocean90. See #59166. git-svn-id: https://develop.svn.wordpress.org/trunk@57548 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add route for single styles revisions.Riad Benguella2024-01-31
| | | | | | | | | | Adds a route for single global styles revisions: /wp/v2/global-styles/${ parentId }/revisions/${ revisionsId } This fixes the `getRevision` actions in the core-data package. Props ramonopoly, get_dave. Fixes #59810. git-svn-id: https://develop.svn.wordpress.org/trunk@57494 602fd350-edb4-49c9-b593-d223f7449a82
* Taxonomy: Set "public" to "false" for user pattern categories.Tonya Mork2023-11-01
| | | | | | | | | | | Changes the `'wp_pattern_category'` taxonomy's `'public'` argument to `false`. Follow-up to [56642]. Props vrajadas, glendaviesnz, hellofromTonya, ramonopoly. Fixes #59569. git-svn-id: https://develop.svn.wordpress.org/trunk@57044 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Fix issue with Template and Template Part Revision/Autosave REST ↵Jonny Harris2023-10-10
| | | | | | | | | | | | | | | | | | | API controllers. The Template and Template Part REST API controllers have unique characteristics compared to other post type REST API controllers. They do not rely on integer IDs to reference objects; instead, they use a combination of the theme name and slug of the template, like 'twentytwentyfour//home.' Consequently, when the post types template and template part were introduced in [52062], it led to the registration of REST API endpoints for autosaves and revisions with invalid URL structures. In this commit, we introduce new functionality to enable custom autosave and revisions endpoints to be registered at the post type level. Similar to the 'rest_controller_class' parameter, developers can now define 'revisions_rest_controller' and 'autosave_rest_controller.' This empowers developers to create custom controllers for these functionalities. Additionally, we introduce a 'late_route_registration' parameter, which proves helpful when dealing with custom URL patterns and regex pattern matching issues. This commit registers new classes for template and template part autosave and revisions controllers, differentiating them from standard controllers in the following ways: * The response shape now matches that of the template controller. * Permission checks align with the template controller. * A custom URL pattern is introduced to support slug-based identification of templates. Furthermore, we've updated the utility function '_build_block_template_result_from_post' to support passing revision post objects. This enhancement ensures compatibility with the custom revisions controller. Props spacedmonkey, revgeorge, andraganescu, hellofromTonya, antonvlasenko, kadamwhite, ironprogrammer, costdev, mukesh27, timothyblynjacobs, adamsilverstein. Fixes 56922. git-svn-id: https://develop.svn.wordpress.org/trunk@56819 602fd350-edb4-49c9-b593-d223f7449a82
* Revisions: framework for storing post meta revisions.Adam Silverstein2023-09-26
| | | | | | | | | | | | | | | | | | | | | | Enable the storing of post meta in revisions including autosaves and previews: Add a new argument `revisions_enabled` to the `register_meta` function which enables storing meta in revisions. Add a new `wp_post_revision_meta_keys` filter which developers can use to control which meta is revisioned - it passes an array of the meta keys with revisions enabled as well as the post type. Meta keys with revisions enabled are also stored for autosaves, and are restored when a revision or autosave is restored. In addition, meta values are now stored with the autosave revision used for previews. Changes to meta can now be previewed correctly without overwriting the published meta (see #20299) or passing data as a query variable, as the editor currently does to preview changes to the featured image. Changes to meta with revisions enabled are considered when determining if a new revision should be created. A new revision is created if the meta value has changed since the last revision. Revisions are now saved on the `wp_after_insert_post` hook instead of `post_updated`. The `wp_after_insert_post` action is fired after post meta has been saved by the REST API which enables attaching meta to the revision. To ensure backwards compatibility with existing action uses, `wp_save_post_revision_on_insert` function exits early if plugins have removed the previous `do_action( 'post_updated', 'wp_save_post_revision' )` call. Props: alexkingorg, johnbillion, markjaquith, WraithKenny, kovshenin, azaozz, tv-productions, p51labs, mattheu, mikeschroder, Mamaduka, ellatrix, timothyblynjacobs, jakemgold, bookwyrm, ryanduff, mintindeed, wonderboymusic, sanchothefat, westonruter, spacedmonkey, hellofromTonya, drewapicture, adamsilverstein, swisspiddy. Fixes #20564, #20299. git-svn-id: https://develop.svn.wordpress.org/trunk@56714 602fd350-edb4-49c9-b593-d223f7449a82
* Taxonomy: add taxonomy for user pattern categories.Isabel Brison2023-09-21
| | | | | | | | | | Adds a `wp_pattern_category` taxonomy linked to the `wp-block` object. Props glendaviesnz, kebbet, desrosj, mamaduka. Fixes #59379. git-svn-id: https://develop.svn.wordpress.org/trunk@56642 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: load title on navigation fallback.Isabel Brison2023-07-25
| | | | | | | | | | | Adds raw title property when loading the navigation fallback with an embed context. Props ramonopoly, get_dave, scruffian, mukesh27, audrasjb. Fixes #58557. git-svn-id: https://develop.svn.wordpress.org/trunk@56296 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: add revisions endpoint for global styles.Isabel Brison2023-06-28
| | | | | | | | | | Adds an endpoint that returns revisions to the global styles custom post. Props ramonopoly, peterwilsoncc, spacedmonkey, mukesh27, timothyblynjacobs. Fixes #58524. git-svn-id: https://develop.svn.wordpress.org/trunk@56082 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: add navigation fallback.Isabel Brison2023-06-27
| | | | | | | | | | Creates a fallback menu for the Navigation block including an API endpoint to retrieve it. Props get_dave, spacedmonkey, kebbet, flixos90, mikeschroder, ramonopoly, audrasjb. Fixes 58557. git-svn-id: https://develop.svn.wordpress.org/trunk@56052 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: rename reusable blocks to patterns.Isabel Brison2023-06-26
| | | | | | | | | | Renames the Reusable blocks to Patterns and adds an option to convert a block or collection of blocks to a non-synced Pattern. Props glendaviesnz, ramonopoly, peterwilsoncc, timothyblynjacobs, flixos90. Fixes #58577. git-svn-id: https://develop.svn.wordpress.org/trunk@56030 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Support non-Latin characters in template route regex.Daniel Bachhuber2023-02-07
| | | | | | | | | | Non-Latin characters are URL-encoded (e.g. `%cf%84%ce%b5%cf%83%cf%84`). Matching `%` in the route ensures templates with non-Latin titles can be properly saved. Props antonyagrios, mburridge. Fixes #57329. git-svn-id: https://develop.svn.wordpress.org/trunk@55294 602fd350-edb4-49c9-b593-d223f7449a82
* Query: Add a `search_columns` argument to control which fields are searched ↵Jb Audras2023-02-07
| | | | | | | | | | | | in a search query. Previously, the `s` argument of the `WP_Query::parse_query()` method searched the `post_title`, `post_excerpt`, and `post_content` fields, with no way of controlling this apart from using the `posts_search` filter and adjusting the SQL manually. This changeset adds the ability to specify which fields are searched when performing a query, using the `search_columns` argument. Props johnbillion, birgire, petitphp, audrasjb, costdev, mukesh27. Fixes #43867. git-svn-id: https://develop.svn.wordpress.org/trunk@55248 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Adds pagination and ordering support to ↵Tonya Mork2023-01-24
| | | | | | | | | | | | | | | | `WP_REST_Pattern_Directory_Controller`. Adds pagination and ordering support to `WP_REST_Pattern_Directory_Controller` by allow listing `'per_page'`, `'page'`, `'offset'`, `'order'`, and `'orderby'` query parameters. This change enables pagination and ordering features in the pattern directory explorer by using the same sort as wordpress.org/patterns. Reference: * [https://github.com/WordPress/gutenberg/pull/45293 Gutenberg PR 45293] Follow-up to [55098], [51206], [51021]. Props ntsekouras, ryelle, arrasel403, hellofromTonya, ironprogrammer, mukesh27, robinwpdeveloper. Fixes #57501. git-svn-id: https://develop.svn.wordpress.org/trunk@55132 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Remove leading whitespace from some translated strings.David Baumwald2022-09-29
| | | | | | | | | | | Merges [https://github.com/WordPress/gutenberg/pull/44314 Gutenberg PR #44314] into trunk. Follow-up to [54263] and [54269]. Props kebbet, bernhard-reiter. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54356 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Add has_archive property to the post types REST endpoint.Jorge Costa2022-09-21
| | | | | | | | | Backports PHP changes in WordPress/gutenberg#42746 to the core. Adds a has_archive field to the post types endpoint. Props mcsf, ntsekouras, oandregal. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54273 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Adds template types, `is_wp_suggestion`, and fallback template content.Tonya Mork2022-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit improves site editor templates by: * Adds a post meta `is_wp_suggestion` to templates created from the site editor. Why? To differentiate the templates created from the post editor in the Template panel in inspector controls and the templates suggested in site editor. See [https://github.com/WordPress/gutenberg/pull/41387 Gutenberg PR 41387] for more details. * Expands the template types that can be added to the site editor to include single custom post type and specific posts templates. See [https://github.com/WordPress/gutenberg/pull/41189 Gutenberg PR 41189] for more details. * Adds fallback template content on creation in site editor: * Introduces `get_template_hierarchy()` to get the template hierarchy for a given template slug to be created. * Adds a `lookup` route to `WP_REST_Templates_Controller` to get the fallback template content. See [https://github.com/WordPress/gutenberg/pull/42520 Gutenberg PR 42520] for more details. * Fixes a typo in default category template's description within `get_default_block_template_types()`. See [https://github.com/WordPress/gutenberg/pull/42586 Gutenberg PR 42586] for more details. * Changes field checks from `in_array()` to `rest_is_field_included()` in `WP_REST_Post_Types_Controller`. * Adds an `icon` field to `WP_REST_Post_Types_Controller` Follow-up to [53129], [52331], [52275], [52062], [51962], [43087]. Props ntsekouras, spacedmonkey, mamaduka, mburridge, jameskoster, bernhard-reiter, mcsf, hellofromTonya. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54269 602fd350-edb4-49c9-b593-d223f7449a82
* Media: Change alt attribute field to textarea in media library.Joe Dolson2022-09-20
| | | | | | | | | | | Change the input field used for `alt` attributes in the media library views from a text input to a textarea. This gives users more flexibility in resizing the field for easier management of longer alt attributes. This patch includes a less-common use of `esc_attr` for a `textarea`. This is because the primary usage of the `alt` attribute will be escaped using `esc_attr`, and the value in editing should match the value output on the front end. Props edent, sabernhardt, afercia, JavierCasares, audrasjb, joedolson. Fixes #50066. git-svn-id: https://develop.svn.wordpress.org/trunk@54243 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add support for searching resources by id.Timothy Jacobs2022-09-11
| | | | | | | | | | This brings support for the `include` and `exclude` collection parameters to the Search Controller. This can be used to find an item by id when it's subtype is unknown. Props kadamwhite. Fixes #56546. git-svn-id: https://develop.svn.wordpress.org/trunk@54123 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add the missing `site_icon_url` to the index.Sergey Biryukov2022-09-06
| | | | | | | | | | | | | | The `site_icon_url` index was supposed to ship with WordPress 5.6, but was [https://github.com/WordPress/gutenberg/pull/22952 never backported to core]. This commit backports the original PR from Gutenberg repository: * [https://github.com/WordPress/gutenberg/pull/42957 #42957: REST API: Add the missing 'site_icon_url' to the index] Follow-up to [52080]. Props Mamaduka, bernhard-reiter, TimothyBlynJacobs. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54083 602fd350-edb4-49c9-b593-d223f7449a82
* Site Health: Introduce page cache check.Felix Arntz2022-08-31
| | | | | | | | | | | | | | | | This changeset adds a new `page_cache` check which determines whether the site uses a full page cache, and in addition assesses the server response time. If no page cache is present and the server response time is slow, the check will suggest use of a page cache. A few filters are included for customization of the check: * `site_status_good_response_time_threshold` filters the number of milliseconds below which the server response time is considered good. The default value is based on the `server-response-time` Lighthouse audit and can be altered using this filter. * `site_status_page_cache_supported_cache_headers` filters the map of supported cache headers and their callback to determine whether it was a cache hit. The default list includes commonly used cache headers, and it is filterable to support e.g. additional cache headers used by specific vendors. Note that due to the nature of this check it is only run in production environments. Props furi3r, westonruter, spacedmonkey, swissspidy, Clorith. Fixes #56041. git-svn-id: https://develop.svn.wordpress.org/trunk@54043 602fd350-edb4-49c9-b593-d223f7449a82
* Administration: Change default site tagline to an empty string.Jb Audras2022-08-03
| | | | | | | | | | | | | | | | This changeset replaces the default "Just another WordPress site" tagline with an empty string for new installations. The reasoning is: 1. Not all themes display the tagline; 2. Not everyone changes the default tagline; 3. When people don't see the tagline in their theme, they may not realize it is still visible in some places, like feeds. The string "Just another WordPress site" and the related multisite string: "Just another {NETWORK} site" are now only used as a placeholder for the tagline admin option. Props markjaquith, Denis-de-Bernardy, westi, RyanMurphy, kovshenin, SergeyBiryukov, chriscct7, tyxla, hyperbrand, karmatosed, lukecavanagh, melchoyce, boemedia, khag7, sabernhardt, audrasjb, peterwilsoncc, costdev, martinkrcho, rafiahmedd. Fixes #6479. git-svn-id: https://develop.svn.wordpress.org/trunk@53815 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Use the `integer` type for `page_on_front` and `page_for_posts` ↵Sergey Biryukov2022-06-29
| | | | | | | | | | | | options. This adjusts the newly added options in the settings endpoint to use the `integer` type instead of `number`. Since these are page IDs and are not supposed to be floats, `integer` is the correct type. Follow-up to [53588]. See #56058. git-svn-id: https://develop.svn.wordpress.org/trunk@53589 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Add missing options to the settings endpoint.Sergey Biryukov2022-06-29
| | | | | | | | | | | | This adds the `show_on_front`, `page_on_front`, and `page_for_posts` options to the settings endpoint that were missed during WP 6.0 backports. Related PR from Gutenberg repository: * [https://github.com/WordPress/gutenberg/pull/38607 #38607 Page for Posts: Display notice in template panel] Props Mamaduka, spacedmonkey, gziolo, jameskoster. See #56058. git-svn-id: https://develop.svn.wordpress.org/trunk@53588 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Fixes `/wp/v2/pattern-directory/patterns` endpoint response for ↵Tonya Mork2022-05-02
| | | | | | | | | | | | | | | | | | `slug` parameter. [53218] introduced a bug of a wrong response from the `wp/v2/pattern-directory/patterns` endpoint with a `slug` parameter. As the response is cached, it can result in an incorrect list of available patterns supported by the current theme. This commit resolves by: * Limiting the `slug` to an `array` in the query parameters. * When set, parsing and sorting the slug(s) and then serializing the sorted query args as part of the hashed transient keys. Props antonvlasenko, timothyblynjacobs, spacedmonkey, costdev, hellofromTonya. Follow-up to [53218], [53152], [51208]. Fixes #55617. git-svn-id: https://develop.svn.wordpress.org/trunk@53333 602fd350-edb4-49c9-b593-d223f7449a82