WSP-37
This commit is contained in:
@@ -43,6 +43,7 @@ function superdesk_admin() {
|
||||
'separator-caption-image' => $_POST['separator-caption-image'],
|
||||
'copyrightholder-image' => $_POST['copyrightholder-image'],
|
||||
'copyrightnotice-image' => $_POST['copyrightnotice-image'],
|
||||
'separator-located' => $_POST['separator-located'],
|
||||
);
|
||||
update_option('superdesk_settings', $settings);
|
||||
} else if (get_option('superdesk_settings')) {
|
||||
@@ -66,6 +67,7 @@ function superdesk_admin() {
|
||||
'separator-caption-image' => '',
|
||||
'copyrightholder-image' => '',
|
||||
'copyrightnotice-image' => '',
|
||||
'separator-located' => '',
|
||||
);
|
||||
}
|
||||
$statuses = array(
|
||||
@@ -383,6 +385,14 @@ function superdesk_admin() {
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="separator-located">Separator between the location and name</label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="separator-located" id="separator-located" class="regular-text" value="<?php echo($settings['separator-located']); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="submit">
|
||||
|
||||
@@ -16,6 +16,12 @@ if ($obj['type'] == 'text') {
|
||||
if ($obj['pubstatus'] == 'usable') {
|
||||
$content = $obj['description_html'] . "<!--more-->" . $obj['body_html'];
|
||||
|
||||
if (!empty($obj['located'])) {
|
||||
$content = substr($obj['description_html'], strpos($obj['description_html'], '>') + 1, strlen($obj['description_html'])) . "<!--more-->" . $obj['body_html'];
|
||||
|
||||
$content = '<p>' . wp_strip_all_tags($obj['located']) . $settings['separator-located'] . $content;
|
||||
}
|
||||
|
||||
if ($settings['display-copyright'] == "on" && isset($obj['associations']['featuremedia']['copyrightnotice'])) {
|
||||
$content.= "<p>" . wp_strip_all_tags($obj['associations']['featuremedia']['copyrightnotice']) . "</p>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user