WordPress Quiz 0% 0 Created by Yadeno GelasaWordPress WP WordPress Quiz 1 / 84 1. What is the process of marking the code you write so that it is ready for translation? A. Using GlotPress B. Translation C. Internationalization D. Localization 2 / 84 2. In your wp-config.php file, you've added the following line of code. What does it do? define( 'DISALLOW_FILE_EDIT', true ); A. Disables the ability to edit core WordPress files from either within the WordPress admin or via direct file access B. Prevents any non-admin user from directly editing theme or plugin files C. Sets read-only permissions on all files in the WordPress install D. Disables the theme and plugin editor in the WordPress admin 3 / 84 3. In the WordPress template hierarchy, which file could not be used to display an archive? A. category.php B. page.php C. archive.php D. index.php 4 / 84 4. Why can't you modify the query on a template page? A. According to WordPress best practices, the query should only be modified in functions.php. B. You can modify the query in a template page if you use pre_get_posts(). C. The query can only be run inside the Loop. D. Due to execution order, the query has already run by the time a template is loaded. 5 / 84 5. Which Wordpress conditional would you use to determine if you were on a single page? A. is_page() B. is_archive() C. is_page_template() D. is_single() 6 / 84 6. What is the role of a WordPress theme? A. Adds accessibility enhancements such as keyboard navigation and skip links B. All C. Controls colors, fonts, and page layouts D. Ensures a site is mobile responsive 7 / 84 7. What service is used to manage user profile photos across any WordPress site? A. WordPress.org B. None. Just upload a profile photo from your site user account. C. Profile Photo plugin D. Gravatar 8 / 84 8. The REST API is a simple way to get data in and out of WordPress over HTTP. Applications using the REST API should be written in which programming language? A. Node.js B. Java C. Any programming language that can make HTTP requests and interpret JSON D. PHP 9 / 84 9. What are transients? A. Post draft stored in the database B. Plugins used for quick debugging C. Short database queries D. A way to cache information 10 / 84 10. Who owns the trademark for WordPress and WordCamp names and logos? A. WordPress.com B. Automattic C. Matt Mullenweg D. WordPress Foundation (The WordPress Foundation owns and oversees the trademarks for the WordPress and WordCamp names and logos) 11 / 84 11. According to WordPress PHP coding standards for inline comments, how would you write a single-line comment in a PHP document? A. /// This is a single line comment. B. <!-- This is a single line comment --> C. /* _ This is a single line comment._/ D. // This is a single line comment 12 / 84 12. Which of these refers to a WordPress security token that is used to verify that a request was made by the right person or client? A. Use your web browser's developer tools. B. Use an online tool like GTmetrix, Pingdom, Lighthouse, or WebPageTest. C. Use a plugin like Query Monitor or Debug Bar. D. All 13 / 84 13. What color is the paragraph nested within the div? <head> <style> body { color: black; } p { color: blue; } div { color: green; } p { color: red; } </style> </head> <body> <div> <p>This is a paragraph inside a div.</p> </div> </body> </html> A. Green B. Blue C. Red D. Black 14 / 84 14. If you wanted to debug some JavaScript, which method would you use to display data in your browser console? A. windows.alert() B. document.write() C. console.log() D. innerHTML 15 / 84 15. On a regular WordPress install, what is the difference between transients and the object cache? A. Transients are available for the duration of a user session and apply to all page components. The object cache is available only for scripts. B. Transients are persistent and write to the wp_options. The object cache persists only for the particular page load. C. Transients are stored in the WordPress database. The object cache is stored on the server where the WordPress install is located. D. Transients persist only for the particular page load. The object cache is persistent and writes to the wp_options table. 16 / 84 16. Theme developers can take advantage of the API to give users a way to manipulate basic theme settings. The Customizer API is object-oriented and provides four main objects. What are they? A. widgets, containers, sections, settings B. containers, hooks, settings, styles C. panels, sections, controls, settings D. panels, blocks, controls, settings 17 / 84 17. What is the primary difference between template tags prefaced with the versus get_the? A. Template tags prefaced with the _ don't accept arguments. B. Template tags prefaced with the _ return a value. Template tags prefaced with get_the display a value. C. Template tags prefaced with the _ can be used directly within a template. D. Template tags prefaced with the _ display a value. Template tags prefaced with get_the return a value. 18 / 84 18. How many minutes does it take to install WordPress according to the "Famous X-Minute Installation" instructions on WordPress.org? A. 15 B. 10 C. 5 D. 30 19 / 84 19. If you have pretty permalinks enabled on a WordPress site, the REST API index is exposed by appending what to the end of the site URL. (for example, http://example.com/answer/) Note that the index provides information regarding which routes are available for that particular WordPress install. A. http://example.com/wp-admin/ B. http://example.com/wp-json/ C. http://example.com/wp-rest/ D. http://example.com/wp-rest-api/ 20 / 84 20. The WordPress REST API is designed to receive and respond to particular types of requests using basic HTML methods. For example, a request to upload a PHP file into a particular folder on a server might look like the code POST /folder/_file.php. Based on this code, what would you call /folder/_file.php (in REST API terms)? A. Schema B. Route C. Response D. Request 21 / 84 21. Which of the following must have underlined links in order to meet WCAG 2.0 accessibility standards? A. Links in paragraph text B. Links in a nav bar C. Links in user interface controls D. Links on images 22 / 84 22. Which of this CSS class naming convention is correct according to WordPress CSS Coding Standards? A. div.selector_name B. .selector-name C. .selectorName D. .selector_name 23 / 84 23. Which folder in a WordPress install is not affected by an automatic WordPress update? A. /wp-admin B. /wp-content C. root D. /wp-includes 24 / 84 24. In which of the following ways might you contribute to the WordPress community by testing? A. Beta testing B. All C. User testing D. Automated testing 25 / 84 25. Which software development principle, often used in WordPress, aims to reduce the repetition of code? A. RRR B. KISS C. WET D. DRY 26 / 84 26. Akismet is a plugin that comes automatically installed with WordPress. What does it do? A. It connects your site to Google Analytics. B. It displays a blog feed from websites similar to yours. C. It protects your site from comment spam. D. It hardens site security by enforcing strong passwords. 27 / 84 27. WordPress is an open-source software licensed under the GPL. This means that__ A. The software is free to modify B. All C. Derivative works must also be licensed as GPL D. The software is free to use 28 / 84 28. The Block API enables developers to register custom blocks in themes or plugins. How would you register a custom block? A. Use the registerBlockType() function. B. Use the createGutenBlock() function. C. Use the registerBlockName() function. D. Use a block template. 29 / 84 29. If you activate or update a plugin and it breaks your site so that you cannot manage it via wp-admin, how can you disable the plugin? A. Use phpMyAdmin to change the wp_options table's active_plugins option value to a:0:{}. B. Access site files via FTP and navigate to /wp-content/plugins/. Delete the folder of the plugin that you would like to disable or simply rename it. C. All D. Access the WordPress install via WP-CLI. Run the following command: wp plugin deactivate offending-plugin. 30 / 84 30. Where do you configure global settings for comments on your WordPress site? A. Tools screen B. wp-config.php C. cPanel D. Discussion Settings 31 / 84 31. How would you write a text string containing "Hello World!" in a way that makes it possible for someone else to translate the string into a different language? A. $string = "Hello World!"; B. esc_html( 'Hello World!', 'mytextdomain' ); C. __( 'Hello World!', 'mytextdomain' ); D. apply_filters( 'Hello World!', 'mytextdomain' ); 32 / 84 32. How would you use CSS to ensure your theme was mobile responsive? A. Use CSS grid to create responsive layouts. B. All C. Use media queries to add breakpoints for different screen sizes. D. Use Flexbox to create flexible page layouts. 33 / 84 33. WP_Query is the WordPress query class that is used to fetch posts from the database. How would you create a new instance of this class? A. $query = query_posts(); B. $query = get_posts(); C. $query = new WP_Query(); D. $query = new query_posts(); 34 / 84 34. JavaScript variables can hold many data types. Which data type does the following variable represent? var x = '16'; A. Boolean B. Object C. String D. Number 35 / 84 35. Which WordPress setting would you use to make page URLs look like http://example.com/my-page/ instead of the default http://example.com/?p=21/? A. Reading B. Pretty URLs C. Permalinks D. Writing 36 / 84 36. Within the Editor, blocks are rendered as JavaScript. How are blocks rendered on the front end of a site? A. as HTML comments B. as JavaScript comments C. as a React component D. as plain HTML 37 / 84 37. What can you not configure via wp-config.php? A. Changing your site or WordPress address B. Changing the default user role C. Changing the default wp_table prefix D. Changing the default number of post revisions 38 / 84 38. Review the HTML on line 1. The goal of the PHP on line 2 is to extract the field value and assign it to a variable prior to inserting it into the database. What is wrong with this PHP code? <input type="text" id="title" name="title" /> $title = $_POST[ 'title' ] A. The code sample does not allow for translation. It should use a translation function and look like this: $title = __($_POST['title']) B. The code sample does not sanitize the form data. It should use the sanitize_text_field() function and look like this: $title = sanitize_text_field($_POST['title']);. C. The sample does not use GET method. It should be wrapped in the ger_post_field() function and look like this: $title = get_post_field($_GET['title']);. D. There is no error. The code follows Wordpress best practice. 39 / 84 39. Which WP-CLI command would you use to manage the capabilities of a user role? A. wp admin B. wp cap C. wp manage D. wp role 40 / 84 40. You might see this code in a WordPress plugin. What does it do? if ( ! defined( 'ABSPATH' ) ) { die; } A. This is a way to prevent naming collisions. ABSPATH is the absolute path to the plugin's directory. If ABSPATH is defined by another WordPress plugin with the same directory slug, the plugin should not run. B. This is a security measure. ABSPATH is the absolute path to the WordPress directory. If the file is called directly, ABSPATH will not be defined and therefore, the plugin should not run. C. This is how WordPress detects a plugin's presence. This ensures that the plugin is running from the /wp-content/plugins/ directory. If it is not, the plugin should not run. D. This is a compatibility checker. ABSPATH is defined in WordPress core. The plugin checks that the minimum version of WordPress needed to support the plugin is installed. If it is not, the plugin should not run. 41 / 84 41. Which of these snippets represents a wrapper that calls jQuery safely and doesn't require repetitive use of the word "jQuery"? A. (function ($) { // do stuff })(jQuery); B. $.ready(function () { // do stuff }); C. $(function () { // do stuff }); D. jQuery(function ($) { // do stuff }); 42 / 84 42. The REST API provides data, which is accessible to any client anonymously, as well as private data available only after authentication. How could you ensure that no one can anonymously access site data via the REST API? A. Use the rest_authenticaton_errors() filter along with cookie authentication to limit access to logged in users. B. Use the Disable REST API plugin. C. Disable the REST API via the site's wp-config.php file. D. Use the rest_authenticaton_errors() filter along with the is_user_logged_in() conditional to limit access to logged in users. 43 / 84 43. In WordPress, what is true of plugins? A. Plugins add site-specific features. B. All of the above C. Plugins are available in free or premium (paid) versions. D. Plugins can extend WordPress core functionality. 44 / 84 44. You have a search bar on your site. You would like to use a <label> to make the word "Search" visible to screen readers, but you don't want to display the word "Search" on the screen. How can you accomplish this? A. Use the built-in WordPress CSS class .screen-reader-text to hide the text from the screen, like this: <label class="screen-reader-text">Search</label> B. The majority of users do not require a screen reader. Remove the label entirely. C. Create a custom CSS class to set a large negative value to the text-indent property to hide the text off-screen, like this: <label class="hide-this">Search</label> D. Assign an ARIA state of "hidden" to the label, like this: <label>Search</label> 45 / 84 45. When it comes to best practice for WordPress development, what is the preferred method for adding a custom post type (CPT) to a site? A. Add CPTs via a plugin. B. Add CPTs via a parent theme. C. Add CPTs via phpMyAdmin. D. Add CPTs via a child theme. 46 / 84 46. Which of the following file types is NOT involved in translating WordPress? A. .po B. .pot C. .mot D. .mo 47 / 84 47. What is the name of the open-source project that serves as a bug tracker and project management tool for WordPress? A. GitHub Issues B. Trac C. Redmine D. HackerOne 48 / 84 48. What is the default priority for an action hook or filter? A. 10 B. 0 C. 5 D. 15 49 / 84 49. Which is the best practice for working with WordPress CSS? A. Use !important next to styles if they don't give you the result you want. B. Avoid CSS shorthand for proper documentation. C. Use spaces to indent each property. D. Use hyphens in class names. 50 / 84 50. If your WordPress site is seriously compromised, what is the best course of action to return your site to good health? A. Hire a third-party service to clean up your site because it is difficult for someone who is not a WordPress security expert to find and remove all traces of an attack. B. Determine the date of the attack and restore your site to a backup point prior to that date. C. Manually delete suspicious files on the server and delete any database tables that are not core WordPress. D. Change your hosting password, your WordPress admin password, and your database password. 51 / 84 51. What is a user role that is unique to WordPress Multisite? A. Owner B. MU Admin C. Multisite Master D. Super Admin 52 / 84 52. Where can you find the official WordPress documentation and usage guide? A. support.wordpress.com B. developer.wordpress.org C. developer.wordpress.com D. support.wordpress.org 53 / 84 53. What is this code sample an example of? <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); the_content(); endwhile; else : _e( 'Sorry, no posts matched your criteria.', 'textdomain' ); endif; A. The Loop B. Template tags C. Custom query D. Nested loop 54 / 84 54. Which of these are best practices in accessibility? A. Be sure there is proper color contrast between background and text. B. Do not skip heading levels. C. All D. If an activity can be completed with a mouse, it must also be accessible by keyboard. 55 / 84 55. What user role would you assign to someone so they can write and publish only their posts and no one else's? A. Subscriber B. Author C. Editor D. Contributor 56 / 84 56. Which is not a benefit of DRY code? A. The code is easier to read. B. The code is less abstracted. C. The code can be reused. D. The code is easier to maintain. 57 / 84 57. Which is NOT a suggested performance improvement for your WordPress website? A. Choose a very recent version of PHP. B. The site should run the most recent version of WordPress. C. Remove or inactivate unnecessary plugins. D. UTF8 is supported. 58 / 84 58. WordPress is translated, at least partially, in more than 200 locales. If you wanted to help translate WordPress into other languages, which contributor group would you join? A. core B. accessibility C. polyglots D. documentation 59 / 84 59. For the majority of modern themes, what is the standard method used to customize various details of site appearance and features, such as changing the site description or adding a logo and favicons? A. Theme settings B. WordPress settings C. Customizer D. wp-config.php 60 / 84 60. The REST API utilizes which data format? A. XML B. JSON C. TXT D. YAML 61 / 84 61. What is the correct order of parameters for the add_action() function? A. add_action( 'example_function', 'example_hook', $priority, $accepted_args ) B. add_action( 'example_hook', 'example_function', $accepted_args, $priority ) C. add_action( 'example_function', 'example_hook', $priority ) D. add_action( 'example_hook', 'example_function', $priority, $accepted_args ) 62 / 84 62. What technique would you use to secure data before rendering it to a user? A. Escape and sanitize B. Escape and secure C. Validate and escape D. Validate and sanitize 63 / 84 63. You would use a post instead of a page when the content is_ A. When the content is part of a blog. B. Nested (has a parent/child relationship with another piece of content) C. Evergreen D. For a top-level menu item 64 / 84 64. What is the difference between an action and a filter? A. Actions are used to add or remove code at runtime. Filters are used to modify data before it is either displayed in the browser or saved to the database. B. Actions are used to add custom functions and remove WordPress functions. Filters are used to make strings translatable for localization. C. Actions are used to add user-inputted data to the database. Filters are used to validate user-inputted data prior to adding it to the database. D. Actions are used to assign values to variables at runtime. Filters are used to extract data from actions and display it in the browser. 65 / 84 65. What is a way you can both harden your site's security and improve how Google presents your site in search results? A. Install a security plugin on your site. B. Install an SSL certificate. C. Use a third-party security monitoring service. D. Require users to log in to view content. 66 / 84 66. Which of these refers to a WordPress security token that is used to verify that a request was made by the right person or client? A. Nonce B. Transient C. Cookie D. Salt 67 / 84 67. The REST API provides public data, which is accessible to any client anonymously, as well as private data available only after authentication. How could you ensure no one can anonymously access site data via the REST API? A. Disable the REST API via the site's wp-config.php file. B. Use the rest_authentication_errors() filter along with cookie authentication to limit access to logged-in users. C. Use the Disable REST API plugin. D. Use the rest_authentication_errors() filter along with the is_user_logged_in() conditional to limit access to logged in users. 68 / 84 68. Which of the following is NOT a suggested security improvement for your WordPress website? A. Do not output debug information. B. The site should communicate with WordPress.org. C. WordPress updates are accomplished manually only. D. Remove inactive themes. 69 / 84 69. What is the core mission of WordPress? A. To make money B. To make free software C. To encourage blogging D. To democratize publishing and the freedoms that come with open-source 70 / 84 70. The WordPress block editor contains a number of default blocks, including blocks for paragraphs, images, quotes, and shortcodes. Blocks are grouped into categories to help users browse and discover them. Which is not a category provided by WordPress Core? A. Formatting B. Widgets C. Shortcodes D. Layout 71 / 84 71. Which of these does not impact your site speed? A. Content delivery network (CDN) B. Your web host C. Inactive plugins D. Caching 72 / 84 72. Review the HTML on line 1. The goal of the PHP on line 2 is to extract the field value and assign it to a variable prior to inserting into the database. What is wrong with this PHP code? <input type="text" id="title" name="title" /> $title = $_POST[ 'title' ]; A. There is no error. The code follows WordPress best practices. B. The code sample does not allow for translation. It should use a translation function and look like this: $title = __( $_POST[ 'title' ]; C. The code sample does not sanitize the form data. It should use the sanitize_text_field() function and look like this: $title = sanitize_text_field( $_POST[ 'title' ] ); D. The code sample does not use the GET method. It should be wrapped in the get_post_field() function and look like this $title = get_post_field( $GET[ 'title' ] ); 73 / 84 73. You can harden your WordPress site security by adding __ to your wp-config.php file? A. Unique keys and salts B. Accessibility C. Documentation D. Database usernames and passwords 74 / 84 74. What would you do to improve your site's performance? A. Only load scripts and styles on pages where they are needed. B. Use a CDN. C. Minify CSS and JavaScript files. D. All of the above 75 / 84 75. Which of these is NOT a part of the internationalization and localization process? A. using a tool like Poedit to parse source code and extract translatable strings into a POT file B. translators translating the POT file into a PO file, one for each language C. installing/using the WordPress Multilingual Plugin D. using a gettext function to wrap translatable strings when writing code 76 / 84 76. Wordpress core and many plugins store data in the database in a special format as represented by the sample below. What format is this called? a:2:{i:0;s:27:"ari-adminer/ari-adminer.php";i:1;s:30:"atomic-blocks/atomicblocks.php";} A. PHP array B. Value C. Serialized data D. Text array 77 / 84 77. When should you edit core WordPress files? A. When you need to add a custom page template B. When there is no plugin available to make a customization, you need C. When you need to add a custom script to the header or footer of every page in a site D. You should never edit WordPress core. 78 / 84 78. On a webpage, there are frequently navigation links, a search bar, or other elements that appear before the main content. For keyboard and screen reader users, it can be frustrating to get to the main content of a page because they have to tab through all these elements on every new page load. What can you add to a site to fix this? A. Infinite scroll B. Collapsible menus C. Tabbed navigation D. Skip links 79 / 84 79. In a standard template file, how often does the WordPress Loop run? A. The Loop doesn't run in template files. B. It runs once per post in the database. C. It runs once per fetched post. D. It runs once. 80 / 84 80. Which of these is not a part of the internationalization and localization process? A. Translators translating the PO file, one for each language. B. Using a gettext function to wrap transatable strings when writing code. C. Using a tool like Poedit to parse source code and extract translatable strings into a POT file. D. Installing/using the Wordpress Multilingual Plugin. 81 / 84 81. In WordPress, what is the Loop used to do? A. It displays a single page B. All of the above C. It displays a single post D. It displays posts on an archive. 82 / 84 82. In WordPress, what is the block editor used for? A. creating a site layout B. injecting specialized scripts into the content area C. cropping images in the media library D. creating and laying out content 83 / 84 83. Which of these are the minimum files required to make a child theme? A. index.php style.css script.js B. functions.php style.css script.js C. index.php functions.php D. functions.php style.css 84 / 84 84. If you wanted to register a custom post type, which hook would you use? A. wp_head B. init C. register_post_type D. add_meta_box Your score isShare Your Result! Facebook You can follow me here! 0% Restart quiz Exit