The Events Calendar Shortcode - Version 2.5.4

Version Description

  • Fix broken settings page link
Download this release

Release Info

Developer brianhogg
Plugin Icon 128x128 The Events Calendar Shortcode
Version 2.5.4
Comparing to
See all releases

Code changes from version 2.5.3 to 2.5.4

Files changed (2) hide show
  1. readme.txt +8 -2
  2. the-events-calendar-shortcode.php +5 -7
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === The Events Calendar Shortcode & Block ===
2
  Contributors: brianhogg
3
  Tags: event, events, calendar, shortcode, modern tribe
4
- Requires at least: 4.1
5
  Requires PHP: 5.3
6
  Tested up to: 6.0
7
- Stable tag: 2.5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -180,6 +180,9 @@ The [pro version of the plugin](https://eventcalendarnewsletter.com/the-events-c
180
 
181
  == Upgrade Notice ==
182
 
 
 
 
183
  = 2.5.3 =
184
  * Fix for month="next" when near the end of a month
185
 
@@ -200,6 +203,9 @@ Adds link to full documentation
200
 
201
  == Changelog ==
202
 
 
 
 
203
  = 2.5.3 =
204
  * Fix for month="next" when near the end of a month
205
 
1
  === The Events Calendar Shortcode & Block ===
2
  Contributors: brianhogg
3
  Tags: event, events, calendar, shortcode, modern tribe
4
+ Requires at least: 5.6
5
  Requires PHP: 5.3
6
  Tested up to: 6.0
7
+ Stable tag: 2.5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
180
 
181
  == Upgrade Notice ==
182
 
183
+ = 2.5.4 =
184
+ * Fix broken settings page link
185
+
186
  = 2.5.3 =
187
  * Fix for month="next" when near the end of a month
188
 
203
 
204
  == Changelog ==
205
 
206
+ = 2.5.4 =
207
+ * Fix broken settings page link
208
+
209
  = 2.5.3 =
210
  * Fix for month="next" when near the end of a month
211
 
the-events-calendar-shortcode.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: The Events Calendar Shortcode & Block
4
  Plugin URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/
5
  Description: An addon to add shortcode and new editor block functionality for The Events Calendar Plugin by Modern Tribe.
6
- Version: 2.5.3
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode
9
  Contributors: brianhogg
@@ -55,7 +55,7 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
55
  *
56
  * @since 1.0.0
57
  */
58
- const VERSION = '2.5.3';
59
 
60
  private $admin_page = null;
61
 
@@ -101,16 +101,14 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
101
  }
102
 
103
  public function add_menu_page() {
104
- if ( ! class_exists( 'Tribe__Settings' ) or ! method_exists( Tribe__Settings::instance(), 'should_setup_pages' ) or ! Tribe__Settings::instance()->should_setup_pages() ) {
105
  return;
106
  }
107
 
108
  $page_title = $menu_title = esc_html__( 'Shortcode & Block', 'the-events-calendar-shortcode' );
109
  $capability = apply_filters( 'ecs_admin_page_capability', 'install_plugins' );
110
 
111
- $where = Tribe__Settings::instance()->get_parent_slug();
112
-
113
- $this->admin_page = add_submenu_page( $where, $page_title, $menu_title, $capability, self::MENU_SLUG, array( $this, 'do_menu_page' ) );
114
 
115
  add_action( 'admin_print_styles-' . $this->admin_page, array( $this, 'enqueue' ) );
116
  add_action( 'admin_print_styles', array( $this, 'enqueue_submenu_style' ) );
@@ -134,7 +132,7 @@ if ( ! class_exists( 'Events_Calendar_Shortcode' ) ) {
134
 
135
  public function add_action_links( $links ) {
136
  $mylinks = array();
137
- if ( class_exists( 'Tribe__Settings' ) and method_exists( Tribe__Settings::instance(), 'should_setup_pages' ) and Tribe__Settings::instance()->should_setup_pages() ) {
138
  $mylinks[] = '<a href="' . admin_url( 'edit.php?post_type=tribe_events&page=ecs-admin' ) . '">' . esc_html__( 'Settings', 'the-events-calendar-shortcode' ) . '</a>';
139
  }
140
  $mylinks[] = '<a target="_blank" style="color:#3db634; font-weight: bold;" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode/?utm_source=plugin-list&utm_medium=upgrade-link&utm_campaign=plugin-list&utm_content=action-link">' . esc_html__( 'Upgrade', 'the-events-calendar-shortcode' ) . '</a>';
3
  Plugin Name: The Events Calendar Shortcode & Block
4
  Plugin URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode/
5
  Description: An addon to add shortcode and new editor block functionality for The Events Calendar Plugin by Modern Tribe.
6
+ Version: 2.5.4
7
  Author: Event Calendar Newsletter
8
  Author URI: https://eventcalendarnewsletter.com/the-events-calendar-shortcode
9
  Contributors: brianhogg
55
  *
56
  * @since 1.0.0
57
  */
58
+ const VERSION = '2.5.4';
59
 
60
  private $admin_page = null;
61
 
101
  }
102
 
103
  public function add_menu_page() {
104
+ if ( ! class_exists( 'Tribe__Settings' ) ) {
105
  return;
106
  }
107
 
108
  $page_title = $menu_title = esc_html__( 'Shortcode & Block', 'the-events-calendar-shortcode' );
109
  $capability = apply_filters( 'ecs_admin_page_capability', 'install_plugins' );
110
 
111
+ $this->admin_page = add_submenu_page( 'edit.php?post_type=tribe_events', $page_title, $menu_title, $capability, self::MENU_SLUG, array( $this, 'do_menu_page' ) );
 
 
112
 
113
  add_action( 'admin_print_styles-' . $this->admin_page, array( $this, 'enqueue' ) );
114
  add_action( 'admin_print_styles', array( $this, 'enqueue_submenu_style' ) );
132
 
133
  public function add_action_links( $links ) {
134
  $mylinks = array();
135
+ if ( class_exists( 'Tribe__Settings' ) and current_user_can( 'install_plugins' ) ) {
136
  $mylinks[] = '<a href="' . admin_url( 'edit.php?post_type=tribe_events&page=ecs-admin' ) . '">' . esc_html__( 'Settings', 'the-events-calendar-shortcode' ) . '</a>';
137
  }
138
  $mylinks[] = '<a target="_blank" style="color:#3db634; font-weight: bold;" href="https://eventcalendarnewsletter.com/the-events-calendar-shortcode/?utm_source=plugin-list&utm_medium=upgrade-link&utm_campaign=plugin-list&utm_content=action-link">' . esc_html__( 'Upgrade', 'the-events-calendar-shortcode' ) . '</a>';