From 68a5820794451b3c479fd058a6ec00035e0ce85f Mon Sep 17 00:00:00 2001 From: Sayan Datta Date: Sat, 21 May 2022 20:16:19 +0530 Subject: [PATCH 1/5] Fix Admin Notice error --- .distignore | 1 + .github/workflows/deploy-assets.yml | 23 ------------------ inc/Base/AdminNotice.php | 37 ++++++++++++++--------------- inc/Base/Deactivate.php | 2 ++ readme.txt | 7 +++++- templates/admin.php | 2 +- wp-last-modified-info.php | 2 +- 7 files changed, 29 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/deploy-assets.yml diff --git a/.distignore b/.distignore index 8585d19..3081cf9 100644 --- a/.distignore +++ b/.distignore @@ -15,6 +15,7 @@ _config.yml .distignore +.editorconfig .gitignore CHANGELOG.md composer.json diff --git a/.github/workflows/deploy-assets.yml b/.github/workflows/deploy-assets.yml deleted file mode 100644 index d03ec5c..0000000 --- a/.github/workflows/deploy-assets.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Plugin asset/readme update - -on: - push: - branches: - - master - -jobs: - deploy: - name: Update plugin and assets - runs-on: ubuntu-latest - environment: wp.org plugin - - steps: - - name: Check out Git repository - uses: actions/checkout@master - - - name: WordPress.org plugin asset/readme update - uses: 10up/action-wordpress-plugin-asset-update@master - env: - SVN_USERNAME: ${{ secrets.SVN_USERNAME }} - SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - IGNORE_OTHER_FILES: true diff --git a/inc/Base/AdminNotice.php b/inc/Base/AdminNotice.php index c151513..76f28af 100644 --- a/inc/Base/AdminNotice.php +++ b/inc/Base/AdminNotice.php @@ -110,6 +110,22 @@ public function notice() { * Dismiss admin notices. */ public function dismiss_notice() { + // Check for Rating Notice + if ( get_option( 'wplmi_plugin_no_thanks_rating_notice' ) === '1' ) { + if ( get_option( 'wplmi_plugin_dismissed_time' ) <= strtotime( '-14 days' ) ) { + delete_option( 'wplmi_plugin_dismiss_rating_notice' ); + delete_option( 'wplmi_plugin_no_thanks_rating_notice' ); + } + } + + // Check for Donate Notice + if ( get_option( 'wplmi_plugin_no_thanks_donate_notice' ) === '1' ) { + if ( get_option( 'wplmi_plugin_dismissed_time_donate' ) <= strtotime( '-15 days' ) ) { + delete_option( 'wplmi_plugin_dismiss_donate_notice' ); + delete_option( 'wplmi_plugin_no_thanks_donate_notice' ); + } + } + if ( ! isset( $_REQUEST['wplmi_notice_action'] ) || empty( $_REQUEST['wplmi_notice_action'] ) ) { return; } @@ -119,26 +135,9 @@ public function dismiss_notice() { $notice = sanitize_text_field( $_REQUEST['wplmi_notice_action'] ); $notice = explode( '_', $notice ); $notice_type = end( $notice ); - $notice_action = join( '_', array_pop( $notice ) ); + array_pop( $notice ); + $notice_action = join( '_', $notice ); - // Check for Rating Notice - if ( get_option( 'wplmi_plugin_no_thanks_rating_notice' ) === '1' ) { - if ( get_option( 'wplmi_plugin_dismissed_time' ) > strtotime( '-14 days' ) ) { - return; - } - delete_option( 'wplmi_plugin_dismiss_rating_notice' ); - delete_option( 'wplmi_plugin_no_thanks_rating_notice' ); - } - - // Check for Donate Notice - if ( get_option( 'wplmi_plugin_no_thanks_donate_notice' ) === '1' ) { - if ( get_option( 'wplmi_plugin_dismissed_time_donate' ) > strtotime( '-15 days' ) ) { - return; - } - delete_option( 'wplmi_plugin_dismiss_donate_notice' ); - delete_option( 'wplmi_plugin_no_thanks_donate_notice' ); - } - if ( 'dismiss' === $notice_action ) { update_option( 'wplmi_plugin_dismiss_' . $notice_type . '_notice', '1' ); } diff --git a/inc/Base/Deactivate.php b/inc/Base/Deactivate.php index d396fb0..a704663 100644 --- a/inc/Base/Deactivate.php +++ b/inc/Base/Deactivate.php @@ -24,7 +24,9 @@ public static function deactivate() { } delete_option( 'wplmi_plugin_dismiss_rating_notice' ); + delete_option( 'wplmi_plugin_dismiss_donate_notice' ); delete_option( 'wplmi_plugin_no_thanks_rating_notice' ); + delete_option( 'wplmi_plugin_no_thanks_donate_notice' ); delete_option( 'wplmi_plugin_installed_time' ); delete_option( 'wplmi_plugin_installed_time_donate' ); } diff --git a/readme.txt b/readme.txt index e581997..91e1276 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: infosatech Tags: last modified, timestamp, modified time, post modified, sort by modified, time, date Requires at least: 4.7 Tested up to: 6.0 -Stable tag: 1.8.0 +Stable tag: 1.8.1 Requires PHP: 5.6 Donate link: https://www.paypal.me/iamsayan/ License: GPLv3 @@ -164,6 +164,11 @@ Post detailed information about the issue in the [support forum](https://wordpre If you like WP Last Modified Info, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/wp-last-modified-info/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you! += 1.8.1 = +Release Date: May 22, 2022 + +* Fixed: Notice can't be dismissed. + = 1.8.0 = Release Date: May 21, 2022 diff --git a/templates/admin.php b/templates/admin.php index 54f81fd..5f3a0e7 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -207,7 +207,7 @@

WP Last Modified Info v' . $this->version . '' ); ?>

-

Developed with by Sayan Datta | Hire Me | GitHub | Support | Translate | Rate it (★★★★★) on WordPress.org, if you like this plugin.

+

Developed with by Sayan Datta | Hire Me | GitHub | Support | Translate | Rate it (★★★★★) on WordPress.org, if you like this plugin.

diff --git a/wp-last-modified-info.php b/wp-last-modified-info.php index 810112e..b77f064 100644 --- a/wp-last-modified-info.php +++ b/wp-last-modified-info.php @@ -37,7 +37,7 @@ } // Define constants -define( 'WPLMI_VERSION', '1.8.0' ); +define( 'WPLMI_VERSION', '1.8.1' ); // Require once the Composer Autoload if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) { From 33b55cde578ee37526f96049b0f67d1a5cc11994 Mon Sep 17 00:00:00 2001 From: Sayan Datta Date: Sat, 21 May 2022 20:45:17 +0530 Subject: [PATCH 2/5] Update pot --- composer.json | 10 +++++-- inc/Base/AdminNotice.php | 5 ---- languages/wp-last-modified-info.pot | 22 +++++++------- vendor/composer/autoload_classmap.php | 41 --------------------------- vendor/composer/autoload_static.php | 41 --------------------------- 5 files changed, 18 insertions(+), 101 deletions(-) diff --git a/composer.json b/composer.json index a08c372..8cc0007 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "iamsayan/wp-last-modified-info", - "description": "Adds last modified date and time automatically on pages and posts very easily. It is possible to use shortcodes to display last modified info anywhere on a WordPress site running 4.7 and beyond.", + "description": "Ultimate Last Modified Plugin for WordPress with Gutenberg Block Integration. It is possible to use shortcodes to display last modified info anywhere on a WordPress site running 4.7 and beyond.", "type": "wordpress-plugin", "license": "GPL-3.0", "authors": [ @@ -31,13 +31,17 @@ }, "scripts": { "build": [ - "composer dump-autoload -o" + "composer dump-autoload" ], "analyze": [ "clear", "vendor/bin/phpstan analyze inc wp-last-modified-info.php" - ] + ], + "pot" : [ + "wp i18n make-pot . languages/wp-last-modified-info.pot --exclude=\"/vendor,/assets,/blocks\"" + ] }, + "optimize-autoloader": true, "require": { "deliciousbrains/wp-background-processing": "^1.0" } diff --git a/inc/Base/AdminNotice.php b/inc/Base/AdminNotice.php index 76f28af..dd5853d 100644 --- a/inc/Base/AdminNotice.php +++ b/inc/Base/AdminNotice.php @@ -22,11 +22,6 @@ class AdminNotice extends BaseController { use Hooker; - /** - * Notice. - */ - private $notice; - /** * Register functions. */ diff --git a/languages/wp-last-modified-info.pot b/languages/wp-last-modified-info.pot index 51f5dd7..27d350f 100644 --- a/languages/wp-last-modified-info.pot +++ b/languages/wp-last-modified-info.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2022-05-21T06:08:21+00:00\n" +"POT-Creation-Date: 2022-05-21T15:14:58+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.5.0\n" "X-Domain: wp-last-modified-info\n" @@ -302,41 +302,41 @@ msgstr "" msgid "Use these tags. Available Dynamic Tags" msgstr "" -#: inc/Base/AdminNotice.php:52 +#: inc/Base/AdminNotice.php:47 msgid "Your version of PHP is below the minimum version of PHP required by WP Last Modified Info plugin. Please contact your host and request that your version be upgraded to 5.6 or later." msgstr "" #. translators: %s: 1. Plugin Name, 2. Version, 3. Link -#: inc/Base/AdminNotice.php:61 +#: inc/Base/AdminNotice.php:56 msgid "Thanks for installing %1$s v%2$s plugin. Click here to configure plugin settings." msgstr "" -#: inc/Base/AdminNotice.php:79 +#: inc/Base/AdminNotice.php:74 msgid "Ok, you deserve it" msgstr "" -#: inc/Base/AdminNotice.php:80 +#: inc/Base/AdminNotice.php:75 msgid "I already did" msgstr "" -#: inc/Base/AdminNotice.php:81 -#: inc/Base/AdminNotice.php:102 +#: inc/Base/AdminNotice.php:76 +#: inc/Base/AdminNotice.php:97 msgid "Nope, maybe later" msgstr "" -#: inc/Base/AdminNotice.php:82 +#: inc/Base/AdminNotice.php:77 msgid "I don't want to rate" msgstr "" -#: inc/Base/AdminNotice.php:100 +#: inc/Base/AdminNotice.php:95 msgid "Donate Now" msgstr "" -#: inc/Base/AdminNotice.php:101 +#: inc/Base/AdminNotice.php:96 msgid "I already donated" msgstr "" -#: inc/Base/AdminNotice.php:103 +#: inc/Base/AdminNotice.php:98 msgid "I don't want to donate" msgstr "" diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index aae17e1..097728c 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -9,45 +9,4 @@ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'WP_Async_Request' => $vendorDir . '/deliciousbrains/wp-background-processing/classes/wp-async-request.php', 'WP_Background_Process' => $vendorDir . '/deliciousbrains/wp-background-processing/classes/wp-background-process.php', - 'Wplmi\\Api\\Callbacks\\AdminCallbacks' => $baseDir . '/inc/Api/Callbacks/AdminCallbacks.php', - 'Wplmi\\Api\\Callbacks\\ManagerCallbacks' => $baseDir . '/inc/Api/Callbacks/ManagerCallbacks.php', - 'Wplmi\\Api\\SettingsApi' => $baseDir . '/inc/Api/SettingsApi.php', - 'Wplmi\\Base\\Activate' => $baseDir . '/inc/Base/Activate.php', - 'Wplmi\\Base\\AdminNotice' => $baseDir . '/inc/Base/AdminNotice.php', - 'Wplmi\\Base\\BaseController' => $baseDir . '/inc/Base/BaseController.php', - 'Wplmi\\Base\\Deactivate' => $baseDir . '/inc/Base/Deactivate.php', - 'Wplmi\\Base\\Enqueue' => $baseDir . '/inc/Base/Enqueue.php', - 'Wplmi\\Base\\Localization' => $baseDir . '/inc/Base/Localization.php', - 'Wplmi\\Base\\MiscActions' => $baseDir . '/inc/Base/MiscActions.php', - 'Wplmi\\Base\\PluginTools' => $baseDir . '/inc/Base/PluginTools.php', - 'Wplmi\\Base\\Uninstall' => $baseDir . '/inc/Base/Uninstall.php', - 'Wplmi\\Core\\AdminBar' => $baseDir . '/inc/Core/AdminBar.php', - 'Wplmi\\Core\\Backend\\AdminColumn' => $baseDir . '/inc/Core/Backend/AdminColumn.php', - 'Wplmi\\Core\\Backend\\BlockEditor' => $baseDir . '/inc/Core/Backend/BlockEditor.php', - 'Wplmi\\Core\\Backend\\DashboardWidget' => $baseDir . '/inc/Core/Backend/DashboardWidget.php', - 'Wplmi\\Core\\Backend\\EditScreen' => $baseDir . '/inc/Core/Backend/EditScreen.php', - 'Wplmi\\Core\\Backend\\MetaBox' => $baseDir . '/inc/Core/Backend/MetaBox.php', - 'Wplmi\\Core\\Backend\\MiscActions' => $baseDir . '/inc/Core/Backend/MiscActions.php', - 'Wplmi\\Core\\Backend\\PluginsData' => $baseDir . '/inc/Core/Backend/PluginsData.php', - 'Wplmi\\Core\\Backend\\PostStatusFilters' => $baseDir . '/inc/Core/Backend/PostStatusFilters.php', - 'Wplmi\\Core\\Backend\\UserColumn' => $baseDir . '/inc/Core/Backend/UserColumn.php', - 'Wplmi\\Core\\Blocks' => $baseDir . '/inc/Core/Blocks.php', - 'Wplmi\\Core\\Elementor\\Loader' => $baseDir . '/inc/Core/Elementor/Loader.php', - 'Wplmi\\Core\\Elementor\\Modules\\AuthorName' => $baseDir . '/inc/Core/Elementor/Modules/AuthorName.php', - 'Wplmi\\Core\\Elementor\\Modules\\AuthorUrl' => $baseDir . '/inc/Core/Elementor/Modules/AuthorUrl.php', - 'Wplmi\\Core\\Elementor\\Modules\\ModifiedDate' => $baseDir . '/inc/Core/Elementor/Modules/ModifiedDate.php', - 'Wplmi\\Core\\Elementor\\Modules\\ModifiedTime' => $baseDir . '/inc/Core/Elementor/Modules/ModifiedTime.php', - 'Wplmi\\Core\\Frontend\\PostView' => $baseDir . '/inc/Core/Frontend/PostView.php', - 'Wplmi\\Core\\Frontend\\Schema' => $baseDir . '/inc/Core/Frontend/Schema.php', - 'Wplmi\\Core\\Frontend\\Shortcode' => $baseDir . '/inc/Core/Frontend/Shortcode.php', - 'Wplmi\\Core\\Frontend\\TemplateTags' => $baseDir . '/inc/Core/Frontend/TemplateTags.php', - 'Wplmi\\Core\\Notification' => $baseDir . '/inc/Core/Notification.php', - 'Wplmi\\Core\\RestApi' => $baseDir . '/inc/Core/RestApi.php', - 'Wplmi\\Helpers\\Ajax' => $baseDir . '/inc/Helpers/Ajax.php', - 'Wplmi\\Helpers\\Fields' => $baseDir . '/inc/Helpers/Fields.php', - 'Wplmi\\Helpers\\HelperFunctions' => $baseDir . '/inc/Helpers/HelperFunctions.php', - 'Wplmi\\Helpers\\Hooker' => $baseDir . '/inc/Helpers/Hooker.php', - 'Wplmi\\Helpers\\SettingsData' => $baseDir . '/inc/Helpers/SettingsData.php', - 'Wplmi\\Loader' => $baseDir . '/inc/Loader.php', - 'Wplmi\\Pages\\Dashboard' => $baseDir . '/inc/Pages/Dashboard.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 5f2b8da..2955ff6 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -28,47 +28,6 @@ class ComposerStaticInit864e9b664caffe9d69b14c441bfd3b88 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'WP_Async_Request' => __DIR__ . '/..' . '/deliciousbrains/wp-background-processing/classes/wp-async-request.php', 'WP_Background_Process' => __DIR__ . '/..' . '/deliciousbrains/wp-background-processing/classes/wp-background-process.php', - 'Wplmi\\Api\\Callbacks\\AdminCallbacks' => __DIR__ . '/../..' . '/inc/Api/Callbacks/AdminCallbacks.php', - 'Wplmi\\Api\\Callbacks\\ManagerCallbacks' => __DIR__ . '/../..' . '/inc/Api/Callbacks/ManagerCallbacks.php', - 'Wplmi\\Api\\SettingsApi' => __DIR__ . '/../..' . '/inc/Api/SettingsApi.php', - 'Wplmi\\Base\\Activate' => __DIR__ . '/../..' . '/inc/Base/Activate.php', - 'Wplmi\\Base\\AdminNotice' => __DIR__ . '/../..' . '/inc/Base/AdminNotice.php', - 'Wplmi\\Base\\BaseController' => __DIR__ . '/../..' . '/inc/Base/BaseController.php', - 'Wplmi\\Base\\Deactivate' => __DIR__ . '/../..' . '/inc/Base/Deactivate.php', - 'Wplmi\\Base\\Enqueue' => __DIR__ . '/../..' . '/inc/Base/Enqueue.php', - 'Wplmi\\Base\\Localization' => __DIR__ . '/../..' . '/inc/Base/Localization.php', - 'Wplmi\\Base\\MiscActions' => __DIR__ . '/../..' . '/inc/Base/MiscActions.php', - 'Wplmi\\Base\\PluginTools' => __DIR__ . '/../..' . '/inc/Base/PluginTools.php', - 'Wplmi\\Base\\Uninstall' => __DIR__ . '/../..' . '/inc/Base/Uninstall.php', - 'Wplmi\\Core\\AdminBar' => __DIR__ . '/../..' . '/inc/Core/AdminBar.php', - 'Wplmi\\Core\\Backend\\AdminColumn' => __DIR__ . '/../..' . '/inc/Core/Backend/AdminColumn.php', - 'Wplmi\\Core\\Backend\\BlockEditor' => __DIR__ . '/../..' . '/inc/Core/Backend/BlockEditor.php', - 'Wplmi\\Core\\Backend\\DashboardWidget' => __DIR__ . '/../..' . '/inc/Core/Backend/DashboardWidget.php', - 'Wplmi\\Core\\Backend\\EditScreen' => __DIR__ . '/../..' . '/inc/Core/Backend/EditScreen.php', - 'Wplmi\\Core\\Backend\\MetaBox' => __DIR__ . '/../..' . '/inc/Core/Backend/MetaBox.php', - 'Wplmi\\Core\\Backend\\MiscActions' => __DIR__ . '/../..' . '/inc/Core/Backend/MiscActions.php', - 'Wplmi\\Core\\Backend\\PluginsData' => __DIR__ . '/../..' . '/inc/Core/Backend/PluginsData.php', - 'Wplmi\\Core\\Backend\\PostStatusFilters' => __DIR__ . '/../..' . '/inc/Core/Backend/PostStatusFilters.php', - 'Wplmi\\Core\\Backend\\UserColumn' => __DIR__ . '/../..' . '/inc/Core/Backend/UserColumn.php', - 'Wplmi\\Core\\Blocks' => __DIR__ . '/../..' . '/inc/Core/Blocks.php', - 'Wplmi\\Core\\Elementor\\Loader' => __DIR__ . '/../..' . '/inc/Core/Elementor/Loader.php', - 'Wplmi\\Core\\Elementor\\Modules\\AuthorName' => __DIR__ . '/../..' . '/inc/Core/Elementor/Modules/AuthorName.php', - 'Wplmi\\Core\\Elementor\\Modules\\AuthorUrl' => __DIR__ . '/../..' . '/inc/Core/Elementor/Modules/AuthorUrl.php', - 'Wplmi\\Core\\Elementor\\Modules\\ModifiedDate' => __DIR__ . '/../..' . '/inc/Core/Elementor/Modules/ModifiedDate.php', - 'Wplmi\\Core\\Elementor\\Modules\\ModifiedTime' => __DIR__ . '/../..' . '/inc/Core/Elementor/Modules/ModifiedTime.php', - 'Wplmi\\Core\\Frontend\\PostView' => __DIR__ . '/../..' . '/inc/Core/Frontend/PostView.php', - 'Wplmi\\Core\\Frontend\\Schema' => __DIR__ . '/../..' . '/inc/Core/Frontend/Schema.php', - 'Wplmi\\Core\\Frontend\\Shortcode' => __DIR__ . '/../..' . '/inc/Core/Frontend/Shortcode.php', - 'Wplmi\\Core\\Frontend\\TemplateTags' => __DIR__ . '/../..' . '/inc/Core/Frontend/TemplateTags.php', - 'Wplmi\\Core\\Notification' => __DIR__ . '/../..' . '/inc/Core/Notification.php', - 'Wplmi\\Core\\RestApi' => __DIR__ . '/../..' . '/inc/Core/RestApi.php', - 'Wplmi\\Helpers\\Ajax' => __DIR__ . '/../..' . '/inc/Helpers/Ajax.php', - 'Wplmi\\Helpers\\Fields' => __DIR__ . '/../..' . '/inc/Helpers/Fields.php', - 'Wplmi\\Helpers\\HelperFunctions' => __DIR__ . '/../..' . '/inc/Helpers/HelperFunctions.php', - 'Wplmi\\Helpers\\Hooker' => __DIR__ . '/../..' . '/inc/Helpers/Hooker.php', - 'Wplmi\\Helpers\\SettingsData' => __DIR__ . '/../..' . '/inc/Helpers/SettingsData.php', - 'Wplmi\\Loader' => __DIR__ . '/../..' . '/inc/Loader.php', - 'Wplmi\\Pages\\Dashboard' => __DIR__ . '/../..' . '/inc/Pages/Dashboard.php', ); public static function getInitializer(ClassLoader $loader) From 2a20e3712738f95eadebc2f8377be5371006d157 Mon Sep 17 00:00:00 2001 From: Sayan Datta Date: Sat, 21 May 2022 20:50:16 +0530 Subject: [PATCH 3/5] Fix --- inc/Base/AdminNotice.php | 18 ++++++++---------- readme.txt | 7 +------ 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/inc/Base/AdminNotice.php b/inc/Base/AdminNotice.php index dd5853d..d758ed5 100644 --- a/inc/Base/AdminNotice.php +++ b/inc/Base/AdminNotice.php @@ -106,19 +106,17 @@ public function notice() { */ public function dismiss_notice() { // Check for Rating Notice - if ( get_option( 'wplmi_plugin_no_thanks_rating_notice' ) === '1' ) { - if ( get_option( 'wplmi_plugin_dismissed_time' ) <= strtotime( '-14 days' ) ) { - delete_option( 'wplmi_plugin_dismiss_rating_notice' ); - delete_option( 'wplmi_plugin_no_thanks_rating_notice' ); - } + if ( get_option( 'wplmi_plugin_no_thanks_rating_notice' ) === '1' + && get_option( 'wplmi_plugin_dismissed_time' ) <= strtotime( '-14 days' ) ) { + delete_option( 'wplmi_plugin_dismiss_rating_notice' ); + delete_option( 'wplmi_plugin_no_thanks_rating_notice' ); } // Check for Donate Notice - if ( get_option( 'wplmi_plugin_no_thanks_donate_notice' ) === '1' ) { - if ( get_option( 'wplmi_plugin_dismissed_time_donate' ) <= strtotime( '-15 days' ) ) { - delete_option( 'wplmi_plugin_dismiss_donate_notice' ); - delete_option( 'wplmi_plugin_no_thanks_donate_notice' ); - } + if ( get_option( 'wplmi_plugin_no_thanks_donate_notice' ) === '1' + && get_option( 'wplmi_plugin_dismissed_time_donate' ) <= strtotime( '-15 days' ) ) { + delete_option( 'wplmi_plugin_dismiss_donate_notice' ); + delete_option( 'wplmi_plugin_no_thanks_donate_notice' ); } if ( ! isset( $_REQUEST['wplmi_notice_action'] ) || empty( $_REQUEST['wplmi_notice_action'] ) ) { diff --git a/readme.txt b/readme.txt index 91e1276..2c70ff2 100644 --- a/readme.txt +++ b/readme.txt @@ -193,9 +193,4 @@ Release Date: May 21, 2022 = Other Versions = -* View the Changelog file. - -== Upgrade Notice == - -= 1.8.0 = -In this release, we make this plugin compatible with WordPress 6.0. You may need to re-configure your plugin settings once, to get it properly working. \ No newline at end of file +* View the Changelog file. \ No newline at end of file From bdf98bb74e2f9b11f0416cb7e9cbf2e7c44995fa Mon Sep 17 00:00:00 2001 From: Sayan Datta Date: Sun, 22 May 2022 06:24:33 +0530 Subject: [PATCH 4/5] fix --- CHANGELOG.md | 5 +++++ readme.txt | 2 +- wp-last-modified-info.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47c4a28..72f9b6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog All notable changes to this project will be documented in this file. +## 1.8.1 +Release Date: May 22, 2022 + +* Fixed: Notice can't be dismissed and causing a error. + ## 1.8.0 Release Date: May 21, 2022 diff --git a/readme.txt b/readme.txt index 2c70ff2..dede5bc 100644 --- a/readme.txt +++ b/readme.txt @@ -167,7 +167,7 @@ If you like WP Last Modified Info, please take a moment to [give a 5-star rating = 1.8.1 = Release Date: May 22, 2022 -* Fixed: Notice can't be dismissed. +* Fixed: Notice can't be dismissed and causing a error. = 1.8.0 = Release Date: May 21, 2022 diff --git a/wp-last-modified-info.php b/wp-last-modified-info.php index b77f064..79b3826 100644 --- a/wp-last-modified-info.php +++ b/wp-last-modified-info.php @@ -3,7 +3,7 @@ * Plugin Name: WP Last Modified Info * Plugin URI: https://wordpress.org/plugins/wp-last-modified-info/ * Description: Ultimate Last Modified Plugin for WordPress with Gutenberg Block Integration. It is possible to use shortcodes to display last modified info anywhere on a WordPress site running 4.7 and beyond. - * Version: 1.8.0 + * Version: 1.8.1 * Author: Sayan Datta * Author URI: https://sayandatta.in * License: GPLv3 From 0320f9afee8d6b7b39e27c504d76a6dfae10110f Mon Sep 17 00:00:00 2001 From: Sayan Datta Date: Sun, 22 May 2022 06:27:21 +0530 Subject: [PATCH 5/5] Autoload --- composer.json | 4 ++- vendor/composer/autoload_classmap.php | 41 +++++++++++++++++++++++++++ vendor/composer/autoload_static.php | 41 +++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8cc0007..c276524 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,9 @@ "wp i18n make-pot . languages/wp-last-modified-info.pot --exclude=\"/vendor,/assets,/blocks\"" ] }, - "optimize-autoloader": true, + "config": { + "optimize-autoloader": true + }, "require": { "deliciousbrains/wp-background-processing": "^1.0" } diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 097728c..aae17e1 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -9,4 +9,45 @@ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'WP_Async_Request' => $vendorDir . '/deliciousbrains/wp-background-processing/classes/wp-async-request.php', 'WP_Background_Process' => $vendorDir . '/deliciousbrains/wp-background-processing/classes/wp-background-process.php', + 'Wplmi\\Api\\Callbacks\\AdminCallbacks' => $baseDir . '/inc/Api/Callbacks/AdminCallbacks.php', + 'Wplmi\\Api\\Callbacks\\ManagerCallbacks' => $baseDir . '/inc/Api/Callbacks/ManagerCallbacks.php', + 'Wplmi\\Api\\SettingsApi' => $baseDir . '/inc/Api/SettingsApi.php', + 'Wplmi\\Base\\Activate' => $baseDir . '/inc/Base/Activate.php', + 'Wplmi\\Base\\AdminNotice' => $baseDir . '/inc/Base/AdminNotice.php', + 'Wplmi\\Base\\BaseController' => $baseDir . '/inc/Base/BaseController.php', + 'Wplmi\\Base\\Deactivate' => $baseDir . '/inc/Base/Deactivate.php', + 'Wplmi\\Base\\Enqueue' => $baseDir . '/inc/Base/Enqueue.php', + 'Wplmi\\Base\\Localization' => $baseDir . '/inc/Base/Localization.php', + 'Wplmi\\Base\\MiscActions' => $baseDir . '/inc/Base/MiscActions.php', + 'Wplmi\\Base\\PluginTools' => $baseDir . '/inc/Base/PluginTools.php', + 'Wplmi\\Base\\Uninstall' => $baseDir . '/inc/Base/Uninstall.php', + 'Wplmi\\Core\\AdminBar' => $baseDir . '/inc/Core/AdminBar.php', + 'Wplmi\\Core\\Backend\\AdminColumn' => $baseDir . '/inc/Core/Backend/AdminColumn.php', + 'Wplmi\\Core\\Backend\\BlockEditor' => $baseDir . '/inc/Core/Backend/BlockEditor.php', + 'Wplmi\\Core\\Backend\\DashboardWidget' => $baseDir . '/inc/Core/Backend/DashboardWidget.php', + 'Wplmi\\Core\\Backend\\EditScreen' => $baseDir . '/inc/Core/Backend/EditScreen.php', + 'Wplmi\\Core\\Backend\\MetaBox' => $baseDir . '/inc/Core/Backend/MetaBox.php', + 'Wplmi\\Core\\Backend\\MiscActions' => $baseDir . '/inc/Core/Backend/MiscActions.php', + 'Wplmi\\Core\\Backend\\PluginsData' => $baseDir . '/inc/Core/Backend/PluginsData.php', + 'Wplmi\\Core\\Backend\\PostStatusFilters' => $baseDir . '/inc/Core/Backend/PostStatusFilters.php', + 'Wplmi\\Core\\Backend\\UserColumn' => $baseDir . '/inc/Core/Backend/UserColumn.php', + 'Wplmi\\Core\\Blocks' => $baseDir . '/inc/Core/Blocks.php', + 'Wplmi\\Core\\Elementor\\Loader' => $baseDir . '/inc/Core/Elementor/Loader.php', + 'Wplmi\\Core\\Elementor\\Modules\\AuthorName' => $baseDir . '/inc/Core/Elementor/Modules/AuthorName.php', + 'Wplmi\\Core\\Elementor\\Modules\\AuthorUrl' => $baseDir . '/inc/Core/Elementor/Modules/AuthorUrl.php', + 'Wplmi\\Core\\Elementor\\Modules\\ModifiedDate' => $baseDir . '/inc/Core/Elementor/Modules/ModifiedDate.php', + 'Wplmi\\Core\\Elementor\\Modules\\ModifiedTime' => $baseDir . '/inc/Core/Elementor/Modules/ModifiedTime.php', + 'Wplmi\\Core\\Frontend\\PostView' => $baseDir . '/inc/Core/Frontend/PostView.php', + 'Wplmi\\Core\\Frontend\\Schema' => $baseDir . '/inc/Core/Frontend/Schema.php', + 'Wplmi\\Core\\Frontend\\Shortcode' => $baseDir . '/inc/Core/Frontend/Shortcode.php', + 'Wplmi\\Core\\Frontend\\TemplateTags' => $baseDir . '/inc/Core/Frontend/TemplateTags.php', + 'Wplmi\\Core\\Notification' => $baseDir . '/inc/Core/Notification.php', + 'Wplmi\\Core\\RestApi' => $baseDir . '/inc/Core/RestApi.php', + 'Wplmi\\Helpers\\Ajax' => $baseDir . '/inc/Helpers/Ajax.php', + 'Wplmi\\Helpers\\Fields' => $baseDir . '/inc/Helpers/Fields.php', + 'Wplmi\\Helpers\\HelperFunctions' => $baseDir . '/inc/Helpers/HelperFunctions.php', + 'Wplmi\\Helpers\\Hooker' => $baseDir . '/inc/Helpers/Hooker.php', + 'Wplmi\\Helpers\\SettingsData' => $baseDir . '/inc/Helpers/SettingsData.php', + 'Wplmi\\Loader' => $baseDir . '/inc/Loader.php', + 'Wplmi\\Pages\\Dashboard' => $baseDir . '/inc/Pages/Dashboard.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 2955ff6..5f2b8da 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -28,6 +28,47 @@ class ComposerStaticInit864e9b664caffe9d69b14c441bfd3b88 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'WP_Async_Request' => __DIR__ . '/..' . '/deliciousbrains/wp-background-processing/classes/wp-async-request.php', 'WP_Background_Process' => __DIR__ . '/..' . '/deliciousbrains/wp-background-processing/classes/wp-background-process.php', + 'Wplmi\\Api\\Callbacks\\AdminCallbacks' => __DIR__ . '/../..' . '/inc/Api/Callbacks/AdminCallbacks.php', + 'Wplmi\\Api\\Callbacks\\ManagerCallbacks' => __DIR__ . '/../..' . '/inc/Api/Callbacks/ManagerCallbacks.php', + 'Wplmi\\Api\\SettingsApi' => __DIR__ . '/../..' . '/inc/Api/SettingsApi.php', + 'Wplmi\\Base\\Activate' => __DIR__ . '/../..' . '/inc/Base/Activate.php', + 'Wplmi\\Base\\AdminNotice' => __DIR__ . '/../..' . '/inc/Base/AdminNotice.php', + 'Wplmi\\Base\\BaseController' => __DIR__ . '/../..' . '/inc/Base/BaseController.php', + 'Wplmi\\Base\\Deactivate' => __DIR__ . '/../..' . '/inc/Base/Deactivate.php', + 'Wplmi\\Base\\Enqueue' => __DIR__ . '/../..' . '/inc/Base/Enqueue.php', + 'Wplmi\\Base\\Localization' => __DIR__ . '/../..' . '/inc/Base/Localization.php', + 'Wplmi\\Base\\MiscActions' => __DIR__ . '/../..' . '/inc/Base/MiscActions.php', + 'Wplmi\\Base\\PluginTools' => __DIR__ . '/../..' . '/inc/Base/PluginTools.php', + 'Wplmi\\Base\\Uninstall' => __DIR__ . '/../..' . '/inc/Base/Uninstall.php', + 'Wplmi\\Core\\AdminBar' => __DIR__ . '/../..' . '/inc/Core/AdminBar.php', + 'Wplmi\\Core\\Backend\\AdminColumn' => __DIR__ . '/../..' . '/inc/Core/Backend/AdminColumn.php', + 'Wplmi\\Core\\Backend\\BlockEditor' => __DIR__ . '/../..' . '/inc/Core/Backend/BlockEditor.php', + 'Wplmi\\Core\\Backend\\DashboardWidget' => __DIR__ . '/../..' . '/inc/Core/Backend/DashboardWidget.php', + 'Wplmi\\Core\\Backend\\EditScreen' => __DIR__ . '/../..' . '/inc/Core/Backend/EditScreen.php', + 'Wplmi\\Core\\Backend\\MetaBox' => __DIR__ . '/../..' . '/inc/Core/Backend/MetaBox.php', + 'Wplmi\\Core\\Backend\\MiscActions' => __DIR__ . '/../..' . '/inc/Core/Backend/MiscActions.php', + 'Wplmi\\Core\\Backend\\PluginsData' => __DIR__ . '/../..' . '/inc/Core/Backend/PluginsData.php', + 'Wplmi\\Core\\Backend\\PostStatusFilters' => __DIR__ . '/../..' . '/inc/Core/Backend/PostStatusFilters.php', + 'Wplmi\\Core\\Backend\\UserColumn' => __DIR__ . '/../..' . '/inc/Core/Backend/UserColumn.php', + 'Wplmi\\Core\\Blocks' => __DIR__ . '/../..' . '/inc/Core/Blocks.php', + 'Wplmi\\Core\\Elementor\\Loader' => __DIR__ . '/../..' . '/inc/Core/Elementor/Loader.php', + 'Wplmi\\Core\\Elementor\\Modules\\AuthorName' => __DIR__ . '/../..' . '/inc/Core/Elementor/Modules/AuthorName.php', + 'Wplmi\\Core\\Elementor\\Modules\\AuthorUrl' => __DIR__ . '/../..' . '/inc/Core/Elementor/Modules/AuthorUrl.php', + 'Wplmi\\Core\\Elementor\\Modules\\ModifiedDate' => __DIR__ . '/../..' . '/inc/Core/Elementor/Modules/ModifiedDate.php', + 'Wplmi\\Core\\Elementor\\Modules\\ModifiedTime' => __DIR__ . '/../..' . '/inc/Core/Elementor/Modules/ModifiedTime.php', + 'Wplmi\\Core\\Frontend\\PostView' => __DIR__ . '/../..' . '/inc/Core/Frontend/PostView.php', + 'Wplmi\\Core\\Frontend\\Schema' => __DIR__ . '/../..' . '/inc/Core/Frontend/Schema.php', + 'Wplmi\\Core\\Frontend\\Shortcode' => __DIR__ . '/../..' . '/inc/Core/Frontend/Shortcode.php', + 'Wplmi\\Core\\Frontend\\TemplateTags' => __DIR__ . '/../..' . '/inc/Core/Frontend/TemplateTags.php', + 'Wplmi\\Core\\Notification' => __DIR__ . '/../..' . '/inc/Core/Notification.php', + 'Wplmi\\Core\\RestApi' => __DIR__ . '/../..' . '/inc/Core/RestApi.php', + 'Wplmi\\Helpers\\Ajax' => __DIR__ . '/../..' . '/inc/Helpers/Ajax.php', + 'Wplmi\\Helpers\\Fields' => __DIR__ . '/../..' . '/inc/Helpers/Fields.php', + 'Wplmi\\Helpers\\HelperFunctions' => __DIR__ . '/../..' . '/inc/Helpers/HelperFunctions.php', + 'Wplmi\\Helpers\\Hooker' => __DIR__ . '/../..' . '/inc/Helpers/Hooker.php', + 'Wplmi\\Helpers\\SettingsData' => __DIR__ . '/../..' . '/inc/Helpers/SettingsData.php', + 'Wplmi\\Loader' => __DIR__ . '/../..' . '/inc/Loader.php', + 'Wplmi\\Pages\\Dashboard' => __DIR__ . '/../..' . '/inc/Pages/Dashboard.php', ); public static function getInitializer(ClassLoader $loader)