fyaconiello / wp-geo-posts-DEPRECATED-

A simple wordpress plugin for adding geodata to posts - this is pretty much abandoned. use at your own risk.
http://wordpress.org/extend/plugins/wp-geoposts/
26 stars 11 forks source link

Wp_Geoquery #5

Closed cyaconiello closed 10 years ago

cyaconiello commented 11 years ago

ok so the geo never closes. you cant reset it so to speak. and since there can only be one instance of the query going at a time it breaks any querys post that query.

        parent::__construct($args);

        remove_filter( 'posts_fields', array( $this, 'posts_fields' ) );
        remove_filter( 'posts_join', array( $this, 'posts_join' ) );
        remove_filter( 'posts_where', array( $this, 'posts_where' ) );
        remove_filter( 'posts_orderby', array( $this, 'posts_orderby' ) );

This needs to be added to geo_query.php of your plugin at line 57

this is pretty crucial

fyaconiello commented 11 years ago

bro where's my pull request?

cyaconiello commented 11 years ago

i have been busy dawg

On Fri, May 24, 2013 at 4:56 PM, Francis Yaconiello < notifications@github.com> wrote:

bro where's my pull request?

— Reply to this email directly or view it on GitHubhttps://github.com/fyaconiello/wp-geo-posts/issues/5#issuecomment-18429564 .

roborourke commented 10 years ago

This was pretty hilarious, got your pull request right here :) https://github.com/fyaconiello/wp-geo-posts/pull/8

cyaconiello commented 10 years ago

i dont get it

On Wed, Nov 27, 2013 at 10:15 AM, sanchothefat notifications@github.comwrote:

This was pretty hilarious, got your pull request right here :) #8https://github.com/fyaconiello/wp-geo-posts/pull/8

— Reply to this email directly or view it on GitHubhttps://github.com/fyaconiello/wp-geo-posts/issues/5#issuecomment-29391726 .

roborourke commented 10 years ago

no I just found your conversation funny - "Where's my pull request bro"

Robert O'Rourke sanchothefat.com +44 7816 329424

cyaconiello commented 10 years ago

hahaha there was a disconnect. I thought I was talking to my brother the creator of the plugin which he asked me to make the pull request soooo long ago i thought he did it to rub it in my face or something. Its awesome you did it though now i dont have to worry bout it. Im also glad you found it amusing. we got a good laugh in over here about it.

On Wed, Nov 27, 2013 at 12:35 PM, sanchothefat notifications@github.comwrote:

no I just found your conversation funny - "Where's my pull request bro"

Robert O'Rourke sanchothefat.com +44 7816 329424

— Reply to this email directly or view it on GitHubhttps://github.com/fyaconiello/wp-geo-posts/issues/5#issuecomment-29403778 .

fyaconiello commented 10 years ago

ill try and test and pull in your request over the weekend. thanks for contributing.

also note: this is sort've abandoned due to the fact that it doesn't work reliably on shared hosts. (Max Google geocode api requests are tracked by server instead of API key) so some people especially on Rackspace have reported it not working some of the time b/c of api errors/limits.

roborourke commented 10 years ago

Ah fair enough, that's not such an issue for us as it's a client with their own VPS. I mostly just need the GeoQuery class, was learning about spatial SQL queries when I found this. The haversine approach is way neater than what I was doing!