| @@ -98,11 +98,14 @@ | ||
| 98 | 98 | |
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * Load the .mo language files. |
| 102 | + * Note: As of WordPress 4.6+, translations are automatically loaded from WordPress.org | |
| 103 | + * for plugins hosted there, so load_plugin_textdomain() is no longer needed. | |
| 102 | 104 | */ |
| 103 | 105 | public function load_languages() { |
| 104 | - load_plugin_textdomain( 'leadin', false, '/leadin/languages' ); | |
| 106 | + // WordPress automatically loads translations for WordPress.org hosted plugins. | |
| 107 | + // This function is kept for backwards compatibility with the hook. | |
| 105 | 108 | } |
| 106 | 109 | |
| 107 | 110 | /** |
| 108 | 111 | * Handler called on plugin activation. |
| @@ -254,8 +257,9 @@ | ||
| 254 | 257 | $error_message = ''; |
| 255 | 258 | |
| 256 | 259 | if ( Versions::is_php_version_not_supported() ) { |
| 257 | 260 | $error_message = sprintf( |
| 261 | + /* translators: %1$s: Plugin current version %2$s: PHP required version */ | |
| 258 | 262 | __( 'HubSpot All-In-One Marketing %1$s requires PHP %2$s or higher Please upgrade WordPress first', 'leadin' ), |
| 259 | 263 | LEADIN_PLUGIN_VERSION, |
| 260 | 264 | LEADIN_REQUIRED_PHP_VERSION |
| 261 | 265 | ); |
| @@ -260,9 +264,10 @@ | ||
| 260 | 264 | LEADIN_REQUIRED_PHP_VERSION |
| 261 | 265 | ); |
| 262 | 266 | } elseif ( Versions::is_wp_version_not_supported() ) { |
| 263 | 267 | $error_message = sprintf( |
| 264 | - __( 'HubSpot All-In-One Marketing %1$s requires PHP %2$s or higher Please upgrade WordPress first', 'leadin' ), | |
| 268 | + /* translators: %1$s: Plugin current version %2$s: WordPress required version */ | |
| 269 | + __( 'HubSpot All-In-One Marketing %1$s requires WordPress %2$s or higher Please upgrade WordPress first', 'leadin' ), | |
| 265 | 270 | LEADIN_PLUGIN_VERSION, |
| 266 | 271 | LEADIN_REQUIRED_WP_VERSION |
| 267 | 272 | ); |
| 268 | 273 | } |