diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 665cce0..0000000
--- a/.jshintignore
+++ /dev/null
@@ -1,3 +0,0 @@
-lib/**/*.js
-vendor/**/*.js
-**/*.min.js
\ No newline at end of file
diff --git a/README.txt b/README.txt
index 3054f99..63cc615 100644
--- a/README.txt
+++ b/README.txt
@@ -128,6 +128,9 @@ If you don't have any caching/minify plugin, it is mostly due to your theme whic
== Changelog ==
+= 2.0.1 =
+* Fixed comptibility issues for users on upgrade
+
= 2.0.0 =
* Tested on WP 4.6.1 with success!
* Added compatibility with pro plugin
diff --git a/adblock-notify-files.php b/adblock-notify-files.php
index e84955e..0662832 100644
--- a/adblock-notify-files.php
+++ b/adblock-notify-files.php
@@ -50,7 +50,7 @@ function an_change_files_css_selectors( $flush, $tempFolderPath, $tempFolderURL,
$fileContent = str_replace( $defaultSelectors, $oldSelectors, $fileContent );
}
-
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
// Load WP_Filesystem API
WP_Filesystem();
global $wp_filesystem;
@@ -93,7 +93,7 @@ function an_change_files_css_selectors( $flush, $tempFolderPath, $tempFolderURL,
* ************************************************************
* Save scripts and styles with new random selectors after saving Titan Options
***************************************************************/
-function an_save_setting_random_selectors() {
+function an_save_setting_random_selectors( $force = false ) {
// Restart cookie on every options save.
if ( isset( $_COOKIE[ AN_COOKIE ] ) ) {
@@ -103,7 +103,7 @@ function an_save_setting_random_selectors() {
$an_option = unserialize( an_get_option( 'adblocker_notify_options' ) );
$anScripts = unserialize( an_get_option( 'adblocker_notify_selectors' ) );
- if ( true == $an_option['an_option_selectors'] ) {
+ if ( true == $an_option['an_option_selectors'] || $force ) {
// Define new temp path
$uploadDir = wp_upload_dir();
diff --git a/adblock-notify-functions.php b/adblock-notify-functions.php
index 56d9dea..b2fc673 100644
--- a/adblock-notify-functions.php
+++ b/adblock-notify-functions.php
@@ -375,6 +375,7 @@ function an_check_key( $key ) {
'adblocker_notify_options',
'adblocker_notify_selectors',
'adblocker_notify_counter',
+ 'adblocker_upgrade_200',
);
return in_array( $key, $all_keys );
@@ -480,3 +481,22 @@ function an_build_selected_template() {
return ob_get_clean();
}
+
+
+add_action( 'an_upgrade_routine','an_upgrade_routine_200' );
+/**
+ * Upgrade routine from version <= 2.0.1
+ */
+function an_upgrade_routine_200() {
+ if ( version_compare( AN_VERSION,'2.0.1' ) < 1 ) {
+ $upgrade = an_get_option( 'adblocker_upgrade_200','no' );
+ if ( $upgrade != 'yes' ) {
+ $anTempDir = unserialize( an_get_option( 'adblocker_notify_selectors' ) );
+ if ( isset( $anTempDir['temp-path'] ) ) {
+ an_delete_temp_folder( $anTempDir['temp-path'] );
+ an_save_setting_random_selectors( true );
+ an_update_option( 'adblocker_upgrade_200','yes' );
+ }
+ }
+ }
+}
diff --git a/adblock-notify-widget.php b/adblock-notify-widget.php
index 0e8392f..33e35ff 100644
--- a/adblock-notify-widget.php
+++ b/adblock-notify-widget.php
@@ -18,7 +18,7 @@
function an_dashboard_widgets() {
$an_option = TitanFramework::getInstance( 'adblocker_notify' );
if ( isset( $an_option ) && $an_option->getOption( 'an_option_stats' ) != 2 ) {
- wp_add_dashboard_widget( 'an_dashboard_widgets', '
' . __( 'Adblock Notify Stats', 'an-translate' ), 'an_get_counters' );
+ wp_add_dashboard_widget( 'an_dashboard_widgets', '
' . __( 'Adblock Notify Stats', 'an-translate' ), 'an_get_counters' );
// Chart JS
wp_enqueue_script( 'an_chart_js', AN_URL . 'vendor/chart-js/Chart.min.js', array( 'jquery' ), null );
// CSS & JS
diff --git a/adblock-notify.php b/adblock-notify.php
index ae8e810..76a8dbb 100644
--- a/adblock-notify.php
+++ b/adblock-notify.php
@@ -7,7 +7,7 @@
* Plugin Name: Adblock Notify Lite
* Plugin URI: http://themeisle.com/plugins/adblock-notify-lite/
* Description: An Adblock detection and nofitication plugin with get around options and a lot of settings. Dashboard widget with adblock counter included!
- * Version: 2.0.0
+ * Version: 2.0.1
* Author: Themeisle
* Author URI: http://themeisle.com
* Text Domain: an-translate
@@ -47,7 +47,7 @@
define( 'AN_COOKIE', 'anCookie' );
}
if ( ! defined( 'AN_VERSION' ) ) {
- define( 'AN_VERSION', '2.0.0' );
+ define( 'AN_VERSION', '2.0.1' );
}
if ( ! defined( 'AN_TEMP_DEVELOPMENT' ) ) {
define( 'AN_TEMP_DEVELOPMENT', false );
@@ -68,6 +68,8 @@
function an_translate_load_textdomain() {
$path = basename( dirname( __FILE__ ) ) . '/languages/';
load_plugin_textdomain( 'an-translate', false, $path );
+
+ do_action( 'an_upgrade_routine' );
}
add_action( 'plugins_loaded', 'an_translate_load_textdomain', 1 );
@@ -225,7 +227,7 @@ function an_add_favicon() {
return;
}
- $favicon_url = AN_URL . 'img/icon-bweb.svg';
+ $favicon_url = AN_URL . 'img/icon-adblock-notify.png';
echo '';
}
diff --git a/css/an-style.css b/css/an-style.css
index 01b78eb..4e91956 100644
--- a/css/an-style.css
+++ b/css/an-style.css
@@ -2,7 +2,7 @@
an_style.css
AdBlock Notify
Copyright: (c) 2016 Themeisle, themeisle.com
- Version: 2.0.0
+ Version: 2.0.1
*/
.reveal-modal-bg {
display: none;
diff --git a/languages/an-translate.pot b/languages/an-translate.pot
index 3b76887..546e473 100644
--- a/languages/an-translate.pot
+++ b/languages/an-translate.pot
@@ -1,11 +1,11 @@
# Copyright (C) 2016 Themeisle
-# This file is distributed under the same license as the Adblock Notify package.
+# This file is distributed under the same license as the Adblock Notify Lite package.
msgid ""
msgstr ""
-"Project-Id-Version: Adblock Notify 1.9.2\n"
+"Project-Id-Version: Adblock Notify Lite 2.0.0\n"
"Report-Msgid-Bugs-To: "
"https://github.com/Codeinwp/adblock-notify-by-bweb/issues\n"
-"POT-Creation-Date: 2016-10-21 15:02:38+00:00\n"
+"POT-Creation-Date: 2016-10-24 12:43:37+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -39,19 +39,19 @@ msgid ""
"change your uploads directory CHMOD."
msgstr ""
-#: adblock-notify-functions.php:414
+#: adblock-notify-functions.php:423
msgid "Show your love"
msgstr ""
-#: adblock-notify-functions.php:417
+#: adblock-notify-functions.php:426
msgid "Leave A Review"
msgstr ""
-#: adblock-notify-functions.php:423
+#: adblock-notify-functions.php:432
msgid "Buy now"
msgstr ""
-#: adblock-notify-functions.php:426
+#: adblock-notify-functions.php:435
msgid "Multi-Site Support"
msgstr ""
@@ -115,7 +115,7 @@ msgstr ""
msgid "You can easily switch between them without losing your options."
msgstr ""
-#. Plugin Name of the plugin/theme
+#: adblock-notify-options.php:79
msgid "Adblock Notify"
msgstr ""
@@ -744,7 +744,7 @@ msgstr ""
msgid "You may probably increase this number by improving your custom messages"
msgstr ""
-#: adblock-notify-widget.php:231 adblock-notify.php:192
+#: adblock-notify-widget.php:231 adblock-notify.php:194
msgid "Settings"
msgstr ""
@@ -756,7 +756,7 @@ msgstr ""
msgid "Reset Stats"
msgstr ""
-#: adblock-notify.php:207
+#: adblock-notify.php:209
msgid "More Plugins"
msgstr ""
@@ -1017,6 +1017,10 @@ msgstr ""
msgid "Issue Tracker"
msgstr ""
+#. Plugin Name of the plugin/theme
+msgid "Adblock Notify Lite"
+msgstr ""
+
#. Plugin URI of the plugin/theme
msgid "http://themeisle.com/plugins/adblock-notify-lite/"
msgstr ""
diff --git a/package.json b/package.json
index aec7bfe..a4ba3af 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "adblock-notify-by-bweb",
- "version": "2.0.0",
+ "version": "2.0.1",
"description": "Adblock Notify plugin",
"repository": {
"type": "git",