Esempio n. 1
0
 /**
  * Checks for existence of a post with given post_url
  *
  * @param str $post_url (slug)
  * @return int - id of post with matching url
  */
 public function isPostUrl($h, $url = '')
 {
     //$post_id = \Hotaru\Models\Post::getFirstPostByPostUrl(urlencode($url));
     $post_id = \Hotaru\Models2\Post::getFirstPostByPostUrl($h, urlencode($url));
     if ($post_id) {
         return $post_id;
     } else {
         return false;
     }
 }