Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1bf6b0f
Add the core/media-query ability
jorgefilipecosta Oct 1, 2026
38795f9
Gate core/media-query behind the Custom Abilities experiment
jorgefilipecosta Oct 1, 2026
10bd2f1
Port the core REST attachment read tests
jorgefilipecosta Oct 1, 2026
1e58951
Add ability tests for core/media-query
jorgefilipecosta Oct 1, 2026
78673ec
Add an e2e spec for core/media-query
jorgefilipecosta Oct 1, 2026
1335f31
Port the core get item params test
jorgefilipecosta Oct 2, 2026
e39950e
Skip the password check on items the user can edit in the edit context
jorgefilipecosta Oct 2, 2026
c1cc367
Keep the password gate on generated captions in the edit context
jorgefilipecosta Oct 2, 2026
8540caa
Deny every request when attachments are hidden from REST
jorgefilipecosta Oct 2, 2026
1da9b8c
Leave the media type enum out when no MIME types are allowed
jorgefilipecosta Oct 2, 2026
f69317e
Remove the temporary filters even when a callback throws
jorgefilipecosta Oct 2, 2026
d03481d
Reset a bound global post instead of unsetting it
jorgefilipecosta Oct 2, 2026
5b0cf4f
Validate collection items against the item schema
jorgefilipecosta Oct 2, 2026
57b6e97
Correct the page and totals descriptions
jorgefilipecosta Oct 2, 2026
377b85f
Check that a gated caption does not reveal the description
jorgefilipecosta Oct 2, 2026
5345709
Fix a data set label
jorgefilipecosta Oct 2, 2026
471cc5a
Check the status code of a forbidden status list
jorgefilipecosta Oct 2, 2026
722a3d7
Stop sweeping uploads the tests never add
jorgefilipecosta Oct 2, 2026
56fa89a
Drop e2e filters the PHPUnit tests already cover
jorgefilipecosta Oct 2, 2026
7e3af1d
Fold the unknown field test into the unsupported input cases
jorgefilipecosta Oct 2, 2026
a0a279d
Drop the title search test the file name search port covers
jorgefilipecosta Oct 2, 2026
00abc5d
Drop string inputs the ported tests already cover
jorgefilipecosta Oct 2, 2026
ee7dff4
Merge the params subset test into its port
jorgefilipecosta Oct 2, 2026
9c97da8
Let create_fixture take post fields and use it for inline fixtures
jorgefilipecosta Oct 2, 2026
c407d60
Use the REST test case's error assertion
jorgefilipecosta Oct 2, 2026
afb11db
Register the category through the ability's own fallback in tests
jorgefilipecosta Oct 2, 2026
ae362ba
Reject unknown output properties like the sibling abilities
jorgefilipecosta Oct 2, 2026
8f1916c
Restore the global post the way the content ability does
jorgefilipecosta Oct 2, 2026
6914c20
Describe the page like the content ability
jorgefilipecosta Oct 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions includes/Abilities/Gated/Gated_Abilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ final class Gated_Abilities {
Read_Settings::class,
Users_Query::class,
Content_Query::class,
Media_Query::class,
);

/**
Expand Down
30 changes: 30 additions & 0 deletions includes/Abilities/Gated/Media_Query.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* Gated ability: media query.
*
* @package WordPress\AI\Abilities\Gated
*/

declare( strict_types=1 );

namespace WordPress\AI\Abilities\Gated;

use WordPress\AI\Abilities\Media\Media as Media_Ability;
use WordPress\AI\Abstracts\Abstract_Gated_Ability;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

/**
* Gates the core/media-query ability.
*
* @since x.x.x
*/
final class Media_Query extends Abstract_Gated_Ability {
/**
* {@inheritDoc}
*/
public function register(): void {
( new Media_Ability() )->init();
}
}
Loading
Loading