Changeset 1693456
- Timestamp:
- 07/10/2017 04:26:52 AM (9 years ago)
- Location:
- note-press/trunk
- Files:
-
- 21 added
- 17 edited
- 1 copied
-
. (copied) (copied from note-press/trunk)
-
Note_Press.php (modified) (1 diff)
-
README.txt (modified) (4 diffs)
-
admin/Note_Press-admin-menu.php (added)
-
admin/Note_Press-settings.php (added)
-
admin/assets/js/admin.js (modified) (1 diff)
-
admin/class-Note_Press-admin.php (modified) (1 diff)
-
admin/images (added)
-
admin/images/CH.png (added)
-
admin/images/NPLogo1.png (added)
-
admin/images/Note_Pressicon.png (added)
-
admin/images/P0.png (added)
-
admin/images/P1.png (added)
-
admin/images/P2.png (added)
-
admin/images/Patreon.png (added)
-
admin/images/Thumbs.db (added)
-
admin/images/X.png (added)
-
admin/mysql.php (added)
-
admin/partials (added)
-
admin/partials/Note_Presss-admin-display.php (added)
-
admin/views/admin.php (modified) (1 diff)
-
assets/screenshot-1.jpg (modified) (previous)
-
assets/screenshot-2.jpg (modified) (previous)
-
assets/screenshot-3.jpg (modified) (previous)
-
assets/screenshot-4.jpg (added)
-
gpl.txt (modified) (1 diff)
-
includes/class-Note_Press-activator.php (added)
-
includes/class-Note_Press-deactivator.php (added)
-
includes/class-Note_Press-i18n.php (added)
-
includes/class-Note_Press-loader.php (added)
-
includes/class-Note_Press.php (added)
-
languages/Note_Press-en_US.mo (modified) (previous)
-
languages/Note_Press-en_US.po (modified) (1 diff)
-
languages/Note_Press-es_ES.mo (modified) (previous)
-
languages/Note_Press-es_ES.po (modified) (1 diff)
-
public/Note_Pressmenu.php (modified) (1 diff)
-
public/assets/css/public.css (modified) (1 diff)
-
public/class-Note_Press.php (modified) (1 diff)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
note-press/trunk/Note_Press.php
r1589611 r1693456 13 13 * 14 14 * @wordpress-plugin 15 15 16 * Plugin Name: Note Press 16 17 * Plugin URI: http://www.datainterlock.com 17 * Description: Add, edit and delete multiple notes and display them with icons on the Admin page .18 * Version: 0.1. 218 * Description: Add, edit and delete multiple notes and display them with icons on the Admin page or dashboard. 19 * Version: 0.1.7 19 20 * Author: datainterlock 20 21 * Author URI: http://www.datainterlock.com 21 22 * Text Domain: Note_Press 22 * License: GPL-3.0+23 * License: -3.0+ 23 24 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 24 25 * Domain Path: /languages 25 26 * WordPress-Plugin-Boilerplate: v2.6.1 27 28 29 This program is free software: you can redistribute it and/or modify 30 it under the terms of the GNU General Public License as published by 31 the Free Software Foundation, either version 3 of the License. 32 33 This program is distributed in the hope that it will be useful, 34 but WITHOUT ANY WARRANTY; without even the implied warranty of 35 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 GNU General Public License for more details. 37 38 39 You should have received a copy of the GNU General Public License 40 along with this program. If not, see <http://www.gnu.org/licenses/>. 41 42 The basic structure of this plugin was cloned from the [WordPress-Plugin-Boilerplate] 43 (https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate) project. Thanks Tom! 44 45 Many of the features of the Boilerplate, such as the admin settings, css and js are included 46 in this plugin yet are not used in this version. I've went ahead and included them as I do have 47 plans to use them in the future. 48 49 */ 50 // If this file is called directly, abort. 51 if (!defined('WPINC')) 52 { 53 die; 54 } 55 /** 26 56 27 This program is free software: you can redistribute it and/or modify 28 it under the terms of the GNU General Public License as published by 29 the Free Software Foundation, either version 3 of the License. 57 * The code that runs during plugin activation. 30 58 31 This program is distributed in the hope that it will be useful, 32 but WITHOUT ANY WARRANTY; without even the implied warranty of 33 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 GNU General Public License for more details. 59 * This action is documented in includes/class-Note_Press-activator.php 35 60 36 You should have received a copy of the GNU General Public License 37 along with this program. If not, see <http://www.gnu.org/licenses/>. 61 */ 62 function activate_Note_Press() 63 { 64 require_once plugin_dir_path(__FILE__) . 'includes/class-Note_Press-activator.php'; 65 Note_Press_Activator::activate(); 66 } 67 /** 38 68 39 The basic structure of this plugin was cloned from the [WordPress-Plugin-Boilerplate] 40 (https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate) project. Thanks Tom! 69 * The code that runs during plugin deactivation. 41 70 42 Many of the features of the Boilerplate, such as the admin settings, css and js are included 43 in this plugin yet are not used in this version. I've went ahead and included them as I do have 44 plans to use them in the future. 71 * This action is documented in includes/class-Note_Press-deactivator.php 72 45 73 */ 46 // If this file is called directly, abort. 47 if ( ! defined( 'WPINC' ) ) { 48 die; 49 } 50 $Note_Press_db_version = "1.0"; 74 function deactivate_Note_Press() 75 { 76 require_once plugin_dir_path(__FILE__) . 'includes/class-Note_Press-deactivator.php'; 77 Note_Press_Deactivator::deactivate(); 78 } 79 register_activation_hook(__FILE__, 'activate_Note_Press'); 80 register_deactivation_hook(__FILE__, 'deactivate_Note_Press'); 81 /** 51 82 52 /*----------------------------------------------------------------------------* 53 * Public-Facing Functionality 54 *----------------------------------------------------------------------------*/ 83 * The core plugin class that is used to define internationalization, 55 84 56 /* 57 * @TODO: 58 * 59 * - replace `class-Note_Press.php` with the name of the plugin's class file 60 * 61 */ 62 require_once( plugin_dir_path( __FILE__ ) . 'public/class-Note_Press.php' ); 85 * admin-specific hooks, and public-facing site hooks. 63 86 64 /* 65 * Register hooks that are fired when the plugin is activated or deactivated. 66 * When the plugin is deleted, the uninstall.php file is loaded. 67 * 68 * @TODO: 69 * 70 * - replace Note_Press with the name of the class defined in 71 * `class-Note_Press.php` 72 */ 73 register_activation_hook( __FILE__, array( 'Note_Press', 'Note_Pressactivate' ) ); 74 register_deactivation_hook( __FILE__, array( 'Note_Press', 'Note_Pressdeactivate' ) ); 87 */ 88 require plugin_dir_path(__FILE__) . 'includes/class-Note_Press.php'; 89 /** 75 90 76 /* 77 * @TODO: 78 * 79 * - replace Note_Press with the name of the class defined in 80 * `class-Note_Press.php` 81 */ 82 add_action( 'plugins_loaded', array( 'Note_Press', 'Note_Pressget_instance' ) ); 91 * Begins execution of the plugin. 83 92 84 /*----------------------------------------------------------------------------* 85 * Dashboard and Administrative Functionality 86 *----------------------------------------------------------------------------*/ 93 * 87 94 88 /* 89 * @TODO: 90 * 91 * - replace `class-Note_Press-admin.php` with the name of the plugin's admin file 92 * - replace Note_Press_Admin with the name of the class defined in 93 * `class-Note_Press-admin.php` 94 * 95 * If you want to include Ajax within the dashboard, change the following 96 * conditional to: 97 * 98 * if ( is_admin() ) { 99 * ... 100 * } 101 * 102 * The code below is intended to to give the lightest footprint possible. 103 */ 104 if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) 105 { 106 // enable these to add the settings menu option 107 // require_once( plugin_dir_path( __FILE__ ) . 'admin/class-Note_Press-admin.php' ); 108 // add_action( 'plugins_loaded', array( 'Note_Press_Admin', 'get_instance' ) ); 95 * Since everything within the plugin is registered via hooks, 109 96 110 } 97 * then kicking off the plugin from this point in the file does 98 99 * not affect the page life cycle. 100 101 * 102 103 * @since 1.0.0 104 105 */ 106 function run_Note_Press() 107 { 108 $plugin = new Note_Press(); 109 $plugin->run(); 110 } 111 run_Note_Press(); 112 -
note-press/trunk/README.txt
r1589611 r1693456 1 === Note Press ===1 === Note Press === 2 2 Contributors: datainterlock 3 3 Tags: note, admin notes, developer notes, notepad, collaboration, clients 4 Donate link: http ://www.datainterlock.com/note-press/4 Donate link: https://www.patreon.com/user?u=6474471 5 5 Requires at least: 3.9 6 Tested up to: 4. 76 Tested up to: 4.8 7 7 Stable tag: trunk 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 11 Add, edit and delete multiple notes and display them with icons on the Admin page.11 Add, edit and delete multiple notes to multiple users and display them with icons on the Admin page or Dashboard. 12 12 13 13 14 14 == Description == 15 Note Press is an extremely easy to use note system for the WordPress Admin panel. Creating to-do lists, leaving instructions for clients, collecting code snippets or collaborating with other admins are just a few of the uses for Note Press. Unlike other note plugins, Note Press keeps thing extremely simple by using features familiar to all WordPress users. Simply click on the Note Press admin button and your notes are all there listed by date.15 Note Press is an extremely easy to use note system for the WordPress Admin panel. Creating to-do lists, leaving instructions for clients, collecting code snippets or collaborating with other users are just a few of the uses for Note Press. You can even give access to Note Press for your Authors, Contributors and Editors. Unlike other note plugins, Note Press keeps thing extremely simple by using features familiar to all WordPress users. Simply click on the Note Press button on the Admin Menu and view a list of all notes. Or visit the dashboard to view Sticky Notes in any color. You can even set a priority and a deadline for notes. 16 16 17 17 … … 32 32 = Using HTTP = 33 33 34 1. Download `Note_Press.zip` from http ://www.datainterlock.com34 1. Download `Note_Press.zip` from https://wordpress.org/plugins/note-press/ 35 35 2. Extract the \'Note Press` directory to your computer 36 36 3. Upload the `Note Press` directory to the `/wp-content/plugins/` directory … … 41 41 = Who can see Note Press? = 42 42 43 At this time, only the Super Admin has the ability to use Note Press. 43 It will depend on the configuration settings. Admins can configured Note Press so that anyone with Contributor access and above can read and write notes with Note Press. 44 Admins and Super Admins will be able to see all notes sent to and from all users with Note Press access. 45 Users who don't have Note Press access can see and delete Dashboard Sticky Notes 46 47 = What's a Sticky Note? = 48 49 Note Press will allow you to create Sticky notes on the Wordpress Admin Dashboard and allow you to chose the color of the note. A Sticky note will be the only way that users, like contributors who have access to the dashboard but do not have Note Press access, can see notes sent to them. 50 51 = Does Note Press support multi-site? = 52 Yes, but. There is no capability to send notes across sites. Each site will have it's own copy of Note Press activated but each site can only send note to that site's users. 44 53 45 54 = Can the icons be replaced? = … … 64 73 65 74 == Screenshots == 66 1. The main Note Press Main panel showing a list of notes. 67 2. Viewing a note in Note Press with media embedded. 68 3. Adding a note to Note Press. 75 1. The Wordpress Dashboard showing sticky notes in different colors and with media embedded. 76 2. The main Note Press Main panel showing a list of notes. 77 3. The Note Press Settings menu 78 4. Adding a note to Note Press. 69 79 70 80 == Changelog == 81 = 0.1.7 = 82 * Fixed an error where the next/prev arrows in the note list had the wrong URL. 83 84 = 0.1.6 = 85 * Fixed an error with database name being hard coded. 86 * Added limited multi-site abilities. 87 88 = 0.1.5 = 89 * Added the ability to send notes to other users with at least Author priviliges. 90 * Added the ability to post sticky notes on the dashboard in any color. 91 * Added the ability to allow Authors and above to access Note Press and create their own notes and edit/delete those sent to them. 92 * Gave priviliges to Admin and Super Admin users to view, edit and delete any note. 93 * Added the ability to see when notes have been viewed. 94 * Added the ability for recipients of Sticky Notes to delete them from the dashboard. 95 * Added Nonce check on input forms. 96 97 = 0.1.4 = 98 * Patch to fix install issues with 0.1.3 99 100 = 0.1.3 = 101 * Boilerplate updated. 102 * Public funcitons moved to admin menu where they should have been in the first place. 103 * Fixed strings that were hard coded instead of being in the language files. 104 * Removed language files that prevented language switching. 105 * Added list of notes to the dashboard. 106 * Database updated with new fields. 107 * Fixed column sorting which was broken in 0.1.2 as a result of preparing queries. 108 71 109 = 0.1.2 = 72 Security update to reduce risk of SQL injection.110 * Security update to reduce risk of SQL injection. 73 111 74 112 = 0.1.1 = 75 Updated to comply with depreciated functions.76 Removed some annoying notices of variables not being set.113 * Updated to comply with depreciated functions. 114 * Removed some annoying notices of variables not being set. 77 115 78 116 = 0.1.0 = -
note-press/trunk/admin/assets/js/admin.js
r1156271 r1693456 1 (function ( $ ) { 2 "use strict"; 3 4 $(function () { 5 6 // Place your administration-specific JavaScript here 7 8 }); 9 10 }(jQuery)); 1 (function( $ ) { 2 3 // Add Color Picker to all inputs that have 'color-field' class 4 $(function() { 5 $('.NPcolor-field').wpColorPicker(); 6 }); 7 8 })( jQuery ); -
note-press/trunk/admin/class-Note_Press-admin.php
r1156271 r1693456 1 1 <?php 2 3 4 5 6 2 7 /** 3 * Plugin Name. 8 9 10 * The admin-specific functionality of the plugin. 11 12 4 13 * 5 * @package Note_Press 6 * @author datainterlock <postmaster@datainterlock.com> 7 * @license GPL-3.0+ 8 * @link http://www.datainterlock.com 9 * @Copyright (C) 2015 Rod Kinnison postmaster@datainterlock.com 14 15 16 * @link http://www.datainterlock.com 17 18 19 * @since 1.0.0 20 21 22 * 23 24 25 * @package Note_Press 26 27 28 * @subpackage Note_Press/admin 29 30 10 31 */ 11 32 33 34 35 36 12 37 /** 13 * Plugin class. This class should ideally be used to work with the 14 * administrative side of the WordPress site. 38 39 40 * The admin-specific functionality of the plugin. 41 42 15 43 * 16 * If you're interested in introducing public-facing 17 * functionality, then refer to `class-plugin-name.php` 44 45 46 * Defines the plugin name, version, and two examples hooks for how to 47 48 49 * enqueue the admin-specific stylesheet and JavaScript. 50 51 18 52 * 19 * @TODO: Rename this class to a proper name for your plugin. 20 * 21 * @package Plugin_Name_Admin 22 * @author Your Name <email@example.com> 53 54 55 * @package Note_Press 56 57 58 * @subpackage Note_Press/admin 59 60 61 * @author Rod Kinnison <postmaster@datainterlock.com> 62 63 23 64 */ 65 66 24 67 class Note_Press_Admin { 25 68 69 70 71 72 26 73 /** 27 * Instance of this class. 74 75 76 * The ID of this plugin. 77 78 28 79 * 80 81 29 82 * @since 1.0.0 83 84 85 * @access private 86 87 88 * @var string $plugin_name The ID of this plugin. 89 90 91 */ 92 93 94 private $plugin_name; 95 96 97 98 99 100 /** 101 102 103 * The version of this plugin. 104 105 30 106 * 31 * @var object 107 108 109 * @since 1.0.0 110 111 112 * @access private 113 114 115 * @var string $version The current version of this plugin. 116 117 32 118 */ 33 protected static $instance = null; 119 120 121 private $version; 122 123 124 125 34 126 35 127 /** 36 * Slug of the plugin screen. 128 129 130 * Initialize the class and set its properties. 131 132 37 133 * 134 135 38 136 * @since 1.0.0 137 138 139 * @param string $plugin_name The name of this plugin. 140 141 142 * @param string $version The version of this plugin. 143 144 145 */ 146 147 148 public function __construct( $plugin_name, $version ) { 149 150 151 152 153 154 $this->plugin_name = $plugin_name; 155 156 157 $this->version = $version; 158 159 160 } 161 162 163 164 165 166 /** 167 168 169 * Register the stylesheets for the admin area. 170 171 39 172 * 40 * @var string 173 174 175 * @since 1.0.0 176 177 41 178 */ 42 protected $plugin_screen_hook_suffix = null; 179 180 181 public function enqueue_styles() { 182 183 184 185 186 187 /** 188 189 190 * This function is provided for demonstration purposes only. 191 192 193 * 194 195 196 * An instance of this class should be passed to the run() function 197 198 199 * defined in Note_Press_Loader as all of the hooks are defined 200 201 202 * in that particular class. 203 204 205 * 206 207 208 * The Note_Press_Loader will then create the relationship 209 210 211 * between the defined hooks and the functions defined in this 212 213 214 * class. 215 216 217 */ 218 219 220 wp_enqueue_style( 'wp-color-picker' ); 221 222 223 // wp_enqueue_style($this->plugin_name, 'wp-color-picker', array(), $this->version, 'all' ); 224 225 226 //wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/Note_Press-admin.css', array(), $this->version, 'all' ); 227 228 229 } 230 231 232 233 43 234 44 235 /** 45 * Initialize the plugin by loading admin scripts & styles and adding a 46 * settings page and menu. 236 237 238 * Register the JavaScript for the admin area. 239 240 47 241 * 48 * @since 1.0.0 242 243 244 * @since 1.0.0 245 246 49 247 */ 50 private function __construct() { 51 52 /* 53 * @TODO : 248 249 250 public function enqueue_scripts() { 251 252 253 254 255 256 /** 257 258 259 * This function is provided for demonstration purposes only. 260 261 54 262 * 55 * - Uncomment following lines if the admin class should only be available for super admins 263 264 265 * An instance of this class should be passed to the run() function 266 267 268 * defined in Note_Press_Loader as all of the hooks are defined 269 270 271 * in that particular class. 272 273 274 * 275 276 277 * The Note_Press_Loader will then create the relationship 278 279 280 * between the defined hooks and the functions defined in this 281 282 283 * class. 284 285 56 286 */ 57 if( ! is_super_admin() ) { 58 return; 59 } 60 61 /* 62 * Call $plugin_slug from public plugin class. 63 * 64 * @TODO: 65 * 66 * - Rename "Plugin_Name" to the name of your initial plugin class 67 * 68 */ 69 $plugin = Note_Press::get_instance(); 70 $this->plugin_slug = $plugin->get_plugin_slug(); 71 72 // Load admin style sheet and JavaScript. 73 add_action( 'admin_enqueue_scripts', array( $this, 'Note_Pressenqueue_admin_styles' ) ); 74 add_action( 'admin_enqueue_scripts', array( $this, 'Note_Pressenqueue_admin_scripts' ) ); 75 76 // Add the options page and menu item. 77 add_action( 'admin_menu', array( $this, 'Note_Pressadd_plugin_admin_menu' ) ); 78 79 // Add an action link pointing to the options page. 80 $plugin_basename = plugin_basename( plugin_dir_path( realpath( dirname( __FILE__ ) ) ) . $this->plugin_slug . '.php' ); 81 add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'Note_Pressadd_action_links' ) ); 82 83 /* 84 * Define custom functionality. 85 * 86 * Read more about actions and filters: 87 * http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters 88 */ 89 //add_action( '@TODO', array( $this, 'action_method_name' ) ); 90 //add_filter( '@TODO', array( $this, 'filter_method_name' ) ); 287 288 289 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'assets/js/admin.js', array( 'wp-color-picker' ), $this->version, false ); 290 91 291 92 292 } 93 293 94 /** 95 * Return an instance of this class. 96 * 97 * @since 1.0.0 98 * 99 * @return object A single instance of this class. 100 */ 101 public static function Note_Pressget_instance() { 102 103 /* 104 * @TODO : 105 * 106 * - Uncomment following lines if the admin class should only be available for super admins 107 */ 108 /* if( ! is_super_admin() ) { 109 return; 110 } */ 111 112 // If the single instance hasn't been set, set it now. 113 if ( null == self::$instance ) { 114 self::$instance = new self; 294 295 296 297 298 public function Note_Press_dashboard( $post, $callback_args ) { 299 300 301 global $wpdb; 302 303 304 305 306 307 $userID = get_current_user_id(); 308 309 310 $table_name = $wpdb->prefix . "Note_Press"; 311 312 313 $num = $wpdb->get_var("SELECT COUNT(*) FROM $table_name where userTo = $userID"); 314 315 316 if ($num == 0) 317 318 319 { 320 321 322 echo __('No notes to you.','Note_Press'); 323 324 115 325 } 116 326 117 return self::$instance; 327 328 else 329 330 331 { 332 333 334 echo '<table width="100%">'; 335 336 337 echo '<tr><td></td><td>'.__("Title","Note_Press").'</td><td>'.__("Priority","Note_Press")."</td><td>".__("Deadline","Note_Press")."</td><td>".__("Read","Note_Press")."</tr>"; 338 339 340 $noteList = $wpdb->get_results("Select * from $table_name where userTo = $userID"); 341 342 343 foreach ($noteList as $note) 344 345 346 { 347 348 349 if ($note->Deadline == NULL) 350 351 352 { 353 354 355 $thisdate = ''; 356 357 358 } 359 360 361 else 362 363 364 { 365 366 367 $date = new DateTime($note->Deadline); 368 369 370 $thisdate =date_format($date,'Y-m-d'); 371 372 373 } 374 375 376 echo '<tr><td>'; 377 378 379 echo ("<img src=".get_option("Note_Press_icons_url",'null').$note->Icon." alt='Icon not found' >"); 380 381 382 echo '</td><td>'; 383 384 385 echo "<a href='?page=Note_Press-Main-Menu&action=view&id=$note->ID'>".$note->Title.'</a>'; 386 387 388 echo '</td><td>'; 389 390 391 switch ($note->Priority) 392 393 394 { 395 396 397 case 0: echo "<img src=".plugins_url('admin/images/P0.png', dirname(__FILE__))." alt='Icon not found'>"; 398 399 400 break; 401 402 403 case 1: echo "<img src=".plugins_url('admin/images/P1.png', dirname(__FILE__))." alt='Icon not found'>"; 404 405 406 break; 407 408 409 case 2: echo "<img src=".plugins_url('admin/images/P2.png', dirname(__FILE__))." alt='Icon not found'>"; 410 411 412 break; 413 414 415 } 416 417 418 echo '</td><td>'; 419 420 421 echo $thisdate; 422 423 424 echo '</td><td>'; 425 426 427 switch ($note->userRead) 428 429 430 { 431 432 433 case 0: echo "<img src=".plugins_url('admin/images/X.png', dirname(__FILE__))." alt='Icon not found'>"; 434 435 436 break; 437 438 439 case 1: echo "<img src=".plugins_url('admin/images/CH.png', dirname(__FILE__))." alt='Icon not found'>"; 440 441 442 break; 443 444 445 } 446 447 448 echo '</td></tr>'; 449 450 451 } 452 453 454 echo '</table>'; 455 456 457 } 458 459 460 } 461 462 463 464 465 466 function Note_Press_sticky_dashboard($post, $callback_args) 467 468 469 { 470 471 472 global $wpdb; 473 474 475 $dashid = substr($callback_args['id'],strpos($callback_args['id'],'-')+1); 476 477 478 $dashid = substr($dashid,0,strpos($dashid,'-')); 479 480 481 $table_name = $wpdb->prefix . "Note_Press"; 482 483 484 $SQL = "Select * from $table_name where ID = $dashid"; 485 486 487 $thisSticky = $wpdb->get_row($SQL); 488 489 490 $wpdb->update($table_name, array( 491 492 493 'userRead' => '1' 494 495 496 ), array( 497 498 499 'ID' => $dashid 500 501 502 ), array( 503 504 505 '%s' 506 507 508 ), array( 509 510 511 '%d' 512 513 514 )); 515 516 517 echo '<style> 518 519 520 #'.$callback_args['id'].'{ 521 522 523 background-color: '.$thisSticky->StickyColor.'; 524 525 526 } 527 528 529 </style>'; 530 531 532 if ($thisSticky->Deadline == NULL) 533 534 535 { 536 537 538 $thisdate = ''; 539 540 541 } 542 543 544 else 545 546 547 { 548 549 550 $date = new DateTime($thisSticky->Deadline); 551 552 553 $thisdate =date_format($date,'Y-m-d'); 554 555 556 } 557 558 559 switch ($thisSticky->Priority) 560 561 562 { 563 564 565 case 0: $icon = "<img src=".plugins_url('admin/images/P0.png', dirname(__FILE__))." alt='Icon not found'>"; 566 567 568 break; 569 570 571 case 1: $icon = "<img src=".plugins_url('admin/images/P1.png', dirname(__FILE__))." alt='Icon not found'>"; 572 573 574 break; 575 576 577 case 2: $icon = "<img src=".plugins_url('admin/images/P2.png', dirname(__FILE__))." alt='Icon not found'>"; 578 579 580 break; 581 582 583 } 584 585 586 $users = get_users(array( 587 588 589 'fields' => array( 590 591 592 'display_name', 593 594 595 'ID' 596 597 598 ) 599 600 601 )); 602 603 604 foreach ($users as $user) 605 606 607 { 608 609 610 if ($user->ID == $thisSticky->AddedBy) 611 612 613 { 614 615 616 $username = $user->display_name; 617 618 619 } 620 621 622 } 623 624 625 626 627 628 echo "<table width='100%'>"; 629 630 631 echo "<tr><td><img src=".get_option("Note_Press_icons_url",'null').$thisSticky->Icon." alt='Icon not found' ></td>"; 632 633 634 echo "<td><strong>".__("From:","Note_Press")."</strong> $username</td><td><strong>".__("Priority:","Note_Press")."</strong> $icon</td><td><strong>".__("Deadline:","Note_Press")."</strong> $thisdate</td></tr></table>"; 635 636 637 echo '<hr>'; 638 639 640 echo $thisSticky->Content; 641 642 643 echo '<hr>'; 644 645 646 echo '<form id="DeleteSticky" name="Delete Sticky" method="post" action=""> 647 648 649 <input type="submit" name="Delete" id="Delete" value="Delete" class="button button-primary" /> 650 651 652 <input type="hidden" value='.$dashid.' name="StickyID"> 653 654 655 </form>'; 656 657 658 659 660 118 661 } 119 662 120 /** 121 * Register and enqueue admin-specific style sheet. 122 * 123 * @TODO: 124 * 125 * - Rename "Plugin_Name" to the name your plugin 126 * 127 * @since 1.0.0 128 * 129 * @return null Return early if no settings page is registered. 130 */ 131 public function Note_Pressenqueue_admin_styles() { 132 133 if ( ! isset( $this->plugin_screen_hook_suffix ) ) { 134 return; 663 664 665 666 667 function Note_Press_add_dashboard_widgets() 668 669 670 { 671 672 673 global $wpdb; 674 675 676 677 678 679 $table_name = $wpdb->prefix . "Note_Press"; 680 681 682 if (isset($_POST['StickyID'])) 683 684 685 { 686 687 688 $wpdb->delete($table_name, array( 689 690 691 'ID' => $_POST['StickyID'] 692 693 694 )); 695 696 135 697 } 136 698 137 $screen = get_current_screen(); 138 if ( $this->plugin_screen_hook_suffix == $screen->id ) { 139 wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'assets/css/admin.css', __FILE__ ), array(), Note_Press::VERSION ); 699 700 701 702 703 $user = get_current_user_id(); 704 705 706 $SQL = "Select * from $table_name where Sticky = 1 and userTo = $user"; 707 708 709 $stickylist = $wpdb->get_results($SQL); 710 711 712 foreach ($stickylist as $sticky) 713 714 715 { 716 717 718 if ($sticky->userTo = $user) 719 720 721 { 722 723 724 add_meta_box( 725 726 727 'Note_Press-'.$sticky->ID.'-dashboard_widget', 728 729 730 $sticky->Title, 731 732 733 array($this, 'Note_Press_sticky_dashboard'), 734 735 736 'dashboard', 737 738 739 'normal', 740 741 742 'low' 743 744 745 ); 746 747 748 } 749 750 140 751 } 141 752 753 754 $menulevel = get_option("Note_Press_Menu_Level",3); 755 756 757 switch ($menulevel) 758 759 760 { 761 762 763 case 0: $setting = 'edit_posts';break; 764 765 766 case 1: $setting = 'publish_posts';break; 767 768 769 case 2: $setting = 'moderate_comments';break; 770 771 772 case 3: $setting = 'manage_options';break; 773 774 775 } 776 777 778 if (current_user_can($setting)) 779 780 781 { 782 783 784 add_meta_box( 785 786 787 'Note_Press_dashboard_widget', 788 789 790 __('Note Press - Notes to you','Note_Press'), 791 792 793 array($this, 'Note_Press_dashboard'), 794 795 796 'dashboard', 797 798 799 'side', 800 801 802 'high' 803 804 805 ); 806 807 808 } 809 810 142 811 } 143 812 144 /** 145 * Register and enqueue admin-specific JavaScript. 146 * 147 * @TODO: 148 * 149 * - Rename "Plugin_Name" to the name your plugin 150 * 151 * @since 1.0.0 152 * 153 * @return null Return early if no settings page is registered. 154 */ 155 public function Note_Pressenqueue_admin_scripts() { 156 157 if ( ! isset( $this->plugin_screen_hook_suffix ) ) { 158 return; 813 814 815 816 817 function Note_Press_add_plugin_admin_menu() { 818 819 820 $menulevel = get_option("Note_Press_Menu_Level",3); 821 822 823 switch ($menulevel) 824 825 826 { 827 828 829 case 0: $setting = 'edit_posts';break; 830 831 832 case 1: $setting = 'publish_posts';break; 833 834 835 case 2: $setting = 'moderate_comments';break; 836 837 838 case 3: $setting = 'manage_options';break; 839 840 159 841 } 160 842 161 $screen = get_current_screen(); 162 if ( $this->plugin_screen_hook_suffix == $screen->id ) { 163 wp_enqueue_script( $this->plugin_slug . '-admin-script', plugins_url( 'assets/js/admin.js', __FILE__ ), array( 'jquery' ), Note_Press::VERSION ); 164 } 843 844 add_menu_page('Note Press', 'Note Press', $setting, 'Note_Press-Main-Menu', array($this, 'Note_Press_load_menu'), plugins_url('admin/images/Note_Pressicon.png', dirname(__FILE__))); 845 846 847 add_submenu_page('Note_Press-Main-Menu', __('Note Press Settings','Note Press'), __('Note Press Settings','Note Press'), 'manage_options', 'Note-Press-Settings', array($this, 'Note_Press_load_settings')); 848 165 849 166 850 } 167 851 168 /** 169 * Register the administration menu for this plugin into the WordPress Dashboard menu. 170 * 171 * @since 1.0.0 172 */ 173 public function Note_Pressadd_plugin_admin_menu() { 174 175 /* 176 * Add a settings page for this plugin to the Settings menu. 177 * 178 * NOTE: Alternative menu locations are available via WordPress administration menu functions. 179 * 180 * Administration Menus: http://codex.wordpress.org/Administration_Menus 181 * 182 * @TODO: 183 * 184 * - Change 'Page Title' to the title of your plugin admin page 185 * - Change 'Menu Text' to the text for menu item for the plugin settings page 186 * - Change 'manage_options' to the capability you see fit 187 * For reference: http://codex.wordpress.org/Roles_and_Capabilities 188 */ 189 $this->plugin_screen_hook_suffix = add_options_page( 190 __( 'Note Press Settings', $this->plugin_slug ), 191 __( 'Note Press', $this->plugin_slug ), 192 'manage_options', 193 $this->plugin_slug, 194 array( $this, 'display_plugin_admin_page' ) 195 ); 852 853 854 855 856 857 858 859 function Note_Press_load_menu() 860 861 862 { 863 864 865 include_once('Note_Press-admin-menu.php'); 866 867 868 } 869 870 871 872 873 874 function Note_Press_load_settings() 875 876 877 { 878 879 880 include_once('Note_Press-settings.php'); 881 196 882 197 883 } 198 884 199 /** 200 * Render the settings page for this plugin. 201 * 202 * @since 1.0.0 203 */ 204 public function Note_Pressdisplay_plugin_admin_page() { 205 include_once( 'views/admin.php' ); 206 } 207 208 /** 209 * Add settings action link to the plugins page. 210 * 211 * @since 1.0.0 212 */ 213 public function Note_Pressadd_action_links( $links ) { 214 215 return array_merge( 216 array( 217 'settings' => '<a href="' . admin_url( 'options-general.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings', $this->plugin_slug ) . '</a>' 218 ), 219 $links 220 ); 221 222 } 223 224 /** 225 * NOTE: Actions are points in the execution of a page or process 226 * lifecycle that WordPress fires. 227 * 228 * Actions: http://codex.wordpress.org/Plugin_API#Actions 229 * Reference: http://codex.wordpress.org/Plugin_API/Action_Reference 230 * 231 * @since 1.0.0 232 */ 233 public function Note_Pressaction_method_name() { 234 // @TODO: Define your action hook callback here 235 } 236 237 /** 238 * NOTE: Filters are points of execution in which WordPress modifies data 239 * before saving it or sending it to the browser. 240 * 241 * Filters: http://codex.wordpress.org/Plugin_API#Filters 242 * Reference: http://codex.wordpress.org/Plugin_API/Filter_Reference 243 * 244 * @since 1.0.0 245 */ 246 public function Note_Pressfilter_method_name() { 247 // @TODO: Define your filter hook callback here 248 } 885 886 887 888 889 function Note_Press_load_help() 890 891 892 { 893 894 895 include_once('Note_Press-help.php'); 896 897 898 } 899 249 900 250 901 } 902 903 -
note-press/trunk/admin/views/admin.php
r1156271 r1693456 1 1 <?php 2 3 4 2 5 /** 6 7 8 3 9 * Represents the view for the administration dashboard. 10 11 12 4 13 * 14 15 16 5 17 * This includes the header, options, and other information that should provide 18 19 20 6 21 * The User Interface to the end user. 22 23 24 7 25 * 26 27 28 8 29 * @package Note_Press 30 31 32 9 33 * @author datainterlock <postmaster@datainterlock.com> 34 35 36 10 37 * @license GPL-3.0+ 38 39 40 11 41 * @link http://www.datainterlock.com 42 43 44 12 45 * @Copyright (C) 2015 Rod Kinnison postmaster@datainterlock.com 46 47 48 13 49 */ 50 51 52 14 53 ?> 54 55 56 57 58 59 15 60 16 61 <div class="wrap"> 17 62 63 64 65 66 67 68 18 69 <h2><?php echo esc_html( get_admin_page_title() ); ?></h2> 70 71 72 73 74 75 19 76 20 77 <!-- @TODO: Provide markup for your options page here. --> 21 78 79 80 81 82 83 84 22 85 </div> 86 87 88 -
note-press/trunk/gpl.txt
r1156271 r1693456 1 1 GNU GENERAL PUBLIC LICENSE 2 3 4 2 5 Version 3, 29 June 2007 3 6 7 8 9 10 11 12 4 13 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> 14 15 16 5 17 Everyone is permitted to copy and distribute verbatim copies 18 19 20 6 21 of this license document, but changing it is not allowed. 7 22 23 24 25 26 27 28 8 29 Preamble 9 30 31 32 33 34 35 36 10 37 The GNU General Public License is a free, copyleft license for 38 39 40 11 41 software and other kinds of works. 12 42 43 44 45 46 47 48 13 49 The licenses for most software and other practical works are designed 50 51 52 14 53 to take away your freedom to share and change the works. By contrast, 54 55 56 15 57 the GNU General Public License is intended to guarantee your freedom to 58 59 60 16 61 share and change all versions of a program--to make sure it remains free 62 63 64 17 65 software for all its users. We, the Free Software Foundation, use the 66 67 68 18 69 GNU General Public License for most of our software; it applies also to 70 71 72 19 73 any other work released this way by its authors. You can apply it to 74 75 76 20 77 your programs, too. 21 78 79 80 81 82 83 84 22 85 When we speak of free software, we are referring to freedom, not 86 87 88 23 89 price. Our General Public Licenses are designed to make sure that you 90 91 92 24 93 have the freedom to distribute copies of free software (and charge for 94 95 96 25 97 them if you wish), that you receive source code or can get it if you 98 99 100 26 101 want it, that you can change the software or use pieces of it in new 102 103 104 27 105 free programs, and that you know you can do these things. 28 106 107 108 109 110 111 112 29 113 To protect your rights, we need to prevent others from denying you 114 115 116 30 117 these rights or asking you to surrender the rights. Therefore, you have 118 119 120 31 121 certain responsibilities if you distribute copies of the software, or if 122 123 124 32 125 you modify it: responsibilities to respect the freedom of others. 33 126 127 128 129 130 131 132 34 133 For example, if you distribute copies of such a program, whether 134 135 136 35 137 gratis or for a fee, you must pass on to the recipients the same 138 139 140 36 141 freedoms that you received. You must make sure that they, too, receive 142 143 144 37 145 or can get the source code. And you must show them these terms so they 146 147 148 38 149 know their rights. 39 150 151 152 153 154 155 156 40 157 Developers that use the GNU GPL protect your rights with two steps: 158 159 160 41 161 (1) assert copyright on the software, and (2) offer you this License 162 163 164 42 165 giving you legal permission to copy, distribute and/or modify it. 43 166 167 168 169 170 171 172 44 173 For the developers' and authors' protection, the GPL clearly explains 174 175 176 45 177 that there is no warranty for this free software. For both users' and 178 179 180 46 181 authors' sake, the GPL requires that modified versions be marked as 182 183 184 47 185 changed, so that their problems will not be attributed erroneously to 186 187 188 48 189 authors of previous versions. 49 190 191 192 193 194 195 196 50 197 Some devices are designed to deny users access to install or run 198 199 200 51 201 modified versions of the software inside them, although the manufacturer 202 203 204 52 205 can do so. This is fundamentally incompatible with the aim of 206 207 208 53 209 protecting users' freedom to change the software. The systematic 210 211 212 54 213 pattern of such abuse occurs in the area of products for individuals to 214 215 216 55 217 use, which is precisely where it is most unacceptable. Therefore, we 218 219 220 56 221 have designed this version of the GPL to prohibit the practice for those 222 223 224 57 225 products. If such problems arise substantially in other domains, we 226 227 228 58 229 stand ready to extend this provision to those domains in future versions 230 231 232 59 233 of the GPL, as needed to protect the freedom of users. 60 234 235 236 237 238 239 240 61 241 Finally, every program is threatened constantly by software patents. 242 243 244 62 245 States should not allow patents to restrict development and use of 246 247 248 63 249 software on general-purpose computers, but in those that do, we wish to 250 251 252 64 253 avoid the special danger that patents applied to a free program could 254 255 256 65 257 make it effectively proprietary. To prevent this, the GPL assures that 258 259 260 66 261 patents cannot be used to render the program non-free. 67 262 263 264 265 266 267 268 68 269 The precise terms and conditions for copying, distribution and 270 271 272 69 273 modification follow. 70 274 275 276 277 278 279 280 71 281 TERMS AND CONDITIONS 72 282 283 284 285 286 287 288 73 289 0. Definitions. 74 290 291 292 293 294 295 296 75 297 "This License" refers to version 3 of the GNU General Public License. 76 298 299 300 301 302 303 304 77 305 "Copyright" also means copyright-like laws that apply to other kinds of 306 307 308 78 309 works, such as semiconductor masks. 79 310 311 312 313 314 315 316 80 317 "The Program" refers to any copyrightable work licensed under this 318 319 320 81 321 License. Each licensee is addressed as "you". "Licensees" and 322 323 324 82 325 "recipients" may be individuals or organizations. 83 326 327 328 329 330 331 332 84 333 To "modify" a work means to copy from or adapt all or part of the work 334 335 336 85 337 in a fashion requiring copyright permission, other than the making of an 338 339 340 86 341 exact copy. The resulting work is called a "modified version" of the 342 343 344 87 345 earlier work or a work "based on" the earlier work. 88 346 347 348 349 350 351 352 89 353 A "covered work" means either the unmodified Program or a work based 354 355 356 90 357 on the Program. 91 358 359 360 361 362 363 364 92 365 To "propagate" a work means to do anything with it that, without 366 367 368 93 369 permission, would make you directly or secondarily liable for 370 371 372 94 373 infringement under applicable copyright law, except executing it on a 374 375 376 95 377 computer or modifying a private copy. Propagation includes copying, 378 379 380 96 381 distribution (with or without modification), making available to the 382 383 384 97 385 public, and in some countries other activities as well. 98 386 387 388 389 390 391 392 99 393 To "convey" a work means any kind of propagation that enables other 394 395 396 100 397 parties to make or receive copies. Mere interaction with a user through 398 399 400 101 401 a computer network, with no transfer of a copy, is not conveying. 102 402 403 404 405 406 407 408 103 409 An interactive user interface displays "Appropriate Legal Notices" 410 411 412 104 413 to the extent that it includes a convenient and prominently visible 414 415 416 105 417 feature that (1) displays an appropriate copyright notice, and (2) 418 419 420 106 421 tells the user that there is no warranty for the work (except to the 422 423 424 107 425 extent that warranties are provided), that licensees may convey the 426 427 428 108 429 work under this License, and how to view a copy of this License. If 430 431 432 109 433 the interface presents a list of user commands or options, such as a 434 435 436 110 437 menu, a prominent item in the list meets this criterion. 111 438 439 440 441 442 443 444 112 445 1. Source Code. 113 446 447 448 449 450 451 452 114 453 The "source code" for a work means the preferred form of the work 454 455 456 115 457 for making modifications to it. "Object code" means any non-source 458 459 460 116 461 form of a work. 117 462 463 464 465 466 467 468 118 469 A "Standard Interface" means an interface that either is an official 470 471 472 119 473 standard defined by a recognized standards body, or, in the case of 474 475 476 120 477 interfaces specified for a particular programming language, one that 478 479 480 121 481 is widely used among developers working in that language. 122 482 483 484 485 486 487 488 123 489 The "System Libraries" of an executable work include anything, other 490 491 492 124 493 than the work as a whole, that (a) is included in the normal form of 494 495 496 125 497 packaging a Major Component, but which is not part of that Major 498 499 500 126 501 Component, and (b) serves only to enable use of the work with that 502 503 504 127 505 Major Component, or to implement a Standard Interface for which an 506 507 508 128 509 implementation is available to the public in source code form. A 510 511 512 129 513 "Major Component", in this context, means a major essential component 514 515 516 130 517 (kernel, window system, and so on) of the specific operating system 518 519 520 131 521 (if any) on which the executable work runs, or a compiler used to 522 523 524 132 525 produce the work, or an object code interpreter used to run it. 133 526 527 528 529 530 531 532 134 533 The "Corresponding Source" for a work in object code form means all 534 535 536 135 537 the source code needed to generate, install, and (for an executable 538 539 540 136 541 work) run the object code and to modify the work, including scripts to 542 543 544 137 545 control those activities. However, it does not include the work's 546 547 548 138 549 System Libraries, or general-purpose tools or generally available free 550 551 552 139 553 programs which are used unmodified in performing those activities but 554 555 556 140 557 which are not part of the work. For example, Corresponding Source 558 559 560 141 561 includes interface definition files associated with source files for 562 563 564 142 565 the work, and the source code for shared libraries and dynamically 566 567 568 143 569 linked subprograms that the work is specifically designed to require, 570 571 572 144 573 such as by intimate data communication or control flow between those 574 575 576 145 577 subprograms and other parts of the work. 146 578 579 580 581 582 583 584 147 585 The Corresponding Source need not include anything that users 586 587 588 148 589 can regenerate automatically from other parts of the Corresponding 590 591 592 149 593 Source. 150 594 595 596 597 598 599 600 151 601 The Corresponding Source for a work in source code form is that 602 603 604 152 605 same work. 153 606 607 608 609 610 611 612 154 613 2. Basic Permissions. 155 614 615 616 617 618 619 620 156 621 All rights granted under this License are granted for the term of 622 623 624 157 625 copyright on the Program, and are irrevocable provided the stated 626 627 628 158 629 conditions are met. This License explicitly affirms your unlimited 630 631 632 159 633 permission to run the unmodified Program. The output from running a 634 635 636 160 637 covered work is covered by this License only if the output, given its 638 639 640 161 641 content, constitutes a covered work. This License acknowledges your 642 643 644 162 645 rights of fair use or other equivalent, as provided by copyright law. 163 646 647 648 649 650 651 652 164 653 You may make, run and propagate covered works that you do not 654 655 656 165 657 convey, without conditions so long as your license otherwise remains 658 659 660 166 661 in force. You may convey covered works to others for the sole purpose 662 663 664 167 665 of having them make modifications exclusively for you, or provide you 666 667 668 168 669 with facilities for running those works, provided that you comply with 670 671 672 169 673 the terms of this License in conveying all material for which you do 674 675 676 170 677 not control copyright. Those thus making or running the covered works 678 679 680 171 681 for you must do so exclusively on your behalf, under your direction 682 683 684 172 685 and control, on terms that prohibit them from making any copies of 686 687 688 173 689 your copyrighted material outside their relationship with you. 174 690 691 692 693 694 695 696 175 697 Conveying under any other circumstances is permitted solely under 698 699 700 176 701 the conditions stated below. Sublicensing is not allowed; section 10 702 703 704 177 705 makes it unnecessary. 178 706 707 708 709 710 711 712 179 713 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 714 715 716 717 718 719 720 181 721 No covered work shall be deemed part of an effective technological 722 723 724 182 725 measure under any applicable law fulfilling obligations under article 726 727 728 183 729 11 of the WIPO copyright treaty adopted on 20 December 1996, or 730 731 732 184 733 similar laws prohibiting or restricting circumvention of such 734 735 736 185 737 measures. 186 738 739 740 741 742 743 744 187 745 When you convey a covered work, you waive any legal power to forbid 746 747 748 188 749 circumvention of technological measures to the extent such circumvention 750 751 752 189 753 is effected by exercising rights under this License with respect to 754 755 756 190 757 the covered work, and you disclaim any intention to limit operation or 758 759 760 191 761 modification of the work as a means of enforcing, against the work's 762 763 764 192 765 users, your or third parties' legal rights to forbid circumvention of 766 767 768 193 769 technological measures. 194 770 771 772 773 774 775 776 195 777 4. Conveying Verbatim Copies. 196 778 779 780 781 782 783 784 197 785 You may convey verbatim copies of the Program's source code as you 786 787 788 198 789 receive it, in any medium, provided that you conspicuously and 790 791 792 199 793 appropriately publish on each copy an appropriate copyright notice; 794 795 796 200 797 keep intact all notices stating that this License and any 798 799 800 201 801 non-permissive terms added in accord with section 7 apply to the code; 802 803 804 202 805 keep intact all notices of the absence of any warranty; and give all 806 807 808 203 809 recipients a copy of this License along with the Program. 204 810 811 812 813 814 815 816 205 817 You may charge any price or no price for each copy that you convey, 818 819 820 206 821 and you may offer support or warranty protection for a fee. 207 822 823 824 825 826 827 828 208 829 5. Conveying Modified Source Versions. 209 830 831 832 833 834 835 836 210 837 You may convey a work based on the Program, or the modifications to 838 839 840 211 841 produce it from the Program, in the form of source code under the 842 843 844 212 845 terms of section 4, provided that you also meet all of these conditions: 213 846 847 848 849 850 851 852 214 853 a) The work must carry prominent notices stating that you modified 854 855 856 215 857 it, and giving a relevant date. 216 858 859 860 861 862 863 864 217 865 b) The work must carry prominent notices stating that it is 866 867 868 218 869 released under this License and any conditions added under section 870 871 872 219 873 7. This requirement modifies the requirement in section 4 to 874 875 876 220 877 "keep intact all notices". 221 878 879 880 881 882 883 884 222 885 c) You must license the entire work, as a whole, under this 886 887 888 223 889 License to anyone who comes into possession of a copy. This 890 891 892 224 893 License will therefore apply, along with any applicable section 7 894 895 896 225 897 additional terms, to the whole of the work, and all its parts, 898 899 900 226 901 regardless of how they are packaged. This License gives no 902 903 904 227 905 permission to license the work in any other way, but it does not 906 907 908 228 909 invalidate such permission if you have separately received it. 229 910 911 912 913 914 915 916 230 917 d) If the work has interactive user interfaces, each must display 918 919 920 231 921 Appropriate Legal Notices; however, if the Program has interactive 922 923 924 232 925 interfaces that do not display Appropriate Legal Notices, your 926 927 928 233 929 work need not make them do so. 234 930 931 932 933 934 935 936 235 937 A compilation of a covered work with other separate and independent 938 939 940 236 941 works, which are not by their nature extensions of the covered work, 942 943 944 237 945 and which are not combined with it such as to form a larger program, 946 947 948 238 949 in or on a volume of a storage or distribution medium, is called an 950 951 952 239 953 "aggregate" if the compilation and its resulting copyright are not 954 955 956 240 957 used to limit the access or legal rights of the compilation's users 958 959 960 241 961 beyond what the individual works permit. Inclusion of a covered work 962 963 964 242 965 in an aggregate does not cause this License to apply to the other 966 967 968 243 969 parts of the aggregate. 244 970 971 972 973 974 975 976 245 977 6. Conveying Non-Source Forms. 246 978 979 980 981 982 983 984 247 985 You may convey a covered work in object code form under the terms 986 987 988 248 989 of sections 4 and 5, provided that you also convey the 990 991 992 249 993 machine-readable Corresponding Source under the terms of this License, 994 995 996 250 997 in one of these ways: 251 998 999 1000 1001 1002 1003 1004 252 1005 a) Convey the object code in, or embodied in, a physical product 1006 1007 1008 253 1009 (including a physical distribution medium), accompanied by the 1010 1011 1012 254 1013 Corresponding Source fixed on a durable physical medium 1014 1015 1016 255 1017 customarily used for software interchange. 256 1018 1019 1020 1021 1022 1023 1024 257 1025 b) Convey the object code in, or embodied in, a physical product 1026 1027 1028 258 1029 (including a physical distribution medium), accompanied by a 1030 1031 1032 259 1033 written offer, valid for at least three years and valid for as 1034 1035 1036 260 1037 long as you offer spare parts or customer support for that product 1038 1039 1040 261 1041 model, to give anyone who possesses the object code either (1) a 1042 1043 1044 262 1045 copy of the Corresponding Source for all the software in the 1046 1047 1048 263 1049 product that is covered by this License, on a durable physical 1050 1051 1052 264 1053 medium customarily used for software interchange, for a price no 1054 1055 1056 265 1057 more than your reasonable cost of physically performing this 1058 1059 1060 266 1061 conveying of source, or (2) access to copy the 1062 1063 1064 267 1065 Corresponding Source from a network server at no charge. 268 1066 1067 1068 1069 1070 1071 1072 269 1073 c) Convey individual copies of the object code with a copy of the 1074 1075 1076 270 1077 written offer to provide the Corresponding Source. This 1078 1079 1080 271 1081 alternative is allowed only occasionally and noncommercially, and 1082 1083 1084 272 1085 only if you received the object code with such an offer, in accord 1086 1087 1088 273 1089 with subsection 6b. 274 1090 1091 1092 1093 1094 1095 1096 275 1097 d) Convey the object code by offering access from a designated 1098 1099 1100 276 1101 place (gratis or for a charge), and offer equivalent access to the 1102 1103 1104 277 1105 Corresponding Source in the same way through the same place at no 1106 1107 1108 278 1109 further charge. You need not require recipients to copy the 1110 1111 1112 279 1113 Corresponding Source along with the object code. If the place to 1114 1115 1116 280 1117 copy the object code is a network server, the Corresponding Source 1118 1119 1120 281 1121 may be on a different server (operated by you or a third party) 1122 1123 1124 282 1125 that supports equivalent copying facilities, provided you maintain 1126 1127 1128 283 1129 clear directions next to the object code saying where to find the 1130 1131 1132 284 1133 Corresponding Source. Regardless of what server hosts the 1134 1135 1136 285 1137 Corresponding Source, you remain obligated to ensure that it is 1138 1139 1140 286 1141 available for as long as needed to satisfy these requirements. 287 1142 1143 1144 1145 1146 1147 1148 288 1149 e) Convey the object code using peer-to-peer transmission, provided 1150 1151 1152 289 1153 you inform other peers where the object code and Corresponding 1154 1155 1156 290 1157 Source of the work are being offered to the general public at no 1158 1159 1160 291 1161 charge under subsection 6d. 292 1162 1163 1164 1165 1166 1167 1168 293 1169 A separable portion of the object code, whose source code is excluded 1170 1171 1172 294 1173 from the Corresponding Source as a System Library, need not be 1174 1175 1176 295 1177 included in conveying the object code work. 296 1178 1179 1180 1181 1182 1183 1184 297 1185 A "User Product" is either (1) a "consumer product", which means any 1186 1187 1188 298 1189 tangible personal property which is normally used for personal, family, 1190 1191 1192 299 1193 or household purposes, or (2) anything designed or sold for incorporation 1194 1195 1196 300 1197 into a dwelling. In determining whether a product is a consumer product, 1198 1199 1200 301 1201 doubtful cases shall be resolved in favor of coverage. For a particular 1202 1203 1204 302 1205 product received by a particular user, "normally used" refers to a 1206 1207 1208 303 1209 typical or common use of that class of product, regardless of the status 1210 1211 1212 304 1213 of the particular user or of the way in which the particular user 1214 1215 1216 305 1217 actually uses, or expects or is expected to use, the product. A product 1218 1219 1220 306 1221 is a consumer product regardless of whether the product has substantial 1222 1223 1224 307 1225 commercial, industrial or non-consumer uses, unless such uses represent 1226 1227 1228 308 1229 the only significant mode of use of the product. 309 1230 1231 1232 1233 1234 1235 1236 310 1237 "Installation Information" for a User Product means any methods, 1238 1239 1240 311 1241 procedures, authorization keys, or other information required to install 1242 1243 1244 312 1245 and execute modified versions of a covered work in that User Product from 1246 1247 1248 313 1249 a modified version of its Corresponding Source. The information must 1250 1251 1252 314 1253 suffice to ensure that the continued functioning of the modified object 1254 1255 1256 315 1257 code is in no case prevented or interfered with solely because 1258 1259 1260 316 1261 modification has been made. 317 1262 1263 1264 1265 1266 1267 1268 318 1269 If you convey an object code work under this section in, or with, or 1270 1271 1272 319 1273 specifically for use in, a User Product, and the conveying occurs as 1274 1275 1276 320 1277 part of a transaction in which the right of possession and use of the 1278 1279 1280 321 1281 User Product is transferred to the recipient in perpetuity or for a 1282 1283 1284 322 1285 fixed term (regardless of how the transaction is characterized), the 1286 1287 1288 323 1289 Corresponding Source conveyed under this section must be accompanied 1290 1291 1292 324 1293 by the Installation Information. But this requirement does not apply 1294 1295 1296 325 1297 if neither you nor any third party retains the ability to install 1298 1299 1300 326 1301 modified object code on the User Product (for example, the work has 1302 1303 1304 327 1305 been installed in ROM). 328 1306 1307 1308 1309 1310 1311 1312 329 1313 The requirement to provide Installation Information does not include a 1314 1315 1316 330 1317 requirement to continue to provide support service, warranty, or updates 1318 1319 1320 331 1321 for a work that has been modified or installed by the recipient, or for 1322 1323 1324 332 1325 the User Product in which it has been modified or installed. Access to a 1326 1327 1328 333 1329 network may be denied when the modification itself materially and 1330 1331 1332 334 1333 adversely affects the operation of the network or violates the rules and 1334 1335 1336 335 1337 protocols for communication across the network. 336 1338 1339 1340 1341 1342 1343 1344 337 1345 Corresponding Source conveyed, and Installation Information provided, 1346 1347 1348 338 1349 in accord with this section must be in a format that is publicly 1350 1351 1352 339 1353 documented (and with an implementation available to the public in 1354 1355 1356 340 1357 source code form), and must require no special password or key for 1358 1359 1360 341 1361 unpacking, reading or copying. 342 1362 1363 1364 1365 1366 1367 1368 343 1369 7. Additional Terms. 344 1370 1371 1372 1373 1374 1375 1376 345 1377 "Additional permissions" are terms that supplement the terms of this 1378 1379 1380 346 1381 License by making exceptions from one or more of its conditions. 1382 1383 1384 347 1385 Additional permissions that are applicable to the entire Program shall 1386 1387 1388 348 1389 be treated as though they were included in this License, to the extent 1390 1391 1392 349 1393 that they are valid under applicable law. If additional permissions 1394 1395 1396 350 1397 apply only to part of the Program, that part may be used separately 1398 1399 1400 351 1401 under those permissions, but the entire Program remains governed by 1402 1403 1404 352 1405 this License without regard to the additional permissions. 353 1406 1407 1408 1409 1410 1411 1412 354 1413 When you convey a copy of a covered work, you may at your option 1414 1415 1416 355 1417 remove any additional permissions from that copy, or from any part of 1418 1419 1420 356 1421 it. (Additional permissions may be written to require their own 1422 1423 1424 357 1425 removal in certain cases when you modify the work.) You may place 1426 1427 1428 358 1429 additional permissions on material, added by you to a covered work, 1430 1431 1432 359 1433 for which you have or can give appropriate copyright permission. 360 1434 1435 1436 1437 1438 1439 1440 361 1441 Notwithstanding any other provision of this License, for material you 1442 1443 1444 362 1445 add to a covered work, you may (if authorized by the copyright holders of 1446 1447 1448 363 1449 that material) supplement the terms of this License with terms: 364 1450 1451 1452 1453 1454 1455 1456 365 1457 a) Disclaiming warranty or limiting liability differently from the 1458 1459 1460 366 1461 terms of sections 15 and 16 of this License; or 367 1462 1463 1464 1465 1466 1467 1468 368 1469 b) Requiring preservation of specified reasonable legal notices or 1470 1471 1472 369 1473 author attributions in that material or in the Appropriate Legal 1474 1475 1476 370 1477 Notices displayed by works containing it; or 371 1478 1479 1480 1481 1482 1483 1484 372 1485 c) Prohibiting misrepresentation of the origin of that material, or 1486 1487 1488 373 1489 requiring that modified versions of such material be marked in 1490 1491 1492 374 1493 reasonable ways as different from the original version; or 375 1494 1495 1496 1497 1498 1499 1500 376 1501 d) Limiting the use for publicity purposes of names of licensors or 1502 1503 1504 377 1505 authors of the material; or 378 1506 1507 1508 1509 1510 1511 1512 379 1513 e) Declining to grant rights under trademark law for use of some 1514 1515 1516 380 1517 trade names, trademarks, or service marks; or 381 1518 1519 1520 1521 1522 1523 1524 382 1525 f) Requiring indemnification of licensors and authors of that 1526 1527 1528 383 1529 material by anyone who conveys the material (or modified versions of 1530 1531 1532 384 1533 it) with contractual assumptions of liability to the recipient, for 1534 1535 1536 385 1537 any liability that these contractual assumptions directly impose on 1538 1539 1540 386 1541 those licensors and authors. 387 1542 1543 1544 1545 1546 1547 1548 388 1549 All other non-permissive additional terms are considered "further 1550 1551 1552 389 1553 restrictions" within the meaning of section 10. If the Program as you 1554 1555 1556 390 1557 received it, or any part of it, contains a notice stating that it is 1558 1559 1560 391 1561 governed by this License along with a term that is a further 1562 1563 1564 392 1565 restriction, you may remove that term. If a license document contains 1566 1567 1568 393 1569 a further restriction but permits relicensing or conveying under this 1570 1571 1572 394 1573 License, you may add to a covered work material governed by the terms 1574 1575 1576 395 1577 of that license document, provided that the further restriction does 1578 1579 1580 396 1581 not survive such relicensing or conveying. 397 1582 1583 1584 1585 1586 1587 1588 398 1589 If you add terms to a covered work in accord with this section, you 1590 1591 1592 399 1593 must place, in the relevant source files, a statement of the 1594 1595 1596 400 1597 additional terms that apply to those files, or a notice indicating 1598 1599 1600 401 1601 where to find the applicable terms. 402 1602 1603 1604 1605 1606 1607 1608 403 1609 Additional terms, permissive or non-permissive, may be stated in the 1610 1611 1612 404 1613 form of a separately written license, or stated as exceptions; 1614 1615 1616 405 1617 the above requirements apply either way. 406 1618 1619 1620 1621 1622 1623 1624 407 1625 8. Termination. 408 1626 1627 1628 1629 1630 1631 1632 409 1633 You may not propagate or modify a covered work except as expressly 1634 1635 1636 410 1637 provided under this License. Any attempt otherwise to propagate or 1638 1639 1640 411 1641 modify it is void, and will automatically terminate your rights under 1642 1643 1644 412 1645 this License (including any patent licenses granted under the third 1646 1647 1648 413 1649 paragraph of section 11). 414 1650 1651 1652 1653 1654 1655 1656 415 1657 However, if you cease all violation of this License, then your 1658 1659 1660 416 1661 license from a particular copyright holder is reinstated (a) 1662 1663 1664 417 1665 provisionally, unless and until the copyright holder explicitly and 1666 1667 1668 418 1669 finally terminates your license, and (b) permanently, if the copyright 1670 1671 1672 419 1673 holder fails to notify you of the violation by some reasonable means 1674 1675 1676 420 1677 prior to 60 days after the cessation. 421 1678 1679 1680 1681 1682 1683 1684 422 1685 Moreover, your license from a particular copyright holder is 1686 1687 1688 423 1689 reinstated permanently if the copyright holder notifies you of the 1690 1691 1692 424 1693 violation by some reasonable means, this is the first time you have 1694 1695 1696 425 1697 received notice of violation of this License (for any work) from that 1698 1699 1700 426 1701 copyright holder, and you cure the violation prior to 30 days after 1702 1703 1704 427 1705 your receipt of the notice. 428 1706 1707 1708 1709 1710 1711 1712 429 1713 Termination of your rights under this section does not terminate the 1714 1715 1716 430 1717 licenses of parties who have received copies or rights from you under 1718 1719 1720 431 1721 this License. If your rights have been terminated and not permanently 1722 1723 1724 432 1725 reinstated, you do not qualify to receive new licenses for the same 1726 1727 1728 433 1729 material under section 10. 434 1730 1731 1732 1733 1734 1735 1736 435 1737 9. Acceptance Not Required for Having Copies. 436 1738 1739 1740 1741 1742 1743 1744 437 1745 You are not required to accept this License in order to receive or 1746 1747 1748 438 1749 run a copy of the Program. Ancillary propagation of a covered work 1750 1751 1752 439 1753 occurring solely as a consequence of using peer-to-peer transmission 1754 1755 1756 440 1757 to receive a copy likewise does not require acceptance. However, 1758 1759 1760 441 1761 nothing other than this License grants you permission to propagate or 1762 1763 1764 442 1765 modify any covered work. These actions infringe copyright if you do 1766 1767 1768 443 1769 not accept this License. Therefore, by modifying or propagating a 1770 1771 1772 444 1773 covered work, you indicate your acceptance of this License to do so. 445 1774 1775 1776 1777 1778 1779 1780 446 1781 10. Automatic Licensing of Downstream Recipients. 447 1782 1783 1784 1785 1786 1787 1788 448 1789 Each time you convey a covered work, the recipient automatically 1790 1791 1792 449 1793 receives a license from the original licensors, to run, modify and 1794 1795 1796 450 1797 propagate that work, subject to this License. You are not responsible 1798 1799 1800 451 1801 for enforcing compliance by third parties with this License. 452 1802 1803 1804 1805 1806 1807 1808 453 1809 An "entity transaction" is a transaction transferring control of an 1810 1811 1812 454 1813 organization, or substantially all assets of one, or subdividing an 1814 1815 1816 455 1817 organization, or merging organizations. If propagation of a covered 1818 1819 1820 456 1821 work results from an entity transaction, each party to that 1822 1823 1824 457 1825 transaction who receives a copy of the work also receives whatever 1826 1827 1828 458 1829 licenses to the work the party's predecessor in interest had or could 1830 1831 1832 459 1833 give under the previous paragraph, plus a right to possession of the 1834 1835 1836 460 1837 Corresponding Source of the work from the predecessor in interest, if 1838 1839 1840 461 1841 the predecessor has it or can get it with reasonable efforts. 462 1842 1843 1844 1845 1846 1847 1848 463 1849 You may not impose any further restrictions on the exercise of the 1850 1851 1852 464 1853 rights granted or affirmed under this License. For example, you may 1854 1855 1856 465 1857 not impose a license fee, royalty, or other charge for exercise of 1858 1859 1860 466 1861 rights granted under this License, and you may not initiate litigation 1862 1863 1864 467 1865 (including a cross-claim or counterclaim in a lawsuit) alleging that 1866 1867 1868 468 1869 any patent claim is infringed by making, using, selling, offering for 1870 1871 1872 469 1873 sale, or importing the Program or any portion of it. 470 1874 1875 1876 1877 1878 1879 1880 471 1881 11. Patents. 472 1882 1883 1884 1885 1886 1887 1888 473 1889 A "contributor" is a copyright holder who authorizes use under this 1890 1891 1892 474 1893 License of the Program or a work on which the Program is based. The 1894 1895 1896 475 1897 work thus licensed is called the contributor's "contributor version". 476 1898 1899 1900 1901 1902 1903 1904 477 1905 A contributor's "essential patent claims" are all patent claims 1906 1907 1908 478 1909 owned or controlled by the contributor, whether already acquired or 1910 1911 1912 479 1913 hereafter acquired, that would be infringed by some manner, permitted 1914 1915 1916 480 1917 by this License, of making, using, or selling its contributor version, 1918 1919 1920 481 1921 but do not include claims that would be infringed only as a 1922 1923 1924 482 1925 consequence of further modification of the contributor version. For 1926 1927 1928 483 1929 purposes of this definition, "control" includes the right to grant 1930 1931 1932 484 1933 patent sublicenses in a manner consistent with the requirements of 1934 1935 1936 485 1937 this License. 486 1938 1939 1940 1941 1942 1943 1944 487 1945 Each contributor grants you a non-exclusive, worldwide, royalty-free 1946 1947 1948 488 1949 patent license under the contributor's essential patent claims, to 1950 1951 1952 489 1953 make, use, sell, offer for sale, import and otherwise run, modify and 1954 1955 1956 490 1957 propagate the contents of its contributor version. 491 1958 1959 1960 1961 1962 1963 1964 492 1965 In the following three paragraphs, a "patent license" is any express 1966 1967 1968 493 1969 agreement or commitment, however denominated, not to enforce a patent 1970 1971 1972 494 1973 (such as an express permission to practice a patent or covenant not to 1974 1975 1976 495 1977 sue for patent infringement). To "grant" such a patent license to a 1978 1979 1980 496 1981 party means to make such an agreement or commitment not to enforce a 1982 1983 1984 497 1985 patent against the party. 498 1986 1987 1988 1989 1990 1991 1992 499 1993 If you convey a covered work, knowingly relying on a patent license, 1994 1995 1996 500 1997 and the Corresponding Source of the work is not available for anyone 1998 1999 2000 501 2001 to copy, free of charge and under the terms of this License, through a 2002 2003 2004 502 2005 publicly available network server or other readily accessible means, 2006 2007 2008 503 2009 then you must either (1) cause the Corresponding Source to be so 2010 2011 2012 504 2013 available, or (2) arrange to deprive yourself of the benefit of the 2014 2015 2016 505 2017 patent license for this particular work, or (3) arrange, in a manner 2018 2019 2020 506 2021 consistent with the requirements of this License, to extend the patent 2022 2023 2024 507 2025 license to downstream recipients. "Knowingly relying" means you have 2026 2027 2028 508 2029 actual knowledge that, but for the patent license, your conveying the 2030 2031 2032 509 2033 covered work in a country, or your recipient's use of the covered work 2034 2035 2036 510 2037 in a country, would infringe one or more identifiable patents in that 2038 2039 2040 511 2041 country that you have reason to believe are valid. 512 2042 2043 2044 2045 2046 2047 2048 513 2049 If, pursuant to or in connection with a single transaction or 2050 2051 2052 514 2053 arrangement, you convey, or propagate by procuring conveyance of, a 2054 2055 2056 515 2057 covered work, and grant a patent license to some of the parties 2058 2059 2060 516 2061 receiving the covered work authorizing them to use, propagate, modify 2062 2063 2064 517 2065 or convey a specific copy of the covered work, then the patent license 2066 2067 2068 518 2069 you grant is automatically extended to all recipients of the covered 2070 2071 2072 519 2073 work and works based on it. 520 2074 2075 2076 2077 2078 2079 2080 521 2081 A patent license is "discriminatory" if it does not include within 2082 2083 2084 522 2085 the scope of its coverage, prohibits the exercise of, or is 2086 2087 2088 523 2089 conditioned on the non-exercise of one or more of the rights that are 2090 2091 2092 524 2093 specifically granted under this License. You may not convey a covered 2094 2095 2096 525 2097 work if you are a party to an arrangement with a third party that is 2098 2099 2100 526 2101 in the business of distributing software, under which you make payment 2102 2103 2104 527 2105 to the third party based on the extent of your activity of conveying 2106 2107 2108 528 2109 the work, and under which the third party grants, to any of the 2110 2111 2112 529 2113 parties who would receive the covered work from you, a discriminatory 2114 2115 2116 530 2117 patent license (a) in connection with copies of the covered work 2118 2119 2120 531 2121 conveyed by you (or copies made from those copies), or (b) primarily 2122 2123 2124 532 2125 for and in connection with specific products or compilations that 2126 2127 2128 533 2129 contain the covered work, unless you entered into that arrangement, 2130 2131 2132 534 2133 or that patent license was granted, prior to 28 March 2007. 535 2134 2135 2136 2137 2138 2139 2140 536 2141 Nothing in this License shall be construed as excluding or limiting 2142 2143 2144 537 2145 any implied license or other defenses to infringement that may 2146 2147 2148 538 2149 otherwise be available to you under applicable patent law. 539 2150 2151 2152 2153 2154 2155 2156 540 2157 12. No Surrender of Others' Freedom. 541 2158 2159 2160 2161 2162 2163 2164 542 2165 If conditions are imposed on you (whether by court order, agreement or 2166 2167 2168 543 2169 otherwise) that contradict the conditions of this License, they do not 2170 2171 2172 544 2173 excuse you from the conditions of this License. If you cannot convey a 2174 2175 2176 545 2177 covered work so as to satisfy simultaneously your obligations under this 2178 2179 2180 546 2181 License and any other pertinent obligations, then as a consequence you may 2182 2183 2184 547 2185 not convey it at all. For example, if you agree to terms that obligate you 2186 2187 2188 548 2189 to collect a royalty for further conveying from those to whom you convey 2190 2191 2192 549 2193 the Program, the only way you could satisfy both those terms and this 2194 2195 2196 550 2197 License would be to refrain entirely from conveying the Program. 551 2198 2199 2200 2201 2202 2203 2204 552 2205 13. Use with the GNU Affero General Public License. 553 2206 2207 2208 2209 2210 2211 2212 554 2213 Notwithstanding any other provision of this License, you have 2214 2215 2216 555 2217 permission to link or combine any covered work with a work licensed 2218 2219 2220 556 2221 under version 3 of the GNU Affero General Public License into a single 2222 2223 2224 557 2225 combined work, and to convey the resulting work. The terms of this 2226 2227 2228 558 2229 License will continue to apply to the part which is the covered work, 2230 2231 2232 559 2233 but the special requirements of the GNU Affero General Public License, 2234 2235 2236 560 2237 section 13, concerning interaction through a network will apply to the 2238 2239 2240 561 2241 combination as such. 562 2242 2243 2244 2245 2246 2247 2248 563 2249 14. Revised Versions of this License. 564 2250 2251 2252 2253 2254 2255 2256 565 2257 The Free Software Foundation may publish revised and/or new versions of 2258 2259 2260 566 2261 the GNU General Public License from time to time. Such new versions will 2262 2263 2264 567 2265 be similar in spirit to the present version, but may differ in detail to 2266 2267 2268 568 2269 address new problems or concerns. 569 2270 2271 2272 2273 2274 2275 2276 570 2277 Each version is given a distinguishing version number. If the 2278 2279 2280 571 2281 Program specifies that a certain numbered version of the GNU General 2282 2283 2284 572 2285 Public License "or any later version" applies to it, you have the 2286 2287 2288 573 2289 option of following the terms and conditions either of that numbered 2290 2291 2292 574 2293 version or of any later version published by the Free Software 2294 2295 2296 575 2297 Foundation. If the Program does not specify a version number of the 2298 2299 2300 576 2301 GNU General Public License, you may choose any version ever published 2302 2303 2304 577 2305 by the Free Software Foundation. 578 2306 2307 2308 2309 2310 2311 2312 579 2313 If the Program specifies that a proxy can decide which future 2314 2315 2316 580 2317 versions of the GNU General Public License can be used, that proxy's 2318 2319 2320 581 2321 public statement of acceptance of a version permanently authorizes you 2322 2323 2324 582 2325 to choose that version for the Program. 583 2326 2327 2328 2329 2330 2331 2332 584 2333 Later license versions may give you additional or different 2334 2335 2336 585 2337 permissions. However, no additional obligations are imposed on any 2338 2339 2340 586 2341 author or copyright holder as a result of your choosing to follow a 2342 2343 2344 587 2345 later version. 588 2346 2347 2348 2349 2350 2351 2352 589 2353 15. Disclaimer of Warranty. 590 2354 2355 2356 2357 2358 2359 2360 591 2361 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 2362 2363 2364 592 2365 APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 2366 2367 2368 593 2369 HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 2370 2371 2372 594 2373 OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 2374 2375 2376 595 2377 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2378 2379 2380 596 2381 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 2382 2383 2384 597 2385 IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 2386 2387 2388 598 2389 ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 2390 2391 2392 2393 2394 2395 2396 600 2397 16. Limitation of Liability. 601 2398 2399 2400 2401 2402 2403 2404 602 2405 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 2406 2407 2408 603 2409 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 2410 2411 2412 604 2413 THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 2414 2415 2416 605 2417 GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 2418 2419 2420 606 2421 USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 2422 2423 2424 607 2425 DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 2426 2427 2428 608 2429 PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 2430 2431 2432 609 2433 EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 2434 2435 2436 610 2437 SUCH DAMAGES. 611 2438 2439 2440 2441 2442 2443 2444 612 2445 17. Interpretation of Sections 15 and 16. 613 2446 2447 2448 2449 2450 2451 2452 614 2453 If the disclaimer of warranty and limitation of liability provided 2454 2455 2456 615 2457 above cannot be given local legal effect according to their terms, 2458 2459 2460 616 2461 reviewing courts shall apply local law that most closely approximates 2462 2463 2464 617 2465 an absolute waiver of all civil liability in connection with the 2466 2467 2468 618 2469 Program, unless a warranty or assumption of liability accompanies a 2470 2471 2472 619 2473 copy of the Program in return for a fee. 620 2474 2475 2476 2477 2478 2479 2480 621 2481 END OF TERMS AND CONDITIONS 622 2482 2483 2484 2485 2486 2487 2488 623 2489 How to Apply These Terms to Your New Programs 624 2490 2491 2492 2493 2494 2495 2496 625 2497 If you develop a new program, and you want it to be of the greatest 2498 2499 2500 626 2501 possible use to the public, the best way to achieve this is to make it 2502 2503 2504 627 2505 free software which everyone can redistribute and change under these terms. 628 2506 2507 2508 2509 2510 2511 2512 629 2513 To do so, attach the following notices to the program. It is safest 2514 2515 2516 630 2517 to attach them to the start of each source file to most effectively 2518 2519 2520 631 2521 state the exclusion of warranty; and each file should have at least 2522 2523 2524 632 2525 the "copyright" line and a pointer to where the full notice is found. 633 2526 2527 2528 2529 2530 2531 2532 634 2533 <one line to give the program's name and a brief idea of what it does.> 2534 2535 2536 635 2537 Copyright (C) <year> <name of author> 636 2538 2539 2540 2541 2542 2543 2544 637 2545 This program is free software: you can redistribute it and/or modify 2546 2547 2548 638 2549 it under the terms of the GNU General Public License as published by 2550 2551 2552 639 2553 the Free Software Foundation, either version 3 of the License, or 2554 2555 2556 640 2557 (at your option) any later version. 641 2558 2559 2560 2561 2562 2563 2564 642 2565 This program is distributed in the hope that it will be useful, 2566 2567 2568 643 2569 but WITHOUT ANY WARRANTY; without even the implied warranty of 2570 2571 2572 644 2573 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2574 2575 2576 645 2577 GNU General Public License for more details. 646 2578 2579 2580 2581 2582 2583 2584 647 2585 You should have received a copy of the GNU General Public License 2586 2587 2588 648 2589 along with this program. If not, see <http://www.gnu.org/licenses/>. 649 2590 2591 2592 2593 2594 2595 2596 650 2597 Also add information on how to contact you by electronic and paper mail. 651 2598 2599 2600 2601 2602 2603 2604 652 2605 If the program does terminal interaction, make it output a short 2606 2607 2608 653 2609 notice like this when it starts in an interactive mode: 654 2610 2611 2612 2613 2614 2615 2616 655 2617 <program> Copyright (C) <year> <name of author> 2618 2619 2620 656 2621 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 2622 2623 2624 657 2625 This is free software, and you are welcome to redistribute it 2626 2627 2628 658 2629 under certain conditions; type `show c' for details. 659 2630 2631 2632 2633 2634 2635 2636 660 2637 The hypothetical commands `show w' and `show c' should show the appropriate 2638 2639 2640 661 2641 parts of the General Public License. Of course, your program's commands 2642 2643 2644 662 2645 might be different; for a GUI interface, you would use an "about box". 663 2646 2647 2648 2649 2650 2651 2652 664 2653 You should also get your employer (if you work as a programmer) or school, 2654 2655 2656 665 2657 if any, to sign a "copyright disclaimer" for the program, if necessary. 2658 2659 2660 666 2661 For more information on this, and how to apply and follow the GNU GPL, see 2662 2663 2664 667 2665 <http://www.gnu.org/licenses/>. 668 2666 2667 2668 2669 2670 2671 2672 669 2673 The GNU General Public License does not permit incorporating your program 2674 2675 2676 670 2677 into proprietary programs. If your program is a subroutine library, you 2678 2679 2680 671 2681 may consider it more useful to permit linking proprietary applications with 2682 2683 2684 672 2685 the library. If this is what you want to do, use the GNU Lesser General 2686 2687 2688 673 2689 Public License instead of this License. But first, please read 2690 2691 2692 674 2693 <http://www.gnu.org/philosophy/why-not-lgpl.html>. 2694 2695 2696 -
note-press/trunk/languages/Note_Press-en_US.po
r1156271 r1693456 6 6 msgid "" 7 7 msgstr "" 8 "Project-Id-Version: \n"8 "Project-Id-Version: Note Press 0.1.3\n" 9 9 "Report-Msgid-Bugs-To: \n" 10 "POT-Creation-Date: 201 5-05-05 23:38-0500\n"11 "PO-Revision-Date: 201 5-05-05 23:59-0600\n"12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13 "Language-Team: LANGUAGE <LL@li.org>\n"14 "Language: \n"10 "POT-Creation-Date: 2017-07-02 11:52-0600\n" 11 "PO-Revision-Date: 2017-07-02 11:52-0600\n" 12 "Last-Translator: DataInterlock <postmaster@datainterlock.com>\n" 13 "Language-Team: DataInterlock <postmaster@datainterlock.com>\n" 14 "Language: en\n" 15 15 "MIME-Version: 1.0\n" 16 16 "Content-Type: text/plain; charset=UTF-8\n" 17 17 "Content-Transfer-Encoding: 8bit\n" 18 "Plural-Forms: \n" 19 "X-Generator: Eazy Po 0.9.5.3\n" 20 21 #: admin/class-Note_Press-admin.php:190 18 "X-Generator: Poedit 1.6.4\n" 19 "X-Poedit-KeywordsList: __\n" 20 "X-Poedit-Basepath: ..\n" 21 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 22 "X-Poedit-SearchPath-0: .\n" 23 24 #: admin/Note_Press-admin-menu.php:36 admin/Note_Press-settings.php:36 25 msgid "Note Press" 26 msgstr "Note Press" 27 28 #: admin/Note_Press-admin-menu.php:37 admin/Note_Press-settings.php:37 29 msgid "For more information and instructions please visit our website at: " 30 msgstr "For more information and instructions please visit our website at: " 31 32 #: admin/Note_Press-admin-menu.php:44 admin/Note_Press-settings.php:44 33 msgid "" 34 "Please consider supporting the development of Note Press by clicking the " 35 "image above and becoming a Patreon." 36 msgstr "" 37 "Please consider supporting the development of Note Press by clicking the " 38 "image above and becoming a Patreon." 39 40 #: admin/Note_Press-admin-menu.php:59 41 msgid "note" 42 msgstr "note" 43 44 #: admin/Note_Press-admin-menu.php:60 45 msgid "notes" 46 msgstr "notes" 47 48 #: admin/Note_Press-admin-menu.php:102 49 msgid "View" 50 msgstr "View" 51 52 #: admin/Note_Press-admin-menu.php:103 53 msgid "Edit" 54 msgstr "Edit" 55 56 #: admin/Note_Press-admin-menu.php:104 57 msgid "Are you sure you want to delete this note?" 58 msgstr "Are you sure you want to delete this note?" 59 60 #: admin/Note_Press-admin-menu.php:104 admin/Note_Press-admin-menu.php:111 61 msgid "Delete" 62 msgstr "Delete" 63 64 #: admin/Note_Press-admin-menu.php:125 admin/Note_Press-admin-menu.php:139 65 msgid "Icon" 66 msgstr "Icon" 67 68 #: admin/Note_Press-admin-menu.php:126 admin/Note_Press-admin-menu.php:140 69 #: admin/class-Note_Press-admin.php:113 70 msgid "Title" 71 msgstr "Title" 72 73 #: admin/Note_Press-admin-menu.php:127 admin/Note_Press-admin-menu.php:141 74 msgid "By" 75 msgstr "By" 76 77 #: admin/Note_Press-admin-menu.php:128 78 msgid "To" 79 msgstr "To" 80 81 #: admin/Note_Press-admin-menu.php:129 admin/Note_Press-admin-menu.php:142 82 msgid "Date" 83 msgstr "Date" 84 85 #: admin/Note_Press-admin-menu.php:130 admin/Note_Press-admin-menu.php:143 86 #: admin/class-Note_Press-admin.php:113 87 msgid "Priority" 88 msgstr "Priority" 89 90 #: admin/Note_Press-admin-menu.php:131 admin/class-Note_Press-admin.php:113 91 msgid "Read" 92 msgstr "Read" 93 94 #: admin/Note_Press-admin-menu.php:132 admin/Note_Press-admin-menu.php:144 95 #: admin/class-Note_Press-admin.php:113 96 msgid "Deadline" 97 msgstr "Deadline" 98 99 #: admin/Note_Press-admin-menu.php:428 100 msgid "Notes" 101 msgstr "Notes" 102 103 #: admin/Note_Press-admin-menu.php:433 104 msgid "Search" 105 msgstr "Search" 106 107 #: admin/Note_Press-admin-menu.php:456 108 msgid "Add A Note" 109 msgstr "Add A Note" 110 111 #: admin/Note_Press-admin-menu.php:485 admin/Note_Press-admin-menu.php:553 112 #: admin/Note_Press-admin-menu.php:844 113 msgid "That note was not found." 114 msgstr "That note was not found." 115 116 #: admin/Note_Press-admin-menu.php:503 117 msgid "View a Note" 118 msgstr "View a Note" 119 120 #: admin/Note_Press-admin-menu.php:507 121 msgid "Edit This Note" 122 msgstr "Edit This Note" 123 124 #: admin/Note_Press-admin-menu.php:509 admin/Note_Press-admin-menu.php:561 125 msgid "Back to List" 126 msgstr "Back to List" 127 128 #: admin/Note_Press-admin-menu.php:513 admin/Note_Press-admin-menu.php:582 129 msgid "Title:" 130 msgstr "Title:" 131 132 #: admin/Note_Press-admin-menu.php:514 133 msgid "Date Added/Last Edited:" 134 msgstr "Date Added/Last Edited:" 135 136 #: admin/Note_Press-admin-menu.php:515 137 msgid "Added By:" 138 msgstr "Added By:" 139 140 #: admin/Note_Press-admin-menu.php:528 admin/Note_Press-admin-menu.php:688 141 #: admin/class-Note_Press-admin.php:212 142 msgid "Priority:" 143 msgstr "Priority:" 144 145 #: admin/Note_Press-admin-menu.php:538 admin/Note_Press-admin-menu.php:663 146 #: admin/class-Note_Press-admin.php:212 147 msgid "Deadline:" 148 msgstr "Deadline:" 149 150 #: admin/Note_Press-admin-menu.php:540 admin/Note_Press-admin-menu.php:783 151 msgid "Contents:" 152 msgstr "Contents:" 153 154 #: admin/Note_Press-admin-menu.php:569 155 msgid "Edit a Note" 156 msgstr "Edit a Note" 157 158 #: admin/Note_Press-admin-menu.php:573 159 msgid "Add a Note" 160 msgstr "Add a Note" 161 162 #: admin/Note_Press-admin-menu.php:591 163 msgid "Enter a title for this note." 164 msgstr "Enter a title for this note." 165 166 #: admin/Note_Press-admin-menu.php:599 167 msgid "To:" 168 msgstr "To:" 169 170 #: admin/Note_Press-admin-menu.php:624 171 msgid "" 172 "Choose who you wish to send this note to. Ctl-click to choose multiple " 173 "recipients." 174 msgstr "" 175 "Choose who you wish to send this note to. Ctl-click to choose multiple " 176 "recipients." 177 178 #: admin/Note_Press-admin-menu.php:641 179 msgid "Sticky Note:" 180 msgstr "Sticky Note:" 181 182 #: admin/Note_Press-admin-menu.php:645 183 msgid "" 184 "<strong>Note: </strong>Users who do not have the ability to write notes can " 185 "only see Sticky Notes." 186 msgstr "" 187 "<strong>Note: </strong>Users who do not have the ability to write notes can " 188 "only see Sticky Notes." 189 190 #: admin/Note_Press-admin-menu.php:666 191 msgid "" 192 "Enter a deadline for this note or leave this field blank for no deadline.</" 193 "br> <strong>Not all browswers support a date picker</strong>. If you do not " 194 "have the option to select a date, please enter one in the format MM/DD/YYYY." 195 msgstr "" 196 "Enter a deadline for this note or leave this field blank for no deadline.</" 197 "br> <strong>Not all browswers support a date picker</strong>. If you do not " 198 "have the option to select a date, please enter one in the format MM/DD/YYYY." 199 200 #: admin/Note_Press-admin-menu.php:692 201 msgid "Low" 202 msgstr "Low" 203 204 #: admin/Note_Press-admin-menu.php:693 205 msgid "Medium" 206 msgstr "Medium" 207 208 #: admin/Note_Press-admin-menu.php:694 209 msgid "High" 210 msgstr "High" 211 212 #: admin/Note_Press-admin-menu.php:696 213 msgid "Select a priority for this note." 214 msgstr "Select a priority for this note." 215 216 #: admin/Note_Press-admin-menu.php:700 217 msgid "Icon:" 218 msgstr "Icon:" 219 220 #: admin/Note_Press-admin-menu.php:752 221 msgid "Select an icon for this note." 222 msgstr "Select an icon for this note." 223 224 #: admin/Note_Press-admin-menu.php:779 225 msgid "Author/Editor: " 226 msgstr "Author/Editor: " 227 228 #: admin/Note_Press-admin-menu.php:802 admin/Note_Press-settings.php:87 229 msgid "Save" 230 msgstr "Save" 231 232 #: admin/Note_Press-admin-menu.php:809 233 msgid "Update Note" 234 msgstr "Update Note" 235 236 #: admin/Note_Press-admin-menu.php:813 237 msgid "Add Note" 238 msgstr "Add Note" 239 240 #: admin/Note_Press-admin-menu.php:836 admin/Note_Press-admin-menu.php:889 241 msgid "A note must have a title." 242 msgstr "A note must have a title." 243 244 #: admin/Note_Press-admin-menu.php:1016 245 msgid "That note was not found" 246 msgstr "That note was not found" 247 248 #: admin/Note_Press-admin-menu.php:1023 admin/Note_Press-admin-menu.php:1102 249 msgid "Note Deleted!" 250 msgstr "Note Deleted!" 251 252 #: admin/Note_Press-admin-menu.php:1035 253 msgid "Please deactivate and re-activate Note Press to complete the upgrade." 254 msgstr "Please deactivate and re-activate Note Press to complete the upgrade." 255 256 #: admin/Note_Press-admin-menu.php:1106 257 msgid " Notes Deleted!" 258 msgstr " Notes Deleted!" 259 260 #: admin/Note_Press-admin-menu.php:1115 261 msgid "No notes selected." 262 msgstr "No notes selected." 263 264 #: admin/Note_Press-settings.php:31 265 msgid "Settings updated." 266 msgstr "Settings updated." 267 268 #: admin/Note_Press-settings.php:61 admin/class-Note_Press-admin.php:283 22 269 msgid "Note Press Settings" 23 270 msgstr "Note Press Settings" 24 271 25 #: admin/class-Note_Press-admin.php:191 public/Note_Pressmenu.php:24 26 msgid "Note Press" 27 msgstr "Note Press" 28 29 #: admin/class-Note_Press-admin.php:217 30 msgid "Settings" 31 msgstr "Settings" 32 33 #: public/Note_Pressmenu.php:25 34 msgid "For more information and instructions please visit our website at: " 35 msgstr "For more information and instructions please visit our website at: " 36 37 #: public/Note_Pressmenu.php:43 38 msgid "note" 39 msgstr "note" 40 41 #: public/Note_Pressmenu.php:44 42 msgid "notes" 43 msgstr "notes" 44 45 #: public/Note_Pressmenu.php:66 46 msgid "View" 47 msgstr "View" 48 49 #: public/Note_Pressmenu.php:67 50 msgid "Edit" 51 msgstr "Edit" 52 53 #: public/Note_Pressmenu.php:68 54 msgid "Are you sure you want to delete this note?" 55 msgstr "Are you sure you want to delete this note?" 56 57 #: public/Note_Pressmenu.php:68 public/Note_Pressmenu.php:77 58 msgid "Delete" 59 msgstr "Delete" 60 61 #: public/Note_Pressmenu.php:91 62 msgid "Icon" 63 msgstr "Icon" 64 65 #: public/Note_Pressmenu.php:92 66 msgid "Title" 67 msgstr "Title" 68 69 #: public/Note_Pressmenu.php:93 70 msgid "By" 71 msgstr "By" 72 73 #: public/Note_Pressmenu.php:94 74 msgid "Date" 75 msgstr "Date" 76 77 #: public/Note_Pressmenu.php:189 78 msgid "Notes" 79 msgstr "Notes" 80 81 #: public/Note_Pressmenu.php:220 82 msgid "Add A Note" 83 msgstr "Add A Note" 84 85 #: public/Note_Pressmenu.php:241 public/Note_Pressmenu.php:277 86 #: public/Note_Pressmenu.php:436 87 msgid "That note was not found." 88 msgstr "That note was not found." 89 90 #: public/Note_Pressmenu.php:250 91 msgid "Edit This Note" 92 msgstr "Edit This Note" 93 94 #: public/Note_Pressmenu.php:252 public/Note_Pressmenu.php:284 95 msgid "Back to List" 96 msgstr "Back to List" 97 98 #: public/Note_Pressmenu.php:256 public/Note_Pressmenu.php:292 99 msgid "Title:" 100 msgstr "Title:" 101 102 #: public/Note_Pressmenu.php:257 103 msgid "Date Added/Last Edited:" 104 msgstr "Date Added/Last Edited:" 105 106 #: public/Note_Pressmenu.php:258 107 msgid "Added By:" 108 msgstr "Added By:" 109 110 #: public/Note_Pressmenu.php:260 public/Note_Pressmenu.php:373 111 msgid "Contents:" 112 msgstr "Contents:" 113 114 #: public/Note_Pressmenu.php:300 115 msgid "Enter a title for this note." 116 msgstr "Enter a title for this note." 117 118 #: public/Note_Pressmenu.php:304 119 msgid "Icon:" 120 msgstr "Icon:" 121 122 #: public/Note_Pressmenu.php:357 123 msgid "Select an icon for this note." 124 msgstr "Select an icon for this note." 125 126 #: public/Note_Pressmenu.php:363 public/Note_Pressmenu.php:368 127 msgid "Author/Editor: " 128 msgstr "Author/Editor: " 129 130 #: public/Note_Pressmenu.php:392 131 msgid "Save" 132 msgstr "Save" 133 134 #: public/Note_Pressmenu.php:399 135 msgid "Update Note" 136 msgstr "Update Note" 137 138 #: public/Note_Pressmenu.php:403 139 msgid "Add Note" 140 msgstr "Add Note" 141 142 #: public/Note_Pressmenu.php:428 public/Note_Pressmenu.php:460 143 msgid "A note must have a title." 144 msgstr "A note must have a title." 145 146 #: public/Note_Pressmenu.php:500 147 msgid "That note was not found" 148 msgstr "That note was not found" 149 150 #: public/Note_Pressmenu.php:507 151 msgid "Note Deleted!" 152 msgstr "Note Deleted!" 153 154 #: public/Note_Pressmenu.php:557 155 msgid " Note Deleted!" 156 msgstr " Note Deleted!" 157 158 #: public/Note_Pressmenu.php:562 159 msgid " Notes Deleted!" 160 msgstr " Notes Deleted!" 161 162 #: public/Note_Pressmenu.php:571 163 msgid "No notes selected." 164 msgstr "No notes selected." 272 #: admin/Note_Press-settings.php:69 273 msgid "Note Press User Level:" 274 msgstr "Note Press User Level:" 275 276 #: admin/Note_Press-settings.php:78 277 msgid "Select the level required to create notes with Note Press." 278 msgstr "Select the level required to create notes with Note Press." 279 280 #: admin/Note_Press-settings.php:92 281 msgid "Save Settings" 282 msgstr "Save Settings" 283 284 #: admin/class-Note_Press-admin.php:108 285 msgid "No notes to you." 286 msgstr "No notes to you." 287 288 #: admin/class-Note_Press-admin.php:212 289 msgid "From:" 290 msgstr "" 291 292 #: admin/class-Note_Press-admin.php:264 293 msgid "Note Press - Notes to you" 294 msgstr "Note Press - Notes to you" 295 296 #~ msgid " Note Deleted!" 297 #~ msgstr " Note Deleted!" 298 299 #~ msgid "Enter a deadline for this note." 300 #~ msgstr "Enter a deadline for this note." -
note-press/trunk/languages/Note_Press-es_ES.po
r1156271 r1693456 6 6 msgid "" 7 7 msgstr "" 8 "Project-Id-Version: \n"8 "Project-Id-Version: NotePressES\n" 9 9 "Report-Msgid-Bugs-To: \n" 10 "POT-Creation-Date: 201 5-05-05 23:38-0500\n"11 "PO-Revision-Date: 201 5-05-05 23:55-0600\n"12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13 "Language-Team: LANGUAGE <LL@li.org>\n"14 "Language: \n"10 "POT-Creation-Date: 2017-07-01 20:34-0600\n" 11 "PO-Revision-Date: 2017-07-01 20:34-0600\n" 12 "Last-Translator: DataInterlock <postmaster@datainterlock.com>\n" 13 "Language-Team: DataInterlock <postmaster@datainterlock.com>\n" 14 "Language: es_ES\n" 15 15 "MIME-Version: 1.0\n" 16 16 "Content-Type: text/plain; charset=UTF-8\n" 17 17 "Content-Transfer-Encoding: 8bit\n" 18 "Plural-Forms: \n" 19 "X-Generator: Eazy Po 0.9.5.3\n" 20 21 #: admin/class-Note_Press-admin.php:190 18 "X-Generator: Poedit 1.6.4\n" 19 "X-Poedit-Basepath: ..\n" 20 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 21 "X-Poedit-KeywordsList: __\n" 22 "X-Poedit-SearchPath-0: .\n" 23 24 #: admin/Note_Press-admin-menu.php:36 admin/Note_Press-settings.php:36 25 msgid "Note Press" 26 msgstr "Note Press" 27 28 #: admin/Note_Press-admin-menu.php:37 admin/Note_Press-settings.php:37 29 msgid "For more information and instructions please visit our website at: " 30 msgstr "" 31 "Para obtener más información e instrucciones por favor visite nuestro sitio " 32 "web en :" 33 34 #: admin/Note_Press-admin-menu.php:44 admin/Note_Press-settings.php:44 35 msgid "" 36 "Please consider supporting the development of Note Press by clicking the " 37 "image above and becoming a Patreon." 38 msgstr "" 39 "Please consider supporting the development of Note Press by clicking the " 40 "image above and becoming a Patreon. This is a sample Spanish language file " 41 "for Note Press and is not fully translated." 42 43 #: admin/Note_Press-admin-menu.php:59 44 msgid "note" 45 msgstr "nota" 46 47 #: admin/Note_Press-admin-menu.php:60 48 msgid "notes" 49 msgstr "notas" 50 51 #: admin/Note_Press-admin-menu.php:102 52 msgid "View" 53 msgstr "Ver" 54 55 #: admin/Note_Press-admin-menu.php:103 56 msgid "Edit" 57 msgstr "Editar" 58 59 #: admin/Note_Press-admin-menu.php:104 60 msgid "Are you sure you want to delete this note?" 61 msgstr "¿Seguro que quieres eliminar esta nota?" 62 63 #: admin/Note_Press-admin-menu.php:104 admin/Note_Press-admin-menu.php:111 64 msgid "Delete" 65 msgstr "Borrar" 66 67 #: admin/Note_Press-admin-menu.php:125 admin/Note_Press-admin-menu.php:139 68 msgid "Icon" 69 msgstr "Icono" 70 71 #: admin/Note_Press-admin-menu.php:126 admin/Note_Press-admin-menu.php:140 72 #: admin/class-Note_Press-admin.php:113 73 msgid "Title" 74 msgstr "Título" 75 76 #: admin/Note_Press-admin-menu.php:127 admin/Note_Press-admin-menu.php:141 77 msgid "By" 78 msgstr "Autor" 79 80 #: admin/Note_Press-admin-menu.php:128 81 msgid "To" 82 msgstr "To" 83 84 #: admin/Note_Press-admin-menu.php:129 admin/Note_Press-admin-menu.php:142 85 msgid "Date" 86 msgstr "Fecha" 87 88 #: admin/Note_Press-admin-menu.php:130 admin/Note_Press-admin-menu.php:143 89 #: admin/class-Note_Press-admin.php:113 90 msgid "Priority" 91 msgstr "Prioridad" 92 93 #: admin/Note_Press-admin-menu.php:131 admin/class-Note_Press-admin.php:113 94 msgid "Read" 95 msgstr "Read" 96 97 #: admin/Note_Press-admin-menu.php:132 admin/Note_Press-admin-menu.php:144 98 #: admin/class-Note_Press-admin.php:113 99 msgid "Deadline" 100 msgstr "Fecha tope" 101 102 #: admin/Note_Press-admin-menu.php:428 103 msgid "Notes" 104 msgstr "Notas" 105 106 #: admin/Note_Press-admin-menu.php:431 107 msgid "Search" 108 msgstr "Buscar" 109 110 #: admin/Note_Press-admin-menu.php:454 111 msgid "Add A Note" 112 msgstr "Poner una Nota" 113 114 #: admin/Note_Press-admin-menu.php:483 admin/Note_Press-admin-menu.php:551 115 #: admin/Note_Press-admin-menu.php:841 116 msgid "That note was not found." 117 msgstr "No se ha encontrado esa nota." 118 119 #: admin/Note_Press-admin-menu.php:501 120 msgid "View a Note" 121 msgstr "View a Note" 122 123 #: admin/Note_Press-admin-menu.php:505 124 msgid "Edit This Note" 125 msgstr "Editar Esta Nota" 126 127 #: admin/Note_Press-admin-menu.php:507 admin/Note_Press-admin-menu.php:559 128 msgid "Back to List" 129 msgstr "Volver a la lista" 130 131 #: admin/Note_Press-admin-menu.php:511 admin/Note_Press-admin-menu.php:579 132 msgid "Title:" 133 msgstr "Título:" 134 135 #: admin/Note_Press-admin-menu.php:512 136 msgid "Date Added/Last Edited:" 137 msgstr "Fecha Alta / Última modificación:" 138 139 #: admin/Note_Press-admin-menu.php:513 140 msgid "Added By:" 141 msgstr "Autor:" 142 143 #: admin/Note_Press-admin-menu.php:526 admin/Note_Press-admin-menu.php:685 144 msgid "Priority:" 145 msgstr "Prioridad:" 146 147 #: admin/Note_Press-admin-menu.php:536 admin/Note_Press-admin-menu.php:660 148 msgid "Deadline:" 149 msgstr "Fecha tope:" 150 151 #: admin/Note_Press-admin-menu.php:538 admin/Note_Press-admin-menu.php:780 152 msgid "Contents:" 153 msgstr "Contenidos:" 154 155 #: admin/Note_Press-admin-menu.php:566 156 msgid "Edit a Note" 157 msgstr "Edit a Note" 158 159 #: admin/Note_Press-admin-menu.php:570 160 msgid "Add a Note" 161 msgstr "Add a Note" 162 163 #: admin/Note_Press-admin-menu.php:588 164 msgid "Enter a title for this note." 165 msgstr "Introduzca un título para esta nota." 166 167 #: admin/Note_Press-admin-menu.php:596 168 msgid "To:" 169 msgstr "To:" 170 171 #: admin/Note_Press-admin-menu.php:621 172 msgid "" 173 "Choose who you wish to send this note to. Ctl-click to choose multiple " 174 "recipients." 175 msgstr "" 176 "Choose who you wish to send this note to. Ctl-click to choose multiple " 177 "recipients." 178 179 #: admin/Note_Press-admin-menu.php:638 180 msgid "Sticky Note:" 181 msgstr "Sticky Note:" 182 183 #: admin/Note_Press-admin-menu.php:642 184 msgid "" 185 "<strong>Note: </strong>Users who do not have the ability to write notes can " 186 "only see Sticky Notes." 187 msgstr "" 188 "<strong>Note: </strong>Users who do not have the ability to write notes can " 189 "only see Sticky Notes." 190 191 #: admin/Note_Press-admin-menu.php:663 192 msgid "" 193 "Enter a deadline for this note or leave this field blank for no deadline.</" 194 "br> <strong>Not all browswers support a date picker</strong>. If you do not " 195 "have the option to select a date, please enter one in the format MM/DD/YYYY." 196 msgstr "" 197 "Ingrese un plazo para esta nota o deje este campo en blanco para que no haya " 198 "fecha límite. </ br> <strong> No todos los browswers admiten un selector de " 199 "fechas </ strong>. Si no tiene la opción de seleccionar una fecha, " 200 "introduzca una en el formato MM/DD/AAAA." 201 202 #: admin/Note_Press-admin-menu.php:689 203 msgid "Low" 204 msgstr "Bajo" 205 206 #: admin/Note_Press-admin-menu.php:690 207 msgid "Medium" 208 msgstr "Medio" 209 210 #: admin/Note_Press-admin-menu.php:691 211 msgid "High" 212 msgstr "Alto" 213 214 #: admin/Note_Press-admin-menu.php:693 215 msgid "Select a priority for this note." 216 msgstr "Seleccione una prioridad para esta nota." 217 218 #: admin/Note_Press-admin-menu.php:697 219 msgid "Icon:" 220 msgstr "Icono:" 221 222 #: admin/Note_Press-admin-menu.php:749 223 msgid "Select an icon for this note." 224 msgstr "Seleccione un icono para esta nota." 225 226 #: admin/Note_Press-admin-menu.php:776 227 msgid "Author/Editor: " 228 msgstr "Autor / Editor :" 229 230 #: admin/Note_Press-admin-menu.php:799 admin/Note_Press-settings.php:87 231 msgid "Save" 232 msgstr "Guardar" 233 234 #: admin/Note_Press-admin-menu.php:806 235 msgid "Update Note" 236 msgstr "Actualización Nota" 237 238 #: admin/Note_Press-admin-menu.php:810 239 msgid "Add Note" 240 msgstr "Añadir La Nota" 241 242 #: admin/Note_Press-admin-menu.php:833 admin/Note_Press-admin-menu.php:886 243 msgid "A note must have a title." 244 msgstr "Una nota tiene que tener un título." 245 246 #: admin/Note_Press-admin-menu.php:1013 247 msgid "That note was not found" 248 msgstr "Esa nota no se ha encontrado" 249 250 #: admin/Note_Press-admin-menu.php:1020 admin/Note_Press-admin-menu.php:1092 251 msgid "Note Deleted!" 252 msgstr "Nota eliminados !" 253 254 #: admin/Note_Press-admin-menu.php:1032 255 msgid "Please deactivate and re-activate Note Press to complete the upgrade." 256 msgstr "Please deactivate and re-activate Note Press to complete the upgrade." 257 258 #: admin/Note_Press-admin-menu.php:1096 259 msgid " Notes Deleted!" 260 msgstr " Nota eliminados !" 261 262 #: admin/Note_Press-admin-menu.php:1105 263 msgid "No notes selected." 264 msgstr "No hay notas seleccionadas ." 265 266 #: admin/Note_Press-settings.php:31 267 msgid "Settings updated." 268 msgstr "Settings updated." 269 270 #: admin/Note_Press-settings.php:61 22 271 msgid "Note Press Settings" 23 272 msgstr "Note Press Ajustes" 24 273 25 #: admin/class-Note_Press-admin.php:191 public/Note_Pressmenu.php:24 26 msgid "Note Press" 27 msgstr "Note Press" 28 29 #: admin/class-Note_Press-admin.php:217 30 msgid "Settings" 31 msgstr "Ajustes" 32 33 #: public/Note_Pressmenu.php:25 34 msgid "For more information and instructions please visit our website at: " 35 msgstr "Para obtener más información e instrucciones por favor visite nuestro sitio web en :" 36 37 #: public/Note_Pressmenu.php:43 38 msgid "note" 39 msgstr "nota" 40 41 #: public/Note_Pressmenu.php:44 42 msgid "notes" 43 msgstr "notas" 44 45 #: public/Note_Pressmenu.php:66 46 msgid "View" 47 msgstr "Ver" 48 49 #: public/Note_Pressmenu.php:67 50 msgid "Edit" 51 msgstr "Editar" 52 53 #: public/Note_Pressmenu.php:68 54 msgid "Are you sure you want to delete this note?" 55 msgstr "¿Seguro que quieres eliminar esta nota?" 56 57 #: public/Note_Pressmenu.php:68 public/Note_Pressmenu.php:77 58 msgid "Delete" 59 msgstr "Borrar" 60 61 #: public/Note_Pressmenu.php:91 62 msgid "Icon" 63 msgstr "Icono" 64 65 #: public/Note_Pressmenu.php:92 66 msgid "Title" 67 msgstr "Título" 68 69 #: public/Note_Pressmenu.php:93 70 msgid "By" 71 msgstr "Autor" 72 73 #: public/Note_Pressmenu.php:94 74 msgid "Date" 75 msgstr "Fecha" 76 77 #: public/Note_Pressmenu.php:189 78 msgid "Notes" 79 msgstr "Notas" 80 81 #: public/Note_Pressmenu.php:220 82 msgid "Add A Note" 83 msgstr "Poner una Nota" 84 85 #: public/Note_Pressmenu.php:241 public/Note_Pressmenu.php:277 86 #: public/Note_Pressmenu.php:436 87 msgid "That note was not found." 88 msgstr "No se ha encontrado esa nota." 89 90 #: public/Note_Pressmenu.php:250 91 msgid "Edit This Note" 92 msgstr "Editar Esta Nota" 93 94 #: public/Note_Pressmenu.php:252 public/Note_Pressmenu.php:284 95 msgid "Back to List" 96 msgstr "Volver a la lista" 97 98 #: public/Note_Pressmenu.php:256 public/Note_Pressmenu.php:292 99 msgid "Title:" 100 msgstr "Título:" 101 102 #: public/Note_Pressmenu.php:257 103 msgid "Date Added/Last Edited:" 104 msgstr "Fecha Alta / Última modificación:" 105 106 #: public/Note_Pressmenu.php:258 107 msgid "Added By:" 108 msgstr "Autor:" 109 110 #: public/Note_Pressmenu.php:260 public/Note_Pressmenu.php:373 111 msgid "Contents:" 112 msgstr "Contenidos:" 113 114 #: public/Note_Pressmenu.php:300 115 msgid "Enter a title for this note." 116 msgstr "Introduzca un título para esta nota." 117 118 #: public/Note_Pressmenu.php:304 119 msgid "Icon:" 120 msgstr "Icono:" 121 122 #: public/Note_Pressmenu.php:357 123 msgid "Select an icon for this note." 124 msgstr "Seleccione un icono para esta nota." 125 126 #: public/Note_Pressmenu.php:363 public/Note_Pressmenu.php:368 127 msgid "Author/Editor: " 128 msgstr "Autor / Editor :" 129 130 #: public/Note_Pressmenu.php:392 131 msgid "Save" 132 msgstr "Guardar" 133 134 #: public/Note_Pressmenu.php:399 135 msgid "Update Note" 136 msgstr "Actualización Nota" 137 138 #: public/Note_Pressmenu.php:403 139 msgid "Add Note" 140 msgstr "Añadir La Nota" 141 142 #: public/Note_Pressmenu.php:428 public/Note_Pressmenu.php:460 143 msgid "A note must have a title." 144 msgstr "Una nota tiene que tener un título." 145 146 #: public/Note_Pressmenu.php:500 147 msgid "That note was not found" 148 msgstr "Esa nota no se ha encontrado" 149 150 #: public/Note_Pressmenu.php:507 151 msgid "Note Deleted!" 152 msgstr "Nota eliminados !" 153 154 #: public/Note_Pressmenu.php:557 155 msgid " Note Deleted!" 156 msgstr " Nota eliminados !" 157 158 #: public/Note_Pressmenu.php:562 159 msgid " Notes Deleted!" 160 msgstr " Nota eliminados !" 161 162 #: public/Note_Pressmenu.php:571 163 msgid "No notes selected." 164 msgstr "No hay notas seleccionadas ." 274 #: admin/Note_Press-settings.php:69 275 msgid "Note Press User Level:" 276 msgstr "Note Press User Level:" 277 278 #: admin/Note_Press-settings.php:78 279 msgid "Select the level required to create notes with Note Press." 280 msgstr "Select the level required to create notes with Note Press." 281 282 #: admin/Note_Press-settings.php:92 283 msgid "Save Settings" 284 msgstr "Save Settings" 285 286 #: admin/class-Note_Press-admin.php:108 287 msgid "No notes to you." 288 msgstr "No hay notas para usted." 289 290 #: admin/class-Note_Press-admin.php:240 291 msgid "Note Press - Notes to you" 292 msgstr "Note Press - Notas para usted" 293 294 #~ msgid " Note Deleted!" 295 #~ msgstr " Nota eliminados !" 296 297 #, fuzzy 298 #~ msgid "Enter a deadline for this note." 299 #~ msgstr "Introduzca un título para esta nota." -
note-press/trunk/public/Note_Pressmenu.php
r1589611 r1693456 1 2 1 <?php 3 /**4 * Represents the view for the administration dashboard.5 *6 * This includes the header, options, and other information that should provide7 * The User Interface to the end user.8 *9 * @package Note_Press10 * @author datainterlock <postmaster@datainterlock.com>11 * @license GPL-3.0+12 * @link http://www.datainterlock.com13 * @Copyright (C) 2015 Rod Kinnison postmaster@datainterlock.com14 */15 16 if (!defined('WPINC'))17 {18 die;19 }20 21 echo '<div class="wrap">';22 echo '<table width="100%" cellpadding="5">';23 echo '<tr><td width="100px"><img src="'. plugin_dir_url(__FILE__) . 'images/NPLogo1.png" align="bottom" hspace="3" width="100" height="97" /></td>';24 echo '<td><h2>' . __('Note Press', 'Note_Press') . '</h2>';25 echo '<p>' . __('For more information and instructions please visit our website at: ', 'Note_Press') . '<a href="http://www.datainterlock.com" target="_blank">http://www.datainterlock.com</a>26 </td></tr></table><hr />';27 28 if (!class_exists('WP_List_Table'))29 {30 require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');31 }32 33 class My_Example_List_Table extends WP_List_Table34 {35 36 var $example_data = array();37 38 function __construct()39 {40 global $status, $page;41 42 parent::__construct(array(43 'singular' => __('note', 'mylisttable'), //singular name of the listed records44 'plural' => __('notes', 'mylisttable'), //plural name of the listed records45 'ajax' => false //does this table support ajax?46 ));47 }48 49 function column_default($item, $column_name)50 {51 switch ($column_name)52 {53 case 'icon':54 case 'title':55 case 'addedby':56 case 'datetime':57 return $item[$column_name];58 default:59 return print_r($item, true); //Show the whole array for troubleshooting purposes60 }61 }62 63 function column_title($item)64 {65 $actions = array(66 'view' => sprintf('<a href="?page=%s&action=%s&id=%s">' . __('View', 'Note_Press') . '</a>', $_REQUEST['page'], 'view', $item['ID']),67 'edit' => sprintf('<a href="?page=%s&action=%s&id=%s">' . __('Edit', 'Note_Press') . '</a>', $_REQUEST['page'], 'edit', $item['ID']),68 'delete' => sprintf('<a href="?page=%s&action=%s&id=%s" onclick="return confirm(\'' . __('Are you sure you want to delete this note?', 'Note_Press') . '\')">' . __('Delete', 'Note_Press') . '</a>', $_REQUEST['page'], 'delete', $item['ID'])69 );70 71 return sprintf('%1$s %2$s', $item['title'], $this->row_actions($actions));72 }73 74 function get_bulk_actions()75 {76 $actions = array(77 'delete' => __('Delete', 'Note_Press')78 );79 return $actions;80 }81 82 function column_cb($item)83 {84 return sprintf('<input type="checkbox" name="id[]" value="%s" />', $item['ID']);85 }86 87 function get_columns()88 {89 $columns = array(90 'cb' => '<input type="checkbox" />',91 'icon' => __('Icon', 'mylisttable'),92 'title' => __('Title', 'mylisttable'),93 'addedby'=> __('By', 'mylisttable'),94 'datetime'=> __('Date', 'mylisttable'),95 );96 return $columns;97 }98 99 function get_sortable_columns()100 {101 $sortable_columns = array(102 'title' => array('title',false),103 'addedby' => array('addedby',false),104 'datetime' => array('datetime',false)105 );106 return $sortable_columns;107 }108 109 function get_items($column='title',$order='DESC')110 {111 global $wpdb;112 $table_name = $wpdb->prefix . "Note_Press";113 switch ($column)114 {115 case 'title': $column='Title'; break;116 case 'addedby': $column='AddedBy'; break;117 case 'datetime': $column='Date'; break;118 }119 if (isset($_GET['s']))120 {121 $myfilter =' where Title LIKE "%%s%" or Content LIKE "%%s%"';122 $SQL=$wpdb->prepare("SELECT * FROM $table_name".$myfilter." order by %s %s",array($_GET['s'],$_GET['s'],$column,$order));123 }124 else125 {126 $myfilter='';127 $SQL=$wpdb->prepare("SELECT * FROM $table_name order by %s %s",array($column,$order));128 }129 $mylink = $wpdb->get_results($SQL);130 return $mylink;131 }132 133 function prepare_items()134 {135 $_SERVER['REQUEST_URI'] = remove_query_arg( '_wp_http_referer', $_SERVER['REQUEST_URI'] );136 if (isset($_GET['orderby']) && isset($_GET['order']))137 {138 $orderby=$_GET['orderby'];139 $order=$_GET['order'];140 }141 else142 {143 $orderby='title';144 $order='asc';145 }146 $mylink=$this->get_items($orderby,$order);147 foreach ($mylink as $link)148 {149 $iconpath = plugin_dir_url(__FILE__) . 'icons/' . $link->Icon;150 $example_data[] = array(151 'ID' => $link->ID,152 'icon' => '<img src="' . $iconpath . '" width="16" height="16" />',153 'title' => '<a href="?page=Note_Press-Main-Menu&action=view&id=' . $link->ID . '">' . $link->Title . '</a>',154 'addedby' => $link->AddedBy,155 'datetime' => $link->Date156 );157 }158 $columns = $this->get_columns();159 $hidden = array();160 $sortable = $this->get_sortable_columns();161 $this->_column_headers = array(162 $columns,163 $hidden,164 $sortable165 );166 167 $per_page = 5;168 $current_page = $this->get_pagenum();169 $total_items = count(@$example_data);170 // only ncessary because we have sample data171 if ($total_items>0)172 {173 $example_data = array_slice($example_data,(($current_page-1)*$per_page),$per_page);174 }175 $this->set_pagination_args( array(176 'total_items' => $total_items, //WE have to calculate the total number of items177 'per_page' => $per_page //WE have to determine how many items to show on a page178 ) );179 180 $this->items = @$example_data;181 }182 183 } //class184 185 function Note_Press_render_list_page()186 {187 $myListTable = new My_Example_List_Table();188 $myListTable->prepare_items();189 190 echo '</pre><div class="wrap"><h3>' . __('Notes', 'Note_Press') . '</h3>';191 192 echo '<form method="get">';193 echo '<input type="hidden" name="page" value="' . $_REQUEST['page'] . '" />'.$myListTable->search_box('search', 'search_id');194 echo '</form>';195 196 echo '<form id="events-filter" method="get">';197 echo '<input type="hidden" name="page" value="' . $_REQUEST['page'] . '" />';198 $myListTable->display();199 echo '</form>';200 echo '</div>';201 }202 2 203 3 204 function Note_PressshowMessage($message, $errormsg = false)205 {206 if ($errormsg)207 {208 echo '<div id="message" class="error">';209 }210 else211 {212 echo '<div id="message" class="updated fade">';213 }214 215 echo "<p><strong>$message</strong></p></div>";216 }217 4 218 function Note_Pressshow_menu()219 {220 echo '<form action="" method="get">';221 echo '<button class="button-primary" type="submit" name="action" value="Add">' . __('Add A Note', 'Note_Press') . '</button>';222 echo '<input name="page" type="hidden" value="Note_Press-Main-Menu" />';223 echo '</form><hr>';224 }225 5 226 //shows the main list of notes and the menu227 function Note_Pressget_notes()228 {229 global $wpdb;230 Note_Pressshow_menu();231 Note_Press_render_list_page();232 }233 6 234 //shows an individual note235 function Note_Pressshow_note($which)236 {237 global $wpdb;238 $table_name = $wpdb->prefix . "Note_Press";239 $mylink = $wpdb->get_results("SELECT * FROM $table_name where ID=$which");240 if (!$mylink)241 {242 Note_PressshowMessage(__('That note was not found.', 'Note_Press'), true);243 Note_Pressget_notes();244 }245 else246 {247 foreach ($mylink as $link)248 {249 echo '<form action="" method="get">';250 echo '<input name="page" type="hidden" value="Note_Press-Main-Menu" />';251 echo '<button class="button-primary" type="submit" name="edit" value="' . $link->ID . '">' . __('Edit This Note', 'Note_Press') . '</button>';252 echo ' ';253 echo '<button class="button-primary" type="submit" name="action" value="List">' . __('Back to List', 'Note_Press') . '</button>';254 echo '</form><hr>';255 $iconpath = plugin_dir_url(__FILE__) . 'icons/' . $link->Icon;256 echo '<table class="form-table widefat ltr" width="100%">';257 echo "<tr><td><h3><img src='$iconpath' width='16' height='16' /> " . __('Title:', 'Note_Press') . " $link->Title</h3></td></tr>";258 echo "<tr><td><p><strong>" . __('Date Added/Last Edited:', 'Note_Press') . "</strong> $link->Date</p></td></tr>";259 echo "<tr><td><p><strong>" . __('Added By:', 'Note_Press') . "</strong> $link->AddedBy</p></td></tr>";260 $content = do_shortcode(nl2br($link->Content));261 echo "<tr><td><p><strong>" . __('Contents:', 'Note_Press') . "</strong></p><hr><p> $content</p></td></tr>";262 echo '</table>';263 }264 }265 }266 267 //displays the note editor268 function Note_Pressadd_note($which=-1)269 {270 global $wpdb, $current_user;271 if ($which <> -1)272 {273 $table_name = $wpdb->prefix . "Note_Press";274 $mylink = $wpdb->get_results("SELECT * FROM $table_name where ID=$which");275 if (!$mylink)276 {277 Note_PressshowMessage(__('That note was not found.', 'Note_Press'), true);278 Note_Pressget_notes();279 exit;280 }281 }282 echo '<form action="" method="get">';283 echo '<input name="page" type="hidden" value="Note_Press-Main-Menu" />';284 echo '<button class="button-primary" type="submit" name="List" value="List">' . __('Back to List', 'Note_Press') . '</button>';285 echo '<hr>';286 echo '</form>';287 echo '<form action="" method="post">';288 echo '<div id="poststuff">289 <div id="post-body" class="metabox-holder columns-2">290 <div id="post-body-content">';291 echo ' <div id="namediv" class="stuffbox">';292 echo ' <h3><label for="Title">' . __('Title:', 'Note_Press') . '</label></h3>';293 echo ' <div class="inside">';294 echo ' <input name="Title" type="text" id="Title" size="100" maxlength="255" value="';295 if ($which <> -1)296 {297 echo $mylink[0]->Title;298 }299 echo '">300 <p>' . __('Enter a title for this note.', 'Note_Press') . '</p>' ;301 echo ' </div>';302 echo ' </div>';303 echo ' <div id="icondiv" class="stuffbox">';304 echo ' <h3><label for="Icon">' . __('Icon:', 'Note_Press') . '</label></h3>';305 echo ' <div class="inside">';306 $count = 0;307 if ($which <> -1)308 {309 $blank=false;310 }311 else312 {313 $blank = true;314 }315 echo '<table width="100%" border="0">';316 $path = plugin_dir_path(__FILE__) . 'icons';317 $files = scandir($path);318 foreach ($files as $myfile)319 {320 if ($myfile <> '.' && $myfile <> '..')321 {322 if ($count == 0)323 {324 echo '<tr>';325 $enddone = FALSE;326 }327 $iconpath = plugin_dir_url(__FILE__) . 'icons/' . $myfile;328 echo '<td><input type="radio" name="iconselect[]" value="' . $myfile . '"';329 if ($blank)330 {331 echo ' checked ';332 $blank = false;333 }334 if ($which <> -1)335 {336 if ($mylink[0]->Icon == $myfile)337 {338 echo ' checked ';339 }340 }341 echo '><img src="' . $iconpath . '" width="16" height="16" /></td>';342 343 $count++;344 if ($count == 15)345 {346 $count = 0;347 echo '</tr>';348 $enddone = TRUE;349 }350 }351 }352 if (!$enddone)353 {354 echo '</tr>';355 }356 echo '</table>';357 echo '<p>' . __('Select an icon for this note.', 'Note_Press') . '</p>';358 echo ' </div>';359 echo ' </div>';360 echo ' <div id="authordiv" class="stuffbox">';361 if ($which <> -1)362 {363 echo ' <h3><label for="Author">' . __('Author/Editor: ', 'Note_Press') . $mylink[0]->AddedBy . '</label></h3>';364 echo ' <input name="display_name" type="hidden" value="' . $mylink[0]->AddedBy . '" />';365 }366 else367 {368 echo ' <h3><label for="Author">' . __('Author/Editor: ', 'Note_Press') . $current_user->display_name . '</label></h3>';369 echo ' <input name="display_name" type="hidden" value="' . $current_user->display_name . '" />';370 }371 echo ' </div>';372 echo ' <div id="namediv" class="stuffbox">';373 echo ' <h3><label for="Note">' . __('Contents:', 'Note_Press') . '</label></h3>';374 echo ' <div class="inside">';375 if ($which <> -1)376 {377 $content=$mylink[0]->Content;378 }379 else380 {381 $content = '';382 }383 $editor_id = 'Note_Presseditor';384 wp_editor( $content, $editor_id );385 echo ' </div>';386 echo ' </div>';387 echo ' </div>'; //post-body-content388 echo '389 <div id="postbox-container-1" class="postbox-container">390 <div id="side-sortables" class="meta-box-sortables ui-sortable">391 <div id="linksubmitdiv" class="postbox ">392 <h3 class="hndle ui-sortable-handle"><span>'.__('Save','Note_Press').'</span></h3>393 <div class="inside">394 <div class="submitbox" id="submitlink">395 <div id="major-publishing-actions">396 <div id="publishing-action">';397 if ($which <> -1)398 {399 echo '<button class="button-primary" type="submit" name="Update" value="' . $mylink[0]->ID . '">' . __('Update Note', 'Note_Press') . '</button>';400 }401 else402 {403 echo '<input name="DoAdd" type="submit" class="button-large button-primary" id="publish" accesskey="p" value="'. __('Add Note', 'Note_Press') .'">';404 }405 echo ' </div>406 <div class="clear">407 </div>408 </div>409 <div class="clear">410 </div>411 </div>412 </div>413 </div>414 </div>415 </div>';416 echo ' </div>';417 echo '</div>';418 echo '<div id="clear"></div>';419 echo '</form>';420 }421 422 //updates an existing note423 function Note_Pressupdate_note($thisid)424 {425 global $wpdb;426 if (stripslashes_deep($_POST['Title'])=='')427 {428 Note_PressshowMessage(__('A note must have a title.', 'Note_Press'), true);429 Note_Pressget_notes();430 exit;431 }432 $table_name = $wpdb->prefix . "Note_Press";433 $mylink = $wpdb->get_results("SELECT * FROM $table_name where ID=$thisid");434 if (!$mylink)435 {436 Note_PressshowMessage(__('That note was not found.', 'Note_Press'), true);437 }438 else439 {440 $wpdb->update($table_name, array(441 'Icon' => $_POST['iconselect'][0],442 'Title' => stripslashes_deep($_POST['Title']),443 'AddedBy' => $_POST['display_name'],444 'Content' => stripslashes_deep($_POST["Note_Presseditor"]),445 'Date' => date("Y-m-d H:i:s")446 ), array(447 'ID' => $_POST['Update']448 ));449 Note_PressshowMessage($_POST['Title'] . ' updated.');450 }451 Note_Pressget_notes();452 }453 454 //adds a new note455 function Note_Pressinsert_note()456 {457 global $wpdb;458 if (stripslashes_deep($_POST['Title'])=='')459 {460 Note_PressshowMessage(__('A note must have a title.', 'Note_Press'), true);461 Note_Pressget_notes();462 exit;463 }464 $table_name = $wpdb->prefix . "Note_Press";465 $wpdb->insert($table_name, array(466 'Icon' => $_POST['iconselect'][0],467 'Title' => stripslashes_deep($_POST['Title']),468 'AddedBy' => $_POST['display_name'],469 'Content' => stripslashes_deep($_POST["Note_Presseditor"]),470 'Date' => date("Y-m-d H:i:s")471 ));472 Note_PressshowMessage($_POST['Title'] . ' Added.');473 Note_Pressget_notes();474 }475 476 function Note_Pressdelete_multi_note($thisid)477 {478 global $wpdb;479 $table_name = $wpdb->prefix . "Note_Press";480 $mylink = $wpdb->get_results("SELECT * FROM $table_name where ID=$thisid");481 if (!$mylink)482 {483 }484 else485 {486 $wpdb->delete($table_name, array(487 'ID' => $thisid488 ));489 }490 }491 492 //deletes the selected note493 function Note_Pressdelete_note($thisid)494 {495 global $wpdb;496 $table_name = $wpdb->prefix . "Note_Press";497 $mylink = $wpdb->get_results("SELECT * FROM $table_name where ID=$thisid");498 if (!$mylink)499 {500 Note_PressshowMessage(__('That note was not found', 'Note_Press'), true);501 }502 else503 {504 $wpdb->delete($table_name, array(505 'ID' => $thisid506 ));507 Note_PressshowMessage(__('Note Deleted!', 'Note_Press'));508 }509 }510 511 if (isset($_POST['Update']))512 {513 Note_Pressupdate_note($_POST['Update']);514 }515 elseif (isset($_POST['DoAdd']))516 {517 Note_Pressinsert_note();518 }519 elseif (isset($_GET['s']))520 {521 Note_Pressget_notes();522 }523 elseif (isset($_GET['List']) || isset($_GET['orderby']) && isset($_GET['order']))524 {525 Note_Pressget_notes();526 }527 elseif (isset($_GET['edit']))528 {529 Note_Pressadd_note($_GET['edit']);530 }531 elseif (@$_GET['action'] == 'Add')532 {533 Note_Pressadd_note();534 }535 elseif (isset($_GET['action']))536 {537 if ($_GET['action'] == 'view')538 {539 Note_Pressshow_note($_GET['id']);540 }541 elseif ($_GET['action'] == 'edit')542 {543 Note_Pressadd_note($_GET['id']);544 }545 elseif ($_GET['action'] == 'delete')546 {547 if (is_array($_GET['id']))548 {549 $count = 0;550 foreach ($_GET['id'] as $id)551 {552 Note_Pressdelete_multi_note($id);553 $count++;554 }555 if ($count == 1)556 {557 Note_PressshowMessage($count . __(' Note Deleted!', 'Note_Press'));558 559 }560 else561 {562 Note_PressshowMessage($count . __(' Notes Deleted!', 'Note_Press'));563 }564 }565 elseif (isset($_GET['id']))566 {567 Note_Pressdelete_note($_GET['id']);568 }569 else570 {571 Note_PressshowMessage(__('No notes selected.', 'Note_Press'));572 }573 Note_Pressget_notes();574 }575 else576 {577 Note_Pressget_notes();578 }579 }580 else581 {582 Note_Pressget_notes();583 }584 7 ?> -
note-press/trunk/public/assets/css/public.css
r1156271 r1693456 1 1 <style type="text/css"> 2 3 4 2 5 #Note_Pressdropdown {width:240px; height:84px; border:2px inset #ccc; overflow:auto;} 6 7 8 3 9 #Note_Pressdropdown a {text-align:left; font:9pt/10pt arial,verdana,sans-serif; padding-left:2px; margin:0; white-space:nowrap;} 10 11 12 4 13 #Note_Pressdropdown a.menu:link {text-decoration:none; display:block; background-color:#fff; color:#000;} 14 15 16 5 17 #Note_Pressdropdown a.menu:visited {text-decoration:none; display:block; background-color:#fff; color:#000;} 18 19 20 6 21 #Note_Pressdropdown a.menu:hover {text-decoration:none; display:block; background-color:#000; color:#fff;} 22 23 24 7 25 #Note_Pressdropdown a.menu:active {text-decoration:none; display:block; background-color:#000; color:#fff;} 26 27 28 8 29 </style> -
note-press/trunk/public/class-Note_Press.php
r1563878 r1693456 1 1 <?php 2 3 4 5 6 2 7 /** 3 * Note_Press. 8 9 10 * The public-facing functionality of the plugin. 11 12 4 13 * 5 * @package Note_Press 6 * @author datainterlock <postmaster@datainterlock.com> 7 * @license GPL-3.0+ 8 * @link http://www.datainterlock.com 9 * @Copyright (C) 2015-2017 Rod Kinnison postmaster@datainterlock.com 14 15 16 * @link http://www.datainterlock.com 17 18 19 * @since 1.0.0 20 21 22 * 23 24 25 * @package Notepress2 26 27 28 * @subpackage Notepress2/public 29 30 10 31 */ 11 32 33 34 35 36 12 37 /** 13 * Plugin class. This class should ideally be used to work with the 14 * public-facing side of the WordPress site. 38 39 40 * The public-facing functionality of the plugin. 41 42 15 43 * 16 * If you're interested in introducing administrative or dashboard 17 * functionality, then refer to `class-Note_Press-admin.php` 44 45 46 * Defines the plugin name, version, and two examples hooks for how to 47 48 49 * enqueue the admin-specific stylesheet and JavaScript. 50 51 18 52 * 19 * @TODO: Rename this class to a proper name for your plugin. 20 * 53 54 55 * @package Notepress2 56 57 58 * @subpackage Notepress2/public 59 60 61 * @author Rod Kinnison <postmaster@datainterlock.com> 62 63 21 64 */ 22 class Note_Press { 23 24 /** 25 * Plugin version, used for cache-busting of style and script file references. 26 * 27 * @since 1.0.0 28 * 29 * @var string 30 */ 31 const VERSION = '0.1.1'; 32 33 /** 34 * @TODO - Rename "Note_Press" to the name your your plugin 35 * 36 * Unique identifier for your plugin. 37 * 38 * 39 * The variable name is used as the text domain when internationalizing strings 40 * of text. Its value should match the Text Domain file header in the main 41 * plugin file. 42 * 43 * @since 1.0.0 44 * 45 * @var string 46 */ 47 protected $plugin_slug = 'notepress'; 48 49 /** 50 * Instance of this class. 51 * 52 * @since 1.0.0 53 * 54 * @var object 55 */ 56 protected static $instance = null; 57 58 /** 59 * Initialize the plugin by setting localization and loading public scripts 60 * and styles. 61 * 62 * @since 1.0.0 63 */ 64 private function __construct() { 65 66 global $wpdb,$Note_Press_db_version; 67 // Load plugin text domain 68 add_action( 'init', array( $this, 'Note_Pressload_plugin_textdomain' ) ); 69 70 // Activate plugin when new blog is added 71 add_action( 'wpmu_new_blog', array( $this, 'Note_Pressactivate_new_site' ) ); 72 73 // Load public-facing style sheet and JavaScript. 74 add_action( 'wp_enqueue_scripts', array( $this, 'Note_Pressenqueue_styles' ) ); 75 add_action( 'wp_enqueue_scripts', array( $this, 'Note_Pressenqueue_scripts' ) ); 76 77 /* Define custom functionality. 78 * Refer To http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters 65 66 67 class Note_Press_Public { 68 69 70 71 72 73 /** 74 75 76 * The ID of this plugin. 77 78 79 * 80 81 82 * @since 1.0.0 83 84 85 * @access private 86 87 88 * @var string $plugin_name The ID of this plugin. 89 90 91 */ 92 93 94 private $plugin_name; 95 96 97 98 99 100 /** 101 102 103 * The version of this plugin. 104 105 106 * 107 108 109 * @since 1.0.0 110 111 112 * @access private 113 114 115 * @var string $version The current version of this plugin. 116 117 118 */ 119 120 121 private $version; 122 123 124 125 126 127 /** 128 129 130 * Initialize the class and set its properties. 131 132 133 * 134 135 136 * @since 1.0.0 137 138 139 * @param string $plugin_name The name of the plugin. 140 141 142 * @param string $version The version of this plugin. 143 144 145 */ 146 147 148 public function __construct( $plugin_name, $version ) { 149 150 151 152 153 154 $this->plugin_name = $plugin_name; 155 156 157 $this->version = $version; 158 159 160 161 162 163 } 164 165 166 167 168 169 /** 170 171 172 * Register the stylesheets for the public-facing side of the site. 173 174 175 * 176 177 178 * @since 1.0.0 179 180 181 */ 182 183 184 public function enqueue_styles() { 185 186 187 188 189 190 /** 191 192 193 * This function is provided for demonstration purposes only. 194 195 196 * 197 198 199 * An instance of this class should be passed to the run() function 200 201 202 * defined in Notepress2_Loader as all of the hooks are defined 203 204 205 * in that particular class. 206 207 208 * 209 210 211 * The Notepress2_Loader will then create the relationship 212 213 214 * between the defined hooks and the functions defined in this 215 216 217 * class. 218 219 79 220 */ 80 add_option("Note_Press_db_version", $Note_Press_db_version, "", "no"); 81 82 add_action( 'admin_menu', array( $this, 'Note_Pressadd_plugin_main_menu' ) ); 83 //add_filter( '@TODO', array( $this, 'filter_method_name' ) ); 84 85 $table_name = $wpdb->prefix . "Note_Press"; 86 $sql=" 87 CREATE TABLE IF NOT EXISTS `$table_name` ( 88 `ID` int(11) NOT NULL auto_increment, 89 `Icon` varchar(50) NOT NULL, 90 `Title` varchar(255) NOT NULL, 91 `Content` mediumtext NOT NULL, 92 `Date` datetime NOT NULL, 93 `AddedBy` varchar(255) NOT NULL, 94 `ViewLevel` varchar(20) NOT NULL, 95 `Category` varchar(100) NOT NULL, 96 PRIMARY KEY (`ID`) 97 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; 98 "; 99 $wpdb->query($sql); 221 222 223 224 225 226 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/notepress2-public.css', array(), $this->version, 'all' ); 227 228 229 230 100 231 101 232 } 102 /** 103 * Filter to replace the [caption] shortcode text with HTML5 compliant code 104 * 105 * @return text HTML content describing embedded figure 106 **/ 107 108 public function Note_Pressadd_plugin_main_menu() 109 { 110 $icon_url = plugin_dir_url(__FILE__) . 'images/Note_Pressicon.png'; 111 add_menu_page('Note Press', 'Note Press', 'manage_options', 'Note_Press-Main-Menu', array($this, 'Note_Pressplugin_main_menu'), $icon_url); 233 234 235 236 237 238 /** 239 240 241 * Register the JavaScript for the public-facing side of the site. 242 243 244 * 245 246 247 * @since 1.0.0 248 249 250 */ 251 252 253 public function enqueue_scripts() { 254 255 256 257 258 259 /** 260 261 262 * This function is provided for demonstration purposes only. 263 264 265 * 266 267 268 * An instance of this class should be passed to the run() function 269 270 271 * defined in Notepress2_Loader as all of the hooks are defined 272 273 274 * in that particular class. 275 276 277 * 278 279 280 * The Notepress2_Loader will then create the relationship 281 282 283 * between the defined hooks and the functions defined in this 284 285 286 * class. 287 288 289 */ 290 291 292 293 294 295 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/notepress2-public.js', array( 'jquery' ), $this->version, false ); 296 297 298 299 112 300 113 301 } 114 302 115 303 116 public function Note_Pressplugin_main_menu() 117 { 118 include_once( 'Note_Pressmenu.php' ); 119 } 120 121 /** 122 * Return the plugin slug. 123 * 124 * @since 1.0.0 125 * 126 * @return Plugin slug variable. 127 */ 128 public function Note_Pressget_plugin_slug() { 129 return $this->plugin_slug; 130 } 131 132 /** 133 * Return an instance of this class. 134 * 135 * @since 1.0.0 136 * 137 * @return object A single instance of this class. 138 */ 139 public static function Note_Pressget_instance() { 140 141 // If the single instance hasn't been set, set it now. 142 if ( null == self::$instance ) { 143 self::$instance = new self; 144 } 145 146 return self::$instance; 147 } 148 149 /** 150 * Fired when the plugin is activated. 151 * 152 * @since 1.0.0 153 * 154 * @param boolean $network_wide True if WPMU superadmin uses 155 * "Network Activate" action, false if 156 * WPMU is disabled or plugin is 157 * activated on an individual blog. 158 */ 159 public static function Note_Pressactivate( $network_wide ) { 160 161 if ( function_exists( 'is_multisite' ) && is_multisite() ) { 162 163 if ( $network_wide ) { 164 165 // Get all blog ids 166 $blog_ids = self::get_blog_ids(); 167 168 foreach ( $blog_ids as $blog_id ) { 169 170 switch_to_blog( $blog_id ); 171 self::Note_Presssingle_activate(); 172 } 173 174 restore_current_blog(); 175 176 } else { 177 self::Note_Presssingle_activate(); 178 } 179 180 } else { 181 self::Note_Presssingle_activate(); 182 } 183 184 } 185 186 /** 187 * Fired when the plugin is deactivated. 188 * 189 * @since 1.0.0 190 * 191 * @param boolean $network_wide True if WPMU superadmin uses 192 * "Network Deactivate" action, false if 193 * WPMU is disabled or plugin is 194 * deactivated on an individual blog. 195 */ 196 public static function Note_Pressdeactivate( $network_wide ) { 197 198 if ( function_exists( 'is_multisite' ) && is_multisite() ) { 199 200 if ( $network_wide ) { 201 202 // Get all blog ids 203 $blog_ids = self::Note_Pressget_blog_ids(); 204 205 foreach ( $blog_ids as $blog_id ) { 206 207 switch_to_blog( $blog_id ); 208 self::Note_Presssingle_deactivate(); 209 210 } 211 212 restore_current_blog(); 213 214 } else { 215 self::Note_Presssingle_deactivate(); 216 } 217 218 } else { 219 self::Note_Presssingle_deactivate(); 220 } 221 222 } 223 224 /** 225 * Fired when a new site is activated with a WPMU environment. 226 * 227 * @since 1.0.0 228 * 229 * @param int $blog_id ID of the new blog. 230 */ 231 public function Note_Pressactivate_new_site( $blog_id ) { 232 233 if ( 1 !== did_action( 'wpmu_new_blog' ) ) { 234 return; 235 } 236 237 switch_to_blog( $blog_id ); 238 self::Note_Presssingle_activate(); 239 restore_current_blog(); 240 241 } 242 243 /** 244 * Get all blog ids of blogs in the current network that are: 245 * - not archived 246 * - not spam 247 * - not deleted 248 * 249 * @since 1.0.0 250 * 251 * @return array|false The blog ids, false if no matches. 252 */ 253 private static function Note_Pressget_blog_ids() { 254 255 global $wpdb; 256 257 // get an array of blog ids 258 $sql = "SELECT blog_id FROM $wpdb->blogs 259 WHERE archived = '0' AND spam = '0' 260 AND deleted = '0'"; 261 262 return $wpdb->get_col( $sql ); 263 264 } 265 266 /** 267 * Fired for each blog when the plugin is activated. 268 * 269 * @since 1.0.0 270 */ 271 private static function Note_Presssingle_activate() { 272 // @TODO: Define activation functionality here 273 } 274 275 /** 276 * Fired for each blog when the plugin is deactivated. 277 * 278 * @since 1.0.0 279 */ 280 private static function Note_Presssingle_deactivate() { 281 // @TODO: Define deactivation functionality here 282 } 283 284 /** 285 * Load the plugin text domain for translation. 286 * 287 * @since 1.0.0 288 */ 289 public function Note_Pressload_plugin_textdomain() { 290 $domain = $this->plugin_slug; 291 $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); 292 load_textdomain( 'Note_Press', trailingslashit( WP_LANG_DIR ) . $domain .'/' . $domain . '-' . $locale . '.mo' ); 293 $loaded = load_plugin_textdomain( 'Note_Press', FALSE, basename( plugin_dir_path( dirname( __FILE__ ) ) ) . '/languages/' ); 294 /* if ( ! $loaded ){ 295 echo "<hr/>"; 296 echo "Error: the mo file was not found! "; 297 exit(); 298 299 }else{ 300 301 echo "<hr/>Debug info:<br/>"; 302 echo "WPLANG: ". WPLANG; 303 echo "<br/>"; 304 echo "translate test: ". __('Some text','Note_Press'); 305 exit(); 306 } 307 */ } 308 309 /** 310 * Register and enqueue public-facing style sheet. 311 * 312 * @since 1.0.0 313 */ 314 public function Note_Pressenqueue_styles() { 315 wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'assets/css/public.css', __FILE__ ), array(), self::VERSION ); 316 } 317 318 /** 319 * Register and enqueues public-facing JavaScript files. 320 * 321 * @since 1.0.0 322 */ 323 public function Note_Pressenqueue_scripts() { 324 wp_enqueue_script( $this->plugin_slug . '-plugin-script', plugins_url( 'assets/js/public.js', __FILE__ ), array( 'jquery' ), self::VERSION ); 325 } 326 327 /** 328 * NOTE: Actions are points in the execution of a page or process 329 * lifecycle that WordPress fires. 330 * 331 * Actions: http://codex.wordpress.org/Plugin_API#Actions 332 * Reference: http://codex.wordpress.org/Plugin_API/Action_Reference 333 * 334 * @since 1.0.0 335 */ 336 public function Note_Pressaction_method_name() { 337 // @TODO: Define your action hook callback here 338 } 339 340 /** 341 * NOTE: Filters are points of execution in which WordPress modifies data 342 * before saving it or sending it to the browser. 343 * 344 * Filters: http://codex.wordpress.org/Plugin_API#Filters 345 * Reference: http://codex.wordpress.org/Plugin_API/Filter_Reference 346 * 347 * @since 1.0.0 348 */ 349 public function Note_Pressfilter_method_name() { 350 // @TODO: Define your filter hook callback here 351 } 304 305 306 352 307 } 353 354 355 -
note-press/trunk/uninstall.php
r1156271 r1693456 1 1 <?php 2 2 3 /** 4 3 5 * Fired when the plugin is uninstalled. 6 4 7 * 8 5 9 * @package Note_Press 10 6 11 * @author datainterlock <postmaster@datainterlock.com> 12 7 13 * @license GPL-3.0+ 14 8 15 * @link http://www.datainterlock.com 16 9 17 * @Copyright (C) 2015 Rod Kinnison postmaster@datainterlock.com 18 10 19 */ 11 20 21 22 12 23 // If uninstall not called from WordPress, then exit 24 13 25 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { 26 14 27 exit; 28 15 29 } 30 16 31 if (is_multisite()) 32 17 33 { 34 18 35 global $wpdb; 36 19 37 $blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A); 38 20 39 delete_option("Note_Press_db_version"); 40 21 41 if ($blogs) 42 22 43 { 44 23 45 foreach($blogs as $blog) 46 24 47 { 48 25 49 switch_to_blog($blog['blog_id']); 50 26 51 delete_option("Note_Press_db_version"); 52 27 53 $table_name = $wpdb->prefix . "Note_Press"; 54 28 55 $GLOBALS['wpdb']->query("DROP TABLE `".$GLOBALS['wpdb']->prefix."$table_name`"); 56 29 57 $GLOBALS['wpdb']->query("OPTIMIZE TABLE `" .$GLOBALS['wpdb']->prefix."options`"); 58 30 59 restore_current_blog(); 60 31 61 } 62 32 63 } 64 33 65 } 66 34 67 else 68 35 69 { 70 36 71 delete_option("Note_Press_db_version"); 72 37 73 $table_name = $wpdb->prefix . "Note_Press"; 74 38 75 $GLOBALS['wpdb']->query("DROP TABLE `".$GLOBALS['wpdb']->prefix."$table_name`"); 76 39 77 $GLOBALS['wpdb']->query("OPTIMIZE TABLE `" .$GLOBALS['wpdb']->prefix."options`"); 78 40 79 }
Note: See TracChangeset
for help on using the changeset viewer.