Lubinik Learning

Training mode

WordPress Intermediate Assessment

Time remaining:

0 / 50 answered

  1. 1. Which function returns the active theme directory, including the child theme when one is active?

    Which function returns the active theme directory, including the child theme when one is active?
    Hint

    Stylesheet and template can mean child and parent.

  2. 2. What does check_admin_referer() help verify?

    What does check_admin_referer() help verify?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  3. 3. Which function returns the parent theme directory URL?

    Which function returns the parent theme directory URL?
    Hint

    Separate presentation responsibilities from reusable site functionality.

  4. 4. What is the main responsibility of a WordPress theme?

    What is the main responsibility of a WordPress theme?
    Hint

    Separate presentation responsibilities from reusable site functionality.

  5. 5. In a REST endpoint, where should resource-specific authorization be enforced?

    In a REST endpoint, where should resource-specific authorization be enforced?
    Hint

    The server must enforce authorization before the main callback.

  6. 6. What is a secondary query?

    What is a secondary query?
    Hint

    Identify the WordPress API responsibility before considering implementation details.

  7. 7. Why should a developer inspect hook documentation before registering a callback?

    Why should a developer inspect hook documentation before registering a callback?
    Hint

    Identify the role of the WordPress function or extension point.

  8. 8. Which core file establishes many WordPress constants and loads early bootstrap components?

    Which core file establishes many WordPress constants and loads early bootstrap components?
    Hint

    Place the concept in the WordPress request, content, or permission model.

  9. 9. Which function registers a callback on an action?

    Which function registers a callback on an action?
    Hint

    Identify the role of the WordPress function or extension point.

  10. 10. Which function both translates and safely escapes plain text for HTML output?

    Which function both translates and safely escapes plain text for HTML output?
    Hint

    Combine internationalization with context-appropriate output escaping.

  11. 11. Why is init commonly used for rewrite-related registrations?

    Why is init commonly used for rewrite-related registrations?
    Hint

    Registration and flushing are different operations.

  12. 12. Which function registers a stylesheet for a specific block type?

    Which function registers a stylesheet for a specific block type?
    Hint

    It can avoid loading block CSS where it is not needed.

  13. 13. What is unusual about variable scope inside a plugin activation callback?

    What is unusual about variable scope inside a plugin activation callback?
    Hint

    Prefer explicit inputs and APIs.

  14. 14. What distinguishes an Editor from an Author?

    What distinguishes an Editor from an Author?
    Hint

    Place the concept in the WordPress request, content, or permission model.

  15. 15. 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.

  16. 16. 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.

  17. 17. What does order normally specify?

    What does order normally specify?
    Hint

    Identify the WordPress API responsibility before considering implementation details.

  18. 18. What header commonly carries the REST nonce for cookie-authenticated requests?

    What header commonly carries the REST nonce for cookie-authenticated requests?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  19. 19. Which option is a reasonable autoload candidate?

    Which option is a reasonable autoload candidate?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  20. 20. How are callbacks with the same priority generally ordered?

    How are callbacks with the same priority generally ordered?
    Hint

    Identify the role of the WordPress function or extension point.

  21. 21. What is a widget in classic WordPress terminology?

    What is a widget in classic WordPress terminology?
    Hint

    Start with the everyday meaning of the WordPress term.

  22. 22. 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.

  23. 23. Which hook is appropriate when a plugin must initialize after all active plugins have loaded?

    Which hook is appropriate when a plugin must initialize after all active plugins have loaded?
    Hint

    Think about when every active plugin file has been included.

  24. 24. Why return WP_REST_Response?

    Why return WP_REST_Response?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  25. 25. What does the methods route argument define?

    What does the methods route argument define?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  26. 26. Why call wp_reset_postdata() after a secondary loop that used the_post()?

    Why call wp_reset_postdata() after a secondary loop that used the_post()?
    Hint

    Identify the role of the WordPress function or extension point.

  27. 27. What is WordPress metadata?

    What is WordPress metadata?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  28. 28. What does a theme content width setting primarily communicate?

    What does a theme content width setting primarily communicate?
    Hint

    It concerns rendered media dimensions.

  29. 29. How should server-side WordPress code treat submitted form data?

    How should server-side WordPress code treat submitted form data?
    Hint

    Identify the data-model or security responsibility before choosing the API.

  30. 30. What does the principle of least privilege recommend?

    What does the principle of least privilege recommend?
    Hint

    Place the concept in the WordPress request, content, or permission model.

  31. 31. Which argument filters by publication status?

    Which argument filters by publication status?
    Hint

    Identify the WordPress API responsibility before considering implementation details.

  32. 32. Why might a plugin file check whether ABSPATH is defined?

    Why might a plugin file check whether ABSPATH is defined?
    Hint

    Identify the WordPress API responsibility before considering implementation details.

  33. 33. What is a benefit of checking object-level capabilities such as edit_post with an object ID?

    What is a benefit of checking object-level capabilities such as edit_post with an object ID?
    Hint

    Authorization may depend on the object owner and status.

  34. 34. What is WP_Query used for?

    What is WP_Query used for?
    Hint

    Identify the WordPress API responsibility before considering implementation details.

  35. 35. Why pass a default value to get_option()?

    Why pass a default value to get_option()?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  36. 36. Why should WordPress core, themes and plugins be kept updated?

    Why should WordPress core, themes and plugins be kept updated?
    Hint

    Start with the everyday meaning of the WordPress term.

  37. 37. 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.

  38. 38. Which argument is commonly used for numbered pagination?

    Which argument is commonly used for numbered pagination?
    Hint

    Identify the WordPress API responsibility before considering implementation details.

  39. 39. What is screenshot.png used for in a theme?

    What is screenshot.png used for in a theme?
    Hint

    Separate presentation responsibilities from reusable site functionality.

  40. 40. What is an attachment in WordPress?

    What is an attachment in WordPress?
    Hint

    Place the concept in the WordPress request, content, or permission model.

  41. 41. After WordPress resolves the request, what does the template loader do?

    After WordPress resolves the request, what does the template loader do?
    Hint

    Place the concept in the WordPress request, content, or permission model.

  42. 42. Which request value selects a traditional AJAX handler?

    Which request value selects a traditional AJAX handler?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  43. 43. What is the reliable way for a child theme to load its parent and child styles?

    What is the reliable way for a child theme to load its parent and child styles?
    Hint

    Use the enqueue API rather than a CSS import.

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

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

    Separate presentation responsibilities from reusable site functionality.

  45. 45. What is a risk of overriding a large parent template?

    What is a risk of overriding a large parent template?
    Hint

    Separate presentation responsibilities from reusable site functionality.

  46. 46. When is do_action_ref_array() useful?

    When is do_action_ref_array() useful?
    Hint

    Compare it with call_user_func_array().

  47. 47. Why use a namespace such as my-plugin/v1?

    Why use a namespace such as my-plugin/v1?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.

  48. 48. What does orderby control?

    What does orderby control?
    Hint

    Identify the WordPress API responsibility before considering implementation details.

  49. 49. What makes a PHP file discoverable as a WordPress plugin?

    What makes a PHP file discoverable as a WordPress plugin?
    Hint

    Look at how the Plugins screen discovers files.

  50. 50. When is one structured array option preferable to many scalar options?

    When is one structured array option preferable to many scalar options?
    Hint

    Consider lifecycle, authorization, failure and long-term maintenance.