Plugin Directory

Changeset 2608252


Ignore:
Timestamp:
10/02/2021 12:46:34 PM (5 years ago)
Author:
janiko
Message:

CR/LF bug fixing

Location:
style-genre/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • style-genre/trunk/class.style-genre-admin.php

    r2608064 r2608252  
    55 *
    66 * @link       https://profiles.wordpress.org/janiko/#content-plugins
    7  * @since      1.0.0
     7 * @since      1.0.1
    88 *
    99 * @package    Style_Genre
  • style-genre/trunk/readme.txt

    r2608064 r2608252  
    55Requires PHP: 7.0
    66Tested up to: 5.8.1
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2727Let me know if you have some. I will add them here!
    2828
    29 An answer to that question.
     29= Does the plugin handles text domains?
     30No. The option panel would be to complex. And generally, the same text should be translated in the same way in every domain.
     31
     32= Are the CR/LF supported? =
     33Well, not for now. Please avoid using msgid with CR/LF, it would really complexify the plugin.
    3034
    3135== Changelog ==
     36
     37= 1.0.1=
     38* Fixed bug: option panel
    3239
    3340= 1.0.0 =
  • style-genre/trunk/style-genre.php

    r2608064 r2608252  
    1212 * Plugin URI:        https://profiles.wordpress.org/janiko/#content-plugins
    1313 * Description:       This extension helps you to modify some parts of the translations.
    14  * Version:           1.0.0
     14 * Version:           1.0.1
    1515 * Requires at least: 5.2
    1616 * Requires PHP:      7.2
     
    113113function style_genre_filter( $translated_text, $original_text, $domain ) {
    114114
    115     $plugin_options = get_option( 'style_genre_option' );
     115    $raw_plugin_options = get_option( 'style_genre_option' );
     116    $plugin_options = str_replace( "\r\n", PHP_EOL, $raw_plugin_options ); // Not sure that's the best option :(
    116117
    117118    // Here we need an array of strings
     
    122123        $pos = array_search( $original_text, $option_original_texts );
    123124        if ( is_int($pos) )
    124             $result = $option_gendered_texts[$pos] ;
     125            $result = $option_gendered_texts[$pos];
    125126        else
    126127            $result = $translated_text;
Note: See TracChangeset for help on using the changeset viewer.