Created
May 23, 2012 22:55
-
-
Save pedroelsner/2778351 to your computer and use it in GitHub Desktop.
#7 - Plugin WordPress - Hello Word
This file contains hidden or 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 | |
function hello_world_meta_box() { | |
global $post; | |
echo '<input id="hello_world_nonce" name="hello_world_nonce" type="hidden" value="' . wp_create_nonce( plugin_basename(__FILE__) ) . '" />'; | |
echo '<input id="hello_world_opt_mostrar_mensagem" name="hello_world_opt_mostrar_mensagem" type="checkbox" '; | |
if ( get_post_meta( $post->ID, 'hello_world_opt_mostrar_mensagem', true ) == '1' ) | |
echo ' checked="checked" '; | |
echo '/>'; | |
echo '<label for="hello_world_opt_mostrar_mensagem">Mostrar mensagem?</label>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment