Plugin Directory

Changeset 2500058


Ignore:
Timestamp:
03/20/2021 11:52:04 AM (5 years ago)
Author:
ko31
Message:

Update to version 2.7.1 from GitHub

Location:
simple-slug-translate
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • simple-slug-translate/tags/2.7.1/readme.txt

    r2499947 r2500058  
    55Requires at least: 4.3
    66Tested up to: 5.7
    7 Stable tag: 2.7.0
     7Stable tag: 2.7.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    110110== Changelog ==
    111111
     112= 2.7.1 =
     113* Fixed bug
     114
    112115= 2.7.0 =
    113116* Add supported languages
  • simple-slug-translate/tags/2.7.1/simple-slug-translate.php

    r2499947 r2500058  
    44 * Plugin URI:      https://github.com/ko31/simple-slug-translate
    55 * Description:     Simple Slug Translate can translate the post, page, category and taxonomy slugs to English automatically.
    6  * Version:         2.7.0
     6 * Version:         2.7.1
    77 * Author:          Ko Takagi
    88 * Author URI:      https://go-sign.info
     
    220220    public function translate( $text ) {
    221221        if ( empty( $this->options['apikey'] ) ||
    222              empty( $this->options['endpoint'] ) ||
    223222             empty( $this->options['source'] ) ) {
    224223            return array(
     
    229228        $auth = base64_encode( 'apikey:' . $this->options['apikey'] );
    230229
    231         $endpoint = $this->options['endpoint'] . '/v3/translate?version=2018-05-01';
     230        $location_endpoint = ( $this->options['endpoint'] ) ?: $this->get_default_endpoint();
     231        $endpoint          = $location_endpoint . '/v3/translate?version=2018-05-01';
    232232
    233233        $response = wp_remote_post( $endpoint,
     
    410410        ?>
    411411        <input name="<?php echo $this->option_name; ?>[endpoint]" type="text" id="endpoint" value="<?php echo $endpoint; ?>"
    412                placeholder="" class="regular-text">
     412               placeholder="<?php echo esc_attr( $this->get_default_endpoint() ); ?>" class="regular-text">
    413413        <?php
    414414    }
     
    552552    }
    553553
     554    public function get_default_endpoint() {
     555        return 'https://gateway.watsonplatform.net/language-translator/api';
     556    }
     557
    554558    public function mbfunctions_exist() {
    555559        return ( function_exists( 'mb_strlen' ) ) ? true : false;
  • simple-slug-translate/trunk/readme.txt

    r2499947 r2500058  
    55Requires at least: 4.3
    66Tested up to: 5.7
    7 Stable tag: 2.7.0
     7Stable tag: 2.7.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    110110== Changelog ==
    111111
     112= 2.7.1 =
     113* Fixed bug
     114
    112115= 2.7.0 =
    113116* Add supported languages
  • simple-slug-translate/trunk/simple-slug-translate.php

    r2499947 r2500058  
    44 * Plugin URI:      https://github.com/ko31/simple-slug-translate
    55 * Description:     Simple Slug Translate can translate the post, page, category and taxonomy slugs to English automatically.
    6  * Version:         2.7.0
     6 * Version:         2.7.1
    77 * Author:          Ko Takagi
    88 * Author URI:      https://go-sign.info
     
    220220    public function translate( $text ) {
    221221        if ( empty( $this->options['apikey'] ) ||
    222              empty( $this->options['endpoint'] ) ||
    223222             empty( $this->options['source'] ) ) {
    224223            return array(
     
    229228        $auth = base64_encode( 'apikey:' . $this->options['apikey'] );
    230229
    231         $endpoint = $this->options['endpoint'] . '/v3/translate?version=2018-05-01';
     230        $location_endpoint = ( $this->options['endpoint'] ) ?: $this->get_default_endpoint();
     231        $endpoint          = $location_endpoint . '/v3/translate?version=2018-05-01';
    232232
    233233        $response = wp_remote_post( $endpoint,
     
    410410        ?>
    411411        <input name="<?php echo $this->option_name; ?>[endpoint]" type="text" id="endpoint" value="<?php echo $endpoint; ?>"
    412                placeholder="" class="regular-text">
     412               placeholder="<?php echo esc_attr( $this->get_default_endpoint() ); ?>" class="regular-text">
    413413        <?php
    414414    }
     
    552552    }
    553553
     554    public function get_default_endpoint() {
     555        return 'https://gateway.watsonplatform.net/language-translator/api';
     556    }
     557
    554558    public function mbfunctions_exist() {
    555559        return ( function_exists( 'mb_strlen' ) ) ? true : false;
Note: See TracChangeset for help on using the changeset viewer.