Lubinik Learning

Training mode

WordPress Fundamentals

A twenty-question exam covering essential WordPress development knowledge.

Time remaining:

0 / 20 answered

  1. 1. What is the essential difference between a WordPress action and a filter?

    Choose the statement that correctly describes the contract expected by WordPress.

    What is the essential difference between a WordPress action and a filter?
    Hint

    Ask yourself whether the received value must continue through the execution chain.

  2. 2. Which statements about WordPress nonces are correct?

    Select all correct answers.

    Which statements about WordPress nonces are correct?
    Hint

    A nonce verifies intent, not the user’s role or capabilities.

  3. 3. What should be called after a secondary loop that uses WP_Query::the_post()?

    $query = new WP_Query( $args );
    while ( $query->have_posts() ) {
        $query->the_post();
        the_title();
    }
    What should be called after a secondary loop that uses WP_Query::the_post()?
    Hint

    The secondary loop changed the global $post variable.

  4. 4. Which hook is normally used to register a Custom Post Type?

    You want to call register_post_type() at the point recommended by WordPress.

    Which hook is normally used to register a Custom Post Type?
    Hint

    This hook runs after WordPress has loaded but before the main request is processed.

  5. 5. Which output-escaping pairs are appropriate for their context?

    Select all correct answers. The values are dynamic and are about to be rendered.

    Which output-escaping pairs are appropriate for their context?
    Hint

    Visible HTML text and a URL attribute require different escaping functions.

  6. 6. What is the difference between sanitizing and escaping data?

    Choose the most accurate statement for WordPress development.

    What is the difference between sanitizing and escaping data?
    Hint

    Think about when data enters the system and when it leaves for the browser.

  7. 7. Which wp_enqueue_script() practices are correct?

    Select all correct answers.

    Which wp_enqueue_script() practices are correct?
    Hint

    Dependencies and versioning are part of the registration contract.

  8. 8. Which template is the most specific conventional file for a single book CPT entry?

    The registered post type slug is book.

    Which template is the most specific conventional file for a single book CPT entry?
    Hint

    The template hierarchy includes the post type slug.

  9. 9. When should a plugin normally flush rewrite rules for a new CPT?

    Choose the approach that avoids unnecessary work on normal requests.

    When should a plugin normally flush rewrite rules for a new CPT?
    Hint

    Flushing is expensive and registration must happen first.

  10. 10. How should dynamic values be included in a custom SQL query with $wpdb?

    The query contains values supplied at runtime.

    How should dynamic values be included in a custom SQL query with $wpdb?
    Hint

    Do not concatenate untrusted values into the SQL string.

  11. 11. What is required for the permission_callback of a custom REST route?

    Choose the safest general rule.

    What is required for the permission_callback of a custom REST route?
    Hint

    Public and protected routes both need an explicit permission decision.

  12. 12. What guarantee does a transient expiration provide?

    Consider external object caches as well as the database implementation.

    What guarantee does a transient expiration provide?
    Hint

    An expiration is a maximum lifetime, not a minimum lifetime.

  13. 13. Which values are good candidates for autoloaded options?

    Think about both access frequency and total payload size.

    Which values are good candidates for autoloaded options?
    Hint

    Autoloaded options are loaded on many requests.

  14. 14. How does hook priority affect callbacks attached to the same hook?

    Assume all callbacks are valid and registered.

    How does hook priority affect callbacks attached to the same hook?
    Hint

    Compare numeric priority values.

  15. 15. Which checks belong in a save_post metabox handler?

    Select all generally appropriate safeguards.

    Which checks belong in a save_post metabox handler?
    Hint

    Consider request intent, autosaves, and authorization.

  16. 16. When should a custom taxonomy normally be registered?

    Choose the conventional WordPress lifecycle hook.

    When should a custom taxonomy normally be registered?
    Hint

    It is the same common lifecycle point used for CPT registration.

  17. 17. What does relation control in a WP_Query meta_query?

    The query contains more than one metadata condition.

    What does relation control in a WP_Query meta_query?
    Hint

    Think of boolean logic between clauses.

  18. 18. Which style.css header links a child theme to its parent?

    The parent theme directory is named lubinik-theme.

    Which style.css header links a child theme to its parent?
    Hint

    The value must match the parent directory name.

  19. 19. Which hooks handle a custom WordPress AJAX action named save_note?

    The action may support both authenticated and unauthenticated visitors.

    Which hooks handle a custom WordPress AJAX action named save_note?
    Hint

    The unauthenticated variant has an extra suffix.

  20. 20. Which function should authorize whether the current user may perform a WordPress operation?

    Choose the function intended for capability checks.

    Which function should authorize whether the current user may perform a WordPress operation?
    Hint

    Roles group capabilities, but code should generally check the required capability.