Skip to content

Commit

Permalink
Merge pull request #1 from RRZE-Webteam/dev1-4
Browse files Browse the repository at this point in the history
Bugfix Copyrightinfo bei Artikelanzeige
  • Loading branch information
xwolfde committed Sep 16, 2015
2 parents f06a85c + 15b62e0 commit 3697431
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
12 changes: 10 additions & 2 deletions functions/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
'advanced_reveal_pages_id' => true,
'advanced_images_info_credits' => 0,
'advanced_display_hero_credits' => true,
'advanced_display_postthumb_credits' => true,

);

Expand Down Expand Up @@ -943,11 +944,18 @@
),
'advanced_display_hero_credits' => array(
'type' => 'bool',
'title' => __( 'Copyright-Hinweis', 'fau' ),
'label' => __( 'Auf der Startseite wird im Slider der Copyright-Hinweis des Bildes angezeigt, wenn vorhanden', 'fau' ),
'title' => __( 'Copyright-Hinweis Startseite', 'fau' ),
'label' => __( 'Auf der Startseite wird im Slider bzw im Banner der Copyright-Hinweis des Bildes angezeigt, wenn vorhanden', 'fau' ),
'default' => $defaultoptions['advanced_display_hero_credits'],
'parent' => 'design'
),
'advanced_display_postthumb_credits' => array(
'type' => 'bool',
'title' => __( 'Copyright-Hinweis Beiträge', 'fau' ),
'label' => __( 'In Beiträgen wird das Artikelbild mit einem Copyright-Hinweis des Bildes versehen, wenn vorhanden', 'fau' ),
'default' => $defaultoptions['advanced_display_postthumb_credits'],
'parent' => 'design'
),

'advanced_images_info_credits' => array(
'type' => 'select',
Expand Down
28 changes: 23 additions & 5 deletions single.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,31 @@
echo '<div class="post-image-caption">'.$bildunterschrift.'</div>';
} else {
$imgdata = fau_get_image_attributs($post_thumbnail_id);
$info = trim(strip_tags( $imgdata['beschreibung'] ));
if (isset($info) && (!empty($info))) {
echo '<div class="post-image-caption">'. $imgdata['beschreibung'].'</div>';
} elseif (isset($imgdata['credits']) && (!empty($imgdata['credits'])) ) {
echo '<div class="post-image-caption">'. $imgdata['credits'].'</div>';
$info = trim(strip_tags( $imgdata['excerpt'] ));
$credits = '';
if ($options['advanced_display_postthumb_credits']==true) {
$credits = trim(strip_tags( $imgdata['credits']));
}


if ( (!empty($info)) || (!empty($credits)) ) {
echo '<div class="post-image-caption">';

if (!empty($info)) {
echo $info;
}

if (!empty($credits)) {
if ((!empty($info)) && ($credits != $info)) {
echo "<br>";
echo $credits;
} elseif (empty($info)) {
echo $credits;
}
}
echo "</div>\n";
}


}

Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GitHub THeme URI: https://github.com/RRZE-Webteam/FAU-Techfak
Author: RRZE-Webteam
Author URI: http://www.rrze.fau.de
Description: Wordpress-Theme für die Technische Fakultät der Friedrich-Alexander-Universität (FAU)
Version: 1.3.4
Version: 1.3.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: FAU, Website, Corporate Design
Expand Down

0 comments on commit 3697431

Please sign in to comment.