Version Description
- Added [GTranslate] syntax to be used inside wordpress articles/pages
Download this release
Release Info
| Developer | edo888 |
| Plugin | |
| Version | 1.0.16 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.15 to 1.0.16
- gtranslate.php +14 -2
- readme.txt +8 -2
gtranslate.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: GTranslate
|
| 4 |
Plugin URI: http://edo.webmaster.am/gtranslate?xyz=998
|
| 5 |
Description: Get translations with a single click between 58 languages (more than 98% of internet users) on your website!
|
| 6 |
-
Version: 1.0.
|
| 7 |
Author: Edvard Ananyan
|
| 8 |
Author URI: http://edo.webmaster.am
|
| 9 |
|
|
@@ -31,6 +31,8 @@ register_activation_hook(__FILE__, array('GTranslate', 'activate'));
|
|
| 31 |
register_deactivation_hook(__FILE__, array('GTranslate', 'deactivate'));
|
| 32 |
add_action('admin_menu', array('GTranslate', 'admin_menu'));
|
| 33 |
add_action('init', array('GTranslate', 'enqueue_scripts'));
|
|
|
|
|
|
|
| 34 |
|
| 35 |
class GTranslate extends WP_Widget {
|
| 36 |
function activate() {
|
|
@@ -84,6 +86,16 @@ class GTranslate extends WP_Widget {
|
|
| 84 |
echo $args['after_widget'];
|
| 85 |
}
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
function register() {
|
| 88 |
wp_register_sidebar_widget('gtranslate', 'GTranslate', array('GTranslate', 'widget'), array('description' => __('Google Automatic Translations')));
|
| 89 |
wp_register_widget_control('gtranslate', 'GTranslate', array('GTranslate', 'control'));
|
|
@@ -522,7 +534,7 @@ EOT;
|
|
| 522 |
|
| 523 |
<div style="margin-top:20px;">
|
| 524 |
<h4>Widget code</h4>
|
| 525 |
-
<span style="color:red;">DO NOT COPY THIS INTO YOUR POSTS OR PAGES
|
| 526 |
You can edit this if you wish:<br />
|
| 527 |
<textarea id="widget_code" name="widget_code" onchange="ShowWidgetPreview(this.value)" style="font-family:Monospace;font-size:11px;height:150px;width:565px;"><?php echo $widget_code; ?></textarea>
|
| 528 |
<?php wp_nonce_field('gtranslate-save'); ?>
|
| 3 |
Plugin Name: GTranslate
|
| 4 |
Plugin URI: http://edo.webmaster.am/gtranslate?xyz=998
|
| 5 |
Description: Get translations with a single click between 58 languages (more than 98% of internet users) on your website!
|
| 6 |
+
Version: 1.0.16
|
| 7 |
Author: Edvard Ananyan
|
| 8 |
Author URI: http://edo.webmaster.am
|
| 9 |
|
| 31 |
register_deactivation_hook(__FILE__, array('GTranslate', 'deactivate'));
|
| 32 |
add_action('admin_menu', array('GTranslate', 'admin_menu'));
|
| 33 |
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() {
|
| 86 |
echo $args['after_widget'];
|
| 87 |
}
|
| 88 |
|
| 89 |
+
function get_widget_code($atts) {
|
| 90 |
+
$data = get_option('GTranslate');
|
| 91 |
+
GTranslate::load_defaults(& $data);
|
| 92 |
+
|
| 93 |
+
if(empty($data['widget_code']))
|
| 94 |
+
return 'Configure it from WP-Admin -> Settings -> GTranslate to see it in action.';
|
| 95 |
+
else
|
| 96 |
+
return $data['widget_code'];
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
function register() {
|
| 100 |
wp_register_sidebar_widget('gtranslate', 'GTranslate', array('GTranslate', 'widget'), array('description' => __('Google Automatic Translations')));
|
| 101 |
wp_register_widget_control('gtranslate', 'GTranslate', array('GTranslate', 'control'));
|
| 534 |
|
| 535 |
<div style="margin-top:20px;">
|
| 536 |
<h4>Widget code</h4>
|
| 537 |
+
<span style="color:red;">DO NOT COPY THIS INTO YOUR POSTS OR PAGES! Put [GTranslate] inside the post/page <br />or add a GTranslate widget into your sidebar from Appearance -> Widgets instead.</span><br /><br />
|
| 538 |
You can edit this if you wish:<br />
|
| 539 |
<textarea id="widget_code" name="widget_code" onchange="ShowWidgetPreview(this.value)" style="font-family:Monospace;font-size:11px;height:150px;width:565px;"><?php echo $widget_code; ?></textarea>
|
| 540 |
<?php wp_nonce_field('gtranslate-save'); ?>
|
readme.txt
CHANGED
|
@@ -5,7 +5,7 @@ Donate link: http://edo.webmaster.am/gtranslate
|
|
| 5 |
Tags: widget, plugin, sidebar, google, translate, translation, automatic translator, google translate, ajax translator, jquery translator
|
| 6 |
Requires at least: 2.3
|
| 7 |
Tested up to: 3.1
|
| 8 |
-
Stable tag: 1.0.
|
| 9 |
|
| 10 |
Get translations with a single click between 58 languages (more than 98% of internet users) on your website!
|
| 11 |
|
|
@@ -34,7 +34,7 @@ Keywords: google translation, google translate, google translator, automatic tra
|
|
| 34 |
|
| 35 |
1. Upload `gtranslate` folder to the `/wp-content/plugins/` directory
|
| 36 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
| 37 |
-
3. You can add a widget to your website.
|
| 38 |
|
| 39 |
== Configuration ==
|
| 40 |
|
|
@@ -63,6 +63,12 @@ Yes, you need to wrap the text you don't want to be translated with <span cla
|
|
| 63 |
|
| 64 |
== Changelog ==
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
= 1.0.14 =
|
| 67 |
* Added notes, so people will not copy the code into their posts
|
| 68 |
|
| 5 |
Tags: widget, plugin, sidebar, google, translate, translation, automatic translator, google translate, ajax translator, jquery translator
|
| 6 |
Requires at least: 2.3
|
| 7 |
Tested up to: 3.1
|
| 8 |
+
Stable tag: 1.0.16
|
| 9 |
|
| 10 |
Get translations with a single click between 58 languages (more than 98% of internet users) on your website!
|
| 11 |
|
| 34 |
|
| 35 |
1. Upload `gtranslate` folder to the `/wp-content/plugins/` directory
|
| 36 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
| 37 |
+
3. You can add a widget to your website or use [GTranslate] syntax inside pages where you want it to appear.
|
| 38 |
|
| 39 |
== Configuration ==
|
| 40 |
|
| 63 |
|
| 64 |
== Changelog ==
|
| 65 |
|
| 66 |
+
= 1.0.16 =
|
| 67 |
+
* Added [GTranslate] syntax to be used inside wordpress articles/pages
|
| 68 |
+
|
| 69 |
+
= 1.0.15 =
|
| 70 |
+
* Added aff link to track visits from wordpress on my site
|
| 71 |
+
|
| 72 |
= 1.0.14 =
|
| 73 |
* Added notes, so people will not copy the code into their posts
|
| 74 |
|
