Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the WordPress Media Library?
The WordPress Media Library is a tool inside WordPress that stores and organizes all your images, videos, audio, and documents uploaded to your website. It helps you manage your media files easily.
Click to reveal answer
beginner
How can you add media files to the WordPress Media Library?
You can add media files by clicking the 'Add New' button in the Media Library or by uploading files directly when creating posts or pages. You can drag and drop files or select them from your computer.
Click to reveal answer
intermediate
What is the purpose of media categories or folders in WordPress?
Media categories or folders help organize your media files so you can find them quickly. WordPress by default does not have folders, but plugins can add this feature to group files by type, project, or date.
Click to reveal answer
beginner
How do you edit media file details in WordPress?
You can edit media details by clicking on a media item in the library. You can change the title, caption, alt text (important for accessibility), and description to improve how the media is used and found.
Click to reveal answer
beginner
Why is alt text important for images in the Media Library?
Alt text describes the image for people who use screen readers and helps search engines understand the image content. It improves accessibility and SEO for your website.
Click to reveal answer
Where do you go to upload new media files in WordPress?
AMedia > Add New
BPosts > Add New
CSettings > Media
DAppearance > Themes
✗ Incorrect
The correct place to upload media files is under Media > Add New.
What type of files can you upload to the WordPress Media Library?
AOnly images
BOnly videos
CImages, videos, audio, and documents
DOnly documents
✗ Incorrect
WordPress supports uploading images, videos, audio files, and documents.
What is the main benefit of adding alt text to images?
AMakes images load faster
BImproves accessibility and SEO
CChanges image colors
DDeletes the image
✗ Incorrect
Alt text helps screen readers and search engines understand images, improving accessibility and SEO.
Can you organize media files into folders by default in WordPress?
AYes, WordPress has built-in folders
BNo, and no plugins can add this
CYes, but only for images
DNo, but plugins can add folder features
✗ Incorrect
WordPress does not have folders by default, but plugins can add this feature.
How do you edit the caption of a media file?
AClick the media file in the library and edit the caption field
BEdit the post where the media is used
CChange the file name on your computer
DYou cannot edit captions in WordPress
✗ Incorrect
You edit captions by selecting the media file in the library and changing the caption field.
Explain how you would upload and organize media files in WordPress.
Think about the steps from uploading to organizing and editing.
You got /4 concepts.
Why is it important to add alt text to images in the WordPress Media Library?
Consider both accessibility and search engine benefits.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of the WordPress Media Library?
easy
A. To organize and manage media files like images and videos
B. To write and edit PHP code
C. To create new WordPress themes
D. To manage user roles and permissions
Solution
Step 1: Understand the Media Library role
The Media Library is designed to store and organize media files such as images, audio, and videos.
Step 2: Compare with other options
Options A, B, and D relate to themes, coding, and user management, which are not the Media Library's purpose.
Final Answer:
To organize and manage media files like images and videos -> Option A
Quick Check:
Media Library = Manage media files [OK]
Hint: Media Library is for media files, not code or users [OK]
Common Mistakes:
Confusing Media Library with theme or user management
Thinking it edits code
Assuming it manages plugins
2. Which WordPress function must be called before using wp.media() in JavaScript to open the media uploader?
easy
A. wp_enqueue_script('jquery')
B. wp_enqueue_media()
C. wp_register_style()
D. wp_localize_script()
Solution
Step 1: Identify the function to load media scripts
The function wp_enqueue_media() loads all necessary scripts and styles for the media uploader.
Step 2: Check other options
Options B, C, and D relate to scripts or styles but do not specifically load media uploader scripts.
Final Answer:
wp_enqueue_media() -> Option B
Quick Check:
Load media scripts = wp_enqueue_media() [OK]
Hint: Always enqueue media scripts with wp_enqueue_media() first [OK]
Common Mistakes:
Forgetting to enqueue media scripts before using wp.media()
Using unrelated enqueue functions
Confusing script and style enqueue functions
3. What will the following JavaScript code do in a WordPress admin page?
A. Throw a JavaScript error because wp.media() is undefined
B. Upload a new image automatically without user interaction
C. Close any open media uploader popup
D. Open the WordPress media uploader popup allowing single image selection
Solution
Step 1: Understand wp.media() usage
The code creates a media frame with a title and disables multiple selection, then opens the media uploader popup.
Step 2: Analyze each option
Open the WordPress media uploader popup allowing single image selection matches the behavior. Upload a new image automatically without user interaction is wrong because it does not upload automatically. Close any open media uploader popup is incorrect as it opens, not closes. Throw a JavaScript error because wp.media() is undefined would happen only if scripts are not loaded.
Final Answer:
Open the WordPress media uploader popup allowing single image selection -> Option D
Quick Check:
wp.media() + open() = open media popup [OK]
Hint: wp.media() with open() shows media popup [OK]
Common Mistakes:
Assuming it uploads files automatically
Confusing open() with close()
Not enqueuing media scripts causing errors
4. You wrote this code to open the media uploader but it does not open:
A. The media uploader cannot be opened inside document.ready
B. The frame.open() method is incorrect
C. You forgot to call wp_enqueue_media() to load media scripts
D. jQuery is not loaded on the page
Solution
Step 1: Check media scripts loading
The media uploader requires wp_enqueue_media() to load scripts; without it, wp.media is undefined or non-functional.
Step 2: Evaluate other options
frame.open() is correct syntax. jQuery is likely loaded if using $ inside document.ready. The uploader can open inside document.ready.
Final Answer:
You forgot to call wp_enqueue_media() to load media scripts -> Option C
Quick Check:
Missing wp_enqueue_media() = no media popup [OK]
Hint: Always enqueue media scripts before using wp.media() [OK]
Common Mistakes:
Calling frame.open() incorrectly
Assuming jQuery absence causes this
Thinking document.ready blocks media popup
5. You want to let users select multiple images from the media library and then display their URLs in a list. Which code snippet correctly sets up the media frame for multiple selection?