diff --git a/azrcrv-timelines.php b/azrcrv-timelines.php index aa5489b..fc31282 100644 --- a/azrcrv-timelines.php +++ b/azrcrv-timelines.php @@ -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/ @@ -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 .= " "; diff --git a/readme.txt b/readme.txt index b1ac7ed..13db5ad 100644 --- a/readme.txt +++ b/readme.txt @@ -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 @@ -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.