Training mode
A twenty-question exam covering essential WordPress development knowledge.
Time remaining:
0 / 20 answered
Choose the statement that correctly describes the contract expected by WordPress.
Ask yourself whether the received value must continue through the execution chain.
Select all correct answers.
A nonce verifies intent, not the user’s role or capabilities.
$query = new WP_Query( $args ); while ( $query->have_posts() ) { $query->the_post(); the_title(); }
The secondary loop changed the global $post variable.
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.
Select all correct answers. The values are dynamic and are about to be rendered.
Visible HTML text and a URL attribute require different escaping functions.
Choose the most accurate statement for WordPress development.
Think about when data enters the system and when it leaves for the browser.
Dependencies and versioning are part of the registration contract.
The registered post type slug is book.
book
The template hierarchy includes the post type slug.
Choose the approach that avoids unnecessary work on normal requests.
Flushing is expensive and registration must happen first.
The query contains values supplied at runtime.
Do not concatenate untrusted values into the SQL string.
Choose the safest general rule.
Public and protected routes both need an explicit permission decision.
Consider external object caches as well as the database implementation.
An expiration is a maximum lifetime, not a minimum lifetime.
Think about both access frequency and total payload size.
Autoloaded options are loaded on many requests.
Assume all callbacks are valid and registered.
Compare numeric priority values.
Select all generally appropriate safeguards.
Consider request intent, autosaves, and authorization.
Choose the conventional WordPress lifecycle hook.
It is the same common lifecycle point used for CPT registration.
The query contains more than one metadata condition.
Think of boolean logic between clauses.
The parent theme directory is named lubinik-theme.
lubinik-theme
The value must match the parent directory name.
The action may support both authenticated and unauthenticated visitors.
The unauthenticated variant has an extra suffix.
Choose the function intended for capability checks.
Roles group capabilities, but code should generally check the required capability.