]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - wordpress-plugin/ozh-plc-bridge/inc/options.php
Initial commit (importing from http://svn.planetozh.com/ozhin)
[Github/YOURLS.git] / wordpress-plugin / ozh-plc-bridge / inc / options.php
1 <?php\r
2 \r
3 function wp_ozh_yourls_add_page() {\r
4         add_options_page('Ozh\'s PLC Bridge', 'PLC Bridge', 'manage_options', 'ozh_plc', 'wp_ozh_yourls_do_page');\r
5 }\r
6 \r
7 \r
8 function wp_ozh_yourls_do_page() {\r
9         ?>\r
10         <div class="wrap">\r
11         <h2>Your Plugin Name</h2>\r
12 \r
13         <form method="post" action="options.php">\r
14         <?php settings_fields('wp_ozh_yourls_options'); ?>\r
15 ozh_yourls_do_posts\r
16 ozh_yourls_do_pages\r
17 ozh_yourls_twitter_login\r
18 ozh_yourls_twitter_password\r
19 ozh_yourls_twitter_msg\r
20 ozh_yourls_includes\r
21 \r
22         <?php\r
23         echo "<pre>";\r
24         var_dump($_POST);\r
25         echo "</pre>";\r
26         ?>\r
27         \r
28 \r
29         <table class="form-table">\r
30 \r
31         <tr valign="top">\r
32         <th scope="row">Posts</th>\r
33         <td><input type="hidden" value="0" name="ozh_plc[do_posts]"/>\r
34         <input name="ozh_plc[do_posts]" id="ozh_yourls_do_posts" type="checkbox" value="1" <?php checked('1', get_option('ozh_yourls_do_posts')); ?> /></td>\r
35         </tr>\r
36         \r
37         <tr valign="top">\r
38         <th scope="row">Pages</th>\r
39         <td><input type="hidden" value="0" name="ozh_plc[do_pages]"/>\r
40         <input name="ozh_plc[do_pages]" id="ozh_yourls_do_pages" type="checkbox" value="1" <?php checked('1', get_option('ozh_yourls_do_pages')); ?> /></td>\r
41         </tr>\r
42 \r
43          \r
44         <tr valign="top">\r
45         <th scope="row">Login</th>\r
46         <td><input type="text" name="ozh_plc[twitter_login]" value="<?php echo get_option('ozh_yourls_twitter_login'); ?>" /></td>\r
47         </tr>\r
48 \r
49         <tr valign="top">\r
50         <th scope="row">Pwd</th>\r
51         <td><input type="text" name="ozh_plc[twitter_password]" value="<?php echo get_option('ozh_yourls_twitter_password'); ?>" /></td>\r
52         </tr>\r
53 \r
54         </table>\r
55         <p class="submit">\r
56         <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />\r
57         </p>\r
58 \r
59         </form>\r
60         </div>\r
61         \r
62         <?php   \r
63 }\r