Skip to content

Commit

Permalink
* Fix bug with display of flag display option.
Browse files Browse the repository at this point in the history
  • Loading branch information
azurecurve committed Sep 18, 2020
1 parent 3a4cf47 commit 73f63fd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
23 changes: 17 additions & 6 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.0
* Version: 1.2.1
* 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 @@ -293,7 +293,7 @@ function azrcrv_t_display_options(){

<tr><th scope="row"><label for="color"><?php esc_html_e('Default Color', 'timelines'); ?></label></th><td>
<input type="text" name="color" value="<?php echo esc_html(stripslashes($options['color'])); ?>" class="regular-text" />
<p class="description"><?php esc_html_e('Specify default color of timeline (this can be overriden in the shortcode using the arguement "color="', 'timelines'); ?></p>
<p class="description"><?php esc_html_e('Specify default color of timeline (this can be overriden in the shortcode using the parameter "color=#007FFF;")', 'timelines'); ?></p>
</td></tr>

<tr><th scope="row"><label for="timeline"><?php esc_html_e('Default Timeline', 'timelines'); ?></label></th><td>
Expand Down Expand Up @@ -345,21 +345,32 @@ function azrcrv_t_display_options(){
<?php
if (azrcrv_t_is_plugin_active('azrcrv-flags/azrcrv-flags.php')){
$flags = '<a href="admin.php?page=azrcrv-f">Flags</a>';
$flags_active = true;
}else{
$flags = '<a href="https://development.azurecurve.co.uk/classicpress-plugins/flags/">Flags</a>';
$flags_active = false;
}
?>
<?php
if (azrcrv_t_is_plugin_active('azrcrv-nearby/azrcrv-nearby.php')){
$nearby = '<a href="admin.php?page=azrcrv-n">Nearby</a>';
$nearby_active = true;
}else{
$nearby = '<a href="https://development.azurecurve.co.uk/classicpress-plugins/nearby/">Nearby</a>';
$nearby_active = false;
}
?>
<tr><th scope="row"><label for="integrate-with-flags-and-nearby"><?php printf(__('Integrate with %s and %s?', 'timelines'), $flags, $nearby); ?></label></th><td>
<fieldset><legend class="screen-reader-text"><span><?php printf(esc_html_e('Integrate with %s and %s?', 'timelines'), $flags, $nearby); ?></span></legend>
<label for="integrate-with-flags-and-nearby"><input name="integrate-with-flags-and-nearby" type="checkbox" id="integrate-with-flags-and-nearby" value="1" <?php checked('1', $options['integrate-with-flags-and-nearby']); ?> /><?php esc_html_e('Display flag next to timeline entry', 'timelines'); ?></label>
</fieldset>
<tr><th scope="row"><label for="integrate-with-flags-and-nearby"><?php printf(__('Display country flag?', 'timelines'), $flags, $nearby); ?></label></th><td>
<?php
if ($flags_active AND $nearby_active){ ?>
<fieldset><legend class="screen-reader-text"><span><?php printf(esc_html_e('Integrate with %s and %s to display country flag?', 'timelines'), $flags, $nearby); ?></span></legend>
<label for="integrate-with-flags-and-nearby"><input name="integrate-with-flags-and-nearby" type="checkbox" id="integrate-with-flags-and-nearby" value="1" <?php checked('1', $options['integrate-with-flags-and-nearby']); ?> /><?php esc_html_e('Display flag next to timeline entry', 'timelines'); ?></label>
</fieldset>
<?php
}else{
printf(__('Both %s and %s must be active for this function to be available.', 'timelines'), $flags, $nearby);
}
?>
</td></tr>

</table>
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.0
Version: 1.2.1
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.0/azrcrv-timelines.zip
Download link: https://github.com/azurecurve/azrcrv-timelines/releases/download/v1.2.1/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.1](https://github.com/azurecurve/azrcrv-timelines/releases/tag/v1.2.1)
* Fix bug with display of flag display option.

### [Version 1.2.0](https://github.com/azurecurve/azrcrv-timelines/releases/tag/v1.2.0)
* Integrate with [Flags](https://development.azurecurve.co.uk/classicpress-plugins/flags/) and [Nearby](https://development.azurecurve.co.uk/classicpress-plugins/nearby/) to display a country flag next to timeline entry.
* Fix bug with default timeline parameter when slug not provided.
Expand Down

0 comments on commit 73f63fd

Please sign in to comment.