}
}
+ public function get_permalink_path() {
+ $post_permalink = $this->is_page ? '/' . $this->slug : '/' . date('Y', $this->date) . '/' . date('m', $this->date) . '/' . $this->slug;
+ return $post_permalink;
+ }
+
public function get_metadata() {
$data = [];
post_data,
post_data_version)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);';
- cx_db_exec($sql, $site_id, $creation_time, $update_time, $slug, $date, $page, $draft, $nav_index, $title, $data, 1);
+ $id = cx_db_exec($sql, $site_id, $creation_time, $update_time, $slug, $date, $page, $draft, $nav_index, $title, $data, 1);
+ return $id;
}
function cx_posts_update_post($post_id, $title, $slug, $date, $page, $draft, $nav_index, $data) {