public static function makeInfo($info) { $source = '<a target="_blank" href="' . $info->src_url . '">' . $info->src_name . '</a>'; $log = '<b>Source: </b>' . $source . '<br />[ ' . date('Y-m-d H:i:s') . ' ]'; $log .= '[ ' . $info->action . ' ][ ' . $info->msg . ' ]'; if ($info->id > 0) { $host = ogbFile::getHost(); $view = '[ id: ' . $info->id . ' ][ <a target="_blank" href="' . $host . $info->viewLink . '">View</a> ]'; $edit = '[ <a target="_blank" href="' . $host . '/wp-admin/' . $info->editLink . '">Edit</a> ]'; $log .= $view . $edit; } $logSave = '<li>' . $log . "[Post id:{$info->item_id}]<hr /></li>\n"; //if($info->action!='Ignore'){ self::addSavedLog($logSave); //} return $log; }
public static function makeLogSave($save) { if ($save->action != 'Save') { return ''; } $host = ogbFile::getHost(); $source = '<a target="_blank" href="' . $save->src_url . '">' . $save->src_name . '</a>'; $view = '[ id: ' . $save->id . ' ][ <a target="_blank" href="' . $host . $save->viewLink . '">View</a> ]'; $edit = '[ <a target="_blank" href="' . $host . 'administrator/' . $save->editLink . '">Edit</a> ]'; $savedInfo = '<li><b>Source: </b>' . $source . '<br />[ Saved at: ' . date('Y-m-d H:i:s') . ' ]'; $savedInfo .= $view . $edit . '[ ID: ' . $save->item_id . ' ]<hr /></li>'; return $savedInfo; }