Esempio n. 1
0
 /**
  * Change the date output format of parent's
  *
  * @param string $format
  *
  * @return mixed
  */
 public function date($format = 'F jS, Y')
 {
     //December 24th, 2015
     return parent::date($format);
 }
Esempio n. 2
0
 /**
  * Check if the current page is matching to the routing page.
  * @return bool
  */
 private function isSpecificPage()
 {
     static $currentHierarchy;
     if (!isset($currentHierarchy)) {
         $currentPost = new Post(get_post());
         $currentHierarchy = $currentPost->ancestors()->map(function (Post $post) {
             return urldecode($post->wpPost()->post_name);
         })->push(urldecode($currentPost->wpPost()->post_name));
     }
     return $this->isSelfOrDescendant($currentHierarchy);
 }