{"id":163,"date":"2019-10-04T08:24:16","date_gmt":"2019-10-04T08:24:16","guid":{"rendered":"https:\/\/docs.osclasspoint.com\/?p=163"},"modified":"2019-10-05T10:01:20","modified_gmt":"2019-10-05T10:01:20","slug":"hsearch-php","status":"publish","type":"post","link":"https:\/\/docs.osclasspoint.com\/hsearch-php","title":{"rendered":"hSearch.php"},"content":{"rendered":"\n<p>osc_search() &#8211; Gets search object<\/p>\n\n\n\n<p>osc_list_orders() &#8211; Gets available search orders<\/p>\n\n\n\n<p>osc_search_page() &#8211; Gets current search page<\/p>\n\n\n\n<p>osc_search_total_pages() &#8211; Gets total pages of search<\/p>\n\n\n\n<p>osc_search_has_pic() &#8211; Gets if &#8220;has pic&#8221; option is enabled or not in the search<\/p>\n\n\n\n<p>osc_search_order() &#8211; Gets current search order<\/p>\n\n\n\n<p>osc_search_order_type() &#8211; Gets current search order type<\/p>\n\n\n\n<p>osc_search_pattern() &#8211; Gets current search pattern<\/p>\n\n\n\n<p>osc_search_region() &#8211; Gets current search region<\/p>\n\n\n\n<p>osc_search_city() &#8211; Gets current search city<\/p>\n\n\n\n<p>osc_search_price_max() &#8211; Gets current search max price<\/p>\n\n\n\n<p>osc_search_price_min() &#8211; Gets current search min price<\/p>\n\n\n\n<p>osc_search_total_items() &#8211; Gets current search total items<\/p>\n\n\n\n<p>osc_search_show_as() &#8211; Gets current search &#8220;show as&#8221; variable (show the items as a list or as a gallery)<\/p>\n\n\n\n<p>osc_search_start() &#8211; Gets current search start item record<\/p>\n\n\n\n<p>osc_search_end() &#8211; Gets current search end item record<\/p>\n\n\n\n<p>osc_search_category() &#8211; Gets current search category<\/p>\n\n\n\n<p>osc_search_category_id() &#8211; Gets current search category id<\/p>\n\n\n\n<p>osc_update_search_url($params, $delimiter = &#8216;&amp;&#8217;) &#8211; Update the search url with new options<\/p>\n\n\n\n<p>osc_alert_form() &#8211; Load the form for the alert subscription<\/p>\n\n\n\n<p>osc_search_alert() &#8211; Gets alert of current search<\/p>\n\n\n\n<p>osc_search_show_all_url( ) &#8211; Gets for a default search (all categories, no other option)<\/p>\n\n\n\n<p>osc_search_url($params = null) &#8211; Gets search url given params<\/p>\n\n\n\n<h2>Helpers for listing the locations on sidebar<\/h2>\n\n\n\n<p>osc_list_country() &#8211; Gets list of countries with items<\/p>\n\n\n\n<p>osc_list_region() &#8211; Gets list of regions with items<\/p>\n\n\n\n<p>osc_list_city() &#8211; Gets list of cities with items<\/p>\n\n\n\n<p>osc_has_list_countries() &#8211; Gets the next country in the list_countries list<\/p>\n\n\n\n<p>osc_has_list_regions($country = &#8216;%%%%&#8217;) &#8211; Gets the next region in the list_regions list<\/p>\n\n\n\n<p>osc_has_list_cities($region = &#8216;%%%%&#8217;) &#8211; Gets the next city in the list_cities list<\/p>\n\n\n\n<p>osc_count_list_countries() &#8211; Gets the total number of countries in list_countries<\/p>\n\n\n\n<p>osc_count_list_regions($country = &#8216;%%%%&#8217;) &#8211; Gets the total number of regions in list_regions<\/p>\n\n\n\n<p>osc_count_list_cities($region = &#8216;%%%%&#8217;) &#8211; Gets the total number of cities in list_cities<\/p>\n\n\n\n<p>osc_list_region_name() &#8211; Gets the the name of current &#8220;list region&#8221;<\/p>\n\n\n\n<p>osc_list_region_items() &#8211; Gets the number of items of current &#8220;list region&#8221;<\/p>\n\n\n\n<p>osc_list_city_name() &#8211; Gets the the name of current &#8220;list city&#8221;<\/p>\n\n\n\n<p>osc_list_city_items() &#8211; Gets the number of items of current &#8220;list city&#8221;<\/p>\n\n\n\n<p>osc_list_country_url() &#8211; Gets the url of current &#8220;list country&#8221;<\/p>\n\n\n\n<p>osc_list_region_url() &#8211; Gets the url of current &#8220;list region&#8221;<\/p>\n\n\n\n<p>osc_list_city_url() &#8211; Gets the url of current &#8220;list city&#8221;<\/p>\n\n\n\n<h2>Latest searches<\/h2>\n\n\n\n<p>osc_get_latest_searches($limit = 20) &#8211; Gets the latest searches done in the website<\/p>\n\n\n\n<p>osc_count_latest_searches() &#8211; Gets the total number of latest searches done in the website<\/p>\n\n\n\n<p>osc_has_latest_searches() &#8211; Gets the next latest search<\/p>\n\n\n\n<p>osc_latest_search() &#8211; Gets the current latest search<\/p>\n\n\n\n<p>osc_latest_search_text() &#8211; Gets the current latest search pattern<\/p>\n\n\n\n<p>osc_latest_search_date() &#8211; Gets the current latest search date<\/p>\n\n\n\n<p>osc_latest_search_total() &#8211; Gets the current latest search total<\/p>\n","protected":false},"excerpt":{"rendered":"<p>osc_search() &#8211; Gets search object osc_list_orders() &#8211; Gets available search orders osc_search_page() &#8211; Gets current search page osc_search_total_pages() &#8211; Gets total pages of search osc_search_has_pic() &#8211; Gets if &#8220;has pic&#8221; option is enabled or not in the search osc_search_order() &#8211; Gets current search order osc_search_order_type() &#8211; Gets current search order type osc_search_pattern() &#8211; Gets current [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12,105],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/posts\/163"}],"collection":[{"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":1,"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":164,"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/posts\/163\/revisions\/164"}],"wp:attachment":[{"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.osclasspoint.com\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}