1.1 Breaking Changes

Dominik Schilling edited this page Jan 19, 2016 · 9 revisions
  • $gpdb has been replaced with $wpdb
    • GlotPress is using the same table prefix as WordPress. You can define $gp_table_prefix to continue using an existing prefix.
  • All filters have been prefixed with gp_
  • GP's Plugin API system has been removed
  • gp_json_encode() has been replaced with wp_json_encode()
  • _gp_get_secret_key(), _gp_get_salt(), gp_salt(), gp_hash(), and gp_generate_password() have been removed
  • gp_limit_for_page() has been removed
  • gp_time_since() has been replaced with human_time_diff()
  • gp_url_login() has been replaced with wp_login_url(), gp_link_login_get has been removed
  • GP's API system has been removed (gp_update_option(), gp_get_option(), gp_delete_option(), gp_cache_all_options(), gp_get_option_from_db(), gp_option())
  • GP_User->logged_in() has been removed, use is_user_logged_in() instead
  • GP_User->login() and GP_User->logout() have been removed
  • GP_User->get_avatar() has been removed, use get_gravatar() instead
  • GP_User->set_as_current() has been removed, use wp_set_current_user() instead
  • GP_User->can() has been replaced with GP::$permission->user_can()
  • GP::$user->current()->can() has been replaced with GP::$permission->current_user_can()
  • The GP_User object has now been removed, all functionality has been either replaced with equivalent WP functions or moved to other objects in GP