Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. add_options_page ( 'XXX', 'XXX', 'manage_options', 'xxx_plugin', 'xxx_options_page' );
  2.  
  3. function xxx_options_page() { ?>
  4. <form action="options.php" method="post">
  5. <?php settings_fields('xxx_plugin_options'); ?>
  6. <?php $options = get_option('xxx_options'); ?>
  7. <table class="form-table">
  8. <tr>
  9. <th scope="row"><?php _e('Settings', 'xxx') ?></th>
  10. <td>
  11. <input type="checkbox" name="xxx_options[some_option]" value="1" <?php checked( 1 == $options['some_option'] ); ?> /> <?php _e("Some Option", "xxx") ?>
  12. </td>
  13. </tr>
  14. // Some more options
  15. </table>
  16. <p class="submit">
  17. <input name="xxx_submit" type="submit" class="button-primary" value="<?php _e('Submit Changes', 'xxx') ?>" />
  18. </p>
  19. </form>
  20.  
  21. <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement