Wordpress

In WordPress, what is the Loop used to do?

1.

It displays a single page.

2.

It displays posts on an archive.

3.

It displays a single post.

4.

all of these answers

Q 1 / 80

Wordpress

undefined

1.

WordPress Foundation (The WordPress Foundation owns and oversees the trademarks for the WordPress and WordCamp names and logos.)

2.

WordPress.com

3.

Matt Mullenweg

4.

Automattic

Q 2 / 80

Wordpress

What is the name of the open-source project that serves as a bug tracker and project management tool for WordPress?

1.

HackerOne

2.

Redmine

3.

Trac

4.

GitHub Issues

Q 3 / 80

Wordpress

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?

1.

PHP

2.

any programming language that can make HTTP requests and interpret JSON

3.

Java

4.

Node.js

Q 4 / 80

Wordpress

How many minutes does it take to install WordPress according to the "Famous X-Minute Installation" instructions on WordPress.org?

1.

5

2.

30

3.

15

4.

10

Q 5 / 80

Wordpress

In WordPress, what is true of plugins?

1.

Plugins are available in free or premium (paid) versions.

2.

Plugins can extend WordPress core functionality.

3.

all of these answers

4.

Plugins add site-specific features.

Q 6 / 80

Wordpress

Akismet is a plugin that comes automatically installed with WordPress. What does it do?

1.

It connects your site to Google Analytics.

2.

It displays a blog feed from websites similar to yours.

3.

It protects your site from comment spam.

4.

It hardens site security by enforcing strong passwords.

Q 7 / 80

Wordpress

What would you do to improve your site's performance?

1.

Only load scripts and styles on pages where they are needed.

2.

Minify CSS and JavaScript files.

3.

all of these answers

4.

Use a CDN.

Q 8 / 80

Wordpress

The REST API utilizes which data format?

1.

YAML

2.

JSON

3.

TXT

4.

XML

Q 9 / 80

Wordpress

What color is the paragraph nested within the div?

<html> <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>

1.

blue

2.

black

3.

red

4.

green

Q 10 / 80

Wordpress

Theme developers can take advantage of the Customizer 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?

1.

widgets, containers, sections, settings

2.

containers, hooks, settings, styles

3.

panels, blocks, controls, settings

4.

panels, sections, controls, settings

Q 11 / 80

Wordpress

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/?`

1.

Writing

2.

Permalinks

3.

Pretty URLs

4.

Reading

Q 12 / 80

Wordpress

In WordPress, what is the block editor used for?

1.

cropping images in the media library

2.

injecting specialized scripts into the content area

3.

creating a site layout

4.

creating and laying out content

Q 13 / 80

Wordpress

Which of the following file types is NOT involved in translating WordPress?

1.

.po

2.

.pot

3.

.mot

4.

.mo

Q 14 / 80

Wordpress

What is the default priority for an action hook or filter?

1.

10

2.

15

3.

0

4.

5

Q 15 / 80

Wordpress

What's the primary difference between template tags prefaced with the **versus get_the**?

1.

Template tags prefaced with the _ don't accept arguments.

2.

Template tags prefaced with the _ can be used directly within a template.

3.

Template tags prefaced with the _ display a value. Template tags prefaced with get_the return a value.

4.

Template tags prefaced with the _ return a value. Template tags prefaced with get_the display a value.

Q 16 / 80

Wordpress

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?

1.

`$query = new query_posts();`

2.

`$query = new WP_Query();`

3.

`$query = query_posts();`

4.

`$query = get_posts();`

Q 17 / 80

Wordpress

What is a user role that is unique to WordPress Multisite?

1.

MU Admin

2.

Owner

3.

Super Admin

4.

Multisite Master

Q 18 / 80

Wordpress

Within the editor, blocks are rendered as JavaScript. How are blocks rendered on the front end of a site?

1.

as plain HTML

2.

as a React component

3.

as JavaScript comments

4.

as HTML comments

Q 19 / 80

Wordpress

Which of these is NOT a part of the internationalization and localization process?

1.

using a gettext function to wrap translatable strings when writing code

2.

installing/using the WordPress Multilingual Plugin

3.

using a tool like Poedit to parse source code and extract translatable strings into a POT file

4.

translators translating the POT file into a PO file, one for each language

Q 20 / 80

Wordpress

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 that no one can anonymously access site data via the REST API?

1.

Disable the REST API via the site's wp-config.php file.

2.

Use the `rest_authentication_errors()` filter along with the `is_user_logged_in()` conditional to limit access to logged in users.

3.

Use the `rest_authentication_errors()` filter along with cookie authentication to limit access to logged in users.

4.

Use the Disable REST API plugin.

Q 21 / 80

Wordpress

Which of these snippets represents a wrapper that calls jQuery safely and doesn't require repetitive use of the word "jQuery"?

$.ready(function() { // do stuff }); (function($) { // do stuff })( jQuery ); $(function() { // do stuff }); jQuery(function($) { // do stuff });

1.

.

2.

.

3.

.

4.

.

Q 22 / 80

Wordpress

What is the correct order of parameters for the add_action() function?

1.

`add_action( 'example_hook', 'example_function', $accepted_args, $priority )`

2.

`add_action( 'example_function', 'example_hook', $priority, $accepted_args )`

3.

`add_action( 'example_hook', 'example_function', $priority, $accepted_args )`

4.

`add_action( 'example_function', 'example_hook', $priority )`

Q 23 / 80

Wordpress

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?

1.

Assign an ARIA state of "hidden" to the label, like this: `<label state="hidden">Search</label> <input type="text" name="search" id="search" />`

2.

Use the built-in WordPress CSS class .screen-reader-text to hide the text from screen, like this: `<label class="screen-reader-text">Search</label> <input type="text" name="search" id="search" />`

3.

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> <input type="text" name="search" id="search" />`

