diff --git a/admin/admin.php b/admin/admin.php index 58a5e2f..d2a737c 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -51,7 +51,6 @@ function superdesk_admin() { 'author-byline' => $_POST['author-byline'], 'byline-words' => $_POST['byline-words'], 'display-copyright' => $_POST['display-copyright'], - 'convert-keywords' => $_POST['convert-keywords'], 'import-keywords' => $_POST['import-keywords'], 'convert-services' => $_POST['convert-services'], 'subject-type' => $_POST['subject-type'], @@ -67,6 +66,11 @@ function superdesk_admin() { 'download-images' => $_POST['download-images'], 'post-formats' => $_POST['download-images'], 'post-formats-table' => $resultArray, + 'location-modifier' => $_POST['location-modifier'], + 'update-log-option' => $_POST['update-log-option'], + 'update-log-date-format' => $_POST['update-log-date-format'], + 'update-log-text' => $_POST['update-log-text'], + 'update-log-position' => $_POST['update-log-position'], ); update_option('superdesk_settings', $settings); } else if (get_option('superdesk_settings')) { @@ -82,7 +86,6 @@ function superdesk_admin() { 'author-byline' => '', 'byline-words' => '', 'display-copyright' => '', - 'convert-keywords' => '', 'import-keywords' => '', 'convert-services' => '', 'subject-type' => '', @@ -98,6 +101,11 @@ function superdesk_admin() { 'download-images' => '', 'post-formats' => '', 'post-formats-table' => array(), + 'location-modifier' => 'standard', + 'update-log-option' => 'off', + 'update-log-date-format' => 'Y-m-d H:i', + 'update-log-text' => 'This article was updated at', + 'update-log-position' => 'off' ); } $statuses = array( @@ -175,7 +183,7 @@ function superdesk_admin() {
' . wp_strip_all_tags($obj['located']) . $settings['separator-located']; + $content .= '
';
+ if($prepend){
+ $content .= $updateText .'
';
+ }
+ $content .= wp_strip_all_tags($obj['located']) . $settings['separator-located'];
$content .= mb_substr($obj['body_html'], mb_strpos($obj['body_html'], '>') + 1, mb_strlen($obj['body_html']));
} else {
- $content = $obj['description_html'] . "" . $obj['body_html'];
+ $content = $obj['description_html'] . "";
+ $content .= '
';
+ if($prepend){
+ $content .= $updateText .'
';
+ }
+ $content .= mb_substr($obj['body_html'], mb_strpos($obj['body_html'], '>') + 1, mb_strlen($obj['body_html']));
}
/* if ($settings['display-copyright'] == "on" && isset($obj['associations']['featuremedia']['copyrightnotice'])) {
@@ -30,10 +62,8 @@ if ($obj['type'] == 'text') {
$content .= "
Editors Note: " . wp_strip_all_tags($obj['ednote']) . "
"; } - if (isset($obj['evolvedfrom'])) { - $guid = wp_strip_all_tags($obj['evolvedfrom']); - } else { - $guid = wp_strip_all_tags($obj['guid']); + if($append){ + $content .= "".$updateText."
"; } if ($settings['import-keywords'] && $settings['import-keywords'] == 'on') { @@ -126,7 +156,7 @@ if ($obj['type'] == 'text') { $content = embed_images($content, $image); } - $sync = $wpdb->get_row("SELECT post_id FROM " . $wpdb->prefix . DB_TABLE_SYNC_POST . " WHERE guid = '" . $guid . "'"); + if ($sync) { $post_ID = $sync->post_id;