/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { if (is_null($this->_postCollection)) { $this->_postCollection = parent::_getPostCollection()->addArchiveDateFilter($this->getArchiveId(), $this->getArchive()->getIsDaily()); } return $this->_postCollection; }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { if (is_null($this->_postCollection)) { $this->_postCollection = parent::_getPostCollection()->addPostTypeFilter(array('post', 'page'))->addSearchStringFilter($this->getParsedSearchString(), array('post_title', 'post_content', 'post_excerpt'), 'OR'); } return $this->_postCollection; }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { if (is_null($this->_postCollection)) { $this->_postCollection = parent::_getPostCollection()->addCategoryIdFilter($this->getCurrentCategoryId()); } return $this->_postCollection; }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { if (is_null($this->_postCollection)) { $this->_postCollection = parent::_getPostCollection()->addAuthorIdFilter($this->getAuthorId()); } return $this->_postCollection; }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { if (is_null($this->_postCollection)) { $helper = Mage::helper('wordpress/search'); $this->_postCollection = parent::_getPostCollection()->addPostTypeFilter(array('post', 'page'))->addSearchStringFilter($helper->getParsedSearchString(), $helper->getSearchableFields(), $helper->getLogicalOperator()); } return $this->_postCollection; }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { if (is_null($this->_postCollection)) { $this->_postCollection = parent::_getPostCollection()->addSearchStringFilter($this->_getParsedSearchString(), array('post_title', 'post_content')); if ($postTypes = $this->getRequest()->getParam('post_type')) { $this->_postCollection->addPostTypeFilter($postTypes); } else { $this->_postCollection->addPostTypeFilter(array('post', 'page')); } } return $this->_postCollection; }
/** * Adds on cateogry/author ID filters * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { $collection = parent::_getPostCollection() ->setPageSize($this->_pagerLimit) ->setCurPage(1); if ($categoryId = $this->getData('category_id')) { $collection->addCategoryIdFilter($categoryId); } if ($authorId = $this->getData('author_id')) { $collection->addAuthorIdFilter($authorId); } return $collection; }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { return parent::_getPostCollection()->addArchiveDateFilter($this->getArchiveId(), $this->getArchive()->getIsDaily()); }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { return parent::_getPostCollection()->addAuthorIdFilter($this->getAuthorId()); }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { return parent::_getPostCollection()->addStickyPostsToCollection(); }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { return parent::_getPostCollection()->addStickyPostsToCollection()->addPostTypeFilter('post'); }
/** * Generates and returns the collection of posts * * @return Fishpig_Wordpress_Model_Mysql4_Post_Collection */ protected function _getPostCollection() { return parent::_getPostCollection()->addFieldToFilter('post_author', $this->getAuthor()->getId()); }