Plugin Directory

Changeset 1693456


Ignore:
Timestamp:
07/10/2017 04:26:52 AM (9 years ago)
Author:
datainterlock
Message:

Update to 0.1.7

Location:
note-press/trunk
Files:
21 added
17 edited
1 copied

Legend:

Unmodified
Added
Removed
  • note-press/trunk/Note_Press.php

    r1589611 r1693456  
    1313 *
    1414 * @wordpress-plugin
     15 
    1516 * Plugin Name:       Note Press
    1617 * 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.2
     18 * Description:       Add, edit and delete multiple notes and display them with icons on the Admin page or dashboard.
     19 * Version:           0.1.7
    1920 * Author:            datainterlock
    2021 * Author URI:        http://www.datainterlock.com
    2122 * Text Domain:       Note_Press
    22  * License:           GPL-3.0+
     23 * License:           -3.0+
    2324 * License URI:       http://www.gnu.org/licenses/gpl-3.0.html
    2425 * Domain Path:       /languages
    2526 * 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.
     51if (!defined('WPINC'))
     52    {
     53    die;
     54    }
     55/**
    2656
    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.
    3058
    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
    3560
    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*/
     62function activate_Note_Press()
     63    {
     64    require_once plugin_dir_path(__FILE__) . 'includes/class-Note_Press-activator.php';
     65    Note_Press_Activator::activate();
     66    }
     67/**
    3868
    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.
    4170
    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
    4573*/
    46 // If this file is called directly, abort.
    47 if ( ! defined( 'WPINC' ) ) {
    48     die;
    49 }
    50 $Note_Press_db_version = "1.0";
     74function deactivate_Note_Press()
     75    {
     76    require_once plugin_dir_path(__FILE__) . 'includes/class-Note_Press-deactivator.php';
     77    Note_Press_Deactivator::deactivate();
     78    }
     79register_activation_hook(__FILE__, 'activate_Note_Press');
     80register_deactivation_hook(__FILE__, 'deactivate_Note_Press');
     81/**
    5182
    52 /*----------------------------------------------------------------------------*
    53  * Public-Facing Functionality
    54  *----------------------------------------------------------------------------*/
     83* The core plugin class that is used to define internationalization,
    5584
    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.
    6386
    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*/
     88require plugin_dir_path(__FILE__) . 'includes/class-Note_Press.php';
     89/**
    7590
    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.
    8392
    84 /*----------------------------------------------------------------------------*
    85  * Dashboard and Administrative Functionality
    86  *----------------------------------------------------------------------------*/
     93*
    8794
    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,
    10996
    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*/
     106function run_Note_Press()
     107    {
     108    $plugin = new Note_Press();
     109    $plugin->run();
     110    }
     111run_Note_Press();
     112
  • note-press/trunk/README.txt

    r1589611 r1693456  
    1 === Note Press ===
     1=== Note Press ===
    22Contributors: datainterlock
    33Tags: note, admin notes, developer notes, notepad, collaboration, clients
    4 Donate link:  http://www.datainterlock.com/note-press/
     4Donate link:  https://www.patreon.com/user?u=6474471
    55Requires at least: 3.9
    6 Tested up to: 4.7
     6Tested up to: 4.8
    77Stable tag: trunk
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 Add, edit and delete multiple notes and display them with icons on the Admin page.
     11Add, edit and delete multiple notes to multiple users and display them with icons on the Admin page or Dashboard.
    1212
    1313
    1414== 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.
     15Note 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.
    1616
    1717
     
    3232= Using HTTP =
    3333
    34 1. Download `Note_Press.zip` from http://www.datainterlock.com
     341. Download `Note_Press.zip` from https://wordpress.org/plugins/note-press/
    35352. Extract the \'Note Press` directory to your computer
    36363. Upload the `Note Press` directory to the `/wp-content/plugins/` directory
     
    4141= Who can see Note Press? =
    4242
    43 At this time, only the Super Admin has the ability to use Note Press.
     43It 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.
     44Admins and Super Admins will be able to see all notes sent to and from all users with Note Press access.
     45Users who don't have Note Press access can see and delete Dashboard Sticky Notes
     46
     47= What's a Sticky Note?  =
     48
     49Note 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? =
     52Yes, 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.
    4453
    4554= Can the icons be replaced? =
     
    6473
    6574== 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.
     751. The Wordpress Dashboard showing sticky notes in different colors and with media embedded.
     762. The main Note Press Main panel showing a list of notes.
     773. The Note Press Settings menu
     784. Adding a note to Note Press.
    6979
    7080== 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
    71109= 0.1.2 =
    72 Security update to reduce risk of SQL injection.
     110* Security update to reduce risk of SQL injection.
    73111
    74112= 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.
    77115
    78116= 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  
    11<?php
     2
     3
     4
     5
     6
    27/**
    3  * Plugin Name.
     8
     9
     10 * The admin-specific functionality of the plugin.
     11
     12
    413 *
    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
    1031 */
    1132
     33
     34
     35
     36
    1237/**
    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
    1543 *
    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
    1852 *
    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
    2364 */
     65
     66
    2467class Note_Press_Admin {
    2568
     69
     70
     71
     72
    2673    /**
    27      * Instance of this class.
     74
     75
     76     * The ID of this plugin.
     77
     78
    2879     *
     80
     81
    2982     * @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
    30106     *
    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
    32118     */
    33     protected static $instance = null;
     119
     120
     121    private $version;
     122
     123
     124
     125
    34126
    35127    /**
    36      * Slug of the plugin screen.
     128
     129
     130     * Initialize the class and set its properties.
     131
     132
    37133     *
     134
     135
    38136     * @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
    39172     *
    40      * @var      string
     173
     174
     175     * @since    1.0.0
     176
     177
    41178     */
    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
    43234
    44235    /**
    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
    47241     *
    48      * @since     1.0.0
     242
     243
     244     * @since    1.0.0
     245
     246
    49247     */
    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
    54262         *
    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
    56286         */
    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
    91291
    92292    }
    93293
    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
    115325        }
    116326
    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
    118661    }
    119662
    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
    135697        }
    136698
    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
    140751        }
    141752
     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
    142811    }
    143812
    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
    159841        }
    160842
    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
    165849
    166850    }
    167851
    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
    196882
    197883    }
    198884
    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
    249900
    250901}
     902
     903
  • note-press/trunk/admin/views/admin.php

    r1156271 r1693456  
    11<?php
     2
     3
     4
    25/**
     6
     7
     8
    39 * Represents the view for the administration dashboard.
     10
     11
     12
    413 *
     14
     15
     16
    517 * This includes the header, options, and other information that should provide
     18
     19
     20
    621 * The User Interface to the end user.
     22
     23
     24
    725 *
     26
     27
     28
    829 * @package   Note_Press
     30
     31
     32
    933 * @author    datainterlock <postmaster@datainterlock.com>
     34
     35
     36
    1037 * @license   GPL-3.0+
     38
     39
     40
    1141 * @link      http://www.datainterlock.com
     42
     43
     44
    1245 * @Copyright (C) 2015 Rod Kinnison postmaster@datainterlock.com
     46
     47
     48
    1349 */
     50
     51
     52
    1453?>
     54
     55
     56
     57
     58
     59
    1560
    1661<div class="wrap">
    1762
     63
     64
     65
     66
     67
     68
    1869    <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
     70
     71
     72
     73
     74
     75
    1976
    2077    <!-- @TODO: Provide markup for your options page here. -->
    2178
     79
     80
     81
     82
     83
     84
    2285</div>
     86
     87
     88
  • note-press/trunk/gpl.txt

    r1156271 r1693456  
    11                    GNU GENERAL PUBLIC LICENSE
     2
     3
     4
    25                       Version 3, 29 June 2007
    36
     7
     8
     9
     10
     11
     12
    413 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
     14
     15
     16
    517 Everyone is permitted to copy and distribute verbatim copies
     18
     19
     20
    621 of this license document, but changing it is not allowed.
    722
     23
     24
     25
     26
     27
     28
    829                            Preamble
    930
     31
     32
     33
     34
     35
     36
    1037  The GNU General Public License is a free, copyleft license for
     38
     39
     40
    1141software and other kinds of works.
    1242
     43
     44
     45
     46
     47
     48
    1349  The licenses for most software and other practical works are designed
     50
     51
     52
    1453to take away your freedom to share and change the works.  By contrast,
     54
     55
     56
    1557the GNU General Public License is intended to guarantee your freedom to
     58
     59
     60
    1661share and change all versions of a program--to make sure it remains free
     62
     63
     64
    1765software for all its users.  We, the Free Software Foundation, use the
     66
     67
     68
    1869GNU General Public License for most of our software; it applies also to
     70
     71
     72
    1973any other work released this way by its authors.  You can apply it to
     74
     75
     76
    2077your programs, too.
    2178
     79
     80
     81
     82
     83
     84
    2285  When we speak of free software, we are referring to freedom, not
     86
     87
     88
    2389price.  Our General Public Licenses are designed to make sure that you
     90
     91
     92
    2493have the freedom to distribute copies of free software (and charge for
     94
     95
     96
    2597them if you wish), that you receive source code or can get it if you
     98
     99
     100
    26101want it, that you can change the software or use pieces of it in new
     102
     103
     104
    27105free programs, and that you know you can do these things.
    28106
     107
     108
     109
     110
     111
     112
    29113  To protect your rights, we need to prevent others from denying you
     114
     115
     116
    30117these rights or asking you to surrender the rights.  Therefore, you have
     118
     119
     120
    31121certain responsibilities if you distribute copies of the software, or if
     122
     123
     124
    32125you modify it: responsibilities to respect the freedom of others.
    33126
     127
     128
     129
     130
     131
     132
    34133  For example, if you distribute copies of such a program, whether
     134
     135
     136
    35137gratis or for a fee, you must pass on to the recipients the same
     138
     139
     140
    36141freedoms that you received.  You must make sure that they, too, receive
     142
     143
     144
    37145or can get the source code.  And you must show them these terms so they
     146
     147
     148
    38149know their rights.
    39150
     151
     152
     153
     154
     155
     156
    40157  Developers that use the GNU GPL protect your rights with two steps:
     158
     159
     160
    41161(1) assert copyright on the software, and (2) offer you this License
     162
     163
     164
    42165giving you legal permission to copy, distribute and/or modify it.
    43166
     167
     168
     169
     170
     171
     172
    44173  For the developers' and authors' protection, the GPL clearly explains
     174
     175
     176
    45177that there is no warranty for this free software.  For both users' and
     178
     179
     180
    46181authors' sake, the GPL requires that modified versions be marked as
     182
     183
     184
    47185changed, so that their problems will not be attributed erroneously to
     186
     187
     188
    48189authors of previous versions.
    49190
     191
     192
     193
     194
     195
     196
    50197  Some devices are designed to deny users access to install or run
     198
     199
     200
    51201modified versions of the software inside them, although the manufacturer
     202
     203
     204
    52205can do so.  This is fundamentally incompatible with the aim of
     206
     207
     208
    53209protecting users' freedom to change the software.  The systematic
     210
     211
     212
    54213pattern of such abuse occurs in the area of products for individuals to
     214
     215
     216
    55217use, which is precisely where it is most unacceptable.  Therefore, we
     218
     219
     220
    56221have designed this version of the GPL to prohibit the practice for those
     222
     223
     224
    57225products.  If such problems arise substantially in other domains, we
     226
     227
     228
    58229stand ready to extend this provision to those domains in future versions
     230
     231
     232
    59233of the GPL, as needed to protect the freedom of users.
    60234
     235
     236
     237
     238
     239
     240
    61241  Finally, every program is threatened constantly by software patents.
     242
     243
     244
    62245States should not allow patents to restrict development and use of
     246
     247
     248
    63249software on general-purpose computers, but in those that do, we wish to
     250
     251
     252
    64253avoid the special danger that patents applied to a free program could
     254
     255
     256
    65257make it effectively proprietary.  To prevent this, the GPL assures that
     258
     259
     260
    66261patents cannot be used to render the program non-free.
    67262
     263
     264
     265
     266
     267
     268
    68269  The precise terms and conditions for copying, distribution and
     270
     271
     272
    69273modification follow.
    70274
     275
     276
     277
     278
     279
     280
    71281                       TERMS AND CONDITIONS
    72282
     283
     284
     285
     286
     287
     288
    73289  0. Definitions.
    74290
     291
     292
     293
     294
     295
     296
    75297  "This License" refers to version 3 of the GNU General Public License.
    76298
     299
     300
     301
     302
     303
     304
    77305  "Copyright" also means copyright-like laws that apply to other kinds of
     306
     307
     308
    78309works, such as semiconductor masks.
    79310
     311
     312
     313
     314
     315
     316
    80317  "The Program" refers to any copyrightable work licensed under this
     318
     319
     320
    81321License.  Each licensee is addressed as "you".  "Licensees" and
     322
     323
     324
    82325"recipients" may be individuals or organizations.
    83326
     327
     328
     329
     330
     331
     332
    84333  To "modify" a work means to copy from or adapt all or part of the work
     334
     335
     336
    85337in a fashion requiring copyright permission, other than the making of an
     338
     339
     340
    86341exact copy.  The resulting work is called a "modified version" of the
     342
     343
     344
    87345earlier work or a work "based on" the earlier work.
    88346
     347
     348
     349
     350
     351
     352
    89353  A "covered work" means either the unmodified Program or a work based
     354
     355
     356
    90357on the Program.
    91358
     359
     360
     361
     362
     363
     364
    92365  To "propagate" a work means to do anything with it that, without
     366
     367
     368
    93369permission, would make you directly or secondarily liable for
     370
     371
     372
    94373infringement under applicable copyright law, except executing it on a
     374
     375
     376
    95377computer or modifying a private copy.  Propagation includes copying,
     378
     379
     380
    96381distribution (with or without modification), making available to the
     382
     383
     384
    97385public, and in some countries other activities as well.
    98386
     387
     388
     389
     390
     391
     392
    99393  To "convey" a work means any kind of propagation that enables other
     394
     395
     396
    100397parties to make or receive copies.  Mere interaction with a user through
     398
     399
     400
    101401a computer network, with no transfer of a copy, is not conveying.
    102402
     403
     404
     405
     406
     407
     408
    103409  An interactive user interface displays "Appropriate Legal Notices"
     410
     411
     412
    104413to the extent that it includes a convenient and prominently visible
     414
     415
     416
    105417feature that (1) displays an appropriate copyright notice, and (2)
     418
     419
     420
    106421tells the user that there is no warranty for the work (except to the
     422
     423
     424
    107425extent that warranties are provided), that licensees may convey the
     426
     427
     428
    108429work under this License, and how to view a copy of this License.  If
     430
     431
     432
    109433the interface presents a list of user commands or options, such as a
     434
     435
     436
    110437menu, a prominent item in the list meets this criterion.
    111438
     439
     440
     441
     442
     443
     444
    112445  1. Source Code.
    113446
     447
     448
     449
     450
     451
     452
    114453  The "source code" for a work means the preferred form of the work
     454
     455
     456
    115457for making modifications to it.  "Object code" means any non-source
     458
     459
     460
    116461form of a work.
    117462
     463
     464
     465
     466
     467
     468
    118469  A "Standard Interface" means an interface that either is an official
     470
     471
     472
    119473standard defined by a recognized standards body, or, in the case of
     474
     475
     476
    120477interfaces specified for a particular programming language, one that
     478
     479
     480
    121481is widely used among developers working in that language.
    122482
     483
     484
     485
     486
     487
     488
    123489  The "System Libraries" of an executable work include anything, other
     490
     491
     492
    124493than the work as a whole, that (a) is included in the normal form of
     494
     495
     496
    125497packaging a Major Component, but which is not part of that Major
     498
     499
     500
    126501Component, and (b) serves only to enable use of the work with that
     502
     503
     504
    127505Major Component, or to implement a Standard Interface for which an
     506
     507
     508
    128509implementation is available to the public in source code form.  A
     510
     511
     512
    129513"Major Component", in this context, means a major essential component
     514
     515
     516
    130517(kernel, window system, and so on) of the specific operating system
     518
     519
     520
    131521(if any) on which the executable work runs, or a compiler used to
     522
     523
     524
    132525produce the work, or an object code interpreter used to run it.
    133526
     527
     528
     529
     530
     531
     532
    134533  The "Corresponding Source" for a work in object code form means all
     534
     535
     536
    135537the source code needed to generate, install, and (for an executable
     538
     539
     540
    136541work) run the object code and to modify the work, including scripts to
     542
     543
     544
    137545control those activities.  However, it does not include the work's
     546
     547
     548
    138549System Libraries, or general-purpose tools or generally available free
     550
     551
     552
    139553programs which are used unmodified in performing those activities but
     554
     555
     556
    140557which are not part of the work.  For example, Corresponding Source
     558
     559
     560
    141561includes interface definition files associated with source files for
     562
     563
     564
    142565the work, and the source code for shared libraries and dynamically
     566
     567
     568
    143569linked subprograms that the work is specifically designed to require,
     570
     571
     572
    144573such as by intimate data communication or control flow between those
     574
     575
     576
    145577subprograms and other parts of the work.
    146578
     579
     580
     581
     582
     583
     584
    147585  The Corresponding Source need not include anything that users
     586
     587
     588
    148589can regenerate automatically from other parts of the Corresponding
     590
     591
     592
    149593Source.
    150594
     595
     596
     597
     598
     599
     600
    151601  The Corresponding Source for a work in source code form is that
     602
     603
     604
    152605same work.
    153606
     607
     608
     609
     610
     611
     612
    154613  2. Basic Permissions.
    155614
     615
     616
     617
     618
     619
     620
    156621  All rights granted under this License are granted for the term of
     622
     623
     624
    157625copyright on the Program, and are irrevocable provided the stated
     626
     627
     628
    158629conditions are met.  This License explicitly affirms your unlimited
     630
     631
     632
    159633permission to run the unmodified Program.  The output from running a
     634
     635
     636
    160637covered work is covered by this License only if the output, given its
     638
     639
     640
    161641content, constitutes a covered work.  This License acknowledges your
     642
     643
     644
    162645rights of fair use or other equivalent, as provided by copyright law.
    163646
     647
     648
     649
     650
     651
     652
    164653  You may make, run and propagate covered works that you do not
     654
     655
     656
    165657convey, without conditions so long as your license otherwise remains
     658
     659
     660
    166661in force.  You may convey covered works to others for the sole purpose
     662
     663
     664
    167665of having them make modifications exclusively for you, or provide you
     666
     667
     668
    168669with facilities for running those works, provided that you comply with
     670
     671
     672
    169673the terms of this License in conveying all material for which you do
     674
     675
     676
    170677not control copyright.  Those thus making or running the covered works
     678
     679
     680
    171681for you must do so exclusively on your behalf, under your direction
     682
     683
     684
    172685and control, on terms that prohibit them from making any copies of
     686
     687
     688
    173689your copyrighted material outside their relationship with you.
    174690
     691
     692
     693
     694
     695
     696
    175697  Conveying under any other circumstances is permitted solely under
     698
     699
     700
    176701the conditions stated below.  Sublicensing is not allowed; section 10
     702
     703
     704
    177705makes it unnecessary.
    178706
     707
     708
     709
     710
     711
     712
    179713  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
    180714
     715
     716
     717
     718
     719
     720
    181721  No covered work shall be deemed part of an effective technological
     722
     723
     724
    182725measure under any applicable law fulfilling obligations under article
     726
     727
     728
    18372911 of the WIPO copyright treaty adopted on 20 December 1996, or
     730
     731
     732
    184733similar laws prohibiting or restricting circumvention of such
     734
     735
     736
    185737measures.
    186738
     739
     740
     741
     742
     743
     744
    187745  When you convey a covered work, you waive any legal power to forbid
     746
     747
     748
    188749circumvention of technological measures to the extent such circumvention
     750
     751
     752
    189753is effected by exercising rights under this License with respect to
     754
     755
     756
    190757the covered work, and you disclaim any intention to limit operation or
     758
     759
     760
    191761modification of the work as a means of enforcing, against the work's
     762
     763
     764
    192765users, your or third parties' legal rights to forbid circumvention of
     766
     767
     768
    193769technological measures.
    194770
     771
     772
     773
     774
     775
     776
    195777  4. Conveying Verbatim Copies.
    196778
     779
     780
     781
     782
     783
     784
    197785  You may convey verbatim copies of the Program's source code as you
     786
     787
     788
    198789receive it, in any medium, provided that you conspicuously and
     790
     791
     792
    199793appropriately publish on each copy an appropriate copyright notice;
     794
     795
     796
    200797keep intact all notices stating that this License and any
     798
     799
     800
    201801non-permissive terms added in accord with section 7 apply to the code;
     802
     803
     804
    202805keep intact all notices of the absence of any warranty; and give all
     806
     807
     808
    203809recipients a copy of this License along with the Program.
    204810
     811
     812
     813
     814
     815
     816
    205817  You may charge any price or no price for each copy that you convey,
     818
     819
     820
    206821and you may offer support or warranty protection for a fee.
    207822
     823
     824
     825
     826
     827
     828
    208829  5. Conveying Modified Source Versions.
    209830
     831
     832
     833
     834
     835
     836
    210837  You may convey a work based on the Program, or the modifications to
     838
     839
     840
    211841produce it from the Program, in the form of source code under the
     842
     843
     844
    212845terms of section 4, provided that you also meet all of these conditions:
    213846
     847
     848
     849
     850
     851
     852
    214853    a) The work must carry prominent notices stating that you modified
     854
     855
     856
    215857    it, and giving a relevant date.
    216858
     859
     860
     861
     862
     863
     864
    217865    b) The work must carry prominent notices stating that it is
     866
     867
     868
    218869    released under this License and any conditions added under section
     870
     871
     872
    219873    7.  This requirement modifies the requirement in section 4 to
     874
     875
     876
    220877    "keep intact all notices".
    221878
     879
     880
     881
     882
     883
     884
    222885    c) You must license the entire work, as a whole, under this
     886
     887
     888
    223889    License to anyone who comes into possession of a copy.  This
     890
     891
     892
    224893    License will therefore apply, along with any applicable section 7
     894
     895
     896
    225897    additional terms, to the whole of the work, and all its parts,
     898
     899
     900
    226901    regardless of how they are packaged.  This License gives no
     902
     903
     904
    227905    permission to license the work in any other way, but it does not
     906
     907
     908
    228909    invalidate such permission if you have separately received it.
    229910
     911
     912
     913
     914
     915
     916
    230917    d) If the work has interactive user interfaces, each must display
     918
     919
     920
    231921    Appropriate Legal Notices; however, if the Program has interactive
     922
     923
     924
    232925    interfaces that do not display Appropriate Legal Notices, your
     926
     927
     928
    233929    work need not make them do so.
    234930
     931
     932
     933
     934
     935
     936
    235937  A compilation of a covered work with other separate and independent
     938
     939
     940
    236941works, which are not by their nature extensions of the covered work,
     942
     943
     944
    237945and which are not combined with it such as to form a larger program,
     946
     947
     948
    238949in or on a volume of a storage or distribution medium, is called an
     950
     951
     952
    239953"aggregate" if the compilation and its resulting copyright are not
     954
     955
     956
    240957used to limit the access or legal rights of the compilation's users
     958
     959
     960
    241961beyond what the individual works permit.  Inclusion of a covered work
     962
     963
     964
    242965in an aggregate does not cause this License to apply to the other
     966
     967
     968
    243969parts of the aggregate.
    244970
     971
     972
     973
     974
     975
     976
    245977  6. Conveying Non-Source Forms.
    246978
     979
     980
     981
     982
     983
     984
    247985  You may convey a covered work in object code form under the terms
     986
     987
     988
    248989of sections 4 and 5, provided that you also convey the
     990
     991
     992
    249993machine-readable Corresponding Source under the terms of this License,
     994
     995
     996
    250997in one of these ways:
    251998
     999
     1000
     1001
     1002
     1003
     1004
    2521005    a) Convey the object code in, or embodied in, a physical product
     1006
     1007
     1008
    2531009    (including a physical distribution medium), accompanied by the
     1010
     1011
     1012
    2541013    Corresponding Source fixed on a durable physical medium
     1014
     1015
     1016
    2551017    customarily used for software interchange.
    2561018
     1019
     1020
     1021
     1022
     1023
     1024
    2571025    b) Convey the object code in, or embodied in, a physical product
     1026
     1027
     1028
    2581029    (including a physical distribution medium), accompanied by a
     1030
     1031
     1032
    2591033    written offer, valid for at least three years and valid for as
     1034
     1035
     1036
    2601037    long as you offer spare parts or customer support for that product
     1038
     1039
     1040
    2611041    model, to give anyone who possesses the object code either (1) a
     1042
     1043
     1044
    2621045    copy of the Corresponding Source for all the software in the
     1046
     1047
     1048
    2631049    product that is covered by this License, on a durable physical
     1050
     1051
     1052
    2641053    medium customarily used for software interchange, for a price no
     1054
     1055
     1056
    2651057    more than your reasonable cost of physically performing this
     1058
     1059
     1060
    2661061    conveying of source, or (2) access to copy the
     1062
     1063
     1064
    2671065    Corresponding Source from a network server at no charge.
    2681066
     1067
     1068
     1069
     1070
     1071
     1072
    2691073    c) Convey individual copies of the object code with a copy of the
     1074
     1075
     1076
    2701077    written offer to provide the Corresponding Source.  This
     1078
     1079
     1080
    2711081    alternative is allowed only occasionally and noncommercially, and
     1082
     1083
     1084
    2721085    only if you received the object code with such an offer, in accord
     1086
     1087
     1088
    2731089    with subsection 6b.
    2741090
     1091
     1092
     1093
     1094
     1095
     1096
    2751097    d) Convey the object code by offering access from a designated
     1098
     1099
     1100
    2761101    place (gratis or for a charge), and offer equivalent access to the
     1102
     1103
     1104
    2771105    Corresponding Source in the same way through the same place at no
     1106
     1107
     1108
    2781109    further charge.  You need not require recipients to copy the
     1110
     1111
     1112
    2791113    Corresponding Source along with the object code.  If the place to
     1114
     1115
     1116
    2801117    copy the object code is a network server, the Corresponding Source
     1118
     1119
     1120
    2811121    may be on a different server (operated by you or a third party)
     1122
     1123
     1124
    2821125    that supports equivalent copying facilities, provided you maintain
     1126
     1127
     1128
    2831129    clear directions next to the object code saying where to find the
     1130
     1131
     1132
    2841133    Corresponding Source.  Regardless of what server hosts the
     1134
     1135
     1136
    2851137    Corresponding Source, you remain obligated to ensure that it is
     1138
     1139
     1140
    2861141    available for as long as needed to satisfy these requirements.
    2871142
     1143
     1144
     1145
     1146
     1147
     1148
    2881149    e) Convey the object code using peer-to-peer transmission, provided
     1150
     1151
     1152
    2891153    you inform other peers where the object code and Corresponding
     1154
     1155
     1156
    2901157    Source of the work are being offered to the general public at no
     1158
     1159
     1160
    2911161    charge under subsection 6d.
    2921162
     1163
     1164
     1165
     1166
     1167
     1168
    2931169  A separable portion of the object code, whose source code is excluded
     1170
     1171
     1172
    2941173from the Corresponding Source as a System Library, need not be
     1174
     1175
     1176
    2951177included in conveying the object code work.
    2961178
     1179
     1180
     1181
     1182
     1183
     1184
    2971185  A "User Product" is either (1) a "consumer product", which means any
     1186
     1187
     1188
    2981189tangible personal property which is normally used for personal, family,
     1190
     1191
     1192
    2991193or household purposes, or (2) anything designed or sold for incorporation
     1194
     1195
     1196
    3001197into a dwelling.  In determining whether a product is a consumer product,
     1198
     1199
     1200
    3011201doubtful cases shall be resolved in favor of coverage.  For a particular
     1202
     1203
     1204
    3021205product received by a particular user, "normally used" refers to a
     1206
     1207
     1208
    3031209typical or common use of that class of product, regardless of the status
     1210
     1211
     1212
    3041213of the particular user or of the way in which the particular user
     1214
     1215
     1216
    3051217actually uses, or expects or is expected to use, the product.  A product
     1218
     1219
     1220
    3061221is a consumer product regardless of whether the product has substantial
     1222
     1223
     1224
    3071225commercial, industrial or non-consumer uses, unless such uses represent
     1226
     1227
     1228
    3081229the only significant mode of use of the product.
    3091230
     1231
     1232
     1233
     1234
     1235
     1236
    3101237  "Installation Information" for a User Product means any methods,
     1238
     1239
     1240
    3111241procedures, authorization keys, or other information required to install
     1242
     1243
     1244
    3121245and execute modified versions of a covered work in that User Product from
     1246
     1247
     1248
    3131249a modified version of its Corresponding Source.  The information must
     1250
     1251
     1252
    3141253suffice to ensure that the continued functioning of the modified object
     1254
     1255
     1256
    3151257code is in no case prevented or interfered with solely because
     1258
     1259
     1260
    3161261modification has been made.
    3171262
     1263
     1264
     1265
     1266
     1267
     1268
    3181269  If you convey an object code work under this section in, or with, or
     1270
     1271
     1272
    3191273specifically for use in, a User Product, and the conveying occurs as
     1274
     1275
     1276
    3201277part of a transaction in which the right of possession and use of the
     1278
     1279
     1280
    3211281User Product is transferred to the recipient in perpetuity or for a
     1282
     1283
     1284
    3221285fixed term (regardless of how the transaction is characterized), the
     1286
     1287
     1288
    3231289Corresponding Source conveyed under this section must be accompanied
     1290
     1291
     1292
    3241293by the Installation Information.  But this requirement does not apply
     1294
     1295
     1296
    3251297if neither you nor any third party retains the ability to install
     1298
     1299
     1300
    3261301modified object code on the User Product (for example, the work has
     1302
     1303
     1304
    3271305been installed in ROM).
    3281306
     1307
     1308
     1309
     1310
     1311
     1312
    3291313  The requirement to provide Installation Information does not include a
     1314
     1315
     1316
    3301317requirement to continue to provide support service, warranty, or updates
     1318
     1319
     1320
    3311321for a work that has been modified or installed by the recipient, or for
     1322
     1323
     1324
    3321325the User Product in which it has been modified or installed.  Access to a
     1326
     1327
     1328
    3331329network may be denied when the modification itself materially and
     1330
     1331
     1332
    3341333adversely affects the operation of the network or violates the rules and
     1334
     1335
     1336
    3351337protocols for communication across the network.
    3361338
     1339
     1340
     1341
     1342
     1343
     1344
    3371345  Corresponding Source conveyed, and Installation Information provided,
     1346
     1347
     1348
    3381349in accord with this section must be in a format that is publicly
     1350
     1351
     1352
    3391353documented (and with an implementation available to the public in
     1354
     1355
     1356
    3401357source code form), and must require no special password or key for
     1358
     1359
     1360
    3411361unpacking, reading or copying.
    3421362
     1363
     1364
     1365
     1366
     1367
     1368
    3431369  7. Additional Terms.
    3441370
     1371
     1372
     1373
     1374
     1375
     1376
    3451377  "Additional permissions" are terms that supplement the terms of this
     1378
     1379
     1380
    3461381License by making exceptions from one or more of its conditions.
     1382
     1383
     1384
    3471385Additional permissions that are applicable to the entire Program shall
     1386
     1387
     1388
    3481389be treated as though they were included in this License, to the extent
     1390
     1391
     1392
    3491393that they are valid under applicable law.  If additional permissions
     1394
     1395
     1396
    3501397apply only to part of the Program, that part may be used separately
     1398
     1399
     1400
    3511401under those permissions, but the entire Program remains governed by
     1402
     1403
     1404
    3521405this License without regard to the additional permissions.
    3531406
     1407
     1408
     1409
     1410
     1411
     1412
    3541413  When you convey a copy of a covered work, you may at your option
     1414
     1415
     1416
    3551417remove any additional permissions from that copy, or from any part of
     1418
     1419
     1420
    3561421it.  (Additional permissions may be written to require their own
     1422
     1423
     1424
    3571425removal in certain cases when you modify the work.)  You may place
     1426
     1427
     1428
    3581429additional permissions on material, added by you to a covered work,
     1430
     1431
     1432
    3591433for which you have or can give appropriate copyright permission.
    3601434
     1435
     1436
     1437
     1438
     1439
     1440
    3611441  Notwithstanding any other provision of this License, for material you
     1442
     1443
     1444
    3621445add to a covered work, you may (if authorized by the copyright holders of
     1446
     1447
     1448
    3631449that material) supplement the terms of this License with terms:
    3641450
     1451
     1452
     1453
     1454
     1455
     1456
    3651457    a) Disclaiming warranty or limiting liability differently from the
     1458
     1459
     1460
    3661461    terms of sections 15 and 16 of this License; or
    3671462
     1463
     1464
     1465
     1466
     1467
     1468
    3681469    b) Requiring preservation of specified reasonable legal notices or
     1470
     1471
     1472
    3691473    author attributions in that material or in the Appropriate Legal
     1474
     1475
     1476
    3701477    Notices displayed by works containing it; or
    3711478
     1479
     1480
     1481
     1482
     1483
     1484
    3721485    c) Prohibiting misrepresentation of the origin of that material, or
     1486
     1487
     1488
    3731489    requiring that modified versions of such material be marked in
     1490
     1491
     1492
    3741493    reasonable ways as different from the original version; or
    3751494
     1495
     1496
     1497
     1498
     1499
     1500
    3761501    d) Limiting the use for publicity purposes of names of licensors or
     1502
     1503
     1504
    3771505    authors of the material; or
    3781506
     1507
     1508
     1509
     1510
     1511
     1512
    3791513    e) Declining to grant rights under trademark law for use of some
     1514
     1515
     1516
    3801517    trade names, trademarks, or service marks; or
    3811518
     1519
     1520
     1521
     1522
     1523
     1524
    3821525    f) Requiring indemnification of licensors and authors of that
     1526
     1527
     1528
    3831529    material by anyone who conveys the material (or modified versions of
     1530
     1531
     1532
    3841533    it) with contractual assumptions of liability to the recipient, for
     1534
     1535
     1536
    3851537    any liability that these contractual assumptions directly impose on
     1538
     1539
     1540
    3861541    those licensors and authors.
    3871542
     1543
     1544
     1545
     1546
     1547
     1548
    3881549  All other non-permissive additional terms are considered "further
     1550
     1551
     1552
    3891553restrictions" within the meaning of section 10.  If the Program as you
     1554
     1555
     1556
    3901557received it, or any part of it, contains a notice stating that it is
     1558
     1559
     1560
    3911561governed by this License along with a term that is a further
     1562
     1563
     1564
    3921565restriction, you may remove that term.  If a license document contains
     1566
     1567
     1568
    3931569a further restriction but permits relicensing or conveying under this
     1570
     1571
     1572
    3941573License, you may add to a covered work material governed by the terms
     1574
     1575
     1576
    3951577of that license document, provided that the further restriction does
     1578
     1579
     1580
    3961581not survive such relicensing or conveying.
    3971582
     1583
     1584
     1585
     1586
     1587
     1588
    3981589  If you add terms to a covered work in accord with this section, you
     1590
     1591
     1592
    3991593must place, in the relevant source files, a statement of the
     1594
     1595
     1596
    4001597additional terms that apply to those files, or a notice indicating
     1598
     1599
     1600
    4011601where to find the applicable terms.
    4021602
     1603
     1604
     1605
     1606
     1607
     1608
    4031609  Additional terms, permissive or non-permissive, may be stated in the
     1610
     1611
     1612
    4041613form of a separately written license, or stated as exceptions;
     1614
     1615
     1616
    4051617the above requirements apply either way.
    4061618
     1619
     1620
     1621
     1622
     1623
     1624
    4071625  8. Termination.
    4081626
     1627
     1628
     1629
     1630
     1631
     1632
    4091633  You may not propagate or modify a covered work except as expressly
     1634
     1635
     1636
    4101637provided under this License.  Any attempt otherwise to propagate or
     1638
     1639
     1640
    4111641modify it is void, and will automatically terminate your rights under
     1642
     1643
     1644
    4121645this License (including any patent licenses granted under the third
     1646
     1647
     1648
    4131649paragraph of section 11).
    4141650
     1651
     1652
     1653
     1654
     1655
     1656
    4151657  However, if you cease all violation of this License, then your
     1658
     1659
     1660
    4161661license from a particular copyright holder is reinstated (a)
     1662
     1663
     1664
    4171665provisionally, unless and until the copyright holder explicitly and
     1666
     1667
     1668
    4181669finally terminates your license, and (b) permanently, if the copyright
     1670
     1671
     1672
    4191673holder fails to notify you of the violation by some reasonable means
     1674
     1675
     1676
    4201677prior to 60 days after the cessation.
    4211678
     1679
     1680
     1681
     1682
     1683
     1684
    4221685  Moreover, your license from a particular copyright holder is
     1686
     1687
     1688
    4231689reinstated permanently if the copyright holder notifies you of the
     1690
     1691
     1692
    4241693violation by some reasonable means, this is the first time you have
     1694
     1695
     1696
    4251697received notice of violation of this License (for any work) from that
     1698
     1699
     1700
    4261701copyright holder, and you cure the violation prior to 30 days after
     1702
     1703
     1704
    4271705your receipt of the notice.
    4281706
     1707
     1708
     1709
     1710
     1711
     1712
    4291713  Termination of your rights under this section does not terminate the
     1714
     1715
     1716
    4301717licenses of parties who have received copies or rights from you under
     1718
     1719
     1720
    4311721this License.  If your rights have been terminated and not permanently
     1722
     1723
     1724
    4321725reinstated, you do not qualify to receive new licenses for the same
     1726
     1727
     1728
    4331729material under section 10.
    4341730
     1731
     1732
     1733
     1734
     1735
     1736
    4351737  9. Acceptance Not Required for Having Copies.
    4361738
     1739
     1740
     1741
     1742
     1743
     1744
    4371745  You are not required to accept this License in order to receive or
     1746
     1747
     1748
    4381749run a copy of the Program.  Ancillary propagation of a covered work
     1750
     1751
     1752
    4391753occurring solely as a consequence of using peer-to-peer transmission
     1754
     1755
     1756
    4401757to receive a copy likewise does not require acceptance.  However,
     1758
     1759
     1760
    4411761nothing other than this License grants you permission to propagate or
     1762
     1763
     1764
    4421765modify any covered work.  These actions infringe copyright if you do
     1766
     1767
     1768
    4431769not accept this License.  Therefore, by modifying or propagating a
     1770
     1771
     1772
    4441773covered work, you indicate your acceptance of this License to do so.
    4451774
     1775
     1776
     1777
     1778
     1779
     1780
    4461781  10. Automatic Licensing of Downstream Recipients.
    4471782
     1783
     1784
     1785
     1786
     1787
     1788
    4481789  Each time you convey a covered work, the recipient automatically
     1790
     1791
     1792
    4491793receives a license from the original licensors, to run, modify and
     1794
     1795
     1796
    4501797propagate that work, subject to this License.  You are not responsible
     1798
     1799
     1800
    4511801for enforcing compliance by third parties with this License.
    4521802
     1803
     1804
     1805
     1806
     1807
     1808
    4531809  An "entity transaction" is a transaction transferring control of an
     1810
     1811
     1812
    4541813organization, or substantially all assets of one, or subdividing an
     1814
     1815
     1816
    4551817organization, or merging organizations.  If propagation of a covered
     1818
     1819
     1820
    4561821work results from an entity transaction, each party to that
     1822
     1823
     1824
    4571825transaction who receives a copy of the work also receives whatever
     1826
     1827
     1828
    4581829licenses to the work the party's predecessor in interest had or could
     1830
     1831
     1832
    4591833give under the previous paragraph, plus a right to possession of the
     1834
     1835
     1836
    4601837Corresponding Source of the work from the predecessor in interest, if
     1838
     1839
     1840
    4611841the predecessor has it or can get it with reasonable efforts.
    4621842
     1843
     1844
     1845
     1846
     1847
     1848
    4631849  You may not impose any further restrictions on the exercise of the
     1850
     1851
     1852
    4641853rights granted or affirmed under this License.  For example, you may
     1854
     1855
     1856
    4651857not impose a license fee, royalty, or other charge for exercise of
     1858
     1859
     1860
    4661861rights granted under this License, and you may not initiate litigation
     1862
     1863
     1864
    4671865(including a cross-claim or counterclaim in a lawsuit) alleging that
     1866
     1867
     1868
    4681869any patent claim is infringed by making, using, selling, offering for
     1870
     1871
     1872
    4691873sale, or importing the Program or any portion of it.
    4701874
     1875
     1876
     1877
     1878
     1879
     1880
    4711881  11. Patents.
    4721882
     1883
     1884
     1885
     1886
     1887
     1888
    4731889  A "contributor" is a copyright holder who authorizes use under this
     1890
     1891
     1892
    4741893License of the Program or a work on which the Program is based.  The
     1894
     1895
     1896
    4751897work thus licensed is called the contributor's "contributor version".
    4761898
     1899
     1900
     1901
     1902
     1903
     1904
    4771905  A contributor's "essential patent claims" are all patent claims
     1906
     1907
     1908
    4781909owned or controlled by the contributor, whether already acquired or
     1910
     1911
     1912
    4791913hereafter acquired, that would be infringed by some manner, permitted
     1914
     1915
     1916
    4801917by this License, of making, using, or selling its contributor version,
     1918
     1919
     1920
    4811921but do not include claims that would be infringed only as a
     1922
     1923
     1924
    4821925consequence of further modification of the contributor version.  For
     1926
     1927
     1928
    4831929purposes of this definition, "control" includes the right to grant
     1930
     1931
     1932
    4841933patent sublicenses in a manner consistent with the requirements of
     1934
     1935
     1936
    4851937this License.
    4861938
     1939
     1940
     1941
     1942
     1943
     1944
    4871945  Each contributor grants you a non-exclusive, worldwide, royalty-free
     1946
     1947
     1948
    4881949patent license under the contributor's essential patent claims, to
     1950
     1951
     1952
    4891953make, use, sell, offer for sale, import and otherwise run, modify and
     1954
     1955
     1956
    4901957propagate the contents of its contributor version.
    4911958
     1959
     1960
     1961
     1962
     1963
     1964
    4921965  In the following three paragraphs, a "patent license" is any express
     1966
     1967
     1968
    4931969agreement or commitment, however denominated, not to enforce a patent
     1970
     1971
     1972
    4941973(such as an express permission to practice a patent or covenant not to
     1974
     1975
     1976
    4951977sue for patent infringement).  To "grant" such a patent license to a
     1978
     1979
     1980
    4961981party means to make such an agreement or commitment not to enforce a
     1982
     1983
     1984
    4971985patent against the party.
    4981986
     1987
     1988
     1989
     1990
     1991
     1992
    4991993  If you convey a covered work, knowingly relying on a patent license,
     1994
     1995
     1996
    5001997and the Corresponding Source of the work is not available for anyone
     1998
     1999
     2000
    5012001to copy, free of charge and under the terms of this License, through a
     2002
     2003
     2004
    5022005publicly available network server or other readily accessible means,
     2006
     2007
     2008
    5032009then you must either (1) cause the Corresponding Source to be so
     2010
     2011
     2012
    5042013available, or (2) arrange to deprive yourself of the benefit of the
     2014
     2015
     2016
    5052017patent license for this particular work, or (3) arrange, in a manner
     2018
     2019
     2020
    5062021consistent with the requirements of this License, to extend the patent
     2022
     2023
     2024
    5072025license to downstream recipients.  "Knowingly relying" means you have
     2026
     2027
     2028
    5082029actual knowledge that, but for the patent license, your conveying the
     2030
     2031
     2032
    5092033covered work in a country, or your recipient's use of the covered work
     2034
     2035
     2036
    5102037in a country, would infringe one or more identifiable patents in that
     2038
     2039
     2040
    5112041country that you have reason to believe are valid.
    5122042
     2043
     2044
     2045
     2046
     2047
     2048
    5132049  If, pursuant to or in connection with a single transaction or
     2050
     2051
     2052
    5142053arrangement, you convey, or propagate by procuring conveyance of, a
     2054
     2055
     2056
    5152057covered work, and grant a patent license to some of the parties
     2058
     2059
     2060
    5162061receiving the covered work authorizing them to use, propagate, modify
     2062
     2063
     2064
    5172065or convey a specific copy of the covered work, then the patent license
     2066
     2067
     2068
    5182069you grant is automatically extended to all recipients of the covered
     2070
     2071
     2072
    5192073work and works based on it.
    5202074
     2075
     2076
     2077
     2078
     2079
     2080
    5212081  A patent license is "discriminatory" if it does not include within
     2082
     2083
     2084
    5222085the scope of its coverage, prohibits the exercise of, or is
     2086
     2087
     2088
    5232089conditioned on the non-exercise of one or more of the rights that are
     2090
     2091
     2092
    5242093specifically granted under this License.  You may not convey a covered
     2094
     2095
     2096
    5252097work if you are a party to an arrangement with a third party that is
     2098
     2099
     2100
    5262101in the business of distributing software, under which you make payment
     2102
     2103
     2104
    5272105to the third party based on the extent of your activity of conveying
     2106
     2107
     2108
    5282109the work, and under which the third party grants, to any of the
     2110
     2111
     2112
    5292113parties who would receive the covered work from you, a discriminatory
     2114
     2115
     2116
    5302117patent license (a) in connection with copies of the covered work
     2118
     2119
     2120
    5312121conveyed by you (or copies made from those copies), or (b) primarily
     2122
     2123
     2124
    5322125for and in connection with specific products or compilations that
     2126
     2127
     2128
    5332129contain the covered work, unless you entered into that arrangement,
     2130
     2131
     2132
    5342133or that patent license was granted, prior to 28 March 2007.
    5352134
     2135
     2136
     2137
     2138
     2139
     2140
    5362141  Nothing in this License shall be construed as excluding or limiting
     2142
     2143
     2144
    5372145any implied license or other defenses to infringement that may
     2146
     2147
     2148
    5382149otherwise be available to you under applicable patent law.
    5392150
     2151
     2152
     2153
     2154
     2155
     2156
    5402157  12. No Surrender of Others' Freedom.
    5412158
     2159
     2160
     2161
     2162
     2163
     2164
    5422165  If conditions are imposed on you (whether by court order, agreement or
     2166
     2167
     2168
    5432169otherwise) that contradict the conditions of this License, they do not
     2170
     2171
     2172
    5442173excuse you from the conditions of this License.  If you cannot convey a
     2174
     2175
     2176
    5452177covered work so as to satisfy simultaneously your obligations under this
     2178
     2179
     2180
    5462181License and any other pertinent obligations, then as a consequence you may
     2182
     2183
     2184
    5472185not convey it at all.  For example, if you agree to terms that obligate you
     2186
     2187
     2188
    5482189to collect a royalty for further conveying from those to whom you convey
     2190
     2191
     2192
    5492193the Program, the only way you could satisfy both those terms and this
     2194
     2195
     2196
    5502197License would be to refrain entirely from conveying the Program.
    5512198
     2199
     2200
     2201
     2202
     2203
     2204
    5522205  13. Use with the GNU Affero General Public License.
    5532206
     2207
     2208
     2209
     2210
     2211
     2212
    5542213  Notwithstanding any other provision of this License, you have
     2214
     2215
     2216
    5552217permission to link or combine any covered work with a work licensed
     2218
     2219
     2220
    5562221under version 3 of the GNU Affero General Public License into a single
     2222
     2223
     2224
    5572225combined work, and to convey the resulting work.  The terms of this
     2226
     2227
     2228
    5582229License will continue to apply to the part which is the covered work,
     2230
     2231
     2232
    5592233but the special requirements of the GNU Affero General Public License,
     2234
     2235
     2236
    5602237section 13, concerning interaction through a network will apply to the
     2238
     2239
     2240
    5612241combination as such.
    5622242
     2243
     2244
     2245
     2246
     2247
     2248
    5632249  14. Revised Versions of this License.
    5642250
     2251
     2252
     2253
     2254
     2255
     2256
    5652257  The Free Software Foundation may publish revised and/or new versions of
     2258
     2259
     2260
    5662261the GNU General Public License from time to time.  Such new versions will
     2262
     2263
     2264
    5672265be similar in spirit to the present version, but may differ in detail to
     2266
     2267
     2268
    5682269address new problems or concerns.
    5692270
     2271
     2272
     2273
     2274
     2275
     2276
    5702277  Each version is given a distinguishing version number.  If the
     2278
     2279
     2280
    5712281Program specifies that a certain numbered version of the GNU General
     2282
     2283
     2284
    5722285Public License "or any later version" applies to it, you have the
     2286
     2287
     2288
    5732289option of following the terms and conditions either of that numbered
     2290
     2291
     2292
    5742293version or of any later version published by the Free Software
     2294
     2295
     2296
    5752297Foundation.  If the Program does not specify a version number of the
     2298
     2299
     2300
    5762301GNU General Public License, you may choose any version ever published
     2302
     2303
     2304
    5772305by the Free Software Foundation.
    5782306
     2307
     2308
     2309
     2310
     2311
     2312
    5792313  If the Program specifies that a proxy can decide which future
     2314
     2315
     2316
    5802317versions of the GNU General Public License can be used, that proxy's
     2318
     2319
     2320
    5812321public statement of acceptance of a version permanently authorizes you
     2322
     2323
     2324
    5822325to choose that version for the Program.
    5832326
     2327
     2328
     2329
     2330
     2331
     2332
    5842333  Later license versions may give you additional or different
     2334
     2335
     2336
    5852337permissions.  However, no additional obligations are imposed on any
     2338
     2339
     2340
    5862341author or copyright holder as a result of your choosing to follow a
     2342
     2343
     2344
    5872345later version.
    5882346
     2347
     2348
     2349
     2350
     2351
     2352
    5892353  15. Disclaimer of Warranty.
    5902354
     2355
     2356
     2357
     2358
     2359
     2360
    5912361  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
     2362
     2363
     2364
    5922365APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
     2366
     2367
     2368
    5932369HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
     2370
     2371
     2372
    5942373OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
     2374
     2375
     2376
    5952377THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     2378
     2379
     2380
    5962381PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
     2382
     2383
     2384
    5972385IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
     2386
     2387
     2388
    5982389ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
    5992390
     2391
     2392
     2393
     2394
     2395
     2396
    6002397  16. Limitation of Liability.
    6012398
     2399
     2400
     2401
     2402
     2403
     2404
    6022405  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
     2406
     2407
     2408
    6032409WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
     2410
     2411
     2412
    6042413THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
     2414
     2415
     2416
    6052417GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
     2418
     2419
     2420
    6062421USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
     2422
     2423
     2424
    6072425DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
     2426
     2427
     2428
    6082429PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
     2430
     2431
     2432
    6092433EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
     2434
     2435
     2436
    6102437SUCH DAMAGES.
    6112438
     2439
     2440
     2441
     2442
     2443
     2444
    6122445  17. Interpretation of Sections 15 and 16.
    6132446
     2447
     2448
     2449
     2450
     2451
     2452
    6142453  If the disclaimer of warranty and limitation of liability provided
     2454
     2455
     2456
    6152457above cannot be given local legal effect according to their terms,
     2458
     2459
     2460
    6162461reviewing courts shall apply local law that most closely approximates
     2462
     2463
     2464
    6172465an absolute waiver of all civil liability in connection with the
     2466
     2467
     2468
    6182469Program, unless a warranty or assumption of liability accompanies a
     2470
     2471
     2472
    6192473copy of the Program in return for a fee.
    6202474
     2475
     2476
     2477
     2478
     2479
     2480
    6212481                     END OF TERMS AND CONDITIONS
    6222482
     2483
     2484
     2485
     2486
     2487
     2488
    6232489            How to Apply These Terms to Your New Programs
    6242490
     2491
     2492
     2493
     2494
     2495
     2496
    6252497  If you develop a new program, and you want it to be of the greatest
     2498
     2499
     2500
    6262501possible use to the public, the best way to achieve this is to make it
     2502
     2503
     2504
    6272505free software which everyone can redistribute and change under these terms.
    6282506
     2507
     2508
     2509
     2510
     2511
     2512
    6292513  To do so, attach the following notices to the program.  It is safest
     2514
     2515
     2516
    6302517to attach them to the start of each source file to most effectively
     2518
     2519
     2520
    6312521state the exclusion of warranty; and each file should have at least
     2522
     2523
     2524
    6322525the "copyright" line and a pointer to where the full notice is found.
    6332526
     2527
     2528
     2529
     2530
     2531
     2532
    6342533    <one line to give the program's name and a brief idea of what it does.>
     2534
     2535
     2536
    6352537    Copyright (C) <year>  <name of author>
    6362538
     2539
     2540
     2541
     2542
     2543
     2544
    6372545    This program is free software: you can redistribute it and/or modify
     2546
     2547
     2548
    6382549    it under the terms of the GNU General Public License as published by
     2550
     2551
     2552
    6392553    the Free Software Foundation, either version 3 of the License, or
     2554
     2555
     2556
    6402557    (at your option) any later version.
    6412558
     2559
     2560
     2561
     2562
     2563
     2564
    6422565    This program is distributed in the hope that it will be useful,
     2566
     2567
     2568
    6432569    but WITHOUT ANY WARRANTY; without even the implied warranty of
     2570
     2571
     2572
    6442573    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     2574
     2575
     2576
    6452577    GNU General Public License for more details.
    6462578
     2579
     2580
     2581
     2582
     2583
     2584
    6472585    You should have received a copy of the GNU General Public License
     2586
     2587
     2588
    6482589    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    6492590
     2591
     2592
     2593
     2594
     2595
     2596
    6502597Also add information on how to contact you by electronic and paper mail.
    6512598
     2599
     2600
     2601
     2602
     2603
     2604
    6522605  If the program does terminal interaction, make it output a short
     2606
     2607
     2608
    6532609notice like this when it starts in an interactive mode:
    6542610
     2611
     2612
     2613
     2614
     2615
     2616
    6552617    <program>  Copyright (C) <year>  <name of author>
     2618
     2619
     2620
    6562621    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     2622
     2623
     2624
    6572625    This is free software, and you are welcome to redistribute it
     2626
     2627
     2628
    6582629    under certain conditions; type `show c' for details.
    6592630
     2631
     2632
     2633
     2634
     2635
     2636
    6602637The hypothetical commands `show w' and `show c' should show the appropriate
     2638
     2639
     2640
    6612641parts of the General Public License.  Of course, your program's commands
     2642
     2643
     2644
    6622645might be different; for a GUI interface, you would use an "about box".
    6632646
     2647
     2648
     2649
     2650
     2651
     2652
    6642653  You should also get your employer (if you work as a programmer) or school,
     2654
     2655
     2656
    6652657if any, to sign a "copyright disclaimer" for the program, if necessary.
     2658
     2659
     2660
    6662661For more information on this, and how to apply and follow the GNU GPL, see
     2662
     2663
     2664
    6672665<http://www.gnu.org/licenses/>.
    6682666
     2667
     2668
     2669
     2670
     2671
     2672
    6692673  The GNU General Public License does not permit incorporating your program
     2674
     2675
     2676
    6702677into proprietary programs.  If your program is a subroutine library, you
     2678
     2679
     2680
    6712681may consider it more useful to permit linking proprietary applications with
     2682
     2683
     2684
    6722685the library.  If this is what you want to do, use the GNU Lesser General
     2686
     2687
     2688
    6732689Public License instead of this License.  But first, please read
     2690
     2691
     2692
    6742693<http://www.gnu.org/philosophy/why-not-lgpl.html>.
     2694
     2695
     2696
  • note-press/trunk/languages/Note_Press-en_US.po

    r1156271 r1693456  
    66msgid ""
    77msgstr ""
    8 "Project-Id-Version: \n"
     8"Project-Id-Version: Note Press 0.1.3\n"
    99"Report-Msgid-Bugs-To: \n"
    10 "POT-Creation-Date: 2015-05-05 23:38-0500\n"
    11 "PO-Revision-Date: 2015-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"
    1515"MIME-Version: 1.0\n"
    1616"Content-Type: text/plain; charset=UTF-8\n"
    1717"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
     25msgid "Note Press"
     26msgstr "Note Press"
     27
     28#: admin/Note_Press-admin-menu.php:37 admin/Note_Press-settings.php:37
     29msgid "For more information and instructions please visit our website at: "
     30msgstr "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
     33msgid ""
     34"Please consider supporting the development of Note Press by clicking the "
     35"image above and becoming a Patreon."
     36msgstr ""
     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
     41msgid "note"
     42msgstr "note"
     43
     44#: admin/Note_Press-admin-menu.php:60
     45msgid "notes"
     46msgstr "notes"
     47
     48#: admin/Note_Press-admin-menu.php:102
     49msgid "View"
     50msgstr "View"
     51
     52#: admin/Note_Press-admin-menu.php:103
     53msgid "Edit"
     54msgstr "Edit"
     55
     56#: admin/Note_Press-admin-menu.php:104
     57msgid "Are you sure you want to delete this note?"
     58msgstr "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
     61msgid "Delete"
     62msgstr "Delete"
     63
     64#: admin/Note_Press-admin-menu.php:125 admin/Note_Press-admin-menu.php:139
     65msgid "Icon"
     66msgstr "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
     70msgid "Title"
     71msgstr "Title"
     72
     73#: admin/Note_Press-admin-menu.php:127 admin/Note_Press-admin-menu.php:141
     74msgid "By"
     75msgstr "By"
     76
     77#: admin/Note_Press-admin-menu.php:128
     78msgid "To"
     79msgstr "To"
     80
     81#: admin/Note_Press-admin-menu.php:129 admin/Note_Press-admin-menu.php:142
     82msgid "Date"
     83msgstr "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
     87msgid "Priority"
     88msgstr "Priority"
     89
     90#: admin/Note_Press-admin-menu.php:131 admin/class-Note_Press-admin.php:113
     91msgid "Read"
     92msgstr "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
     96msgid "Deadline"
     97msgstr "Deadline"
     98
     99#: admin/Note_Press-admin-menu.php:428
     100msgid "Notes"
     101msgstr "Notes"
     102
     103#: admin/Note_Press-admin-menu.php:433
     104msgid "Search"
     105msgstr "Search"
     106
     107#: admin/Note_Press-admin-menu.php:456
     108msgid "Add A Note"
     109msgstr "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
     113msgid "That note was not found."
     114msgstr "That note was not found."
     115
     116#: admin/Note_Press-admin-menu.php:503
     117msgid "View a Note"
     118msgstr "View a Note"
     119
     120#: admin/Note_Press-admin-menu.php:507
     121msgid "Edit This Note"
     122msgstr "Edit This Note"
     123
     124#: admin/Note_Press-admin-menu.php:509 admin/Note_Press-admin-menu.php:561
     125msgid "Back to List"
     126msgstr "Back to List"
     127
     128#: admin/Note_Press-admin-menu.php:513 admin/Note_Press-admin-menu.php:582
     129msgid "Title:"
     130msgstr "Title:"
     131
     132#: admin/Note_Press-admin-menu.php:514
     133msgid "Date Added/Last Edited:"
     134msgstr "Date Added/Last Edited:"
     135
     136#: admin/Note_Press-admin-menu.php:515
     137msgid "Added By:"
     138msgstr "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
     142msgid "Priority:"
     143msgstr "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
     147msgid "Deadline:"
     148msgstr "Deadline:"
     149
     150#: admin/Note_Press-admin-menu.php:540 admin/Note_Press-admin-menu.php:783
     151msgid "Contents:"
     152msgstr "Contents:"
     153
     154#: admin/Note_Press-admin-menu.php:569
     155msgid "Edit a Note"
     156msgstr "Edit a Note"
     157
     158#: admin/Note_Press-admin-menu.php:573
     159msgid "Add a Note"
     160msgstr "Add a Note"
     161
     162#: admin/Note_Press-admin-menu.php:591
     163msgid "Enter a title for this note."
     164msgstr "Enter a title for this note."
     165
     166#: admin/Note_Press-admin-menu.php:599
     167msgid "To:"
     168msgstr "To:"
     169
     170#: admin/Note_Press-admin-menu.php:624
     171msgid ""
     172"Choose who you wish to send this note to. Ctl-click to choose multiple "
     173"recipients."
     174msgstr ""
     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
     179msgid "Sticky Note:"
     180msgstr "Sticky Note:"
     181
     182#: admin/Note_Press-admin-menu.php:645
     183msgid ""
     184"<strong>Note: </strong>Users who do not have the ability to write notes can "
     185"only see Sticky Notes."
     186msgstr ""
     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
     191msgid ""
     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."
     195msgstr ""
     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
     201msgid "Low"
     202msgstr "Low"
     203
     204#: admin/Note_Press-admin-menu.php:693
     205msgid "Medium"
     206msgstr "Medium"
     207
     208#: admin/Note_Press-admin-menu.php:694
     209msgid "High"
     210msgstr "High"
     211
     212#: admin/Note_Press-admin-menu.php:696
     213msgid "Select a priority for this note."
     214msgstr "Select a priority for this note."
     215
     216#: admin/Note_Press-admin-menu.php:700
     217msgid "Icon:"
     218msgstr "Icon:"
     219
     220#: admin/Note_Press-admin-menu.php:752
     221msgid "Select an icon for this note."
     222msgstr "Select an icon for this note."
     223
     224#: admin/Note_Press-admin-menu.php:779
     225msgid "Author/Editor: "
     226msgstr "Author/Editor: "
     227
     228#: admin/Note_Press-admin-menu.php:802 admin/Note_Press-settings.php:87
     229msgid "Save"
     230msgstr "Save"
     231
     232#: admin/Note_Press-admin-menu.php:809
     233msgid "Update Note"
     234msgstr "Update Note"
     235
     236#: admin/Note_Press-admin-menu.php:813
     237msgid "Add Note"
     238msgstr "Add Note"
     239
     240#: admin/Note_Press-admin-menu.php:836 admin/Note_Press-admin-menu.php:889
     241msgid "A note must have a title."
     242msgstr "A note must have a title."
     243
     244#: admin/Note_Press-admin-menu.php:1016
     245msgid "That note was not found"
     246msgstr "That note was not found"
     247
     248#: admin/Note_Press-admin-menu.php:1023 admin/Note_Press-admin-menu.php:1102
     249msgid "Note Deleted!"
     250msgstr "Note Deleted!"
     251
     252#: admin/Note_Press-admin-menu.php:1035
     253msgid "Please deactivate and re-activate Note Press to complete the upgrade."
     254msgstr "Please deactivate and re-activate Note Press to complete the upgrade."
     255
     256#: admin/Note_Press-admin-menu.php:1106
     257msgid " Notes Deleted!"
     258msgstr " Notes Deleted!"
     259
     260#: admin/Note_Press-admin-menu.php:1115
     261msgid "No notes selected."
     262msgstr "No notes selected."
     263
     264#: admin/Note_Press-settings.php:31
     265msgid "Settings updated."
     266msgstr "Settings updated."
     267
     268#: admin/Note_Press-settings.php:61 admin/class-Note_Press-admin.php:283
    22269msgid "Note Press Settings"
    23270msgstr "Note Press Settings"
    24271
    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
     273msgid "Note Press User Level:"
     274msgstr "Note Press User Level:"
     275
     276#: admin/Note_Press-settings.php:78
     277msgid "Select the level required to create notes with Note Press."
     278msgstr "Select the level required to create notes with Note Press."
     279
     280#: admin/Note_Press-settings.php:92
     281msgid "Save Settings"
     282msgstr "Save Settings"
     283
     284#: admin/class-Note_Press-admin.php:108
     285msgid "No notes to you."
     286msgstr "No notes to you."
     287
     288#: admin/class-Note_Press-admin.php:212
     289msgid "From:"
     290msgstr ""
     291
     292#: admin/class-Note_Press-admin.php:264
     293msgid "Note Press - Notes to you"
     294msgstr "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  
    66msgid ""
    77msgstr ""
    8 "Project-Id-Version: \n"
     8"Project-Id-Version: NotePressES\n"
    99"Report-Msgid-Bugs-To: \n"
    10 "POT-Creation-Date: 2015-05-05 23:38-0500\n"
    11 "PO-Revision-Date: 2015-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"
    1515"MIME-Version: 1.0\n"
    1616"Content-Type: text/plain; charset=UTF-8\n"
    1717"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
     25msgid "Note Press"
     26msgstr "Note Press"
     27
     28#: admin/Note_Press-admin-menu.php:37 admin/Note_Press-settings.php:37
     29msgid "For more information and instructions please visit our website at: "
     30msgstr ""
     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
     35msgid ""
     36"Please consider supporting the development of Note Press by clicking the "
     37"image above and becoming a Patreon."
     38msgstr ""
     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
     44msgid "note"
     45msgstr "nota"
     46
     47#: admin/Note_Press-admin-menu.php:60
     48msgid "notes"
     49msgstr "notas"
     50
     51#: admin/Note_Press-admin-menu.php:102
     52msgid "View"
     53msgstr "Ver"
     54
     55#: admin/Note_Press-admin-menu.php:103
     56msgid "Edit"
     57msgstr "Editar"
     58
     59#: admin/Note_Press-admin-menu.php:104
     60msgid "Are you sure you want to delete this note?"
     61msgstr "¿Seguro que quieres eliminar esta nota?"
     62
     63#: admin/Note_Press-admin-menu.php:104 admin/Note_Press-admin-menu.php:111
     64msgid "Delete"
     65msgstr "Borrar"
     66
     67#: admin/Note_Press-admin-menu.php:125 admin/Note_Press-admin-menu.php:139
     68msgid "Icon"
     69msgstr "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
     73msgid "Title"
     74msgstr "Título"
     75
     76#: admin/Note_Press-admin-menu.php:127 admin/Note_Press-admin-menu.php:141
     77msgid "By"
     78msgstr "Autor"
     79
     80#: admin/Note_Press-admin-menu.php:128
     81msgid "To"
     82msgstr "To"
     83
     84#: admin/Note_Press-admin-menu.php:129 admin/Note_Press-admin-menu.php:142
     85msgid "Date"
     86msgstr "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
     90msgid "Priority"
     91msgstr "Prioridad"
     92
     93#: admin/Note_Press-admin-menu.php:131 admin/class-Note_Press-admin.php:113
     94msgid "Read"
     95msgstr "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
     99msgid "Deadline"
     100msgstr "Fecha tope"
     101
     102#: admin/Note_Press-admin-menu.php:428
     103msgid "Notes"
     104msgstr "Notas"
     105
     106#: admin/Note_Press-admin-menu.php:431
     107msgid "Search"
     108msgstr "Buscar"
     109
     110#: admin/Note_Press-admin-menu.php:454
     111msgid "Add A Note"
     112msgstr "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
     116msgid "That note was not found."
     117msgstr "No se ha encontrado esa nota."
     118
     119#: admin/Note_Press-admin-menu.php:501
     120msgid "View a Note"
     121msgstr "View a Note"
     122
     123#: admin/Note_Press-admin-menu.php:505
     124msgid "Edit This Note"
     125msgstr "Editar Esta Nota"
     126
     127#: admin/Note_Press-admin-menu.php:507 admin/Note_Press-admin-menu.php:559
     128msgid "Back to List"
     129msgstr "Volver a la lista"
     130
     131#: admin/Note_Press-admin-menu.php:511 admin/Note_Press-admin-menu.php:579
     132msgid "Title:"
     133msgstr "Título:"
     134
     135#: admin/Note_Press-admin-menu.php:512
     136msgid "Date Added/Last Edited:"
     137msgstr "Fecha Alta / Última modificación:"
     138
     139#: admin/Note_Press-admin-menu.php:513
     140msgid "Added By:"
     141msgstr "Autor:"
     142
     143#: admin/Note_Press-admin-menu.php:526 admin/Note_Press-admin-menu.php:685
     144msgid "Priority:"
     145msgstr "Prioridad:"
     146
     147#: admin/Note_Press-admin-menu.php:536 admin/Note_Press-admin-menu.php:660
     148msgid "Deadline:"
     149msgstr "Fecha tope:"
     150
     151#: admin/Note_Press-admin-menu.php:538 admin/Note_Press-admin-menu.php:780
     152msgid "Contents:"
     153msgstr "Contenidos:"
     154
     155#: admin/Note_Press-admin-menu.php:566
     156msgid "Edit a Note"
     157msgstr "Edit a Note"
     158
     159#: admin/Note_Press-admin-menu.php:570
     160msgid "Add a Note"
     161msgstr "Add a Note"
     162
     163#: admin/Note_Press-admin-menu.php:588
     164msgid "Enter a title for this note."
     165msgstr "Introduzca un título para esta nota."
     166
     167#: admin/Note_Press-admin-menu.php:596
     168msgid "To:"
     169msgstr "To:"
     170
     171#: admin/Note_Press-admin-menu.php:621
     172msgid ""
     173"Choose who you wish to send this note to. Ctl-click to choose multiple "
     174"recipients."
     175msgstr ""
     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
     180msgid "Sticky Note:"
     181msgstr "Sticky Note:"
     182
     183#: admin/Note_Press-admin-menu.php:642
     184msgid ""
     185"<strong>Note: </strong>Users who do not have the ability to write notes can "
     186"only see Sticky Notes."
     187msgstr ""
     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
     192msgid ""
     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."
     196msgstr ""
     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
     203msgid "Low"
     204msgstr "Bajo"
     205
     206#: admin/Note_Press-admin-menu.php:690
     207msgid "Medium"
     208msgstr "Medio"
     209
     210#: admin/Note_Press-admin-menu.php:691
     211msgid "High"
     212msgstr "Alto"
     213
     214#: admin/Note_Press-admin-menu.php:693
     215msgid "Select a priority for this note."
     216msgstr "Seleccione una prioridad para esta nota."
     217
     218#: admin/Note_Press-admin-menu.php:697
     219msgid "Icon:"
     220msgstr "Icono:"
     221
     222#: admin/Note_Press-admin-menu.php:749
     223msgid "Select an icon for this note."
     224msgstr "Seleccione un icono para esta nota."
     225
     226#: admin/Note_Press-admin-menu.php:776
     227msgid "Author/Editor: "
     228msgstr "Autor / Editor :"
     229
     230#: admin/Note_Press-admin-menu.php:799 admin/Note_Press-settings.php:87
     231msgid "Save"
     232msgstr "Guardar"
     233
     234#: admin/Note_Press-admin-menu.php:806
     235msgid "Update Note"
     236msgstr "Actualización Nota"
     237
     238#: admin/Note_Press-admin-menu.php:810
     239msgid "Add Note"
     240msgstr "Añadir La Nota"
     241
     242#: admin/Note_Press-admin-menu.php:833 admin/Note_Press-admin-menu.php:886
     243msgid "A note must have a title."
     244msgstr "Una nota tiene que tener un título."
     245
     246#: admin/Note_Press-admin-menu.php:1013
     247msgid "That note was not found"
     248msgstr "Esa nota no se ha encontrado"
     249
     250#: admin/Note_Press-admin-menu.php:1020 admin/Note_Press-admin-menu.php:1092
     251msgid "Note Deleted!"
     252msgstr "Nota eliminados !"
     253
     254#: admin/Note_Press-admin-menu.php:1032
     255msgid "Please deactivate and re-activate Note Press to complete the upgrade."
     256msgstr "Please deactivate and re-activate Note Press to complete the upgrade."
     257
     258#: admin/Note_Press-admin-menu.php:1096
     259msgid " Notes Deleted!"
     260msgstr " Nota eliminados !"
     261
     262#: admin/Note_Press-admin-menu.php:1105
     263msgid "No notes selected."
     264msgstr "No hay notas seleccionadas ."
     265
     266#: admin/Note_Press-settings.php:31
     267msgid "Settings updated."
     268msgstr "Settings updated."
     269
     270#: admin/Note_Press-settings.php:61
    22271msgid "Note Press Settings"
    23272msgstr "Note Press Ajustes"
    24273
    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
     275msgid "Note Press User Level:"
     276msgstr "Note Press User Level:"
     277
     278#: admin/Note_Press-settings.php:78
     279msgid "Select the level required to create notes with Note Press."
     280msgstr "Select the level required to create notes with Note Press."
     281
     282#: admin/Note_Press-settings.php:92
     283msgid "Save Settings"
     284msgstr "Save Settings"
     285
     286#: admin/class-Note_Press-admin.php:108
     287msgid "No notes to you."
     288msgstr "No hay notas para usted."
     289
     290#: admin/class-Note_Press-admin.php:240
     291msgid "Note Press - Notes to you"
     292msgstr "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 
    21<?php
    3 /**
    4  * Represents the view for the administration dashboard.
    5  *
    6  * This includes the header, options, and other information that should provide
    7  * The User Interface to the end user.
    8  *
    9  * @package   Note_Press
    10  * @author    datainterlock <postmaster@datainterlock.com>
    11  * @license   GPL-3.0+
    12  * @link      http://www.datainterlock.com
    13  * @Copyright (C) 2015 Rod Kinnison postmaster@datainterlock.com
    14  */
    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_Table
    34     {
    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 records
    44             'plural' => __('notes', 'mylisttable'), //plural name of the listed records
    45             '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 purposes
    60         }
    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         else
    125         {
    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         else
    142         {
    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->Date
    156             );
    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             $sortable
    165         );
    166 
    167         $per_page = 5;
    168         $current_page = $this->get_pagenum();
    169         $total_items = count(@$example_data);
    170         // only ncessary because we have sample data
    171         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 items
    177           'per_page'    => $per_page                     //WE have to determine how many items to show on a page
    178         ) );
    179 
    180         $this->items = @$example_data; 
    181         }
    182    
    183     } //class
    184 
    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     }
    2022
    2033
    204 function Note_PressshowMessage($message, $errormsg = false)
    205     {
    206     if ($errormsg)
    207         {
    208         echo '<div id="message" class="error">';
    209         }
    210     else
    211         {
    212         echo '<div id="message" class="updated fade">';
    213         }
    214    
    215     echo "<p><strong>$message</strong></p></div>";
    216     }
    2174
    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     }
    2255
    226 //shows the main list of notes and the menu
    227 function Note_Pressget_notes()
    228     {
    229     global $wpdb;
    230     Note_Pressshow_menu();
    231     Note_Press_render_list_page();
    232     }
    2336
    234 //shows an individual note
    235 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     else
    246         {
    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 '&nbsp;';
    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' />&nbsp;&nbsp;" . __('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 editor
    268 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                             else
    312                             {
    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     else
    367     {   
    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     else
    380     {
    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-content
    388     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                                             else
    402                                             {
    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 note
    423 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     else
    439         {
    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 note
    455 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     else
    485         {
    486         $wpdb->delete($table_name, array(
    487             'ID' => $thisid
    488         ));
    489         }
    490     }
    491 
    492 //deletes the selected note
    493 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     else
    503         {
    504         $wpdb->delete($table_name, array(
    505             'ID' => $thisid
    506         ));
    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             else
    561                 {
    562                 Note_PressshowMessage($count . __(' Notes Deleted!', 'Note_Press'));
    563                 }
    564             }
    565         elseif (isset($_GET['id']))
    566             {
    567             Note_Pressdelete_note($_GET['id']);
    568             }
    569         else
    570             {
    571             Note_PressshowMessage(__('No notes selected.', 'Note_Press'));
    572             }
    573         Note_Pressget_notes();
    574         }
    575         else
    576         {
    577             Note_Pressget_notes();
    578         }
    579     }
    580 else
    581     {
    582     Note_Pressget_notes();
    583     }
    5847?>
  • note-press/trunk/public/assets/css/public.css

    r1156271 r1693456  
    11<style type="text/css">
     2
     3
     4
    25#Note_Pressdropdown {width:240px; height:84px; border:2px inset #ccc; overflow:auto;}
     6
     7
     8
    39#Note_Pressdropdown a {text-align:left; font:9pt/10pt arial,verdana,sans-serif; padding-left:2px; margin:0; white-space:nowrap;}
     10
     11
     12
    413#Note_Pressdropdown a.menu:link {text-decoration:none; display:block; background-color:#fff; color:#000;}
     14
     15
     16
    517#Note_Pressdropdown a.menu:visited {text-decoration:none; display:block; background-color:#fff; color:#000;}
     18
     19
     20
    621#Note_Pressdropdown a.menu:hover {text-decoration:none; display:block; background-color:#000; color:#fff;}
     22
     23
     24
    725#Note_Pressdropdown a.menu:active {text-decoration:none; display:block; background-color:#000; color:#fff;}
     26
     27
     28
    829</style>
  • note-press/trunk/public/class-Note_Press.php

    r1563878 r1693456  
    11<?php
     2
     3
     4
     5
     6
    27/**
    3  * Note_Press.
     8
     9
     10 * The public-facing functionality of the plugin.
     11
     12
    413 *
    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
    1031 */
    1132
     33
     34
     35
     36
    1237/**
    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
    1543 *
    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
    1852 *
    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
    2164 */
    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
     67class 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
    79220         */
    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
    100231
    101232    }
    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
    112300
    113301    }
    114302
    115303
    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
    352307}
    353 
    354 
    355 
  • note-press/trunk/uninstall.php

    r1156271 r1693456  
    11<?php
     2
    23/**
     4
    35 * Fired when the plugin is uninstalled.
     6
    47 *
     8
    59 * @package   Note_Press
     10
    611 * @author    datainterlock <postmaster@datainterlock.com>
     12
    713 * @license   GPL-3.0+
     14
    815 * @link      http://www.datainterlock.com
     16
    917 * @Copyright (C) 2015 Rod Kinnison postmaster@datainterlock.com
     18
    1019 */
    1120
     21
     22
    1223// If uninstall not called from WordPress, then exit
     24
    1325if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
     26
    1427    exit;
     28
    1529}
     30
    1631if (is_multisite())
     32
    1733{
     34
    1835    global $wpdb;
     36
    1937    $blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A);
     38
    2039    delete_option("Note_Press_db_version");
     40
    2141    if ($blogs)
     42
    2243    {
     44
    2345        foreach($blogs as $blog)
     46
    2447        {
     48
    2549            switch_to_blog($blog['blog_id']);
     50
    2651            delete_option("Note_Press_db_version");
     52
    2753            $table_name = $wpdb->prefix . "Note_Press";
     54
    2855            $GLOBALS['wpdb']->query("DROP TABLE `".$GLOBALS['wpdb']->prefix."$table_name`");
     56
    2957            $GLOBALS['wpdb']->query("OPTIMIZE TABLE `" .$GLOBALS['wpdb']->prefix."options`");
     58
    3059            restore_current_blog();
     60
    3161        }
     62
    3263    }
     64
    3365}
     66
    3467else
     68
    3569{
     70
    3671    delete_option("Note_Press_db_version");
     72
    3773    $table_name = $wpdb->prefix . "Note_Press";
     74
    3875    $GLOBALS['wpdb']->query("DROP TABLE `".$GLOBALS['wpdb']->prefix."$table_name`");
     76
    3977    $GLOBALS['wpdb']->query("OPTIMIZE TABLE `" .$GLOBALS['wpdb']->prefix."options`");
     78
    4079}
Note: See TracChangeset for help on using the changeset viewer.