Changeset 2608252
- Timestamp:
- 10/02/2021 12:46:34 PM (5 years ago)
- Location:
- style-genre/trunk
- Files:
-
- 3 edited
-
class.style-genre-admin.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
style-genre.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
style-genre/trunk/class.style-genre-admin.php
r2608064 r2608252 5 5 * 6 6 * @link https://profiles.wordpress.org/janiko/#content-plugins 7 * @since 1.0. 07 * @since 1.0.1 8 8 * 9 9 * @package Style_Genre -
style-genre/trunk/readme.txt
r2608064 r2608252 5 5 Requires PHP: 7.0 6 6 Tested up to: 5.8.1 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 27 27 Let me know if you have some. I will add them here! 28 28 29 An answer to that question. 29 = Does the plugin handles text domains? 30 No. 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? = 33 Well, not for now. Please avoid using msgid with CR/LF, it would really complexify the plugin. 30 34 31 35 == Changelog == 36 37 = 1.0.1= 38 * Fixed bug: option panel 32 39 33 40 = 1.0.0 = -
style-genre/trunk/style-genre.php
r2608064 r2608252 12 12 * Plugin URI: https://profiles.wordpress.org/janiko/#content-plugins 13 13 * Description: This extension helps you to modify some parts of the translations. 14 * Version: 1.0. 014 * Version: 1.0.1 15 15 * Requires at least: 5.2 16 16 * Requires PHP: 7.2 … … 113 113 function style_genre_filter( $translated_text, $original_text, $domain ) { 114 114 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 :( 116 117 117 118 // Here we need an array of strings … … 122 123 $pos = array_search( $original_text, $option_original_texts ); 123 124 if ( is_int($pos) ) 124 $result = $option_gendered_texts[$pos] ;125 $result = $option_gendered_texts[$pos]; 125 126 else 126 127 $result = $translated_text;
Note: See TracChangeset
for help on using the changeset viewer.