Changeset 1190876
- Timestamp:
- 07/01/2015 04:02:27 PM (11 years ago)
- Location:
- wp-custom-widget-area/trunk
- Files:
-
- 12 edited
-
README.txt (modified) (3 diffs)
-
admin/class-wp-custom-widget-area-admin.php (modified) (6 diffs)
-
admin/partials/cwa-admin-display.php (modified) (1 diff)
-
admin/partials/cwa-menu-admin-display.php (modified) (1 diff)
-
includes/class-custom-widget-area.php (modified) (13 diffs)
-
includes/class-wp-custom-widget-area-activator.php (modified) (5 diffs)
-
includes/class-wp-custom-widget-area-deactivator.php (modified) (3 diffs)
-
includes/class-wp-custom-widget-area-i18n.php (modified) (5 diffs)
-
includes/class-wp-custom-widget-area-loader.php (modified) (8 diffs)
-
includes/config.php (modified) (1 diff)
-
uninstall.php (modified) (1 diff)
-
wp-custom-widget-area.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-custom-widget-area/trunk/README.txt
r1190757 r1190876 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.2.2 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 73 73 == Changelog == 74 74 75 = 1.1.2 = 76 * database bug fix for v 1.1.0 and 1.1.1 77 75 78 = 1.1.1 = 76 79 * database update fix for v 1.1.0 … … 101 104 == Upgrade Notice == 102 105 106 = 1.1.2 = 107 * database bug fix for v 1.1.0 and 1.1.1 108 103 109 = 1.1.1 = 104 110 * database update fix for v 1.1.0 -
wp-custom-widget-area/trunk/admin/class-wp-custom-widget-area-admin.php
r1190756 r1190876 5 5 * 6 6 * @link http://example.com 7 * @since 1.1. 17 * @since 1.1.2 8 8 * 9 9 * @package Custom_Widget_Area … … 29 29 * The ID of this plugin. 30 30 * 31 * @since 1.1. 131 * @since 1.1.2 32 32 * @access private 33 33 * @var string $plugin_name The ID of this plugin. … … 38 38 * The version of this plugin. 39 39 * 40 * @since 1.1. 140 * @since 1.1.2 41 41 * @access private 42 42 * @var string $version The current version of this plugin. … … 47 47 * Initialize the class and set its properties. 48 48 * 49 * @since 1.1. 149 * @since 1.1.2 50 50 * @var string $plugin_name The name of this plugin. 51 51 * @var string $version The version of this plugin. … … 356 356 * Register the stylesheets for the Dashboard. 357 357 * 358 * @since 1.1. 1358 * @since 1.1.2 359 359 */ 360 360 public function enqueue_styles() { … … 379 379 * Register the JavaScript for the dashboard. 380 380 * 381 * @since 1.1. 1381 * @since 1.1.2 382 382 */ 383 383 public function enqueue_scripts() { -
wp-custom-widget-area/trunk/admin/partials/cwa-admin-display.php
r1190756 r1190876 7 7 * 8 8 * @link http://example.com 9 * @since 1.1. 19 * @since 1.1.2 10 10 * 11 11 * @package Custom_Widget_Area -
wp-custom-widget-area/trunk/admin/partials/cwa-menu-admin-display.php
r1190756 r1190876 7 7 * 8 8 * @link http://example.com 9 * @since 1.1. 19 * @since 1.1.2 10 10 * 11 11 * @package Custom_Widget_Area -
wp-custom-widget-area/trunk/includes/class-custom-widget-area.php
r1190756 r1190876 8 8 * 9 9 * @link http://example.com 10 * @since 1.1. 110 * @since 1.1.2 11 11 * 12 12 * @package Custom_Widget_Area … … 23 23 * version of the plugin. 24 24 * 25 * @since 1.1. 125 * @since 1.1.2 26 26 * @package Custom_Widget_Area 27 27 * @subpackage Custom_Widget_Area/includes … … 34 34 * the plugin. 35 35 * 36 * @since 1.1. 136 * @since 1.1.2 37 37 * @access protected 38 38 * @var Custom_Widget_Area_Loader $loader Maintains and registers all hooks for the plugin. … … 43 43 * The unique identifier of this plugin. 44 44 * 45 * @since 1.1. 145 * @since 1.1.2 46 46 * @access protected 47 47 * @var string $plugin_name The string used to uniquely identify this plugin. … … 52 52 * The current version of the plugin. 53 53 * 54 * @since 1.1. 154 * @since 1.1.2 55 55 * @access protected 56 56 * @var string $version The current version of the plugin. … … 65 65 * the public-facing side of the site. 66 66 * 67 * @since 1.1. 167 * @since 1.1.2 68 68 */ 69 69 public function __construct() { 70 70 71 71 $this->plugin_name = 'wp-custom-widget-area'; 72 $this->version = '1.1. 1';72 $this->version = '1.1.2'; 73 73 74 74 $this->load_dependencies(); … … 92 92 * with WordPress. 93 93 * 94 * @since 1.1. 194 * @since 1.1.2 95 95 * @access private 96 96 */ … … 126 126 * with WordPress. 127 127 * 128 * @since 1.1. 1128 * @since 1.1.2 129 129 * @access private 130 130 */ … … 142 142 * of the plugin. 143 143 * 144 * @since 1.1. 1144 * @since 1.1.2 145 145 * @access private 146 146 */ … … 189 189 * Run the loader to execute all of the hooks with WordPress. 190 190 * 191 * @since 1.1. 1191 * @since 1.1.2 192 192 */ 193 193 public function run() { … … 199 199 * WordPress and to define internationalization functionality. 200 200 * 201 * @since 1.1. 1201 * @since 1.1.2 202 202 * @return string The name of the plugin. 203 203 */ … … 209 209 * The reference to the class that orchestrates the hooks with the plugin. 210 210 * 211 * @since 1.1. 1211 * @since 1.1.2 212 212 * @return Custom_Widget_Area_Loader Orchestrates the hooks of the plugin. 213 213 */ … … 219 219 * Retrieve the version number of the plugin. 220 220 * 221 * @since 1.1. 1221 * @since 1.1.2 222 222 * @return string The version number of the plugin. 223 223 */ -
wp-custom-widget-area/trunk/includes/class-wp-custom-widget-area-activator.php
r1190756 r1190876 5 5 * 6 6 * @link http://example.com 7 * @since 1.1. 17 * @since 1.1.2 8 8 * 9 9 * @package Custom_Widget_Area … … 16 16 * This class defines all code necessary to run during the plugin's activation. 17 17 * 18 * @since 1.1. 118 * @since 1.1.2 19 19 * @package Custom_Widget_Area 20 20 * @subpackage Custom_Widget_Area/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1.1. 130 * @since 1.1.2 31 31 */ 32 32 public static function activate() { … … 37 37 38 38 private function install_db(){ 39 global $wpdb; 40 $kz_db_version = '1.0'; 41 $table_name = $wpdb->prefix . 'cwa'; 42 $charset_collate = ''; 39 global $wpdb, $kz_db_version, $table_name, $charset_collate; 43 40 44 41 if ( ! empty( $wpdb->charset ) ) { … … 67 64 dbDelta( $sql ); 68 65 69 add_option( 'kz_db_version', $kz_db_version ); 66 if ( get_option('kz_db_version') != $kz_db_version ) { 67 update_option( 'kz_db_version', $kz_db_version ); 68 }else{ 69 add_option( 'kz_db_version', $kz_db_version ); 70 } 70 71 } 71 72 -
wp-custom-widget-area/trunk/includes/class-wp-custom-widget-area-deactivator.php
r1190756 r1190876 5 5 * 6 6 * @link http://example.com 7 * @since 1.1. 17 * @since 1.1.2 8 8 * 9 9 * @package Custom_Widget_Area … … 16 16 * This class defines all code necessary to run during the plugin's deactivation. 17 17 * 18 * @since 1.1. 118 * @since 1.1.2 19 19 * @package Custom_Widget_Area 20 20 * @subpackage Custom_Widget_Area/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1.1. 130 * @since 1.1.2 31 31 */ 32 32 public static function deactivate() { -
wp-custom-widget-area/trunk/includes/class-wp-custom-widget-area-i18n.php
r1190756 r1190876 8 8 * 9 9 * @link http://example.com 10 * @since 1.1. 110 * @since 1.1.2 11 11 * 12 12 * @package Custom_Widget_Area … … 20 20 * so that its ready for translation. 21 21 * 22 * @since 1.1. 122 * @since 1.1.2 23 23 * @package Custom_Widget_Area 24 24 * @subpackage Custom_Widget_Area/includes … … 30 30 * The domain specified for this plugin. 31 31 * 32 * @since 1.1. 132 * @since 1.1.2 33 33 * @access private 34 34 * @var string $domain The domain identifier for this plugin. … … 39 39 * Load the plugin text domain for translation. 40 40 * 41 * @since 1.1. 141 * @since 1.1.2 42 42 */ 43 43 public function load_plugin_textdomain() { … … 54 54 * Set the domain equal to that of the specified domain. 55 55 * 56 * @since 1.1. 156 * @since 1.1.2 57 57 * @param string $domain The domain that represents the locale of this plugin. 58 58 */ -
wp-custom-widget-area/trunk/includes/class-wp-custom-widget-area-loader.php
r1190756 r1190876 5 5 * 6 6 * @link http://example.com 7 * @since 1.1. 17 * @since 1.1.2 8 8 * 9 9 * @package Custom_Widget_Area … … 27 27 * The array of actions registered with WordPress. 28 28 * 29 * @since 1.1. 129 * @since 1.1.2 30 30 * @access protected 31 31 * @var array $actions The actions registered with WordPress to fire when the plugin loads. … … 36 36 * The array of filters registered with WordPress. 37 37 * 38 * @since 1.1. 138 * @since 1.1.2 39 39 * @access protected 40 40 * @var array $filters The filters registered with WordPress to fire when the plugin loads. … … 45 45 * Initialize the collections used to maintain the actions and filters. 46 46 * 47 * @since 1.1. 147 * @since 1.1.2 48 48 */ 49 49 public function __construct() { … … 57 57 * Add a new action to the collection to be registered with WordPress. 58 58 * 59 * @since 1.1. 159 * @since 1.1.2 60 60 * @var string $hook The name of the WordPress action that is being registered. 61 61 * @var object $component A reference to the instance of the object on which the action is defined. … … 71 71 * Add a new filter to the collection to be registered with WordPress. 72 72 * 73 * @since 1.1. 173 * @since 1.1.2 74 74 * @var string $hook The name of the WordPress filter that is being registered. 75 75 * @var object $component A reference to the instance of the object on which the filter is defined. … … 86 86 * collection. 87 87 * 88 * @since 1.1. 188 * @since 1.1.2 89 89 * @access private 90 90 * @var array $hooks The collection of hooks that is being registered (that is, actions or filters). … … 113 113 * Register the filters and actions with WordPress. 114 114 * 115 * @since 1.1. 1115 * @since 1.1.2 116 116 */ 117 117 public function run() { -
wp-custom-widget-area/trunk/includes/config.php
r1190756 r1190876 1 1 <?php 2 2 /*plugin configs*/ 3 $kz_db_version = '1.1. 1';3 $kz_db_version = '1.1.2'; 4 4 $table_name = $wpdb->prefix . 'cwa'; 5 5 $charset_collate = ''; -
wp-custom-widget-area/trunk/uninstall.php
r1190664 r1190876 21 21 * 22 22 * @link http://example.com 23 * @since 1.1. 023 * @since 1.1.2 24 24 * 25 25 * @package Custom_Widget_Area -
wp-custom-widget-area/trunk/wp-custom-widget-area.php
r1190756 r1190876 17 17 * Plugin URI: http://kishorkhambu.com.np/plugins/ 18 18 * Description: A wordpress plugin to create custom dynamic widget area. 19 * Version: 1.1. 119 * Version: 1.1.2 20 20 * Author: Kishor Khambu 21 21 * Author URI: http://kishorkhambu.com.np … … 63 63 * not affect the page life cycle. 64 64 * 65 * @since 1.1. 165 * @since 1.1.2 66 66 */ 67 67 function run_plugin_name() { … … 78 78 79 79 // db fix for new version 80 function db_update(){80 /*function db_update(){ 81 81 global $wpdb; 82 82 $table_name = 'wp_cwa'; 83 if( !!! $session_id)83 if( (phpversion() < 5.4 && !!! session_id()) || (phpversion() > 5.3 && !!!session_status() == PHP_SESSION_NONE)) 84 84 session_start(); 85 85 … … 101 101 } 102 102 103 db_update(); 103 db_update();*/ 104 105 106 function myplugin_update_db_check() { 107 global $kz_db_version, $wpdb, $table_name; 108 if ( get_site_option( 'kz_db_version' ) != $kz_db_version ) { 109 Custom_Widget_Area_Activator::activate(); 110 $x = $wpdb->query("ALTER TABLE $table_name ADD cwa_type varchar (10) "); 111 $updaterow = $wpdb->get_results( "SELECT id FROM $table_name"); 112 foreach ($updaterow as $data) { 113 # code... 114 $up = $wpdb->update($table_name, array('cwa_type'=> 'widget'), array('id'=>$data->id)); 115 } 116 } 117 } 118 add_action( 'plugins_loaded', 'myplugin_update_db_check' ); 119 120
Note: See TracChangeset
for help on using the changeset viewer.