Skip to content
This repository was archived by the owner on Mar 14, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .jshintignore

This file was deleted.

3 changes: 3 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions adblock-notify-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ] ) ) {
Expand All @@ -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();
Expand Down
20 changes: 20 additions & 0 deletions adblock-notify-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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' );
}
}
}
}
2 changes: 1 addition & 1 deletion adblock-notify-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<img src="' . AN_URL . 'img/icon-bweb.svg" class="bweb-logo" alt="addblock-notify" style="display:none"/>&nbsp;&nbsp;' . __( 'Adblock Notify Stats', 'an-translate' ), 'an_get_counters' );
wp_add_dashboard_widget( 'an_dashboard_widgets', '<img src="' . AN_URL . 'img/icon-adblock-notify.png" class="bweb-logo" alt="addblock-notify" style="display:none"/>&nbsp;&nbsp;' . __( '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
Expand Down
8 changes: 5 additions & 3 deletions adblock-notify.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down Expand Up @@ -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 '<link rel="shortcut icon" href="' . $favicon_url . '" />';
}

Expand Down
2 changes: 1 addition & 1 deletion css/an-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
24 changes: 14 additions & 10 deletions languages/an-translate.pot
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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 ""

Expand Down Expand Up @@ -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 ""

Expand Down Expand Up @@ -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 ""

Expand All @@ -756,7 +756,7 @@ msgstr ""
msgid "Reset Stats"
msgstr ""

#: adblock-notify.php:207
#: adblock-notify.php:209
msgid "More Plugins"
msgstr ""

Expand Down Expand Up @@ -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 ""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adblock-notify-by-bweb",
"version": "2.0.0",
"version": "2.0.1",
"description": "Adblock Notify plugin",
"repository": {
"type": "git",
Expand Down