WSP-33 on/off display the copyright information

This commit is contained in:
Filip Penkava
2017-01-20 10:50:54 +01:00
parent 8a19a64615
commit 01b59b4328
2 changed files with 33 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ require_once '../../../wp-load.php';
$json = file_get_contents('php://input');
//$json = file_get_contents('log.txt');
//file_put_contents('log.txt', $json . "\n\n", FILE_APPEND);
file_put_contents('log.txt', $json . "\n\n", FILE_APPEND);
$obj = json_decode($json, true);
if ($obj['type'] == 'composite') {
@@ -15,6 +15,10 @@ if ($obj['type'] == 'composite') {
if ($obj['pubstatus'] == 'usable') {
$content = $obj['description_html'] . "<!--more-->" . $obj['body_html'];
if ($settings['display-copyright'] == "on") {
$content.= ""; // $obj['copyrightnotice']
}
$guid = wp_strip_all_tags($obj['guid']);
$sync = $wpdb->get_row("SELECT post_id FROM " . $wpdb->prefix . DB_TABLE_SYNC_POST . " WHERE guid = '" . $guid . "'");