How Would You Refactor This Bit of Code To Be More Concise in Wordpress Context?
How Would You Refactor This Bit of Code To Be More Concise in Wordpress Context?
/*
$map = array(
*/
$names = array();
if ( $data == $name)
$names[] = $data['name'];
return $name
?>
</form>
?>
3.What are MU plugins? Why they are used? Please describe it in brief
A must-use plugin (also called a ‘mu-plugin’) is a plugin that will always be activated by
default.
mu-plugins were only available for WPMU.
A mu-plugin is similar to a classic plugin, except that it is not stored in the plugins
directory of the wp-content folder,
but rather in the mu-plugins directory, of the same folder. If you have never used mu-
plugins before,
this directory should not exist, but you can create it without any problem.
function my_option_code() {
update_option('google_site_key' , $_POST['google_site_key']);
add_action('option_code', 'my_option_code');
<?phpglobal $wpdb;
$option_val = $wpdp->get_var($query);
$wpdb->execute();
$result = $wpdb->get_result();