4.

The majority of users do not require a screen reader. Remove the label entirely.

Q 24 / 80

Wordpress

You might see this code in a WordPress plugin. What does it do?

if ( ! defined( 'ABSPATH' ) ) { die; }

1.

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.

2.

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.

3.

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.

4.

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.

Q 25 / 80

Wordpress

Which is a best practice for working with WordPress CSS?

1.

Use !important next to styles if they don't give you the result you want.

2.

Use hyphens in class names.

3.

Use spaces to indent each property.

4.

Avoid CSS shorthand for proper documentation.

Q 26 / 80

Wordpress

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?

1.

core

2.

polyglots

3.

accessibility

4.

documentation

Q 27 / 80

Wordpress

What is the difference between an action and a filter?

1.

Actions are used to add custom functions and remove WordPress functions. Filters are used to make strings translatable for localization.

2.

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.

3.

Actions are used to assign values to variables at runtime. Filters are used to extract data from actions and display it in the browser.

4.

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.

Q 28 / 80

Wordpress

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?

1.

all of these answers

2.

Access the WordPress install via WP-CLI. Run the following command: wp plugin deactivate offending-plugin.

3.

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.

4.

Use phpMyAdmin to change the wp_options table's active_plugins option value to a:0:{}.

Q 29 / 80

Wordpress

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)?

1.

schema

2.

route

3.

response

4.

request

Q 30 / 80

Wordpress

Which WP-CLI command would you use to manage the capabilities of a user role?

1.

wp admin

2.

wp manage

3.

wp cap

4.

wp role

Q 31 / 80

Wordpress

What technique would you use to secure data before rendering it to a user?

1.

escape and sanitize

2.

validate and escape

3.

validate and sanitize

4.

escape and secure

Q 32 / 80

Wordpress

If your WordPress site is seriously compromised, what is the best course of action to return your site to good health?

**Explanation**: It's not the cheapest, but it's the most reliable. Restoring the backup might not help if you have backdoor scripts installed outside of WP directory.

1.

Determine the date of the attack and restore your site to a backup point prior to that date.

2.

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.

3.

Manually delete suspicious files on the server and delete any database tables that are not core WordPress.

4.

Change your hosting password, your WordPress admin password, and your database password.

Q 33 / 80

Wordpress

If you wanted to register a custom post type, which hook would you use?

1.

register_post_type

2.

add_meta_box

3.

wp_head

4.

init

Q 34 / 80

Wordpress

What is the role of a WordPress theme?

1.

controls colors, fonts, and page layouts

2.

adds accessibility enhancements such as keyboard navigation and skip links

3.

ensures a site is mobile responsive

