diff --git a/lib/RideShortcode.class.php b/lib/RideShortcode.class.php index 7c0eba5..e908b9f 100644 --- a/lib/RideShortcode.class.php +++ b/lib/RideShortcode.class.php @@ -100,7 +100,7 @@ class WPStrava_RideShortcode { "; } } else { - return _e('Please first get your strava token using the settings wp strava page.', 'wp-strava'); + return __('Please first get your strava token using the settings wp strava page.', 'wp-strava'); } } // handler diff --git a/lib/Settings.class.php b/lib/Settings.class.php index 6cee30b..74f958f 100644 --- a/lib/Settings.class.php +++ b/lib/Settings.class.php @@ -29,8 +29,8 @@ class WPStrava_Settings { public function option_home() { if ( isset( $_POST['option_page'] ) && $_POST['option_page'] == $this->option_page ) { //redirect only if all the right options are in place - $errors = get_settings_errors(); - if ( ! empty( $errors ) ) + global $wp_settings_errors; + if ( ! empty( $wp_settings_errors ) ) return; //clearing to start-over