Skip to content

Commit

Permalink
* Fix bug with display of flag when Flags and Nearby installed, but n…
Browse files Browse the repository at this point in the history
…ot active.
  • Loading branch information
azurecurve committed Sep 18, 2020
1 parent 73f63fd commit 6ccbcdf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
12 changes: 7 additions & 5 deletions azrcrv-timelines.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* ------------------------------------------------------------------------------
* Plugin Name: Timelines
* Description: Create a timeline and place on pages or posts using the timeline shortcode.
* Version: 1.2.1
* Version: 1.2.2
* Author: azurecurve
* Author URI: https://development.azurecurve.co.uk/classicpress-plugins/
* Plugin URI: https://development.azurecurve.co.uk/classicpress-plugins/timelines/
Expand Down Expand Up @@ -509,10 +509,12 @@ function azrcrv_t_shortcode($atts, $content = null){
if (isset($meta_fields['timeline-link'])){
if (strlen($meta_fields['timeline-link']) > 0){
$linked_post_id = url_to_postid($meta_fields['timeline-link']);
$linked_post_country = get_post_meta( $linked_post_id, '_azrcrv_n_country', true );
// get country and display flag
if (strlen($linked_post_country) > 0){
$return .= ' '.do_shortcode('[flag='.$linked_post_country.']');
if (azrcrv_t_is_plugin_active('azrcrv-flags/azrcrv-flags.php') AND azrcrv_t_is_plugin_active('azrcrv-nearby/azrcrv-nearby.php') AND $options['integrate-with-flags-and-nearby'] == 1){
$linked_post_country = get_post_meta( $linked_post_id, '_azrcrv_n_country', true );
// get country and display flag
if (strlen($linked_post_country) > 0){
$return .= ' '.do_shortcode('[flag='.$linked_post_country.']');
}
}
$return .= "&nbsp;<a href='".$meta_fields['timeline-link']."'><img class='azc_t' src='".plugin_dir_url(__FILE__)."assets/images/link.png' /></a>";

Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
=== Timelines ===

Description: Create timelines showing the sequence of events and place in any post or page using a shortcode.
Version: 1.2.1
Version: 1.2.2
Tags: timeline, timelines, custom post type
Author: azurecurve
Author URI: https://development.azurecurve.co.uk/
Plugin URI: https://development.azurecurve.co.uk/classicpress-plugins/timelines/
Download link: https://github.com/azurecurve/azrcrv-timelines/releases/download/v1.2.1/azrcrv-timelines.zip
Download link: https://github.com/azurecurve/azrcrv-timelines/releases/download/v1.2.2/azrcrv-timelines.zip
Donate link: https://development.azurecurve.co.uk/support-development/
Requires PHP: 5.6
Requires: 1.0.0
Expand Down Expand Up @@ -53,6 +53,9 @@ This plugin is developed for ClassicPress, but will likely work on WordPress.

# Changelog

### [Version 1.2.2](https://github.com/azurecurve/azrcrv-timelines/releases/tag/v1.2.2)
* Fix bug with display of flag when Flags and Nearby installed, but not active.

### [Version 1.2.1](https://github.com/azurecurve/azrcrv-timelines/releases/tag/v1.2.1)
* Fix bug with display of flag display option.

Expand Down

0 comments on commit 6ccbcdf

Please sign in to comment.