4.

all of these answers

Q 35 / 80

Wordpress

What is the name of the open-sourse project that serves as a bug tracker and project management tool for WordPress?

1.

Redmine

2.

GitHub Issues

3.

HakerOne

4.

Trac

Q 36 / 80

Wordpress

What is a user role that is unique to WordPress Multisite?

1.

Owner

2.

Super Admin

3.

MU Admin

4.

Multisite Master

Q 37 / 80

Wordpress

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?

1.

`apply_filters( 'Hello World!', 'mytextdomain' );`

2.

`_( 'Hello World!', 'mytextdomain' );`

3.

`$string = "Hello World!";`

4.

`esc_html( 'Hello World!', 'mytextdomain' );`

Q 38 / 80

Wordpress

What is the core mission of WordPress?

1.

to make free software

2.

to democratize publishing and the freedoms that come with open source

3.

to make money

4.

to encourage blogging

Q 39 / 80

Wordpress

Which of the following is NOT a suggested security improvement for your WordPress website?

**Explanation**: Communicating with WordPress.org is needed for detecting new versions.

1.

The site should communicate with WordPress.org.

2.

Remove inactive themes.

3.

Do not output debug information.

4.

WordPress updates are accomplished manually only.

Q 40 / 80

Wordpress

What's the primary difference between template tags prefaced with the* versus get_the*?

1.

Template tags prefaced with the_ can be used directly within a template. Template tags prefaced with get_the are generally reserved for partial templates.

2.

Template tags prefaced with the_ return a value. Template tags prefaced with get_the display a value.

3.

Template tags prefaced with the_ display a value. Template tags prefaced with get_the return a value.

4.

Template tags prefaced with the_ don't accept arguments. Template tags prefaced with get_the do accept arguments.

Q 41 / 80

Wordpress

How can you add a custom script that needs to run only on the contact page of a site? The slug of the page is contact.

Link to the script directly from a template named page-contact.php using the get_header() template tag, like this: get_header( '<script src="/my-script.js"></script>' ); Use functions.php to conditionally load the script by hooking it to wp_enqueue_scripts(), like this: add_action( 'wp_enqueue_scripts', 'load_scripts' ); function load_scripts() { if ( is_page( 'contact' ) ) { echo '<script src="/my-script.js"></script>'; } } Use functions.php to conditionally load the script by hooking it to wp_enqueue_scripts(), like this: add_action( 'wp_enqueue_scripts', 'load_scripts' ); function load_scripts() { if ( is_page( 'contact' ) ) { wp_enqueue_script( 'script', get_template_directory_uri() . '/script.js' ); } }

1.

Link to the script directly from a template named page-contact.php, like this:

2.

<head>

3.

<script src="/my-script.js"></script>

4.

</head>

Q 42 / 80

Wordpress

Where can you find the official WordPress documentation and usage guide?

1.

`support.wordpress.com`

2.

`developer.wordpress.com`

3.

`developer.wordpress.org`

4.

`support.wordpress.org`

Q 43 / 80

Wordpress

How would you use CSS to ensure your theme was mobile responsive?

1.

Use CSS grid to create responsive layouts.

2.

Use media queries to add breakpoints for different screen sizes.

3.

Use Flexbox to create flexible page layouts.

4.

all of these answers

Q 44 / 80

Wordpress

The Block API enables developers to register custom blocks in themes or plugins. How would you register a custom block?

1.

Use the registerBlockName() function.

2.

Use the createGutenBlock() function.

3.

Use a block template.

4.

Use the registerBlockType() function.

Q 45 / 80

Wordpress

Which software development principle, often used in WordPress, aims to reduce the repetition of code?

`DRY(Don't Repeat Yourself)`

1.

RRR

2.

WET

3.

DRY

4.

KISS

Q 46 / 80

Wordpress

In a standard template file, how often does the WordPress Loop run?

1.

It runs once per post in the database.

2.

It runs once.

3.

The Loop doesn't run in template files.

4.

It runs once per fetched post.

Q 47 / 80

Wordpress

Which is NOT a suggested performance improvement for your WordPress website?

**Explanation**: New versions usually come with speed improvements. Inactivating plugins improves performance. By exclusion, it's UTF8.

1.

