Un ejemplo:
add_action( 'admin_menu', 'frasedeldia_menu' ); add_action( 'admin_init', 'frasedeldia_settings'); function frasedeldia_settings() { register_setting( 'frasedeldia-group', 'frasedeldia_text' ); }; function frasedeldia_menu() { add_options_page( 'Opciones frase del dia', 'Frase del día', 'manage_options', 'frasedeldia-identifier', 'frasedeldia_options' ); } function frasedeldia_options() { if ( !current_user_can( 'manage_options' ) ) { wp_die( 'You do not have sufficient permissions to access this page.' ); } ?> <div> <?php screen_icon(); ?> <h2>Opciones frase del día</h2> <form method="post" action="options.php"> <?php settings_fields( 'frasedeldia-group' ); do_settings_fields( 'frasedeldia-group', '' ); ?> <p>Introduzca frase</p> <input type="text" name="frasedeldia_text" value="<?php echo get_option('frasedeldia_text'); ?>" /> <?php submit_button(); ?> </form> </div> <?php } ?>