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
'use strict'; | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const PnpWebpackPlugin = require('pnp-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); | |
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); |
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 | |
add_filter( 'facetwp_map_marker_args', function( $args, $post_id ) { | |
$field = get_field( 'type_opport', $post_id ); // Get this post's ACF value | |
$icon = $field[0]; // get the first value (assuming this is an array) | |
$args['icon'] = 'https://URL/TO/' . $icon . '.png'; | |
return $args; | |
}, 10, 2 ); |
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 | |
return array( | |
"post_type" => "park", | |
"post_status" => "publish", | |
"posts_per_page" => 100 | |
); |
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 | |
/** | |
* select post type in the map or proximity facet as the datasource, this is just a placeholder | |
* looks up lat/lng from GEO my WordPress plugin tables | |
* do a full re-index in facetwp's settings to update the indexed values after adding code | |
*/ | |
add_filter( 'facetwp_index_row', function( $params, $class ) { | |
if ( 'my_map_facet' == $params['facet_name'] ) { // be sure to change this to the name of your facet | |
global $wpdb; |
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 | |
// Add the following into the Custom Hooks plugin | |
add_filter( 'facetwp_index_row', function( $params, $class ) { | |
if ( 'geo' == $params['facet_name'] ) { | |
global $wpdb; | |
$post_id = (int) $params['post_id']; | |
$coords = $wpdb->get_row( "SELECT `lat`, `long` FROM {$wpdb->prefix}places_locator WHERE post_id = '$post_id' LIMIT 1" ); | |
$params['facet_value'] = ( null !== $coords ) ? $coords->lat : ''; | |
$params['facet_display_value'] = ( null !== $coords ) ? $coords->long : ''; |
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
1 st | |
Crate two button to execute search and reset in two forms in the same time. | |
<input type="button" onclick="simulateClicksearLocation(); simulateClickSearchBudypress();" value="search click"/> | |
<input type="button" onclick="simulateClick(); restetBpProfileSearch();" value="reset click"/> | |
2nd | |
Wrote js functions so simiulate click button | |
js functions to simulate button click, | |
<script> |