PATH:
home
/
letacommog
/
laindinois
/
OLD
/
wp-content
/
plugins
/
downtown-rest-api
/
classes
<?php add_action( 'rest_api_init', 'dwt_listing_homescreen_api_hooks_get', 0 ); function dwt_listing_homescreen_api_hooks_get() { register_rest_route( 'downtown/app', '/home/', array( 'methods' => WP_REST_Server::READABLE, 'callback' => 'dwt_listing_homeScreen_get', 'permission_callback' => function () { return dwt_listing_basic_auth(); }, ) ); } if (!function_exists('dwt_listing_homeScreen_get')) { function dwt_listing_homeScreen_get() { global $dwt_listing_api; $public_events = $public_listings = ''; $screenTitle = (isset( $dwt_listing_api['sb_home_screen_title'] ) && $dwt_listing_api['sb_home_screen_title'] != "" ) ? $dwt_listing_api['sb_home_screen_title'] : __("Home Screen", "dwt-listing-api"); $per_page = (isset( $dwt_listing_api['dwt_app_homes_listings'] ) && $dwt_listing_api['dwt_app_homes_listings'] != "" ) ? $dwt_listing_api['dwt_app_homes_listings'] : '8'; $data['page_title'] = $screenTitle; $data['section_title'] = $screenTitle; $data['page_title'] = $screenTitle; $data['section_txt'] = __("Latest Listings", "dwt-listing-api"); $data['section_btn'] = __("View All ", "dwt-listing-api"); $data['latest_events'] = __("Latest Events", "dwt-listing-api"); $data['view_all_events'] = __("View All Events ", "dwt-listing-api"); //search $data['search_section']['main_title'] = $dwt_listing_api['search_section_show_title']; $data['search_section']['sub_title'] = $dwt_listing_api['search_section_show_subtitle']; $data['search_section']['placeholder'] = $dwt_listing_api['search_section_show_placeholder']; $s_img = (isset($dwt_listing_api['search_section_show_bg_image']['url']) && $dwt_listing_api['search_section_show_bg_image']['url'] != "") ? $dwt_listing_api['search_section_show_bg_image']['url'] : dwt_listing_API_PLUGIN_URL."images/search_screen.jpg"; $data['search_section']['image'] = $s_img; //cats $data['categories'] = dwt_listing_home_adsLayouts('cat_icons'); //listings $public_listings = dwt_listing_fetchlistings('publish',$per_page); $data['listings'] = $public_listings; //public events $public_events = dwt_listing_fetcheventz('publish',5); $data['events'] = $public_events; $data['advanced_search']['screen_title'] = esc_html__("Advanced Search", "dwt-listing-api"); $data['advanced_search']['filter'] = esc_html__("Filter", "dwt-listing-api"); $data['advanced_search']['sort'] = esc_html__("Sort", "dwt-listing-api"); $data['advanced_search']['reset'] = esc_html__("Reset", "dwt-listing-api"); $data['advanced_search']['search_placeholder'] = esc_html__("What are you looking for...", "dwt-listing-api"); /*$layout = $dwt_listing_api['app_homescreen_manager']['enabled']; if ($layout): foreach ($layout as $key=>$value) { switch($key) { case 'search': $data['search_section']['main_title'] = $dwt_listing_api['search_section_show_title']; $data['search_section']['sub_title'] = $dwt_listing_api['search_section_show_subtitle']; $data['search_section']['placeholder'] = $dwt_listing_api['search_section_show_placeholder']; $s_img = (isset($dwt_listing_api['search_section_show_bg_image']['url']) && $dwt_listing_api['search_section_show_bg_image']['url'] != "") ? $dwt_listing_api['search_section_show_bg_image']['url'] : dwt_listing_API_PLUGIN_URL."images/search_screen.jpg"; $data['search_section']['image'] = $s_img; $data['search_section']['cat_icons'] = dwt_listing_home_adsLayouts('cat_icons'); break; case 'listings': $public_listings = dwt_listing_fetchlistings('publish',$per_page); $data['listings'] = $public_listings; break; } } endif;*/ return $response = array( 'success' => true, 'data' => $data, 'message' => '' ); } } if (!function_exists('dwt_listing_appMenu_settings')) { function dwt_listing_appMenu_settings() { global $dwt_listing_api; $data_menu = array(); $data_menu['home'] = __("Home", "dwt-listing-api"); if(isset($dwt_listing_api['dwt_app_menu_home']) && $dwt_listing_api['dwt_app_menu_home'] !="") { $data_menu['home'] = $dwt_listing_api['dwt_app_menu_home']; } $data_menu['adv_search'] = __("Advanced Search", "dwt-listing-api"); if(isset($dwt_listing_api['dwt_app_menu_search']) && $dwt_listing_api['dwt_app_menu_search'] !="") { $data_menu['adv_search'] = $dwt_listing_api['dwt_app_menu_search']; } $data_menu['events'] = __("Events", "dwt-listing-api"); if(isset($dwt_listing_api['dwt_app_menu_events']) && $dwt_listing_api['dwt_app_menu_events'] !="") { $data_menu['events'] = $dwt_listing_api['dwt_app_menu_events']; } $data_menu['cats'] = __("Categories", "dwt-listing-api"); if(isset($dwt_listing_api['dwt_app_menu_categories']) && $dwt_listing_api['dwt_app_menu_categories'] !="") { $data_menu['cats'] = $dwt_listing_api['dwt_app_menu_categories']; } $data_menu['blog'] = __("Blog", "dwt-listing-api"); if(isset($dwt_listing_api['dwt_app_menu_blog']) && $dwt_listing_api['dwt_app_menu_blog'] !="") { $data_menu['blog'] = $dwt_listing_api['dwt_app_menu_blog']; } $data_menu['about'] = __("About Us", "dwt-listing-api"); if(isset($dwt_listing_api['dwt_app_menu_about']) && $dwt_listing_api['dwt_app_menu_about'] !="") { $data_menu['about'] = $dwt_listing_api['dwt_app_menu_about']; } $data_menu['contact'] = __("Contact Us", "dwt-listing-api"); if(isset($dwt_listing_api['dwt_app_menu_contact']) && $dwt_listing_api['dwt_app_menu_contact'] !="") { $data_menu['contact'] = $dwt_listing_api['dwt_app_menu_contact']; } $data_menu['register'] = __("Login / Register", "dwt-listing-api"); if(isset($dwt_listing_api['dwt_app_menu_reg']) && $dwt_listing_api['dwt_app_menu_reg'] !="") { $data_menu['register'] = $dwt_listing_api['dwt_app_menu_reg']; } $data_menu['dashboard'] = __("Dashboard", "dwt-listing-api"); $data_menu['my_listings'] = __("Listings", "dwt-listing-api"); $data_menu['packages'] = __("Packages", "dwt-listing-api"); $data_menu['saved_listings'] = __("Saved Listings", "dwt-listing-api"); $data_menu['reviews'] = __("Reviews", "dwt-listing-api"); $data_menu['logout'] = __("Logout", "dwt-listing-api"); return $data_menu; } }
[+]
..
[-] profile.php
[edit]
[-] listing-search.php
[edit]
[-] register.php
[edit]
[-] blog.php
[edit]
[-] reviews.php
[edit]
[-] login.php
[edit]
[+]
payments
[-] event-detail.php
[edit]
[-] author-listings.php
[edit]
[-] packages.php
[edit]
[-] categories.php
[edit]
[+]
packages
[-] events-search.php
[edit]
[-] fetch_data.php
[edit]
[-] home.php
[edit]
[-] listing-detail.php
[edit]
[+]
submit-listing
[+]
profile
[-] forget.php
[edit]
[-] settings.php
[edit]
[-] events.php
[edit]