Complete the code to read a WordPress option named 'site_name'.
$site_name = get_option([1]);The get_option function requires the option name as a string, so it must be in quotes.
Complete the code to update the WordPress option 'background_color' with the value '#ffffff'.
update_option([1], '#ffffff');
The option name must be a string, so it needs quotes around it.
Fix the error in the code to properly add a new option 'footer_text' with value 'Thank you!'.
add_option([1], 'Thank you!');
The option name must be a string literal, so it needs quotes.
Fill both blanks to read the option 'header_text' and provide a default value 'Welcome!'.
$header = get_option([1], [2]);
The first argument is the option name as a string, the second is the default value also as a string.
Fill all three blanks to update the option 'footer_color' only if the new value '#000000' is different from the current one.
if (get_option([1]) !== [2]) { update_option([3], '#000000'); }
We check the current value of 'footer_color' option against the new value '#000000'. If different, we update it.