Changeset 135351
- Timestamp:
- 07/15/2009 11:34:46 AM (17 years ago)
- Location:
- kahis-notes/trunk
- Files:
-
- 2 edited
-
knotes.php (modified) (11 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kahis-notes/trunk/knotes.php
r103219 r135351 3 3 Plugin Name: Kahi's Notes 4 4 Plugin URI: http://kahi.cz/wordpress/wp-notes-plugin/ 5 Description: A place for your notes inside WordPress .5 Description: A place for your notes inside WordPress administration. 6 6 Author: Peter Kahoun 7 Version: 0. 67 Version: 0.7 8 8 Author URI: http://kahi.cz 9 */10 11 /*12 13 @todo14 - !! Page title not working15 -16 17 9 */ 18 10 … … 37 29 // Descr: in db are these settings prefixed with abbr_ 38 30 static $settings = array ( 39 40 'content' => '', 41 31 'content' => 'Your mind comes here...', 42 32 ); 43 44 45 46 33 47 34 … … 56 43 57 44 // load translation 58 // load_plugin_textdomain(self::$abbr, 'wp-content/plugins/' . self::$dir_name . '/languages/'); 45 // @todo: generate .pot (very low priority) 46 // load_plugin_textdomain(self::$abbr, 'wp-content/plugins/' . self::$dir_name . '/languages/'); 59 47 60 48 // prepare settings … … 65 53 add_action('admin_menu', array (self::$abbr, 'admin_menu')); 66 54 add_action('admin_head', array (self::$abbr, 'admin_head')); 67 68 } 55 add_action('wp_dashboard_setup', array (self::$abbr, 'wp_dashboard_setup')); 56 57 } 58 69 59 70 60 … … 81 71 82 72 83 // Hook: Action: admin_menu73 // Hook: Special: admin_menu 84 74 // Descr: adds own item into menu in administration 85 75 public static function admin_menu () { … … 97 87 98 88 89 // Hook: Special: wp_add_dashboard_widget 90 // Descr: links the function with widget's content 91 public static function wp_dashboard_setup() { 92 wp_add_dashboard_widget('knotes', 'Notes', array (self::$abbr, 'dashboard_widget')); 93 } 94 95 99 96 // Hook: Action: admin_head 100 97 // Descr: apply my CSS 101 98 public static function admin_head () { 102 99 103 ?>100 ?> 104 101 105 102 <!-- by plugin: <?php echo self::$full_name; ?> --> 106 103 <style type="text/css"> 107 #<?php echo self::$abbr; ?> textarea {width:60em; min-height:10em;} 104 #<?php echo self::$abbr; ?> textarea {width:60em; min-height:14em;} 105 #dashboard-widgets #<?php echo self::$abbr; ?> textarea {width:100%; /* note: max-height:60em not working*/} 108 106 </style> 109 107 <script type="text/javascript"> … … 113 111 </script> 114 112 115 <?php 116 117 } 118 119 120 // WP settings page --------------------------------------------------------- 113 <?php 114 } 115 116 117 118 119 // ==================== WP settings pages ==================== 120 121 121 122 122 // Descr: own settings-page … … 124 124 public static function TheSettingsPage () { 125 125 126 127 ?> 126 ?> 128 127 129 128 <div class="wrap" id="<?php echo self::$abbr; ?>"> 130 131 129 132 130 <h2><?php echo self::$short_name; ?></h2> … … 134 132 <form method="post" action="options.php"> 135 133 136 137 134 <div> 138 135 <label> … … 154 151 </div><!-- /wrap --> 155 152 156 <?php 153 <?php 154 } 155 156 157 // Descr: Dashboard wiget 158 // @note: at the time, this is exact copy of options-page (minus label) 159 // @todo: fix max-height? 160 public static function dashboard_widget() { 161 162 ?> 163 164 <form method="post" action="options.php"> 165 166 <div> 167 <textarea name="<?php echo self::$abbr . '_content'; ?>" rows="3"><?php echo htmlSpecialChars(self::$settings['content']) ?></textarea> 168 </div> 169 170 <p class="submit"> 171 <?php wp_nonce_field('update-options') ?> 172 <input type="hidden" name="action" value="update" /> 173 <input type="hidden" name="page_options" value="<?php echo self::$abbr . '_content'; ?>" /> 174 <input type="submit" name="<?php echo self::$abbr ?>_submit_update" value="<?php _e('Save Changes') ?>" class="button" /> 175 </p> 176 177 </form> 178 179 <?php 157 180 } 158 181 … … 181 204 182 205 206 183 207 // ==================== Initialize the plugin ==================== 184 208 knotes::Init(); -
kahis-notes/trunk/readme.txt
r103221 r135351 1 1 === Kahi's WP Notes === 2 Contributors: kahi2 Contributors: 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=kahi%40kahi%2ecz&item_name=Kahi&no_shipping=1&cn=Your%20note%2e%2e%2e&tax=0¤cy_code=EUR&lc=CZ&bn=PP%2dDonationsBF&charset=UTF%2d8 4 4 Tags: note, notes, admin, administration 5 5 Requires at least: 2.7 6 Tested up to: 2. 7.16 Tested up to: 2.8.1 7 7 Stable tag: trunk 8 8 9 For me, it's place to leave notes about future articles, possible topics, ToDos connected with that particular WP site. 9 For me, it's the place to keep notes about future articles, possible topics, plans, ToDos connected with that particular WP site. 10 10 11 11 12 == Description == … … 20 21 21 22 **PHP 5** on your server is necessary to run this plugin. 23 24 25 == Screenshots == 26 27 Imagine a large text-field... or [see a screenshot](http://kahi.cz/wordpress/wp-content/images/kahis-notes-plugin/notes-screen.png) 28 29 30 == Changelog == 31 32 = 0.7 = 33 34 * New: Dashboard widget!
Note: See TracChangeset
for help on using the changeset viewer.