mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 14:06:23 +05:30
Edit-Post: Change publishing Date (no Drafts)
This commit is contained in:
parent
7601aaeffa
commit
dfd471ffaa
3 changed files with 10 additions and 5 deletions
|
|
@ -43,8 +43,12 @@ function remove_accent($str) {
|
|||
}
|
||||
|
||||
// Edit blog posts
|
||||
function edit_post($title, $tag, $url, $content, $oldfile, $destination = null, $description = null) {
|
||||
function edit_post($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null) {
|
||||
$oldurl = explode('_', $oldfile);
|
||||
if($date !== null)
|
||||
{
|
||||
$oldurl[0] = substr($oldurl[0],0,-19) . date('Y-m-d-h-m-s',strtotime($date));
|
||||
}
|
||||
|
||||
$post_title = $title;
|
||||
$post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue