impress-org / google-maps-builder

One Google Maps plugin to rule them all. Google Maps Builder is intuitive, sleek, powerful and easy to use. Forget the rest, use the best.
https://wordpress.org/plugins/google-maps-builder/
32 stars 9 forks source link

Make infowindow templatable #114

Closed JustinSainton closed 6 years ago

JustinSainton commented 9 years ago

As it stands, overriding the infowindow is a little...cumbersome.

To do so, I have to do things like this:

add_filter( 'gmb_mashup_infowindow_content', function( $response, $marker_data, $post_id ) {

    $response['infowindow'] = str_replace( '</div>', '<p class="place=link"><a href="' . get_permalink( $post_id ) . '">Learn More</a></p></div>', $response['infowindow'] );
    return $response;

}, 85, 3 );

It would be super duper sweet to be able to just override it (like we can with public.php via Google_Maps_Builder_Engine::get_google_maps_template) with a template file.

DevinWalker commented 9 years ago

TOTALLY agree with this. We don't want you to have to do any of that str_replace stuff....

JustinSainton commented 9 years ago

:+1: More than happy to submit PRs to the private Pro repo if that's helpful. The get_google_maps_template() needs a bit of work to function as expected (it doesn't take in to account Windows filepaths or parent themes)

DevinWalker commented 9 years ago

I'll add you now to our Beanstalk repo. We appreciate any contribution efforts :)

I also want to clean up the js A LOT on the admin side. It needs to be more class based without all this spaghetti function calls... but hey that's MVP.

DevinWalker commented 9 years ago

Which email should I add?

JustinSainton commented 9 years ago

justinsainton@gmail.com works great. and believe me, I appreciate as much as any (and more than most) all of the work that goes into these launches and getting a 1.0 out the door. you guys are doing a great job.

DevinWalker commented 9 years ago

Thanks for the kind words. I just sent the invite over.