Changeset 3453470
- Timestamp:
- 02/04/2026 05:21:20 AM (2 months ago)
- Location:
- ondoku
- Files:
-
- 6 edited
- 1 copied
-
tags/1.0.27 (copied) (copied from ondoku/trunk)
-
tags/1.0.27/classes/setting.php (modified) (4 diffs)
-
tags/1.0.27/ondokusan.php (modified) (2 diffs)
-
tags/1.0.27/readme.txt (modified) (1 diff)
-
trunk/classes/setting.php (modified) (4 diffs)
-
trunk/ondokusan.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ondoku/tags/1.0.27/classes/setting.php
r3452493 r3453470 191 191 private function token_check( $option ) { 192 192 if ( empty( $option['token'] ) ) { 193 $this->write_test_log( 'token_check: token is empty', 'WARN' ); 193 194 return false; 194 195 } … … 205 206 ); 206 207 208 $this->write_test_log( sprintf( 209 'token_check API request: url=%s, voice=%s, speed=%s, pitch=%s', 210 ONDOKUSAN_API, 211 $params['voice'], 212 $params['speed'], 213 $params['pitch'] 214 ), 'INFO' ); 215 207 216 $data = wp_remote_post( ONDOKUSAN_API, array( 208 217 'method' => 'POST', 209 218 'headers' => $headers, 219 'timeout' => 30, 210 220 'httpversion' => '1.0', 211 221 'sslverify' => false, … … 214 224 215 225 if ( is_wp_error( $data ) ) { 226 $this->write_test_log( sprintf( 227 'token_check failed: %s', 228 $data->get_error_message() 229 ), 'ERROR' ); 216 230 return false; 217 231 } 218 232 219 233 $code = wp_remote_retrieve_response_code( $data ); 234 $this->write_test_log( sprintf( 235 'token_check response: status_code=%d', 236 $code 237 ), 'INFO' ); 238 220 239 if ( $code === 400 ) { 240 $this->write_test_log( 'token_check: received 400 Bad Request', 'ERROR' ); 221 241 return false; 222 242 } … … 225 245 $result = json_decode( $response, true ); 226 246 227 return is_array( $result ); 247 $is_valid = is_array( $result ); 248 $this->write_test_log( sprintf( 249 'token_check result: valid=%s', 250 $is_valid ? 'true' : 'false' 251 ), 'INFO' ); 252 253 return $is_valid; 228 254 } 229 255 -
ondoku/tags/1.0.27/ondokusan.php
r3452574 r3453470 4 4 Description: Text to Speech (TTS) plugin. Automatically convert posts to MP3 audio. 音読さん - ブログ読み上げ・音声化プラグイン。 5 5 Author: Ondoku 6 Version: 1.0.2 66 Version: 1.0.27 7 7 Text Domain: ondoku3 8 8 Domain Path: /languages/ … … 13 13 14 14 define( 'ONDOKUSAN', __FILE__ ); 15 define( 'ONDOKUSAN_VERSION', '1.0.2 6' );15 define( 'ONDOKUSAN_VERSION', '1.0.27' ); 16 16 define( 'ONDOKUSAN_DIR', untrailingslashit( dirname( __FILE__) ) ); 17 17 define( 'ONDOKUSAN_URL', untrailingslashit( plugins_url( '', __FILE__ ) ) ); -
ondoku/tags/1.0.27/readme.txt
r3452927 r3453470 5 5 Requires at least: 5.1 6 6 Requires PHP: 8.0 7 Stable tag: 1.0.2 67 Stable tag: 1.0.27 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
ondoku/trunk/classes/setting.php
r3452493 r3453470 191 191 private function token_check( $option ) { 192 192 if ( empty( $option['token'] ) ) { 193 $this->write_test_log( 'token_check: token is empty', 'WARN' ); 193 194 return false; 194 195 } … … 205 206 ); 206 207 208 $this->write_test_log( sprintf( 209 'token_check API request: url=%s, voice=%s, speed=%s, pitch=%s', 210 ONDOKUSAN_API, 211 $params['voice'], 212 $params['speed'], 213 $params['pitch'] 214 ), 'INFO' ); 215 207 216 $data = wp_remote_post( ONDOKUSAN_API, array( 208 217 'method' => 'POST', 209 218 'headers' => $headers, 219 'timeout' => 30, 210 220 'httpversion' => '1.0', 211 221 'sslverify' => false, … … 214 224 215 225 if ( is_wp_error( $data ) ) { 226 $this->write_test_log( sprintf( 227 'token_check failed: %s', 228 $data->get_error_message() 229 ), 'ERROR' ); 216 230 return false; 217 231 } 218 232 219 233 $code = wp_remote_retrieve_response_code( $data ); 234 $this->write_test_log( sprintf( 235 'token_check response: status_code=%d', 236 $code 237 ), 'INFO' ); 238 220 239 if ( $code === 400 ) { 240 $this->write_test_log( 'token_check: received 400 Bad Request', 'ERROR' ); 221 241 return false; 222 242 } … … 225 245 $result = json_decode( $response, true ); 226 246 227 return is_array( $result ); 247 $is_valid = is_array( $result ); 248 $this->write_test_log( sprintf( 249 'token_check result: valid=%s', 250 $is_valid ? 'true' : 'false' 251 ), 'INFO' ); 252 253 return $is_valid; 228 254 } 229 255 -
ondoku/trunk/ondokusan.php
r3452574 r3453470 4 4 Description: Text to Speech (TTS) plugin. Automatically convert posts to MP3 audio. 音読さん - ブログ読み上げ・音声化プラグイン。 5 5 Author: Ondoku 6 Version: 1.0.2 66 Version: 1.0.27 7 7 Text Domain: ondoku3 8 8 Domain Path: /languages/ … … 13 13 14 14 define( 'ONDOKUSAN', __FILE__ ); 15 define( 'ONDOKUSAN_VERSION', '1.0.2 6' );15 define( 'ONDOKUSAN_VERSION', '1.0.27' ); 16 16 define( 'ONDOKUSAN_DIR', untrailingslashit( dirname( __FILE__) ) ); 17 17 define( 'ONDOKUSAN_URL', untrailingslashit( plugins_url( '', __FILE__ ) ) ); -
ondoku/trunk/readme.txt
r3452927 r3453470 5 5 Requires at least: 5.1 6 6 Requires PHP: 8.0 7 Stable tag: 1.0.2 67 Stable tag: 1.0.27 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.