本文整理汇总了PHP中RevSliderFunctionsWP::getPostsByIDs方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSliderFunctionsWP::getPostsByIDs方法的具体用法?PHP RevSliderFunctionsWP::getPostsByIDs怎么用?PHP RevSliderFunctionsWP::getPostsByIDs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSliderFunctionsWP
的用法示例。
在下文中一共展示了RevSliderFunctionsWP::getPostsByIDs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPostsFromSpecificList
/**
*
* get posts from specific posts list
*/
private function getPostsFromSpecificList()
{
$strPosts = $this->getParam("posts_list", "");
$strPosts = apply_filters('revslider_set_posts_list', $strPosts);
$slider_id = $this->getID();
$arrPosts = RevSliderFunctionsWP::getPostsByIDs($strPosts, $slider_id);
return $arrPosts;
}
示例2: getPostsFromSpecificList
/**
*
* get posts from specific posts list
*/
private function getPostsFromSpecificList($gal_ids = array())
{
$is_gal = false;
$additional = array();
if (!empty($gal_ids) && $gal_ids[0]) {
$strPosts = $gal_ids;
$strPosts = apply_filters('revslider_set_posts_list_gal', $strPosts, $this->getID());
$is_gal = true;
} else {
if (isset($gal_ids[0])) {
unset($gal_ids[0]);
$strPosts = implode(",", $gal_ids);
$additional['order'] = "none";
$additional['orderby'] = "post__in";
} else {
$strPosts = $this->getParam("posts_list", "");
$additional['order'] = $this->getParam("posts_sort_direction", "DESC");
$additional['orderby'] = $this->getParam("post_sortby", "");
}
$strPosts = apply_filters('revslider_set_posts_list', $strPosts, $this->getID());
}
$slider_id = $this->getID();
$arrPosts = RevSliderFunctionsWP::getPostsByIDs($strPosts, $slider_id, $is_gal, $additional);
return $arrPosts;
}