code/extensions/BlogFilter.php
public function liveChildren($showAll = false, $onlyDeletedFromStage = false) {
		$staged = parent::liveChildren($showAll, $onlyDeletedFromStage);

		if(!$this->shouldFilter()
			&& in_array(get_class($this->owner), ClassInfo::subClassesFor("Blog"))
			&& !Permission::check("VIEW_DRAFT_CONTENT")
		) {
			// Filter publish posts
			$dataQuery = $staged->dataQuery()
				->innerJoin("BlogPost", '"BlogPost_Live"."ID" = "SiteTree"_"Live"."ID"')
				->where('"PublishDate" < \'' . Convert::raw2sql(SS_Datetime::now()) . '\'');
			$staged = $staged->setDataQuery($dataQuery);
		}
		return $staged;
	}
public function liveChildren($showAll = false, $onlyDeletedFromStage = false) {
		$staged = parent::liveChildren($showAll, $onlyDeletedFromStage);

		if(!$this->shouldFilter()
			&& in_array(get_class($this->owner), ClassInfo::subClassesFor("Blog"))
			&& !Permission::check("VIEW_DRAFT_CONTENT")
		) {
			// Filter publish posts
			$dataQuery = $staged->dataQuery()
				->innerJoin("BlogPost", '"BlogPost_Live"."ID" = "SiteTree"_"Live"."ID"')
				->where('"PublishDate" < \'' . Convert::raw2sql(SS_Datetime::now()) . '\'');
			$staged = $staged->setDataQuery($dataQuery);
		}
		return $staged;
	}
public function liveChildren ( $ showAll = false , $ onlyDeletedFromStage = false ) { $ staged = parent :: liveChildren ( $ showAll , $ onlyDeletedFromStage ) ; if ( ! $ this -> shouldFilter ( ) && in_array ( get_class ( $ this -> owner ) , ClassInfo :: subClassesFor ( "Blog" ) ) && ! Permission :: check ( "VIEW_DRAFT_CONTENT" ) ) { // Filter publish posts
 $ dataQuery = $ staged -> dataQuery ( ) -> innerJoin ( "BlogPost" , '"BlogPost_Live"."ID" = "SiteTree"_"Live"."ID"' ) -> where ( '"PublishDate" < \'' . Convert :: raw2sql ( SS_Datetime :: now ( ) ) . '\'' ) ; $ staged = $ staged -> setDataQuery ( $ dataQuery ) ; } return $ staged ; }
Augments (@link Hierarchy::liveChildren()}

@param $staged DataList
@param $showAll boolean
Augments ( @link Hierarchy :: liveChildren () }