diff --git a/autoload.php b/autoload.php index 6cb68e6..ac1dc4b 100644 --- a/autoload.php +++ b/autoload.php @@ -93,7 +93,7 @@ if ($obj['type'] == 'text') { if ($settings['author-byline'] && $settings['author-byline'] == 'on') { $author_name = $obj['byline']; - if (!empty(trim($settings['byline-words']))) { + if (!empty($settings['byline-words'])) { $replaceWords = explode(',', $settings['byline-words']); foreach ($replaceWords as $value) { $author_name = str_replace(trim($value) . " ", "", $author_name); diff --git a/superdeskPublisher.php b/superdeskPublisher.php index 6dfbf28..60d5df1 100644 --- a/superdeskPublisher.php +++ b/superdeskPublisher.php @@ -174,11 +174,11 @@ function custom_wpkses_post_tags($tags, $context) { function generate_caption_image($media) { $caption = ''; $settings = get_option('superdesk_settings'); - if (!empty(trim($media['description_text']))) { + if (!empty($media['description_text'])) { $caption .= wp_strip_all_tags($media['description_text']); } - if (!empty(trim($media['byline']))) { + if (!empty($media['byline'])) { if (!empty($caption)) { $caption .= ' '; } @@ -186,11 +186,11 @@ function generate_caption_image($media) { $caption .= (empty($settings['separator-caption-image']) ? ':' : $settings['separator-caption-image']) . ' ' . wp_strip_all_tags($media['byline']); } - if (!empty(trim($media['copyrightholder'])) && $settings['copyrightholder-image'] == 'on') { + if (!empty($media['copyrightholder']) && $settings['copyrightholder-image'] == 'on') { $caption .= ' / ' . wp_strip_all_tags($media['copyrightholder']); } - if (!empty(trim($media['copyrightnotice'])) && $settings['copyrightnotice-image'] == 'on') { + if (!empty($media['copyrightnotice']) && $settings['copyrightnotice-image'] == 'on') { $caption .= ' ' . wp_strip_all_tags($media['copyrightnotice']); }