brilliantplugins / wp-geometa Goto Github PK
View Code? Open in Web Editor NEWSpatially enable WordPress
License: GNU General Public License v2.0
Spatially enable WordPress
License: GNU General Public License v2.0
Create test cases for setting, updating and querying User, Comment and Term meta.
Add functions to handle buffering points in meters/feet with data in EPSG:4326
Add functions to check distance with feet/meters with data in EPSG:4326
I'm using wp-geometa for ACF and storing lat/long as geopoints, in meta address_geopoint
.
Now I need to make a query: I receive lat/long values and need to see which of the saved geopoints are in a 10 km radius from the received lat/long
When someone installs a newer version of wp-geometa-lib it will upgrade their database.
If they later uninstall the plugin that provided the higher version of wp-geometa-lib, there's a chance that the DB changes might not be optimal or compatible. Warn them on the dashboard if that's the case.
Now that lat/lng keypairs are supported, we should show the named pairs somewhere on the dashboard.
The following warnings are thrown on pages that utilize spatial functions in WP Query:
Warning: Use of undefined constant WP_GEOMETA_DEBUG - assumed 'WP_GEOMETA_DEBUG' (this will throw an Error in a future version of PHP) in ...../public_html/wp-content/plugins/wp-geometa/lib/wp-geometa-lib/wp-geoquery.php on line 182
Warning: Use of undefined constant WP_GEOMETA_DEBUG - assumed 'WP_GEOMETA_DEBUG' (this will throw an Error in a future version of PHP) in ...../public_html/wp-content/plugins/wp-geometa/lib/wp-geometa-lib/wp-geoquery.php on line 250
Warning: Use of undefined constant WP_GEOMETA_DEBUG - assumed 'WP_GEOMETA_DEBUG' (this will throw an Error in a future version of PHP) in ...../public_html/wp-content/plugins/wp-geometa/lib/wp-geometa-lib/wp-geoquery.php on line 128
The following notices are thrown on all pages (admin and front-end):
Notice: Undefined variable: wp_geometa_version in ...../public_html/wp-content/plugins/wp-geometa/lib/wp-geometa-lib/wp-geometa-lib.php on line 34
Notice: Undefined variable: wp_geometa_max_version in ...../public_html/wp-content/plugins/wp-geometa/lib/wp-geometa-lib/wp-geometa-lib.php on line 34
How can this be fixed?
Move the dashboard initialization into a function so that whichever WP-GeoMeta ends up active will also provide the dashboard.
Add a function so that other plugins can enable the dashboard if WP-GeoMeta is only used as a library.
On pantheon the SQL functions don't get created and no error is shown.
A geoquery is no longer functioning on our site (possibly related to PHP 8 compatibility?). The plugin version here on GitHub (0.4.0) is not the same as in the WordPress.org repository (0.3.5) so I tried updating the plugin to version 0.4.0 found here but I'm getting the following PHP fatal error.
PHP Fatal error: Uncaught Error: Undefined constant "WP_GEOMETA_DEBUG" in /public/wp-content/plugins/wp-geometa/lib/wp-geometa-lib/wp-geoquery.php:182
Instead of using
add_management_page( 'WP-GeoMeta', 'WP-GeoMeta', 'install_plugins', 'wp-geometa', array( $this, 'show_dashboard' ) );
Always add the page to the Tools menu, and then use capabilities to filter which spatial records and counts users can see.
First off, absolutely great plugin, Well done. Hopefully, you can help with a problem that I am having.
The goal is to search for photographers from a point(latitude and longitude) and order the results by distance from that center point. The below code works great, however, we are getting limited results. For example, if I do a search from the center point Bangkok Thailand, we are only getting photographers in Asia, and not in North America. The same results happen when doing a search in North America, no Asia photographers. I thought by increasing the mile radius (some large number like 24,901 miles) would solve this problem, but it results in no results. So the goal is to do a global search. Am I missing something? Thanks!
WP_GeoUtil::wp_buffer_point_mi($center_point,10000,8);
$results = new WP_Query( array(
'post_type'=> 'photographer',
'orderby' => 'distance',
'order' => 'ASC',
'meta_query' => array(
'inbuffer' => array(
'key' => 'location',
'compare' => 'ST_INTERSECTS',
'value' => $buffered_shape
),
'distance' => array(
'key' => 'location',
'compare' => 'ST_DISTANCE',
'value' => $center_point,
'type' => 'DECIMAL(10,7)'
)
),
));
Let developers set up WP-GeoMeta so that it's only listening for the data they're storing.
There's no reason to listen to every meta update if we only need it for a certain post type or something.
Add callbacks/hooks so taht other plugins with custom tables (eg. Gravity Forms) could store geo data in a geo way.
Possibly a separate plugin, or at least only available in the dashboard.
Let users specify a post type and fields to use as lat/lng to convert to geometry.
wp-geometa-lib wasn't included...check for this and fail gracefully with message on where/how to get it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.