Skip to content

Commit 7c0e9ce

Browse files
committed
V 1.4.0
1 parent 9762214 commit 7c0e9ce

File tree

4 files changed

+94
-39
lines changed

4 files changed

+94
-39
lines changed

README.md

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Dynamic Month & Year into Posts
2-
- Contributors: gauravtiwari
3-
- Donate link: https://gauravtiwari.org/donate/
4-
- Tags: seo, year, automatic, add-on, hooks, dynamic-content, admin, shortcode, current date, month, yoast, gutenberg, widget, content, writing, editor, elementor, shortcodes
5-
- Requires at least: 3.0.1
6-
- License: GPLv3 or later
7-
- License URI: http://www.gnu.org/licenses/gpl-3.0.html
2+
Contributors: gauravtiwari
3+
Donate link: https://gauravtiwari.org/donate/
4+
Tags: content, marketing, seo, shortcode, writing
5+
Requires at least: 3.0.1
6+
Tested up to: 6.8
7+
Stable tag: 1.4.0
8+
License: GPLv3 or later
9+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
810

9-
Automate your SEO: add today's date by [date], current year by [year], previous year by [pyear], next year by [nyear] and months by [month] [nmonth] [pmonth] etc., shortcodes anywhere, including content, title, meta title, widget, excerpt and Breadcrumbs.
11+
Automate SEO and content with dynamic shortcodes for dates, years, months in content, titles and more.
1012

11-
== Description ==
13+
## Description
1214

1315
### Automate your SEO
1416

@@ -18,6 +20,7 @@ But that's not it.
1820