The site should run the most recent version of WordPress.

2.

Remove or inactivate unnecessary plugins.

3.

UTF8 is supported.

4.

Choose a very recent version of PHP.

Q 48 / 80

Wordpress

On a regular WordPress install, what is the difference between transients and the object cache?

1.

Transients are persistent and write to the wp_options. The object cache persists only for the particular page load.

2.

Transients are stored in the WordPress database. The object cache is stored on the server where the WordPress install is located.

3.

Transients are available for the duration of a user session and apply to all page components. The object cache is available only for scripts.

4.

Transients persist only for the particular page load. The object cache is persistent and writes to the wp_options table.

Q 49 / 80

Wordpress

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?

1.

Theme settings

2.

wp-config.php

3.

Customizer

4.

WordPress settings

Q 50 / 80

Wordpress

You can harden your WordPress site security by adding `__` to your wp-config.php file?

1.

database usernames and passwords

2.

unique keys and salts

3.

accessibility

4.

documentation

Q 51 / 80

Wordpress

According to WordPress PHP coding standards for inline comments, how would you write a single-line comment in a PHP document?

1.

`// This is a single line comment`

2.

`/* _ This is a single line comment._/`

3.

`// This is a single line comment.`

4.

`<!-- This is a single line comment -->`

Q 52 / 80

Wordpress

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.

1.

`http://example.com/wp-json/`

2.

`http://example.com/wp-admin/`

3.

`http://example.com/wp-rest/`

4.

`http://example.com/wp-rest-api/`

Q 53 / 80

Wordpress

What is the process of marking the code you write so that it is ready for translation?

**Explanation**: Localization and translation are synonyms for submitting language-specific translation. GlotPress is just a Wordpress plugin.

1.

internationalization

2.

localization

3.

translation

4.

using GlotPress

Q 54 / 80

Wordpress

In your wp-config.php file, you've added the following line of code. What does it do?

