Training mode
Time remaining:
0 / 60 answered
Consider a latest-posts style block.
Select all correct answers.
Dependencies and versioning are part of the registration contract.
ABSPATH is defined by WordPress.
Consider lifecycle, authorization, failure and long-term maintenance.
Identify the data-model or security responsibility before choosing the API.
Compare it with call_user_func_array().
The query contains more than one metadata condition.
Think of boolean logic between clauses.
The function supports both creation and update.
The hook is dedicated to REST route registration.
Fast stale data may still be wrong.
A child functions.php does not replace its parent counterpart.
Do you need max_num_pages?
Choose the solution with the clearest boundary and safest lifecycle behavior.
Choose the approach that avoids unnecessary work on normal requests.
Flushing is expensive and registration must happen first.
Choose the answer that reflects current WordPress engineering practice.
Assume all callbacks are valid and registered.
Compare numeric priority values.
Authorization may depend on the object owner and status.
It does not exclude sticky posts from matching.
It is a counter, not a boolean-only check.
Separate input shape from authorization.
You want to call register_post_type() at the point recommended by WordPress.
register_post_type()
This hook runs after WordPress has loaded but before the main request is processed.
It is commonly used during versioned migrations.
Choose the function intended for capability checks.
Roles group capabilities, but code should generally check the required capability.
Identify the WordPress API responsibility before considering implementation details.
Stylesheet and template can mean child and parent.
Metadata and taxonomy data use different query arguments.
Avoid caching a literal false when you must distinguish it.
It can avoid loading block CSS where it is not needed.
WordPress provides paired success and error helpers.
Without them, enqueued assets may disappear.