1921
[See Full List of Shortcodes](https://gauravtiwari.org/snippet/dynamic-month-year/#shortcodes)
2022

23+
* New: Add post modified date by using `[datemodified]` and post publication date by using `[datepublished]` shortcodes.
2124
* New: Ace Black Friday with new dynamic shortcodes. Black Friday and Cyber Monday dates can be inserted anywhere by using `[blackfriday]` and `[cybermonday]`.
2225

2326
### Works with popular SEO Plugins
@@ -35,18 +38,19 @@ But that's not it.
3538
* Yoast SEO
3639
* Yoast SEO Premium
3740
* Gutenberg and Block Editor Content, Headings and Buttons
38-
* GenerateBlocks, Ultimate Blocks, Kadence Blocks, Spectra, Otter Blocks
41+
* [All popular Block Editor Addons](https://gauravtiwari.org/best-gutenberg-blocks-plugins-for-wordpress/), including Greenshift, GenerateBlocks, Ultimate Blocks, Kadence Blocks, Spectra, Otter Blocks.
3942
* Elementor Page Builder (100%)
4043
* WP Bakery Page Builder
4144
* Visual Composer
4245
* Beaver Builder
4346
* Brizy Builder
4447
* Oxygen Builder
48+
* Bricks Builder
4549
* Jetpack
4650
* Intelly Related Posts a.k.a. Inline Related Posts (IRP)
4751
* Advanced Custom Fields (Manual: please see the FAQs)
4852
* Lightweight Accordion (including Schema)
49-
* All major themes like default WordPress themes, Astra, Neve, Kadence, GeneratePress and Blocksy.
53+
* All major themes like default WordPress themes, Astra, Neve, Hello, Kadence, GeneratePress and Blocksy.
5054

5155
Tested to be totally working with Yoast SEO, SEOPress and Rank Math's breadcrumbs, custom meta titles, excerpt etc.
5256

@@ -59,43 +63,43 @@ Note: Since August 2021, Google has started showing h1 titles in search results,
5963
* Multiple Langauge (WPML) Support: Shortcode renders your site's defined language.
6064
* Contextual Related Posts Support.
6165
* Jetpack Related Posts Support.
62-
* Totally native. No configuration required.
66+
* Totally native. Doesn't write anything to the database.
67+
* No configuration required.
6368
* Cache friendly.
6469

6570
### Easy to use
6671

67-
Just install the plugin (see Installation tab) and activate it. Add [year] to render current year, [nyear] to render next year, [pyear] to render previous year, [month] to render current month (full name) and [mon] to render first three letters of months automatically. [See Full List of Shortcodes](https://gauravtiwari.org/snippet/dynamic-month-year/#shortcodes)
72+
Just install the plugin (see Installation tab) and activate it. Add [year] to render current year, [nyear] to render next year, [pyear] to render previous year, [month] to render current month (full name) and [mon] to render first three letters of months automatically. [See Full List of Shortcodes](https://gauravtiwari.org/snippet/dynamic-month-year/#shortcodes) (You can also see this link in *Plugins* page in your WordPress dashboard).
6873

6974
As the months & years change, these shortcodes get updated into the content and title automatically on the shortcode locations.
7075

71-
Zero bloat. No CSS/JS files loaded. No database queries are made and the content is rendered on-the-fly. I am a performance geek and digital marketer myself, so I understand what you need.
76+
Zero bloat. No CSS/JS files loaded. No database queries are made and the content is rendered on-the-fly. I am a performance geek and digital marketer myself, so I understand what you need. Please use a [WordPress cache plugin](https://gauravtiwari.org/best-wordpress-caching-plugin/) to cache the rendered content.
77+
78+
Also, Dynamic Month & Year into Posts is a totally free plugin. There are no upsells and will never be.
7279

7380
* [More details](https://gauravtiwari.org/snippet/dynamic-month-year/)
7481
* [Free Support](https://wordpress.org/support/plugin/dynamic-month-year-into-posts/)
7582
* [More WordPress Plugins and Web Tools](https://gauravtiwari.org/code/)
7683
* [WordPress Deals](https://gauravtiwari.org/wordpress-deals/)
7784
* [Request a Feature](https://gauravtiwari.org/contact/)
78-
* [Follow Development on Github](https://github.com/wpgaurav/dynamic-month-year-into-posts)
7985

8086
### Privacy
8187

82-
Dynamic Month & Year into Posts is a completely native shortcode plugin. It has no settings page and does not use any analytics tool to gather or use your data. It's bloat and ad-free. No notifications. No upgrade notices. Nothing.
88+
Dynamic Month & Year into Posts by [Gaurav Tiwari](https://gauravtiwari.org) is a completely native shortcode plugin. It has no settings page and does not use any analytics tool to gather or use your data. It's bloat and ad-free. No notifications. No upgrade notices. Nothing.
8389

8490
### Fast Support and Feature Implementation
8591

86-
I will provide instant support for all your queries or feature requests. Use [support forum](https://wordpress.org/support/plugin/dynamic-month-year-into-posts/) to ask your questions, request new features or report something broken.
92+
I will provide instant support for all your queries or feature requests. Use [support forum](https://wordpress.org/support/plugin/dynamic-month-year-into-posts/) to ask your questions, request new features or report something broken. I will also update the plugin for every major and minor WordPress version.
8793

8894
### Compatibility
8995

90-
I use the plugin myself on [my primary website](https://gauravtiwari.org) and I try my best to ensure that this plugin is compatible with every functionality plugin you use. Please let me know if this plugin isn't compatible with your stack, create a support request and allow me some time.
96+
I use the plugin myself on [my primary website](https://gauravtiwari.org) and other client sites that I run. I try my best to ensure that this plugin is compatible with every functionality plugin you use. Please let me know if this plugin isn't compatible with your stack, create a support request and allow me some time.
9197

9298
Please note that some plugins strip shortcodes or disable rendering of shortcodes. In such cases, it's impossible to implement dynamic dates without rewriting the whole plugin code and breaking a couple of things. But still, I'll give a try.
9399

94-
If you are using TablePress along with a cache plugin, like [WP Rocket](https://gauravtiwari.org/wp-rocket-review/), please clear transients regularly or disable table cache to see updated shortcode data.
95-
96100
Help me with a positive review to keep the development going.
97101

98-
== Frequently Asked Questions ==
102+
## Frequently Asked Questions
99103

100104
= Why would I need this? =
101105
If you are an affiliate marketer or blogger who uses months, years and dates in your posts. If you use this plugin to render dynamic month, year, date, next year, and previous year shortcodes, you won’t have to update those posts again and again as time passes.
@@ -126,7 +130,7 @@ ACF field name => headline
126130
add_filter('acf/format_value/name=headline', 'do_shortcode');
127131
```
128132

129-
== Installation ==
133+
## Installation
130134

131135
1. Upload the plugin folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
132136
1. Activate the plugin through the 'Plugins' screen in WordPress
@@ -142,6 +146,30 @@ ACF field name => headline
142146

143147

144148
== Changelog ==
149+
= 1.4.0 =
150+
* More improvements. props @meteorlxy
151+
152+
= 1.3.9 =
153+
* Refactor code.
154+
* Attempted a fix for Rank Math SEO JSON and Excerpts.
155+
156+
= 1.3.8 =
157+
* New: [nd] and [pd] display next and previous dates (number only).
158+
159+
= 1.3.7 =
160+
* New: [nmonthyear] and [pmonthyear] display next and previous month and years together. Useful in many cases.
161+
162+
= 1.3.6 =
163+
* Shortcode support in Archive Titles.
164+
165+
= 1.3.5 =
166+
* Made Black Friday and Cyber Monday dates totally dynamic and auto-updating.
167+
* Use [year n=number] to display any year next or previous to this year. For example [year n=5] renders 5th year from now and [year n=-5] renders 5th year back from today.
168+
169+
= 1.3.4 =
170+
* Two new useful shortcodes. Post modified/updated date: `[datemodified]` and post publication date: `[datepublished]`. Use these anywhere you want to make your site more dynamic and SEO friendly.
171+
172+
145173
= 1.3.3 =
146174
* Revert some changes
147175

@@ -263,4 +291,4 @@ ACF field name => headline
263291
* Fixed Name Conflicts
264292

265293
= 1.0.0 =
266-
* First version
294+
* First version

README.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://gauravtiwari.org/donate/
44
Tags: content, marketing, seo, shortcode, writing
55
Requires at least: 3.0.1
66
Tested up to: 6.8
7-
Stable tag: 1.3.9
7+
Stable tag: 1.4.0
88
License: GPLv3 or later
99
License URI: http://www.gnu.org/licenses/gpl-3.0.html
1010

@@ -146,6 +146,9 @@ ACF field name => headline
146146

147147

148148
== Changelog ==
149+
= 1.4.0 =
150+
* More improvements. props @meteorlxy
151+
149152
= 1.3.9 =
150153
* Refactor code.
151154
* Attempted a fix for Rank Math SEO JSON and Excerpts.

dynamic-month-year-into-posts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Dynamic Month & Year into Posts
44
* Plugin URI: https://gauravtiwari.org/snippet/dynamic-month-year/
55
* Description: Insert dynamic year, month, dates, days, next and previous dates into content and meta using shortcodes.
6-
* Version: 1.3.9
6+
* Version: 1.4.0
77
* Author: Gaurav Tiwari
88
* Author URI: https://gauravtiwari.org
99
* License: GPL-3.0+
@@ -16,7 +16,7 @@
1616
die;
1717
}
1818

19-
define( 'DYNAMIC_MONTH_YEAR_INTO_POSTS_VERSION', '1.3.9' );
19+
define( 'DYNAMIC_MONTH_YEAR_INTO_POSTS_VERSION', '1.4.0' );
2020

2121
// Load plugin components.
2222
require_once plugin_dir_path( __FILE__ ) . 'includes/shortcodes.php';

includes/core-filters.php

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,45 @@ function dmyip_render_shortcodes_in_excerpt( $excerpt ) {
1919
}
2020
add_filter( 'get_the_excerpt', 'dmyip_render_shortcodes_in_excerpt' );
2121

22-
// Exclude shortcode tags from being stripped.
23-
add_filter( 'strip_shortcodes_tagnames', function( $tagnames ) {
24-
$exclude = array(
25-
'year', 'month', 'cmonth', 'mon', 'cmon', 'mm', 'mn',
26-
'nmonth', 'cnmonth', 'pmonth', 'cpmonth', 'nmon', 'cnmon',
27-
'pmon', 'cpmon', 'date', 'monthyear', 'nmonthyear', 'pmonthyear',
28-
'nyear', 'nnyear', 'pyear', 'ppyear', 'dt', 'nd', 'pd',
29-
'weekday', 'wd', 'blackfriday', 'cybermonday', 'datepublished', 'datemodified'
22+
// Avoid shortcodes being stripped + thanks @meteorlxy
23+
add_filter( 'strip_shortcodes_tagnames', function ( $tags_to_remove ) {
24+
return array_diff(
25+
$tags_to_remove,
26+
array(
27+
'year',
28+
'month',
29+
'cmonth',
30+
'mon',
31+
'cmon',
32+
'mm',
33+
'mn',
34+
'nmonth',
35+
'cnmonth',
36+
'pmonth',
37+
'cpmonth',
38+
'nmon',
39+
'cnmon',
40+
'pmon',
41+
'cpmon',
42+
'date',
43+
'monthyear',
44+
'nmonthyear',
45+
'pmonthyear',
46+
'nyear',
47+
'nnyear',
48+
'pyear',
49+
'ppyear',
50+
'dt',
51+
'nd',
52+
'pd',
53+
'weekday',
54+
'wd',
55+
'blackfriday',
56+
'cybermonday',
57+
'datepublished',
58+
'datemodified',
59+
)
3060
);
31-
foreach ( $exclude as $tag ) {
32-
if ( false !== ( $key = array_search( $tag, $tagnames ) ) ) {
33-
unset( $tagnames[ $key ] );
34-
}
35-
}
36-
return $tagnames;
3761
});
3862

3963
// Enable shortcodes in archive titles.

0 commit comments

Comments
 (0)