Complete the code to activate a plugin in WordPress.
activate_plugin('[1]');
Activating a plugin requires the main plugin file path, like 'my-plugin/my-plugin.php'.
Complete the code to enqueue a stylesheet properly in WordPress.
wp_enqueue_style('[1]', get_template_directory_uri() . '/style.css');
The handle 'theme-style' is a common name for the main theme stylesheet.
Fix the error in the deployment script by completing the missing function name.
function [1]() { // Clear cache after deployment if (function_exists('wp_cache_clear_cache')) { wp_cache_clear_cache(); } }
The function 'clear_cache' clearly indicates its purpose to clear cache after deployment.
Fill both blanks to properly register and enqueue a script in WordPress.
function load_custom_script() {
wp_register_script('[1]', get_template_directory_uri() . '/js/custom.js', array('jquery'), null, true);
wp_enqueue_script('[2]');
}The script handle used in both registration and enqueue must be the same, here 'custom-script'.
Fill all three blanks to create a safe deployment function that disables debugging and flushes rewrite rules.
function safe_deploy() {
define('[1]', false);
flush_rewrite_rules([2]);
error_reporting([3]);
}Disabling debugging uses define('WP_DEBUG', false), flushing rewrite rules with true, and turning off error reporting with 0.