cyberhobo / wordpress-geo-mashup

Official repository for Geo Mashup, the plugin that makes WordPress into a GeoCMS. Documentation:
https://github.com/cyberhobo/wordpress-geo-mashup/wiki/Getting-Started
63 stars 15 forks source link

Corrected plugin textdomain loading hook #836

Closed baden03 closed 5 years ago

baden03 commented 5 years ago

load_plugin_textdomain should be hooked to the plugins_loaded action.

Helpful, as user profile language is now used on the back end, rather than WP system language.

Path to lang dir now uses the GEO_MASHUP_DIR_PATH constant, so GEO_MASHUP_DIRECTORY was removed.

cyberhobo commented 5 years ago

Thanks! I think the move to load_integrations() is correct.

GEO_MASHUP_DIRECTORY was used because load_plugin_textdomain() takes a path relative to the WP plugins directory, not an absolute path. Giving it GEO_MASHUP_DIR_PATH doesn't work for me.

baden03 commented 5 years ago

Dukes! Of course you are correct. the plugin_basename(FILE) is required to load the plugin's textdomain. ...Reinstating the GEO_MASHUP_DIRECTORY.

baden03 commented 5 years ago

sorry, i did not want to include the partial postal code in this pull request.