Created
February 19, 2016 17:32
-
-
Save sibaberpollo/f80061df56c49b463660 to your computer and use it in GitHub Desktop.
funciones indispensables para wordpress --> https://ayudawp.com/35-funciones-utiles-para-functions-php-en-wordpress/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'auto_update_plugin', '__return_false' ); | |
add_filter( 'auto_update_theme', '__return_false' ); | |
/* Remover version de Woprdpress */ | |
add_action('init', 'myoverride', 100); | |
function myoverride() { | |
remove_action('wp_head', array(visual_composer(), 'addMetaData')); | |
} | |
/* Campos personalizados GLOBALES */ | |
add_action('admin_menu', 'add_gcf_interface'); | |
function add_gcf_interface() { | |
add_options_page('Global Custom Fields', 'Global Custom Fields', '8', 'functions', 'editglobalcustomfields'); | |
} | |
function editglobalcustomfields() { | |
?> | |
<div class='wrap'> | |
<h2>Global Custom Fields</h2> | |
<form method="post" action="options.php"> | |
<?php wp_nonce_field('update-options') ?> | |
<p><strong>My Name:</strong><br /> | |
<input type="text" name="myname" size="45" value="<?php echo get_option('myname'); ?>" /></p> | |
<p><strong>Amazon ID:</strong><br /> | |
<input type="text" name="amazonid" size="45" value="<?php echo get_option('amazonid'); ?>" /></p> | |
<p><strong>Today's Featured Website:</strong><br /> | |
<input type="text" name="todaysite" size="45" value="<?php echo get_option('todaysite'); ?>" /></p> | |
<p><strong>Welcome Text:</strong><br /> | |
<textarea name="welcomemessage" cols="100%" rows="7"><?php echo get_option('welcomemessage'); ?></textarea></p> | |
<p><input type="submit" name="Submit" value="Update Options" /></p> | |
<input type="hidden" name="action" value="update" /> | |
<input type="hidden" name="page_options" value="myname,amazonid,todaysite,welcomemessage" /> | |
</form> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment