Changeset 1781539
- Timestamp:
- 12/05/2017 07:03:07 PM (8 years ago)
- Location:
- read-and-understood/trunk
- Files:
-
- 2 edited
-
class_wp_rnu.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
read-and-understood/trunk/class_wp_rnu.php
r1780467 r1781539 5 5 Plugin URI: http://mantos.com/experience-and-expertise/plugin-read-understood/ 6 6 Description: Records acknowledgements that specific users have read specific postings (or not). 7 Version: 1. 87 Version: 1.9 8 8 Author: Peter Mantos; Mantos I.T. Consulting Inc. 9 9 Author URI: http://mantos.com/experience-and-expertise/peter-mantos-resume/ … … 28 28 * REV : WHEN : WHO : WHAT 29 29 * =====+=============+================+=================================================== 30 * 1.9 : 05-Dec-2017 : P.Mantos 31 * : : : Retro-actively attemps to recovery any category selected before version 1.7 32 * : : : by looking at the category option and using it to populate the rnu_category table 33 * : : : if that table is empty. 34 * =====+=============+================+=================================================== 30 35 * 1.8 : 03-Dec-2017 : P.Mantos 31 36 * : : : Respects [rnu_ack] shortcode. … … 75 80 defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); 76 81 if (!defined('READ_AND_UNDERSTOOD_PLUGIN_VERSION')) 77 define('READ_AND_UNDERSTOOD_PLUGIN_VERSION', '1. 8');82 define('READ_AND_UNDERSTOOD_PLUGIN_VERSION', '1.9'); 78 83 class class_wp_rnu 79 84 { … … 231 236 $this->rnudb_install(); 232 237 } 238 $this->rnudb_install(); 233 239 } 234 240 … … 804 810 805 811 dbDelta($sql); // unfortunately there are no results; errors will be 'shown' by default 812 813 // version 1.7 effectively wiped out whatever category the user had previously chosen to be acknowledged. 814 // attempt to mitigate that error by looking to see if the option still exists, yet no categories have yet been selected. 815 $oldSingleCategoryId = get_option($this->shortname . '_category', ''); 816 $rnu_cat_tablename = $wpdb->prefix . "rnu_categories"; 817 $sql = " Select * from $rnu_cat_tablename;"; 818 $results = $wpdb->get_results($sql); 819 $rows_total = $wpdb->num_rows; 820 821 if ($oldSingleCategoryId != false ) { 822 if ($rows_total == 0) { 823 //does not appear that user has set categories (but could have deselected all) 824 if (!is_array($oldSingleCategoryId)) { 825 $oldSingleCategoryId = (int) $oldSingleCategoryId; // make sure it is a number 826 // echo "<br/> need to update categories with $oldSingleCategoryId <br/>"; 827 $this->rnudb_addCategory($oldSingleCategoryId); 828 } else { 829 // echo "<br/> looks like old single category is an array <br/>"; 830 } 831 } else { 832 // echo "<br/> Looks like categories have already been chosen <br/>"; 833 } 834 } else { 835 // \ echo "<br/> Looks as though category option has not been set at all <br/>"; 836 } 806 837 807 838 update_option('rnu_plugin_version', $this->rnu_plugin_version); // update to the current version regardless of existing version whihc has already been checked. -
read-and-understood/trunk/readme.txt
r1780467 r1781539 5 5 Requires at least: 3.0 6 6 7 Stable tag: 1. 87 Stable tag: 1.9 8 8 9 9 Tested up to: 4.9 … … 16 16 17 17 == Upgrade Notice == 18 V1.9 attempts to mitigate an error whereby users of the plugin using a version earlier than V1.7 may have 19 had lost their category selections. Please go into Settings => Read and Understood from your WP-Admin page 20 and ensure that the categories that you what acknowleged are in fact selected. 21 18 22 Now allows the use of a shortcode [rnu_ack] which will add the READ AND UNDERSTOOD button to any post regardless of category selecte. 19 23
Note: See TracChangeset
for help on using the changeset viewer.