Skip to content

Commit

Permalink
tagging v3.3 for release
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-weiner committed Jun 25, 2020
1 parent 972fda0 commit 6d7c910
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 30 deletions.
38 changes: 32 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Contributors: [vikings412](https://profiles.wordpress.org/vikings412/) <br>
Donate Link: https://paypal.me/michaelw13 <br>
Tags: events, customization, modern-tribe, override, template <br>
Requires at least: 4.6 <br>
Tested up to: 5.4.1 <br>
Stable tag: 3.2 <br>
Tested up to: 5.4.2 <br>
Stable tag: 3.3 <br>
Requires PHP: 5.6 <br>
License: GPLv2 or later <br>
License URI: https://www.gnu.org/licenses/gpl-2.0.html <br>
Expand All @@ -36,9 +36,9 @@ The plugin can be downloaded and installed right from your WordPress administrat

### From the Github Repository

Go to the [releases](https://github.com/mike-weiner/display-event-locations-tec/releases) section of the repository and download the `wordpress-display-event-locations-tec.zip` from the most recent release.
Go to the [releases](https://github.com/mike-weiner/display-event-locations-tec/releases) section of the repository and download the `wordpress-[version]-display-event-locations-tec.zip` from the most recent release.

Once you have downloaded the `wordpress-display-event-locations-tec.zip` from the releases section of this repo sign into the backend of your WordPress website. From your WordPress administration panel, go to `Plugins > Add New` and click the gray `Upload Plugin` button at the top of the page. Select the `wordpress-display-event-locations-tec.zip` file to upload from your machine when prompted.
Once you have downloaded the `wordpress-[version]-display-event-locations-tec.zip` from the releases section of this repo sign into the backend of your WordPress website. From your WordPress administration panel, go to `Plugins > Add New` and click the gray `Upload Plugin` button at the top of the page. Select the `wordpress-[version]-display-event-locations-tec.zip` file to upload from your machine when prompted.

WordPress will install the plugin. Once the installation is complete, you will be able to activate the plugin and begin using it! Enjoy!

Expand Down Expand Up @@ -144,6 +144,30 @@ As great as the block editor is it can cause issues, sometimes. For events that

## Changelog

### 3.3
* Released on June 24, 2020
* Added: Tested up to tag changed to 5.4.2 as support with WordPress 5.4.2 has been confirmed
* Added: Stable tag changed to 3.3 to reflect latest version
* Added: Support with The Events Calendar 5.1.4 has been confirmed
* Added: Support with The Events Calendar PRO 5.1.3 has been confirmed
* Fixed: Removed excess HTML from `tooltip.php` in `/tribe-events/month/`
* Fixed: New Author URI that will link out to my new personal website
* Fixed: Clarified the description of `.deltec-tooltip-message` in the CSS classes area of the arbitrary section of the README
* Fixed: Fixed the typo in admin warning that is displayed with The Events Calendar is not activated on the site
* Fixed: Fixed typos in `plugin.php` file
* Fixed: Fixed the typo in special thanks section of the README
* Fixed: Fixed typos in previous upgrade notices within the README
* Fixed: Fixed typos in the comments of `settings-callbacks.php` in `includes/settings-page/`
* Fixed: Fixed typos in the comments of `settings-page.php` in `includes/settings-page/`
* Fixed: Fixed typos in the comments of `settings-validate.php` in `includes/settings-page/`
* Edited: `plugin.php`
* Edited: `README.md`
* Edited: `includes/settings-page/settings-callbacks.php`
* Edited: `includes/settings-page/settings-page.php`
* Edited: `includes/settings-page/settings-validate.php`
* Edited: `/tribe/events/month/calendar-body/day/calendar-events/calendar-event/tooltip/title.php`
* Edited: `/tribe-events/month/tooltip.php`

### 3.2
* Released on May 13, 2020
* Added: Stable tag updated to 3.2
Expand Down Expand Up @@ -247,7 +271,7 @@ As great as the block editor is it can cause issues, sometimes. For events that
### 2.1
* Released on January 8, 2020
* Added: The event street address can now be displayed within the tooltip underneath the location name.
* Added: Uninstallation Hook (Your settings for this plugin will now be deleted from the wp_ database when you uninstall this plugin.)
* Added: Uninstall Hook (Your settings for this plugin will now be deleted from the wp_ database when you uninstall this plugin.)
* Added: An additional line break has been added to featured event tooltips to make things more readable!
* Added: Travis CI has been implemented to automatically check for any syntax and compatibility issues with modern and common versions of PHP.
* Added: New screenshots of the plugin to show the new feature of being able to add the street address to the tooltip.
Expand Down Expand Up @@ -310,6 +334,9 @@ As great as the block editor is it can cause issues, sometimes. For events that

## Upgrade Notice

### 3.3
Today's update continues quality of life improvements to help better your experience while also working to keep our footprint on your installation to a minimum. Unnecessary code has been removed. Typos continue to be fixed. Comments have been simplified. Documentation has been reworded for clarity. Updated developer contact information and URIs have been put into place. -- As always, if you experience any issues open a support ticket and I'll get you up and running. Have a great, productive day!

### 3.2
Today's update brings a revamp of the CSS class structure for all information that this plugin adds to the tooltip in your monthly view! You can now control the stylization of all of the individual components that can be added to the tooltip to display your event's location and its street address (if enabled). You can find more detailed information about the new CSS class structure in the Arbitrary section on CSS Classes of the Github Repository[README](https://github.com/mike-weiner/display-event-locations-tec#css-classes). Support for WordPress 5.4.1 has also been confirmed in testing. As always, please let us know if you experience any issues!

Expand Down Expand Up @@ -355,7 +382,6 @@ Initial release!
* `.deltec-street-address` - A `span` element that surrounds the all elements of the street address for the event's venue/location (if enabled in Display Event Location for The Events Calendar settings area)

### Github Repository

The Github Repository can be found here: https://github.com/mike-weiner/display-event-locations-tec.

### References:
Expand Down
8 changes: 4 additions & 4 deletions includes/settings-page/settings-callbacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function deltec_callback_pre_venue_message_text_field($args) {
$deltec_prm_label = isset($args['label']) ? $args['label'] : '';
$deltec_prm_value = isset($options[$deltec_prm_id]) ? sanitize_text_field($options[$deltec_prm_id]) : '';

// Eacho out the html for the input tag and the label that will be displayed for the 'Tooltip Message Before Venue/Location Name' text field
// Echo out the html for the input tag and the label that will be displayed for the 'Tooltip Message Before Venue/Location Name' text field
echo '<input id="deltec_options_'.$deltec_prm_id.'"name="deltec_options['.$deltec_prm_id.']" type="text" size="40" value="'.$deltec_prm_value.'"><br />';
echo '<label for="deltec_options_'.$deltec_prm_id.'">'.$deltec_prm_label.'</label>';
}
Expand All @@ -45,17 +45,17 @@ function deltec_callback_pre_venue_message_text_field($args) {
* /includes/settings-register.php
*/
function deltec_callback_show_full_address_checkbox($args) {
// Get the option for the check box to dispaly the full address from the Display Event Location for The Events Calendar settings page
// Get the option for the check box to display the full address from the Display Event Location for The Events Calendar settings page
$options = get_option('deltec_options');

// If the checkbox is not set or not checked -> assign $options a value of 0
// If the chekcbox is set -> assign $options a value of 1
// If the checkbox is set -> assign $options a value of 1
$options = empty($options['display-full-address']) ? 0 : 1;

// Create an html checkbox and label to display value of the display full address deltec option
$deltec_dfahtml = '<input type="checkbox" id="deltec_options_display_full_address" name="deltec_options[display-full-address]" value="1"' . checked( 1, $options, false ) . '/><br>';
$deltec_dfahtml .= '<label for="deltec_options_display_full_address">Enable the full address to be displayed underneath the venue/location name within the tooltip.</label>';

// Eacho out the html for the input tag and the label that will be displayed for the 'Show Full Venue Address Inside Tooltip' checkbox
// Echo out the html for the input tag and the label that will be displayed for the 'Show Full Venue Address Inside Tooltip' checkbox
echo $deltec_dfahtml;
}
2 changes: 1 addition & 1 deletion includes/settings-page/settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function deltec_display_settings_page() {
<?php

// If the checkbox is not set or not checked -> assign $options a value of 0
// If the chekcbox is set -> assign $options a value of 1
// If the checkbox is set -> assign $options a value of 1
$deltec_checkbox_option = empty(get_option('deltec_options')['display-full-address']) ? 0 : 1;

// If the user is showing the full address, display this within the tooltip preview as well
Expand Down
2 changes: 1 addition & 1 deletion includes/settings-page/settings-register.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function deltec_register_settings(){
['id' => 'pre-venue-message', 'label' => "Enter the message/phrase that you would like to display before the event location name in the tooltip."] // Array that contains data for the callback function
);

// Adds setting field for chekcbox to display full address or not inside of tooltip
// Adds setting field for checkbox to display full address or not inside of tooltip
add_settings_field (
'display-full-address', // Setting ID
'Show Full Venue Address Inside Tooltip', // Title of the setting displayed on the page
Expand Down
2 changes: 1 addition & 1 deletion includes/settings-page/settings-validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @see deltec_register_settings() located at /includes/settings-register.php
*
* @return string Returns a string containing the sanitized input from the 'Tooltip Message Before Venue/Location Name' textfield
* @return string Returns a string containing the sanitized input from the 'Tooltip Message Before Venue/Location Name' text field
*/
function deltec_validate_options($input)
{
Expand Down
30 changes: 15 additions & 15 deletions plugin.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Plugin Name: Display Event Location for The Events Calendar
* Plugin URI: https://thetechsurge.com/
* Plugin URI: https://michaelweiner.org/
* Description: Add the event venue/location to the tooltip that is displayed on hover over in the month view of the calendar when using The Events Calendar or The Events Calendar Pro by Modern Tribe.
* Author: Michael Weiner
* Author URI: https://thetechsurge.com/
* Version: 3.2
* Author URI: https://michaelweiner.org/
* Version: 3.3
* License: GPL2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
Expand All @@ -15,7 +15,7 @@
exit;
}

// Call dependecies to other files for admin views
// Call dependencies to other files for admin views
if (is_admin()) {
require_once plugin_dir_path(__FILE__) . 'includes/settings-page/admin-menu.php';
require_once plugin_dir_path(__FILE__) . 'includes/settings-page/settings-page.php';
Expand All @@ -42,10 +42,10 @@ function deltec_tribe_custom_template_paths_legacy_views ( string $file, string
// Variable to store complete path to plugin with trailing slash
$deltec_base_plugin_path = trailingslashit( plugin_dir_path( __FILE__ ) );

// Variable to store commplete path to active theme with trailing slash
// Variable to store complete path to active theme with trailing slash
$deltec_active_theme_path = trailingslashit( get_stylesheet_directory() );

// Put custom temapltes in order of priority for legacy calendar views (up to The Events Calendar 4.9.14)
// Put custom templates in order of priority for legacy calendar views (up to The Events Calendar 4.9.14)
// Check this plugin for template overrides and then the current theme for template overrides for every template being loaded
$deltec_template_paths_legacy = [
'deltec_plugin_tec_legacy' => $deltec_base_plugin_path . 'tribe-events/' . $template,
Expand Down Expand Up @@ -93,7 +93,7 @@ function deltec_tribe_custom_template_paths_v2_views( $folders ) {
// Variable to store complete path to plugin with trailing slash
$deltec_base_plugin_path = trailingslashit( plugin_dir_path( __FILE__ ) );

// Variable to store commplete path to active theme with trailing slash
// Variable to store complete path to active theme with trailing slash
$deltec_active_theme_path = trailingslashit( get_stylesheet_directory() );

/*
Expand Down Expand Up @@ -127,18 +127,18 @@ function deltec_tribe_custom_template_paths_v2_views( $folders ) {
function deltec_error_install_tec_plugin() {
global $pagenow; // Get pagenow global variable

// Delcare a variable to store the url for TEC WP plugin directory listing to display within iframe
// Declare a variable to store the url for TEC WP plugin directory listing to display within iframe
$deltec_url = 'plugin-install.php?tab=plugin-information&plugin=the-events-calendar&TB_iframe=true';

// If the current page is the plugins page and the current user has administration privileges
if ( $pagenow == 'plugins.php' && current_user_can( 'manage_options' ) ) {

// Display error message to user that is non-dissmissable
// Display error message to user that is non-dismissible
echo '<div class="error"><p>'
.sprintf(
'%1s <a href="%2s" class="thickbox" title="%3s">%4s</a>.',

esc_html__( 'Display Event Location for The Events Calendar requires The Events Claendar to function properly. Please, install and activate the latest version of', 'tribe-events-calendar' ),
esc_html__( 'Display Event Location for The Events Calendar requires The Events Calendar to function properly. Please, install and activate the latest version of', 'tribe-events-calendar' ),
esc_url( $deltec_url ),
esc_html__( 'The Events Calendar', 'tribe-events-calendar' ),
esc_html__( 'The Events Calendar', 'tribe-events-calendar' )
Expand All @@ -150,7 +150,7 @@ function deltec_error_install_tec_plugin() {


/**
* Check to determine if The Events Calendar pluin is activated anytime a plugin is activated or deactivated
* Check to determine if The Events Calendar plugin is activated anytime a plugin is activated or deactivated
*
* @see deltec_error_install_tec_plugin()
*/
Expand Down Expand Up @@ -178,14 +178,14 @@ function deltec_on_activate(){
* Initialize default deltec_options to WP options database upon installation
*/
function deltec_on_uninstall() {
// Remove deltec_options from the WP database upon uninstallation
// Remove deltec_options from the WP database upon deletion
delete_option('deltec_options');
}
register_uninstall_hook( __FILE__, 'deltec_on_uninstall' );


/**
* Initialize an array to store the deafult deltec_options for WP to use
* Initialize an array to store the default deltec_options for WP to use
*
* @see deltec_on_activate()
*/
Expand Down Expand Up @@ -265,11 +265,11 @@ function deltec_tribe_template_data_array ( $json, $event, $additional ){
// Get the venue being hovered over
$deltec_venue = tribe_get_venue_id($event);

// Check to make sure the current event has a venue set before adding data trying to retrive infromation about the venue
// Check to make sure the current event has a venue set before adding data trying to retrieve information about the venue
// If no venue is set, the unaltered json data will be returned
$deltec_venue_is_set = isset($deltec_venue);

// If the venue exists get the inforation needed for the tooltip template override
// If the venue exists get the information needed for the tooltip template override
if ($deltec_venue_is_set) {
$json['venue'] = $deltec_venue;
$json['venue_link'] = tribe_get_venue_link($deltec_venue, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
class="tribe-events-calendar-month__calendar-event-tooltip-title-link tribe-common-anchor-thin"
>
<?php
// phpcs:ignore
echo $event->title;
echo $event->title;
?>
</a>
</h3>
Expand Down

0 comments on commit 6d7c910

Please sign in to comment.