Plugin Directory

Changeset 519490


Ignore:
Timestamp:
03/15/2012 06:49:17 PM (14 years ago)
Author:
BenIrvin
Message:
 
Location:
admin-dashboard-site-notes
Files:
18 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • admin-dashboard-site-notes/trunk/class.DSNManager.php

    r517859 r519490  
    44class DSNManager {
    55    private $shortcode = "sitenote"; // if changed, also change in dashboard-site-notes.php
    6     private $plugin_version = "1.3.0";
     6    private $plugin_version = "1.3.2";
    77    private $plugin_id = 'dsnmanager';
    88    private $plugin_stylesheet_id = 'dsnmanager_css';
     
    9999       
    100100        // if there's no version set in the database, it's a pre-1.3 version, so run the "upgrade" code and then create the version
    101         if(!isset($this->options['version']) || version_compare($this->options['version'], '1.3.1', '<')) {
     101        if(!isset($this->options['version']) || version_compare($this->options['version'], '1.3', '<')) {
     102            // do the version upgrade now; none of these updates are critical and if they fail we
     103            // don't want to bring the site to a crawl like the previous version.
     104            $this->options['version'] = $this->plugin_version;
     105            update_option($this->plugin_id, $this->options);
     106            $this->options = $this->get_all_options();
     107           
    102108            // set instruction_manual to the opposite of instructions_exclude and rename it
    103109            $sql = "
     
    107113            ";
    108114            $updated_rows = $wpdb->query($sql);
    109             $this->options['updated_rows_instruction_manual'] = $updated_rows;
    110            
    111             $this->options['version'] = $this->plugin_version;
    112             update_option($this->plugin_id, $this->options);
    113115           
    114116            // Create "admin_notice" meta key for each existing dsn_note, since it's now required
     
    120122            ";
    121123            $updated_admin_notices = $wpdb->query($sql);
    122             $this->options['updated_admin_notices'] = $updated_admin_notices;
    123124           
    124125            // Create "contextual_help" meta key for each existing dsn_note
     
    130131            ";
    131132            $updated_admin_notices = $wpdb->query($sql);
    132             $this->options['updated_admin_notices'] = $updated_admin_notices;
    133133           
    134134            // rename "loc_dashboard" to "dashboard_widget" in anticipation of having a dashboard page location
     
    143143            // delete all meta keys attached incorrectly to non-dsn_note post types
    144144            // to minimize risk of deleting meta keys created by other plugins, we'll be as specific as possible rather than just using '_dsn_%'
    145             $old_prefix = '_dsn_'; // hardcoded to _dsn_ because it was used in prior versions
    146             $pre_role = $old_prefix . "role_"; // role meta keys
    147             $pre_loc = $old_prefix . "loc_"; // locations meta keys
    148             $pre_hide = $old_prefix . "hide_title"; // hide_title meta keys
    149             $pre_instr = $old_prefix . "instructions_exclude"; // instructions_exclude meta keys
    150 
     145            $prefix = '_dsn_'; // prefix hardcoded to _dsn_ because it was used in all previous versions
     146            $pre_role = $prefix . "role_"; // role meta keys
     147            $pre_loc = $prefix . "loc_"; // locations meta keys
     148            $pre_hide = $prefix . "hide_title"; // hide_title meta keys
     149            $pre_instr = $prefix . "instructions_exclude"; // instructions_exclude meta keys
    151150            $sql = "
    152151            DELETE FROM wppm
     
    159158                    WHERE ID = wppm.post_id AND wpp.post_type = 'dsn_note')";
    160159            $deleted_rows = $wpdb->query($sql);
    161             $this->options['deleted_rows_metabug'] = $deleted_rows;
    162            
    163             // NOTE: for future versions, make sure to allow previous scripts to run too in case someone skips an update. watch out about updating version in here.
    164             // store this version as the current plugin version in the options
    165             $this->options['version'] = $this->plugin_version;
    166             update_option($this->plugin_id, $this->options);
    167160        }
    168161    }
     
    614607        }
    615608        // check nonce
    616         $nonce_id = $this->nonce_id;
    617         if(!wp_verify_nonce($_POST[$nonce_id],$nonce_id)) {
    618             return $post_id;
    619         }
     609        //$nonce_id = $this->nonce_id;
     610        //if(!wp_verify_nonce($_POST[$nonce_id],$nonce_id)) {
     611        //  return $post_id;
     612        //}
    620613       
    621614        if(is_array($_POST) && count($_POST)) {
     
    701694        $output .= "</div>";
    702695       
     696       
    703697        // add misc options
    704698        $output .= "<div id='dsn_meta_other'>"; // open #dsn_meta_other
     
    829823   
    830824    /////////
     825    //
    831826    // OPTIONS PAGE SECTION
     827    //
    832828    /////////
    833829
     
    854850            'manual_title' => __("Site Instruction Manual", DSNMANAGER_TEXTDOMAIN),
    855851            'manual_nav' => __("Site Instructions", DSNMANAGER_TEXTDOMAIN),
     852            'version'=>false,
    856853        );
    857854        $roles = $this->get_roles();
     
    894891        add_settings_section($section_roles, __('Permissions', DSNMANAGER_TEXTDOMAIN), array($this,'settings_section_roles_description'), $this->plugin_id);
    895892       
     893        // TODO: add_settings_field('support_author',__('Add author name support'), array($this,'input_checkbox'), $this->plugin_id, 'plugin_main', array('id'=>'support_author'));
     894        // TODO: add_settings_field('support_thumbnail',__('Add thumbnail support'), array($this,'input_checkbox'), $this->plugin_id, 'plugin_main', array('id'=>'support_thumbnail'));
    896895        $cb_check = array($this,'input_checkbox');
    897896        $cb_text = array($this,'input_textfield');
     
    997996    }
    998997    /////////
     998    //
    999999    // END OPTIONS PAGE SECTION
     1000    //
    10001001    /////////
    10011002   
  • admin-dashboard-site-notes/trunk/dashboard-site-notes.php

    r517849 r519490  
    44Plugin URI: http://innerdvations.com/plugins/admin-dashboard-notes/
    55Description: Create site notes to appear either on the dashboard or at the top of various admin pages.
    6 Version: 1.3
     6Version: 1.3.2
    77Author: Ben Irvin
    88Author URI: http://innerdvations.com/
    9 Tags: instructions, manual, contextual help, help tab, admin notice, notes
     9Tags: instructions, manual, admin, notes, notices, instruction manual
    1010Wordpress URI: http://wordpress.org/extend/plugins/admin-dashboard-site-notes/
    1111License: GPLv3
  • admin-dashboard-site-notes/trunk/readme.txt

    r517852 r519490  
    55Requires at least: 3.0
    66Tested up to: 3.3.1
    7 Stable tag: 1.3
     7Stable tag: 1.3.2
    88
    9 Add notes as admin notices, contextual help tabs, in an instruction manual, and/or placed in a dashboard widget.
     9Add notes as admin notices in contextual help tabs, as well as compile them into an instruction manual.
    1010
    1111== Description ==
    1212
    13 Add notes as admin notices, contextual help tabs, in an instruction manual, and/or placed in a dashboard widget.
     13Add notes as admin notices in contextual help tabs, as well as compile them into an instruction manual or placed in a dashboard widget.
    1414
    15 This plugin is intended to build instructions into a site for clients, although it can be configured as a general purpose tool to leave temporary notes to any group on your site that has admin access.
     15This is intended to build instructions into a site for clients, so it is focused on providing abilities only to the highest role of user available on a site, although it can be configured as a general purpose tool to leave temporary notes to any group on your site that has admin access.
    1616
    1717== Installation ==
     
    5050= What is planned for future versions? =
    5151Here are features planned for future versions (probably released about every 2-3 months):
    52 
    5352* 1.4: add ability to put notes in the admin bar
    5453* 1.4: add warnings if a note is created that can't be seen anywhere (no role or location selected)
     
    8079
    8180== Changelog ==
     81= 1.3.1 =
     82* bugfix: fixed plugin upgrade script that caused tons of slow pages
     83
    8284= 1.3 =
    8385* feature: ability to add notes to the contextual help tab
     86* feature: shortcode 'sitenote' or can be renamed with define('DSN_SHORTCODE','yourshortcode');
    8487* feature: 'attachment' type now works on WP Media pages
    8588* feature: 'revision' type now works on WP revision page
    86 * feature: shortcode 'sitenote' or can be renamed with define('DSN_SHORTCODE','yourshortcode');
    8789* feature: restructured so that plugin memory/cpu footprint on non-admin pages now extremely tiny
    8890* change: 'exclude from instructions' has been replaced with a new instruction manual location. existing notes updated on upgrade.
Note: See TracChangeset for help on using the changeset viewer.