GEO my WP 3.0 Beta 2

Written by Eyal Fitoussi on November 25, 2017

I am pleased to announce the release of GEO my WP 3.0 beta 2, which includes many bugs fix and improvements. The download link provided at the end of the post, but please make sure to read this post before upgrading from an earlier version.

It took a while ( 3 months ) from the first beta release, mainly because I was working on the update of the premium extensions at the same time. This way I was able to improve GEO my WP in the way it integrates with the extensions. This mostly concerns developers, but it now should be easier to develop extensions for GEO my WP using its many functions, classes, APIs, and hooks.

GEO my WP 3.0 Beta 2 is now more stable ( as far as I could test myself ). If you just start using GEO my WP, I do recommend to use this version, as I don't expect any major issues. If you are upgrading from an earlier version of GEO my WP, I suggest that you do it with caution. Make sure to backup everything before you upgrade, and it is recommended that you set up a staging environment where you can upgrade and test everything before you go live with version 3.0. Just to make sure everything goes smooth with the changes applied in the first beta ( see this post ) and with the changes added in beta 2 and described below.

Note, the premium extensions are still not ready for version 3.0. Except for the Premium Settings extension, which I will release the first beta that is compatible with v3.0 later today.

What’s New In Version 3.0 Beta 2?

Improve integration with GEO my WP extensions

Improving the new GMW_Register_Addon class and adding new functions to make it easier and more efficient to develop an extension for GEO my WP. Once v3.0 is officially released I will start document the new ( and old ) functions and classes that GEO my WP provides.

New Helper Classes

New helper classes added in this version. Classes that can be used to generate more custom form elements ( search form and search results elements ) when needed.
In previous versions of GEO my WP, form elements like address field, radius filter, units filter, post types, taxonomies and so on, were limited and couldn't be modified/customized much. For example, the function

 gmw_get_search_form_radius( $gmw );

,in previous versions, was the core radius field function which directly generated a radius dropdown based on the settings form the form editor.

Now there is a new class GMW_Search_Form_Helper that provides core functions for the different search form elements. For example, using the function

GMW_Search_Form_Helper::radius_field( $args );

, you can generate custom radius select menu by passing arguments like class, id, default_value, options and more. This probably more for developers, but also for users who have been looking to customize some of the form elements, but it was not very simply ( or possible at all ) in previous versions.

The radius field is just one example out of many functions that can be used this way. The new classes can be found in geo-my-wp/includes/template-functions.

New Template Functions

Along with the new helper classes mentioned above, many new template functions were added in this version as well. Most of the new template functions can, and should, be used directly in the search forms and search results template files.
The template functions generate the form elements, using the new helper classes, based on the settings of the form editor. For example, the radius function

gmw_get_search_form_radius( $gmw );

, that in previous versions was directly generating the radius dropdown, is now using the radius settings from the form editor and pass it into the helper function:

GMW_Search_Form_Helper::radius_field( $args );

This way, not only integrations with GEO my WP and future updates will be much easier to manage ( for me and other developers ). Also, the search forms and search results template files, which often are being customized by the users, are cleaner and easier to manage.

In a search results template file, for example, to display the post's featured image, in a previous version the function looked like:



This function checks if the image is enabled in the form settings, if the featured image exists, and pass the width and height of the image.

Now, you can simpy use the function:

gmw_search_results_featured_image( $post, $gmw = array() );

which does everyting for you.

*If you are using custom search forms or search results template files, it is highly recommended that you update your custom templates and use the new template functions.

Renamed Core Extensions and Template Files Folders

Some of the core extensions and template files folders were renamed in this version for better workflow and to make more sense.

The folders that hold the core extensions, such as "posts" and "friends", were renamed to "posts-locator" and "members-locator". The folder names are now dynamically generated by GEO my WP based on the extension's slug/name.

*If you are using custom search forms or search results template files, which located in the theme's or child theme folder, you will need to rename the folders name as well ( same name it is in GEO my WP core plugin ), so GEO my WP will "see" your custom templates.

New Functions and Deprecated Functions

More functions were deprecated in this version of GEO my WP, which most were replaced with a new function.

*If you use custom template files and have WP_DEBUG enabled, you will most likely see warnings regarding the deprecated functions. It is highly recommended that you update your custom template files and replace the deprecated functions. You can use one of the template files provided in GEO my WP plugin as a guide.

Upgrading From an Earlier Version?

If you are upgrading from an earlier version of GEO my WP and use custom search form and search results template files, please make sure to read the above.
Pay attention to the new template functions, deprecated functions and make sure to rename the template folders in the theme's folder.

Premium Settings Extension

Along with this version of GEO my WP, I also released the first beta of Premium Settings 2.0. This is the first extension that is compatiable with GEO my WP 3.0.

This version includes many bugs fix, major improvements and a good amount of new features.

If you have an active license key for the Premium Settings extension you can download version 2.0 from Your Account page.

Ready to Give it a Try?

You can download GEO my WP 3.0 beta 2 from here.
Any feedback regarding the new beta vesions of GEO my WP 3.0 and the Premium Settings extension is greatly appriciated.