Changeset 2028421
- Timestamp:
- 02/11/2019 11:13:51 AM (7 years ago)
- Location:
- amazon-polly/trunk
- Files:
-
- 4 edited
-
README.md (modified) (3 diffs)
-
README.txt (modified) (3 diffs)
-
amazonpolly.php (modified) (1 diff)
-
public/class-amazonpolly-public.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
amazon-polly/trunk/README.md
r2020984 r2028421 1 ## Amazon Pollyfor WordPress1 ## Amazon AI Plugin for WordPress 2 2 | | | 3 3 | ------ | ------ | … … 7 7 | Requires PHP | 5.6 | 8 8 | Tested up to | 5.0 | 9 | Stable tag | 2.6. 3|9 | Stable tag | 2.6.4 | 10 10 | License | GPLv3 ONLY | 11 11 | License URI | https://www.gnu.org/licenses/gpl-3.0.html | … … 237 237 #### Changelog 238 238 239 = 2.6.4 = 240 * Bug fixing. 241 * Plugin Renaming. 242 239 243 = 2.6.3 = 240 244 * Added possibility to specify combination of label and flag to be displayed with translations. -
amazon-polly/trunk/README.txt
r2020984 r2028421 1 === Amazon Pollyfor WordPress ===1 === Amazon AI Plugin for WordPress === 2 2 Contributors: awslabs, wpengine, tstachlewski, stevenkword 3 3 Tags: AWS, Amazon Web Services, WP Engine, Cloud, Text-to-Speech, Amazon Polly, Amazon Translate, Translate, Translation, Podcast, AI … … 5 5 Requires PHP: 5.6 6 6 Tested up to: 5.0 7 Stable tag: 2.6. 37 Stable tag: 2.6.4 8 8 License: GPLv3 ONLY 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 232 232 == Changelog == 233 233 234 = 2.6.4 = 235 * Bug fixing. 236 * Plugin Renaming. 237 234 238 = 2.6.3 = 235 239 * Added possibility to specify combination of label and flag to be displayed with translations. -
amazon-polly/trunk/amazonpolly.php
r2020984 r2028421 17 17 * Plugin URI: https://wordpress.org/plugins/amazon-polly/ 18 18 * Description: Create audio version of your posts, translate them into other languages and create podcasts! Amazon Polly is a service that turns text into lifelike speech. With dozens of voices across a variety of languages, you can select the ideal voice and build engaging speech-enabled applications that work in many different countries. The Amazon Polly plugin for WordPress is a sample application that shows how WordPress creators can easily add Text-to-Speech capabilities to written content with Amazon Polly. You can generate an audio feed for text-based content and insert it into an embedded player to increase the accessibility of your WordPress site. The sample code also enables you to publish podcasts directly from your site and make them available for listeners in the form of podcasts. In addition, the plugin allows to translate your text from one language to another using Amazon Translate– which is a neural machine translation service that delivers fast, high-quality, and affordable language translation. Amazon Translate allows you to localize content - such as websites and applications - for international users, and to easily translate large volumes of text efficiently. 19 * Version: 2.6. 319 * Version: 2.6.4 20 20 * Author: AWS Labs, WP Engine 21 21 * Author URI: https://aws.amazon.com/ -
amazon-polly/trunk/public/class-amazonpolly-public.php
r2020984 r2028421 101 101 $translate_options = ''; 102 102 103 103 104 // Check if Amazon Polly is enabled in WP, if yes then... 104 if ( $common->is_polly_enabled() ) {105 if ( $common->is_polly_enabled() ) { 105 106 106 107 // Check if Amazon Polly is enabled for specific post. … … 182 183 </table>'; 183 184 } 184 185 186 185 } 187 186 } 188 187 188 189 // Will create 'translate' options and content part. If enabled. 189 190 if ( is_singular() ) { 190 // Check if Amazon Translate is enabled, if yes then...191 191 if ($common->is_translation_enabled() ) { 192 193 192 $translate_options = $this->show_translations_options($post_id, $common); 194 195 193 if(isset($_GET['amazonai-language'])) { 196 194 $selected_language = $_GET['amazonai-language']; … … 202 200 } 203 201 204 if ($common->is_polly_enabled() ) { 205 // Put Audio player in the correct position. 206 $selected_position = get_option( 'amazon_polly_position' ); 207 if ( strcmp( $selected_position, 'Do not show' ) === 0 ) { 208 $content = $content; 209 } elseif ( strcmp( $selected_position, 'After post' ) === 0 ) { 210 $content = $content . $translate_options . $polly_content; 211 } else { 212 $content = $translate_options . $polly_content . $content; 213 } 202 // Put plugin content in the correct position. 203 $selected_position = get_option( 'amazon_polly_position' ); 204 if ( strcmp( $selected_position, 'Do not show' ) === 0 ) { 205 $content = $content; 206 } elseif ( strcmp( $selected_position, 'After post' ) === 0 ) { 207 $content = $content . $translate_options . $polly_content; 208 } else { 209 $content = $translate_options . $polly_content . $content; 214 210 } 215 211 216 212 return $content; 217 213 } 214 215 218 216 219 217 function show_translations_options($post_id, $common) {
Note: See TracChangeset
for help on using the changeset viewer.