`define( 'DISALLOW_FILE_EDIT', true );` **Explanation**: [More WordPress Security: Disallow File Edit Setting In WordPress](https://www.icontrolwp.com/blog/more-wordpress-security-disallow-file-edit-setting-wordpress/). Setting all files to read-only would make auto-updates impossible.

1.

prevents any non-admin user from directly editing theme or plugin files

2.

disables the theme and plugin editor in the WordPress admin

3.

disables the ability to edit core WordPress files from either within the WordPress admin or via direct file access

4.

sets read-only permissions on all files in the WordPress install

Q 55 / 80

Wordpress

Which of the following must have underlined links in order to meet WCAG 2.0 accessibility standards?

1.

links on images

2.

links in user interface controls

3.

links in a nav bar

4.

links in paragraph text

Q 56 / 80

Wordpress

In which of the following ways might you contribute to the WordPress community by testing?

1.

user testing

2.

all of these answers

3.

beta testing

4.

automated testing

Q 57 / 80

Wordpress

WordPress is an open-source software licensed under the GPL. This means that `__`.

1.

derivative works must also be licensed as GPL

2.

all of these answers

3.

the software is free to use

4.

the software is free to modify

Q 58 / 80

Wordpress

undefined

<input type="text" id="title" name="title" /> $title = $_POST[ 'title' ];

1.

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'

2.

The code sample does not use sanitize the form data. It should use the `sanitize_text_field()` function and look like this: `$title = sanitize_text_field( $_POST[ 'title'

3.

There is no error. The code follows WordPress best practices.

4.

The code sample does not allow for translation. It should use a translation function and look like this: `$title = __( $_POST[ 'title' ];`

Q 59 / 80

Wordpress

Which software development principle, often used in WordPress, aims to reduce the repetition of code?

1.

DRY

2.

RRR

3.

WET

4.

KISS

Q 60 / 80

Wordpress

Which of these CSS classs naming convention is correct according to WordPress CSS Coding Standards?

1.

`.selector-name`

2.

`.selector_name`

3.

`.selectorName`

4.

`div.selector_name`

Q 61 / 80

Wordpress

Which folder in a WordPress install is not affected by an automatic WordPress update?

1.

`/wp-admin`

2.

`root`

3.

`/wp-content`

4.

`/wp-includes`

Q 62 / 80

Wordpress

What are transients?

**Explanation**: [Transients](https://developer.wordpress.org/apis/handbook/transients/)

1.

short database queries

2.

a way to cache information

3.

plugins used for quick debugging

4.

post draft stored in the database

Q 63 / 80

Wordpress

If you wanted to debug some JavaScript, which method would you use to display data in your browser console?

1.

`windows.alert()`

2.

`console.log()`

3.

`document.write()`

4.

`innerHTML`

Q 64 / 80

Wordpress

On a webpage, there are frequently navigation links, a search bar, or other elements that appear before the main content. For keyborad 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?

1.

collapsible menus

2.

infinite scroll

3.

skip links

4.

tabbed navigation

Q 65 / 80

Wordpress

What user role would you assign to someone so they can write and publish only their posts and no one else's?

**Explanation**: [Summary of Roles](https://wordpress.org/support/article/roles-and-capabilities/#summary-of-roles)

1.

Contributor

2.

Author

3.

Editor

4.

Subscriber

Q 66 / 80

Wordpress

When should you edit core WordPress files?

**Explanation**: It is not recommended to change WordPress core files other than wp-config.php. [Editing Files Offline](https://wordpress.org/support/article/editing-files/#editing-files-offline)

1.

when there is no plugin available to make a customization you need

2.

when you need to add a custom page template

3.

when you need to add a custom script to the header or footer of every page in a site

4.

You should never edit WordPress core.

Q 67 / 80

Wordpress

Which Wordpress conditional would you use to determine if you were on a single page?

1.

is_archive()

2.

is_page()

3.

is_page_template()

4.

is_single()

Q 68 / 80

Wordpress

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";}`

1.

value

2.

serialized data

3.

PHP array

4.

text array

Q 69 / 80

Wordpress

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;

1.

custom query

2.

template tags

3.

the Loop

4.

nested loop

Q 70 / 80

Wordpress

Which of these are the minimum files required to make a child theme?

1.

index.php functions.php

2.

index.php style.css script.js

3.

functions.php style.css script.js

4.

functions.php style.css

Q 71 / 80

Wordpress

You can harden your Wordpress site security by adding **_** to your wp-config.php file?

1.

hashes and reCAPTCHA

2.

database username and passwords

3.

custom action hooks and filters

4.

unique keys and salts

Q 72 / 80

Wordpress

In the WordPress template hierarchy, which file could not be used to display an archive?

1.

`archive.php`

2.

`index.php`

3.

`page.php`

4.

`category.php`

Q 73 / 80

Wordpress

Why can't you modify the query in a template page?

1.

The query can only be run inside the Loop.

2.

You can modify the query in a template page if you use `pre_get_posts()`.

3.

According to WordPress best practices, the query should only be modified in `functions.php`.

4.

Due to execution order, the query has already run by the time a template is loaded.

Q 74 / 80

Wordpress

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?

1.

WordPress settings

2.

Customizer

3.

wp-config.php

4.

Theme settings

Q 75 / 80

Wordpress

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?

1.

`apply_filters( 'Hello World!', 'mytextdomain' );`

2.

`esc_html( 'Hello World!', 'mytextdomain' );`

3.

`$string = "Hello World!";`

4.

`__( 'Hello World!', 'mytextdomain' );`

Q 76 / 80

Wordpress

Which of these are best practices in accessibility?

1.

Do not skip heading levels.

2.

Be sure there is proper color contrast between background and text.

3.

If an activity can be completed with a mouse, it must also be accessible by keyboard.

4.

all of these answers

Q 77 / 80

Wordpress

JavaScript variables can hold many data types. Which data type does the following variable represent?

`var x = "16"`

1.

Boolean

2.

Number

3.

String

4.

Object

Q 78 / 80

Wordpress

You would use a post instead of a page when the content is **_**.

1.

for a top-level menu item

2.

nested (has a parent/child relationship with another piece of content)

3.

when the content is part of a blog.

4.

evergreen

Q 79 / 80

Wordpress

The WordPress block editor contains a number of default blocks, including blocks for paragraphs, images, quotes, and shortcode. Blocks are grouped into categories to help users browse and discover them. Which is not a category provided by WordPress core?

1.

formatting

2.

widgets

3.

layout

4.

shortcodes

Q 80 / 80