GEO my WP
4.0 2.4 ( my mistake 🙂 ) Beta
I am very excited about the new coming version of GEO my WP
4.0 2.4. This is a major update with many major changes. The main focus was on a better structured code, code improvement, performance, better integration with add-on ( actions/filters ), major improvement of the backend, many bug fix and few new features.
Listed below are some of the major changes made in GEO my WP
- Almost every line of code was redone. Code is now much cleaner and better structured using OOP.
- The update takes care of major performance issues specially in the back end caused by the licensing system. The update should also take care of performance issues while AJAX call is being performed.
- Files and folders are better organized.
- Code of the back end was completely redone for the first time since the first release of the plugin. This results in a brand new, shiny back-end interface.
- Improved Geocode function.
- Improved “Current location widget/shortcode”.
- Instead of using
[gmw_results]to display results in a different page you should now use
- You can now show the map of a search results anywhere on the page using the short code
[gmw map="form id"]. In order to use the feature you will need to set the feature “display map?” to “using shortcode” when editing a form and add the short code anywhere on the page.
- The new version of GEO my WP will not save the data to custom fields any more. I have decided to remove the features for few main reasons:
- Since location information is already being saved in the custom table of GEO my WP saving the same information in custom fields as well just causes unnecessary duplication of data which results in bigger tables and will hurt performance in the long run.
- When there is a need to display different components of the location ex ( city, state and so on ) on a page each of the custom fields that holds the information need to be called which results in weaker performance ( each custom field call is a call to database.
To replace the support in custom fields I have created new functions/shortcode that will easily provide you with the ability to display any or all of the data of a certain location. This way is more efficient because it require a single call to database ( that is also being cached ) in order to display single or multiple fields of a location.
- New “Featured” tab in the “Settings” page of GEO my WP allows you to activate/deactivate some features. ex short codes and widgets. So if you are not going to use some of the features you can improve performance by deactivating them.
- New feature: You can now choose a search form template file when creating/editing a from just like choosing the results page template file.
- New Feature: As mentioned above, you can now display the results map anywhere on the page using a short code
[gmw map="form id"].
Single Location information
In order to display location’s information you can now use the function
<?php gmw_post_info( $args ); ?> or the shortcode
the attribute accepted are:
- info – can be any of the location information comma separated: street, city, apt, state, state_long, zip code, country, country_long, address, formatted_address, lat, long, phone, fax, email, website. The default value is formatted_address.
- post_id = the ID of the post you want to display.
- divider – any character you want to display between each field when displaying more than a single field. default is space.
There is no need for post_id if using the shortocde or function within a page, post or a loop. post_id is needed if you want to show location of a specific post.
Example of function usage:
$args = array(
'info' => 'city,state,zipcode,phone,email',
'post_id => 34,
echo gmw_post_info( $args );
the code above will produce the location information for post 34 as below:
Hollywood, FL, 33021, 123-456-7890, firstname.lastname@example.org
Example of shortcode usage:
[gmw_post_info info="city,state_long,website" post_id="34" divider="-"]
The short code will produce the below line:
There are other short codes and functions that will be describe in the future.
Very Important before Installing:
- This is a beta version. It is pretty stable but still bugs are expected. It is not recommended to be used on a live site yet.
- Because of the major changes in the code and database you will lose all your settings and forms. So after updating you will need to setup the plugin and forms again. Apologies for any inconvenience it might cause. However, You WILL NOT lose any of your locations for posts or Buddypress members.
- Some functions where modified. If you have created custom search forms or results template files you will need to compare them to the default template files of the new version of GEO my WP and modified the functions of your template files based on the new version.
- Some of the existing hooks have modified as well as new hooks added.
- For those of you who are using the premium add-on. Because of the major changes in GEO my WP
4.02.4 the current version of the premium add-ons will not work with the new version of GEO my WP. I am in the process of updating the premium add-ons when most of them are ready. If you are using any of the add-ons and want to test GEO my WP 4.02.4 please contact me at email@example.com with the add-on and the license key and I will email you the new version. Below the list of the Premium add-on that are ready for GEO my WP 4.02.4:
- Premium Settings
- Global Maps
- GEO Members Directory
- GEO Xprofile Fields
- Gravity Forms GEO Fields
- GEO Job Manager
- Each of the Premium add-on were improved as well. Code was redone, many bugs were fixed and many new features. Major changes made to Global Maps and Premium Settings.
If you are updating to GEO my WP
4.0 2.4 please make sure to follow the steps below to prevent any issues with the license keys:
- Deactivate any license keys you might have
- Deactivate the premium add-ons
- Deactivate GEO my WP
- Delete GEO my WP and the add-on
- Install and activate GEO my WP
- Install and activate the premium add-ons.
If you are facing issues with the license keys not being activated please contact me at firstname.lastname@example.org with the add-on and license key.
Any feedback, bug reports and feature suggestions are greatly appreciated and can be reported via the comments system of this post.