Plugin Directory

Changeset 2028421


Ignore:
Timestamp:
02/11/2019 11:13:51 AM (7 years ago)
Author:
awslabs
Message:

trunk 2.6.4

Location:
amazon-polly/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • amazon-polly/trunk/README.md

    r2020984 r2028421  
    1 ## Amazon Polly for WordPress
     1## Amazon AI Plugin for WordPress
    22|  |  |
    33| ------ | ------ |
     
    77| Requires PHP | 5.6 |
    88| Tested up to | 5.0 |
    9 | Stable tag | 2.6.3 |
     9| Stable tag | 2.6.4 |
    1010| License | GPLv3 ONLY |
    1111| License URI | https://www.gnu.org/licenses/gpl-3.0.html |
     
    237237#### Changelog
    238238
     239= 2.6.4 =
     240* Bug fixing.
     241* Plugin Renaming.
     242
    239243= 2.6.3 =
    240244* Added possibility to specify combination of label and flag to be displayed with translations.
  • amazon-polly/trunk/README.txt

    r2020984 r2028421  
    1 === Amazon Polly for WordPress ===
     1=== Amazon AI Plugin for WordPress ===
    22Contributors: awslabs, wpengine, tstachlewski, stevenkword
    33Tags: AWS, Amazon Web Services, WP Engine, Cloud, Text-to-Speech, Amazon Polly, Amazon Translate, Translate, Translation, Podcast, AI
     
    55Requires PHP: 5.6
    66Tested up to: 5.0
    7 Stable tag: 2.6.3
     7Stable tag: 2.6.4
    88License: GPLv3 ONLY
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    232232== Changelog ==
    233233
     234= 2.6.4 =
     235* Bug fixing.
     236* Plugin Renaming.
     237
    234238= 2.6.3 =
    235239* Added possibility to specify combination of label and flag to be displayed with translations.
  • amazon-polly/trunk/amazonpolly.php

    r2020984 r2028421  
    1717 * Plugin URI:        https://wordpress.org/plugins/amazon-polly/
    1818 * 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.3
     19 * Version:           2.6.4
    2020 * Author:            AWS Labs, WP Engine
    2121 * Author URI:        https://aws.amazon.com/
  • amazon-polly/trunk/public/class-amazonpolly-public.php

    r2020984 r2028421  
    101101        $translate_options = '';
    102102
     103
    103104        // Check if Amazon Polly is enabled in WP, if yes then...
    104         if ($common->is_polly_enabled() ) {
     105        if ( $common->is_polly_enabled() ) {
    105106
    106107            // Check if Amazon Polly is enabled for specific post.
     
    182183                    </table>';
    183184                }
    184 
    185 
    186185            }
    187186        }
    188187
     188
     189        // Will create 'translate' options and content part. If enabled.
    189190        if ( is_singular() ) {
    190             // Check if Amazon Translate is enabled, if yes then...
    191191            if ($common->is_translation_enabled() ) {
    192 
    193192                $translate_options = $this->show_translations_options($post_id, $common);
    194 
    195193                if(isset($_GET['amazonai-language'])) {
    196194                    $selected_language = $_GET['amazonai-language'];
     
    202200        }
    203201
    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;
    214210        }
    215211
    216212        return $content;
    217213    }
     214
     215
    218216
    219217    function show_translations_options($post_id, $common) {
Note: See TracChangeset for help on using the changeset viewer.