]> git.bts.cx Git - cx.git/blobdiff - cx/lib/posts.php
Better paths for images and editor links
[cx.git] / cx / lib / posts.php
index 326d81c470585f90848e59d57b2ab2ffcbd339d8..4d122dfe642ff2fb087af6a49b9c818138b2a4fc 100644 (file)
@@ -46,8 +46,11 @@ class Post {
        }
 
        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;
+               $permalink = '/' . $this->slug;
+               if ($this->is_page == false) {
+                       $permalink = '/' . date('Y', $this->date) . '/' . date('m', $this->date) . '/' . $this->slug;
+               }
+               return $permalink;
        }
 
        public function get_metadata() {