/** * * get sortby function including standart wp sortby array */ public static function getArrSortBy() { $arrSortBy = array(); $arrSortBy[self::SORTBY_REGULAR_PRICE] = "Regular Price"; $arrSortBy[self::SORTBY_SALE_PRICE] = "Sale Price"; $arrSortBy[self::SORTBY_NUMSALES] = "Number Of Sales"; $arrSortBy[self::SORTBY_FEATURED] = "Featured Products"; $arrSortBy[self::SORTBY_SKU] = "SKU"; $arrSortBy[self::SORTBY_STOCK] = "Stock Quantity"; $arrWPSortBy = UniteFunctionsWPBiz::getArrSortBy(); $arrOutput = array(); $arrOutput["option_disabled1"] = "---- WooCommerce Filters ----"; $arrOutput = array_merge($arrOutput, $arrSortBy); $arrOutput["option_disabled2"] = "---- Regular Filters ----"; $arrOutput = array_merge($arrOutput, $arrWPSortBy); return $arrOutput; }
$postCatID = $slider->getPostCategory(); $isMultiple = strpos($postCatID, ",") !== false; //get category name $isMultiple = true; /* if($isMultiple == false){ $catData = UniteFunctionsWPBiz::getCategoryData($postCatID); if(empty($catData)) UniteFunctionsBiz::throwError("Category with id: $postCatID not found"); $catName = $catData["cat_name"]; $urlCatPosts = UniteFunctionsWPBiz::getUrlSlidesEditByCatID($postCatID); $linkCatPosts = UniteFunctionsBiz::getHtmlLink($urlCatPosts, $catName,"","",true); } */ $sourceType = $slider->getParam("source_type", "posts"); $showSortBy = $sourceType == "posts" ? true : false; //get button links $urlNewPost = UniteFunctionsWPBiz::getUrlNewPost(); $linkNewPost = UniteFunctionsBiz::getHtmlLink($urlNewPost, "New Post", "button_new_post", "button-primary", true); //get ordering $arrSortBy = UniteFunctionsWPBiz::getArrSortBy(); $sortBy = $slider->getParam("post_sortby", ShowBizSlider::DEFAULT_POST_SORTBY); $selectSortBy = UniteFunctionsBiz::getHTMLSelect($arrSortBy, $sortBy, "id='select_sortby'", true); } require self::getPathTemplate($templateName); ?>