コード例 #1
0
ファイル: Post.php プロジェクト: riteshsahu1981/captainkyso
	/**
	 * Generates the category portion of the URL for a post
	 *
	 * @param Fishpig_Wordpress_Model_Post $post
	 * @return string
	 */
	protected function _getPermalinkCategoryPortion(Fishpig_Wordpress_Model_Post $post)
	{
		if ($category = $post->getParentCategory()) {
			return trim($category->getSlug(), '/');
		}
	}
コード例 #2
0
ファイル: Post.php プロジェクト: xiaoguizhidao/beut
 /**
  * Generates the category portion of the URL for a post
  *
  * @param Fishpig_Wordpress_Model_Post $post
  * @return string
  */
 protected function _getPermalinkCategoryPortion(Fishpig_Wordpress_Model_Post $post)
 {
     if ($category = $post->getParentCategory()) {
         return $category->getNoBaseUri();
     }
     return '';
 }