Skip to content

Commit 0784511

Browse files
committed
- Do not render anything if the feed is empty.
- Add title attribute to img tag. - Change name of experimental template.
1 parent b608678 commit 0784511

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

admin/cision-block-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public function getTabs()
381381
{
382382
return array(
383383
'settings' => __('General Settings', CISION_BLOCK_TEXTDOMAIN),
384-
'experimental' => __('Single Press Releases', CISION_BLOCK_TEXTDOMAIN),
384+
'permalinks' => __('Permalinks', CISION_BLOCK_TEXTDOMAIN),
385385
);
386386
}
387387

File renamed without changes.

bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Cision Block
44
* Description: Imports a news feed from Cision.
5-
* Version: 2.2.0
5+
* Version: 2.2.1
66
* Author: Cyclonecode
77
* Author URI: https://stackoverflow.com/users/1047662/cyclonecode?tab=profile
88
* Copyright: Cyclonecode

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cyclonecode/cision-block",
33
"type": "wordpress-plugin",
4-
"version": "2.2.0",
4+
"version": "2.2.1",
55
"keywords": ["wordpress", "plugin", "cision", "feed", "cision feed", "shortcode", "widget", "content"],
66
"description": "This plugin adds a shortcode and a widget that can be used for pulling and displaying pressreleases from cision.",
77
"require": {

public/cision-block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CisionBlock extends Singleton
3636
const SETTINGS_NAME = 'cision_block_settings';
3737
const TRANSIENT_KEY = 'cision_block_data';
3838
const USER_AGENT = 'cision-block/' . self::VERSION;
39-
const VERSION = '2.2.0';
39+
const VERSION = '2.2.1';
4040

4141
/**
4242
*

readme.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Contributors: cyclonecode
33
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VUK8LYLAN2DA6&source=url&lc=US&item_name=Cision+Block
44
Tags: cision, feed, cision feed, shortcode, widget, content
55
Requires at least: 3.1.0
6-
Tested up to: 5.4
6+
Tested up to: 5.4.2
77
Requires PHP: 5.3
8-
Stable tag: 2.2.0
8+
Stable tag: 2.2.1
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -279,6 +279,11 @@ Fixed a bug where source id from widget was never used.
279279

280280
== Changelog ==
281281

282+
= 2.2.1 =
283+
- Do not render anything if the feed is empty.
284+
- Add title attribute to img tag.
285+
- Change name of experimental template.
286+
282287
= 2.2.0 =
283288
- Use Regulatory argument when fetching feeds.
284289
- Add SearchTerm setting and argument.

templates/cision-block.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@
2424
*
2525
* @package Cision Block
2626
* @since 1.0
27-
* @version 2.0.0
27+
* @version 2.2.1
2828
*/
2929

3030
?>
31-
31+
<?php if (count($cision_feed)) : ?>
3232
<section<?php echo $wrapper_attributes; ?>>
3333
<?php echo $prefix; ?>
34-
<?php if (count($cision_feed)) : ?>
3534
<?php foreach ($cision_feed as $item) : ?>
3635
<article<?php echo $attributes; ?>>
3736
<h2><?php echo esc_html($item->Title); ?></h2>
@@ -42,10 +41,11 @@
4241
<img
4342
src="<?php echo esc_url($item->Images[0]->DownloadUrl); ?>"
4443
alt="<?php echo esc_html($item->Images[0]->Description); ?>"
44+
title="<?php echo esc_html($item->Images[0]->Title); ?>"
4545
/>
4646
</span>
4747
<?php endif; ?>
48-
<?php print wp_trim_words(esc_html($item->Intro ? $item->Intro : $item->Body)); ?>
48+
<?php echo wp_trim_words(esc_html($item->Intro ? $item->Intro : $item->Body)); ?>
4949
</p>
5050
<?php if (isset($item->CisionWireUrl, $readmore)) : ?>
5151
<a
@@ -55,7 +55,8 @@
5555
<?php endif; ?>
5656
</article>
5757
<?php endforeach; ?>
58-
<?php endif; ?>
5958
<?php echo $pager; ?>
6059
<?php echo $suffix; ?>
6160
</section>
61+
<?php endif; ?>
62+

0 commit comments

Comments
 (0)