The Post Grid - Version 2.3.6.1

Version Description

  • Promo setup
Download this release

Release Info

Developer techlabpro1
Plugin Icon 128x128 The Post Grid
Version 2.3.6.1
Comparing to
See all releases

Code changes from version 2.3.6 to 2.3.6.1

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: post grid, content grid, post display, post format, post view, blog display, news display, post
5
  Requires at least: 4.5
6
  Tested up to: 5.5
7
- Stable tag: 2.3.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -140,6 +140,9 @@ For any bug or suggestion please mail support@radiustheme.com
140
 
141
  == Changelog ==
142
 
 
 
 
143
  = 2.3.6 =
144
  * Update filter button and item view class
145
 
4
  Tags: post grid, content grid, post display, post format, post view, blog display, news display, post
5
  Requires at least: 4.5
6
  Tested up to: 5.5
7
+ Stable tag: 2.3.6.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
140
 
141
  == Changelog ==
142
 
143
+ = 2.3.6.1 =
144
+ * Promo setup
145
+
146
  = 2.3.6 =
147
  * Update filter button and item view class
148
 
assets/images/notice.png ADDED
Binary file
lib/classes/RtTpgNotice.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WPINC' ) ) {
3
+ die;
4
+ }
5
+
6
+ if ( ! class_exists( 'RtTpgNotice' ) ):
7
+
8
+ class RtTpgNotice {
9
+ public function __construct() {
10
+ add_action( 'admin_init', function () {
11
+ $current = time();
12
+ if ( mktime( 0, 0, 0, 11, 26, 2020 ) <= $current && $current <= mktime( 0, 0, 0, 12, 5, 2020 ) ) {
13
+ if ( get_option( 'rttpg_bf_2020' ) != '1' ) {
14
+ if ( ! isset( $GLOBALS['rt_bf_2020_notice'] ) ) {
15
+ $GLOBALS['rt_bf_2020_notice'] = 'rttpg_bf_2020';
16
+ self::notice();
17
+ }
18
+ }
19
+ }
20
+ } );
21
+ }
22
+
23
+ static function notice() {
24
+
25
+ add_action( 'admin_enqueue_scripts', function () {
26
+ wp_enqueue_script( 'jquery' );
27
+ } );
28
+
29
+ add_action( 'admin_notices', function () {
30
+ $plugin_name = "The Post Grid Pro";
31
+ $download_link = 'https://www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/?ref=wporg';
32
+ ?>
33
+ <div class="notice notice-info is-dismissible" data-rttpgdismissable="rttpg_bf_2020"
34
+ style="display:grid;grid-template-columns: 100px auto;padding-top: 25px; padding-bottom: 22px;">
35
+ <img alt="<?php echo esc_attr( $plugin_name ) ?>"
36
+ src="<?php echo rtTPG()->assetsUrl . 'images/notice.png'; ?>" width="74px"
37
+ height="74px" style="grid-row: 1 / 4; align-self: center;justify-self: center"/>
38
+ <h3 style="margin:0;"><?php echo sprintf( '%s Black Friday Deal!!', $plugin_name ) ?></h3>
39
+ <p style="margin:0 0 2px;">Don't miss out on our biggest sale of the year! Get your
40
+ <b><?php echo $plugin_name; ?> plan</b> with <b>50% OFF</b>! Limited time offer expires on
41
+ December 5.
42
+ </p>
43
+ <p style="margin:0;">
44
+ <a class="button button-primary"
45
+ href="<?php echo esc_url( $download_link ) ?>"
46
+ target="_blank">Buy Now</a>
47
+ <a class="button button-dismiss" href="#">Dismiss</a>
48
+ </p>
49
+ </div>
50
+ <?php
51
+ } );
52
+
53
+ add_action( 'admin_footer', function () {
54
+ ?>
55
+ <script type="text/javascript">
56
+ (function ($) {
57
+ $(function () {
58
+ setTimeout(function () {
59
+ $('div[data-rttpgdismissable] .notice-dismiss, div[data-rttpgdismissable] .button-dismiss')
60
+ .on('click', function (e) {
61
+ e.preventDefault();
62
+ $.post(ajaxurl, {
63
+ 'action': 'rttpg_dismiss_admin_notice',
64
+ 'nonce': <?php echo json_encode( wp_create_nonce( 'rttpg-dismissible-notice' ) ); ?>
65
+ });
66
+ $(e.target).closest('.is-dismissible').remove();
67
+ });
68
+ }, 1000);
69
+ });
70
+ })(jQuery);
71
+ </script>
72
+ <?php
73
+ } );
74
+
75
+ add_action( 'wp_ajax_rttpg_dismiss_admin_notice', function () {
76
+ check_ajax_referer( 'rttpg-dismissible-notice', 'nonce' );
77
+
78
+ update_option( 'rttpg_bf_2020', '1' );
79
+ wp_die();
80
+ } );
81
+ }
82
+ }
83
+
84
+ endif;
the-post-grid.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://demo.radiustheme.com/wordpress/plugins/the-post-grid/
5
  * Description: Fast & Easy way to display WordPress post in Grid, List & Isotope view ( filter by category, tag, author..) without a single line of coding.
6
  * Author: RadiusTheme
7
- * Version: 2.3.6
8
  * Text Domain: the-post-grid
9
  * Domain Path: /languages
10
  * Author URI: https://radiustheme.com/
@@ -20,4 +20,4 @@ define( 'RT_THE_POST_GRID_PLUGIN_ACTIVE_FILE_NAME', plugin_basename( __FILE__ )
20
  define( 'RT_THE_POST_GRID_PLUGIN_URL', plugins_url( '', __FILE__ ) );
21
  define( 'RT_THE_POST_GRID_LANGUAGE_PATH', dirname( plugin_basename( __FILE__ ) ) . '/languages' );
22
 
23
- require( 'lib/init.php' );
4
  * Plugin URI: http://demo.radiustheme.com/wordpress/plugins/the-post-grid/
5
  * Description: Fast & Easy way to display WordPress post in Grid, List & Isotope view ( filter by category, tag, author..) without a single line of coding.
6
  * Author: RadiusTheme
7
+ * Version: 2.3.6.1
8
  * Text Domain: the-post-grid
9
  * Domain Path: /languages
10
  * Author URI: https://radiustheme.com/
20
  define( 'RT_THE_POST_GRID_PLUGIN_URL', plugins_url( '', __FILE__ ) );
21
  define( 'RT_THE_POST_GRID_LANGUAGE_PATH', dirname( plugin_basename( __FILE__ ) ) . '/languages' );
22
 
23
+ require( 'lib/init.php' );