This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| do_action( 'gmw_search_form_before_distance', $gmw ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply_filters( 'gmw_pt_location_query_clauses', $clauses, $this->form ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| geo-my-wp/plugins/posts/includes/gmw-pt-search-functions.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function gmw_orderby_filter( $clauses, $gmw ) { | |
| global $wpdb; | |
| //check if order-by value was submitted. If it was we will use its value otherwise we set the default value to 'distance' | |
| $orderby_value = ( isset( $_GET['gmw_orderby'] ) && !empty( $_GET['gmw_orderby'] ) ) ? $_GET['gmw_orderby'] : 'distance'; | |
| //check the value of the order-by and modify the clause based on that | |
| //when order-by distance | |
| if ( $orderby_value == 'distance' ) { | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function gmw_map_styles( $gmw ) { | |
| ?> | |
| <script> | |
| jQuery(document).ready(function($) { | |
| //declare new map options array for form ID 1 | |
| gmwMapOptions['1'] = []; | |
| }); | |
| </script> | |
| <?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function gmw_map_options( $gmw ) { | |
| ?> | |
| <script> | |
| jQuery(document).ready(function($) { | |
| //declare new map options array for form ID 1 | |
| gmwMapOptions['1'] = []; | |
| gmwMapOptions['1']['styles'] = [ | |
| { | |
| "featureType": "water", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( ! function_exists( 'array_replace_recursive' ) ) { | |
| function array_replace_recursive($base, $replacements) { | |
| foreach (array_slice(func_get_args(), 1) as $replacements) { | |
| $bref_stack = array(&$base); | |
| $head_stack = array($replacements); | |
| do { | |
| end($bref_stack); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $args = array( | |
| 'show_option_all' => '', | |
| 'show_option_none' => '', | |
| 'orderby' => 'ID', | |
| 'order' => 'ASC', | |
| 'show_count' => 0, | |
| 'hide_empty' => 1, | |
| 'child_of' => 0, | |
| 'exclude' => '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function gmw_modify_search_form_taxonomy_args( $args, $taxonomy, $gmw ) { | |
| // Limit the fuction to a specific form using it's ID. | |
| if ( 1 !== $gmw['ID'] ) { | |
| return $args; | |
| } | |
| // limit the function to a specific taxonmoy. | |
| if ( "category" !== $taxonomy->name ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| drag_marker_onclick : function() { | |
| google.maps.event.addListener( GF_Geo.map.map, 'click', function( event ){ | |
| GF_Geo.map.marker.setPosition( event.latLng ); | |
| // save some map details | |
| GF_Geo.processing.status = true; | |
| GF_Geo.processing.element = 'map'; | |
| GF_Geo.processing.coords = { |