C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\includes\class-pointfindercoreelements.php
Copy 1. Load function pointfinder_search_page_func
$this->loader->add_action( 'pointfinder_search_page_hook', $plugin_public, 'pointfinder_search_page_func' );
C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\includes\customshortcodes\pf-half-map-shortcodes.php
Copy 2. Tạo shortcde
pf_directory_half_map
3. Load function
public function pointfinder_single_pfhalfmap_module_html( $atts,$content ) {}
C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\public\class-pointfindercoreelements-public.php
Copy 4. Load function
public function pointfinder_search_page_func(){}
5. Load shortcode
echo do_shortcode('[pf_directory_half_map setup5_mapsettings_zoom="'.$setup42_searchpagemap_zoom.'" setup5_mapsettings_zoom_mobile="'.$setup42_searchpagemap_mobile.'" setup5_mapsettings_autofit="1" setup5_mapsettings_autofitsearch="1" setup5_mapsettings_type="'.$setup42_searchpagemap_type.'" mapsearch_status="1" mapnot_status="1" setup5_mapsettings_lat="'.$setup42_searchpagemap_lat.'" setup5_mapsettings_lng="'.$setup42_searchpagemap_lng.'" setup5_mapsettings_style="'.$setup42_searchpagemap_style.'" setup7_geolocation_status="0" listingtype="" itemtype="" conditions="" features ="" locationtype="" termname="-" csauto="" neaddress="'.$pfpointfinder_google_search_coord.'" ne="'.$pfne.'" ne2="'.$pfne2.'" sw="'.$pfsw.'" sw2="'.$pfsw2.'"]');
C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\ajax\traits\listdata.php
Copy 6. Load function
public function pf_ajax_list_items() {}
C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\public\js\categorymap.js
Copy 7. Click vào button filter results ở hình trên
$('#pf-search-button-halfmap').on('click',function(){}
8. Nó sẽ load function $.pfloadlistings
$.pfloadlistings = function(ne,sw,ne2,sw2,saction,sdata,wherex,fromx){}
C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\public\js\theme-map-functions.js
Copy 9. Load function $.pfgetpagelistdata
$.pfgetpagelistdata = function( options ) {}
10. Load function
$.pfdefinestate
11. Load function Ajax pfget_listitems
C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\includes\class-pointfindercoreelements.php
Copy 12. Load hook PF_AJAX_HANDLER_pfget_listitems
$PointFinderListData = new PointFinderListData();
$this->loader->add_action( 'PF_AJAX_HANDLER_pfget_listitems', $PointFinderListData, 'pf_ajax_list_items' );
$this->loader->add_action( 'PF_AJAX_HANDLER_nopriv_pfget_listitems', $PointFinderListData, 'pf_ajax_list_items' );
C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\admin\fields\pfgetsearchfields.php
Copy $pointfinder_radius_search_val = $this->PFSAIssetControl('setup7_geolocation_distance','','10');
C:\xampp\htdocs\pointfindertheme\wp-content\plugins\pointfindercoreelements\public\class-pointfindercoreelements-public.php
Copy public function pointfinder_geo_posts_where($where, $query) {}
Result:
'AND ( ( wp_postmeta.post_id IS NULL OR mt1.meta_key = "webbupointfinder_item_featuredmarker")) AND wp_posts.post_type = "listing" AND ((wp_posts.post_status = "publish")) AND (latitude.meta_key="webbupointfinder_items_location" AND SUBSTRING_INDEX(latitude.meta_value,",",1) BETWEEN 20.607372352095606 AND 21.359976647904393) AND (longitude.meta_key="webbupointfinder_items_location" AND SUBSTRING_INDEX(SUBSTRING_INDEX(longitude.meta_value,",",2),",",-1) BETWEEN 105.43833830355962 AND 106.24439849644037)';