Skip to content

Commit

Permalink
Merge pull request #16 from iamsayan/develop
Browse files Browse the repository at this point in the history
v1.8.1 Release
  • Loading branch information
iamsayan authored May 22, 2022
2 parents 76fa0f5 + 0320f9a commit c2fd77d
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 71 deletions.
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

_config.yml
.distignore
.editorconfig
.gitignore
CHANGELOG.md
composer.json
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/deploy-assets.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 9 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down Expand Up @@ -31,13 +31,19 @@
},
"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\""
]
},
"config": {
"optimize-autoloader": true
},
"require": {
"deliciousbrains/wp-background-processing": "^1.0"
}
Expand Down
40 changes: 16 additions & 24 deletions inc/Base/AdminNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ class AdminNotice extends BaseController
{
use Hooker;

/**
* Notice.
*/
private $notice;

/**
* Register functions.
*/
Expand Down Expand Up @@ -110,6 +105,20 @@ public function notice() {
* Dismiss admin notices.
*/
public function dismiss_notice() {
// Check for 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'
&& 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;
}
Expand All @@ -119,26 +128,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' );
}
Expand Down
2 changes: 2 additions & 0 deletions inc/Base/Deactivate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
Expand Down
22 changes: 11 additions & 11 deletions languages/wp-last-modified-info.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 <a href=\"%3$s\">here</a> 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&#44; 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 ""

Expand Down
14 changes: 7 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 and causing a error.

= 1.8.0 =
Release Date: May 21, 2022

Expand All @@ -188,9 +193,4 @@ Release Date: May 21, 2022

= Other Versions =

* View the <a href="https://plugins.svn.wordpress.org/wp-last-modified-info/trunk/changelog.txt" target="_blank">Changelog</a> 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.
* View the <a href="https://plugins.svn.wordpress.org/wp-last-modified-info/trunk/changelog.txt" target="_blank">Changelog</a> file.
2 changes: 1 addition & 1 deletion templates/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
<p style="text-align: justify;"><?php printf(
/* translators: %s: plugin name */
__( 'Thank you for using %s. If you found the plugin useful buy me a coffee! Your donation will motivate and make me happy for all the efforts. You can donate via PayPal.', 'wp-last-modified-info' ), '<strong>WP Last Modified Info v' . $this->version . '</strong>' ); ?></strong></p>
<p style="text-align: justify; font-size: 12px; font-style: italic;">Developed with <span style="color:#e25555;">♥</span> by <a href="https://www.sayandatta.in" target="_blank" style="font-weight: 500;">Sayan Datta</a> | <a href="https://www.sayandatta.in/contact/" target="_blank" style="font-weight: 500;">Hire Me</a> | <a href="https://github.com/iamsayan/wp-last-modified-info" target="_blank" style="font-weight: 500;">GitHub</a> | <a href="https://wordpress.org/support/plugin/wp-last-modified-info" target="_blank" style="font-weight: 500;">Support</a> | <a href="https://translate.wordpress.org/projects/wp-plugins/wp-last-modified-info" target="_blank" style="font-weight: 500;">Translate</a> | <a href="https://wordpress.org/support/plugin/wp-last-modified-info/reviews/#new-post" target="_blank" style="font-weight: 500;">Rate it</a> (<span style="color:#ffa000;">&#9733;&#9733;&#9733;&#9733;&#9733;</span>) on WordPress.org, if you like this plugin.</p>
<p style="text-align: justify; font-size: 12px; font-style: italic;">Developed with <span style="color:#e25555;">♥</span> by <a href="https://sayandatta.in" target="_blank" style="font-weight: 500;">Sayan Datta</a> | <a href="https://www.sayandatta.in/contact/" target="_blank" style="font-weight: 500;">Hire Me</a> | <a href="https://github.com/iamsayan/wp-last-modified-info" target="_blank" style="font-weight: 500;">GitHub</a> | <a href="https://wordpress.org/support/plugin/wp-last-modified-info" target="_blank" style="font-weight: 500;">Support</a> | <a href="https://translate.wordpress.org/projects/wp-plugins/wp-last-modified-info" target="_blank" style="font-weight: 500;">Translate</a> | <a href="https://wordpress.org/support/plugin/wp-last-modified-info/reviews/#new-post" target="_blank" style="font-weight: 500;">Rate it</a> (<span style="color:#ffa000;">&#9733;&#9733;&#9733;&#9733;&#9733;</span>) on WordPress.org, if you like this plugin.</p>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions wp-last-modified-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' ) ) {
Expand Down

0 comments on commit c2fd77d

Please sign in to comment.