1.2 Converting Plugins
GlotPress as a Plugin does not use the same code for plugins as the standalone version of GlotPress does, instead it uses the WordPress plugin infrastructure.
If you have a GlotPress plugin for the standalone version converting it is relatively straight forward.
- Refer to the Breaking Changes page and review your plugin for any updates that need to happen.
- Add a WordPress plugin header block to the top of your plugin file.
- If you used the
GP_Pluginclass to base your plugin on, remove it as it no longer exists. - Any
add_action()oradd_filters()calls you have must be converted to the WordPressadd_action()/add_filter()format. - If you're using a
define()to enable/disable your plugin, remove it, using the activate/deactivate functionality in WordPress's plugin system is the way to go. - If you're using warnings/errors from the GP_Plugin class, replace them with the appropriate
gp_notice_set()call (gp_notice_set( $string )for warnings,gp_notice_set( $string, 'error' )for errors). - Replace your initialization of the plugin with an
add_action( 'gp_init', 'gp_plugin_slug_name_or_whatever' )call. - Create a readme.txt file.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
