Translate WordPress with GTranslate - Version 2.0.3

Version Description

  • Update recommended message added - a minor change compared to 2.0.2
Download this release

Release Info

Developer edo888
Plugin Icon 128x128 Translate WordPress with GTranslate
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

Files changed (2) hide show
  1. gtranslate.php +12 -1
  2. readme.txt +4 -1
gtranslate.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: GTranslate
4
  Plugin URI: http://gtranslate.net/?xyz=998
5
  Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="http://gtranslate.net/forum/">GTranslate Forum</a>.
6
- Version: 2.0.2
7
  Author: Edvard Ananyan
8
  Author URI: http://gtranslate.net
9
 
@@ -34,6 +34,13 @@ add_action('init', array('GTranslate', 'enqueue_scripts'));
34
  add_shortcode('GTranslate', array('GTranslate', 'get_widget_code'));
35
  add_shortcode('gtranslate', array('GTranslate', 'get_widget_code'));
36
 
 
 
 
 
 
 
 
37
  class GTranslate extends WP_Widget {
38
  function activate() {
39
  $data = array(
@@ -49,6 +56,10 @@ class GTranslate extends WP_Widget {
49
  // delete_option('GTranslate');
50
  }
51
 
 
 
 
 
52
  function control() {
53
  $data = get_option('GTranslate');
54
  ?>
3
  Plugin Name: GTranslate
4
  Plugin URI: http://gtranslate.net/?xyz=998
5
  Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="http://gtranslate.net/forum/">GTranslate Forum</a>.
6
+ Version: 2.0.3
7
  Author: Edvard Ananyan
8
  Author URI: http://gtranslate.net
9
 
34
  add_shortcode('GTranslate', array('GTranslate', 'get_widget_code'));
35
  add_shortcode('gtranslate', array('GTranslate', 'get_widget_code'));
36
 
37
+ if(is_admin()) {
38
+ global $pagenow;
39
+ if('plugins.php' === $pagenow) {
40
+ add_action('in_plugin_update_message-' . basename(dirname( __FILE__ )) . '/' . basename(__FILE__), array('GTranslate', 'update_message'), 20, 2);
41
+ }
42
+ }
43
+
44
  class GTranslate extends WP_Widget {
45
  function activate() {
46
  $data = array(
56
  // delete_option('GTranslate');
57
  }
58
 
59
+ function update_message($plugin_data, $r) {
60
+ return print '<div style="color:#f33;">It is highly recommended to update to the latest version! <img src="//gtranslate.net/wp-logo.png" style="height:13px;vertical-align:middle;" border="0" title="GTranslate - your window to the world" alt="GTranslate"></div>';
61
+ }
62
+
63
  function control() {
64
  $data = get_option('GTranslate');
65
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Author: Edvard Ananyan
4
  Tags: widget, plugin, sidebar, google, translate, translation, automatic translator, google translate, ajax translator, jquery translator, language translator, google translator, language translate, google language translator, translation, translate, multi language
5
  Requires at least: 2.8
6
  Tested up to: 4.3
7
- Stable tag: 2.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://www.paypal.me/EdvardAnanyan/10
@@ -457,6 +457,9 @@ You need to go to the language you want to edit, for instance, French: http://do
457
 
458
  == Changelog ==
459
 
 
 
 
460
  = 2.0.2 =
461
  * Added support for sites using SSL
462
 
4
  Tags: widget, plugin, sidebar, google, translate, translation, automatic translator, google translate, ajax translator, jquery translator, language translator, google translator, language translate, google language translator, translation, translate, multi language
5
  Requires at least: 2.8
6
  Tested up to: 4.3
7
+ Stable tag: 2.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://www.paypal.me/EdvardAnanyan/10
457
 
458
  == Changelog ==
459
 
460
+ = 2.0.3 =
461
+ * Update recommended message added - a minor change compared to 2.0.2
462
+
463
  = 2.0.2 =
464
  * Added support for sites using SSL
465