Changeset 3431709
- Timestamp:
- 01/03/2026 03:19:59 PM (3 months ago)
- Location:
- post2podcast/trunk
- Files:
-
- 3 edited
-
includes/class-post2podcast-admin.php (modified) (4 diffs)
-
post2podcast.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post2podcast/trunk/includes/class-post2podcast-admin.php
r3431665 r3431709 253 253 254 254 if ($this->is_whitelisted) { 255 // Section for Self-Hosted Settings (conditionally displayed )255 // Section for Self-Hosted Settings (conditionally displayed for whitelisted sites only) 256 256 add_settings_section( 257 257 'post2podcast_self_hosted', 258 __('Self-Hosted Server Configuration', 'post2podcast'), // Updated title259 array($this, 'self_hosted_section_text'), 258 __('Self-Hosted Server Configuration', 'post2podcast'), 259 array($this, 'self_hosted_section_text'), 260 260 'post2podcast' 261 261 ); … … 263 263 add_settings_field( 264 264 'self_hosted_enabled', 265 __('Use Self-Hosted Server', 'post2podcast'), // Updated label for the switch266 array($this, 'self_hosted_callback'), // This will render the switch265 __('Use Self-Hosted Server', 'post2podcast'), 266 array($this, 'self_hosted_callback'), 267 267 'post2podcast', 268 'post2podcast_self_hosted' // Now part of this section268 'post2podcast_self_hosted' 269 269 ); 270 270 271 271 add_settings_field( 272 272 'api_base_url', … … 284 284 'post2podcast_self_hosted' 285 285 ); 286 286 287 287 add_settings_field( 288 'text_model', // Re-using for "AI Model"288 'text_model', 289 289 __('AI Model', 'post2podcast'), 290 array($this, 'text_model_callback'), // Re-using existing callback290 array($this, 'text_model_callback'), 291 291 'post2podcast', 292 292 'post2podcast_self_hosted' 293 293 ); 294 294 295 295 add_settings_section( 296 296 'post2podcast_instructions', 297 __('How to Get API Keys & Setup Self-Hosted Server', 'post2podcast'), // Slightly updated title297 __('How to Get API Keys & Setup Self-Hosted Server', 'post2podcast'), 298 298 array($this, 'instructions_section_text'), 299 299 'post2podcast' … … 457 457 echo '</div>'; 458 458 echo '</div>'; 459 460 // Option 3: Self-Hosted (only for whitelisted sites) 461 if ($this->is_whitelisted) { 462 $self_hosted_api_key = get_option('post2podcast_openai_api_key', ''); 463 $self_hosted_server_url = get_option('post2podcast_server_url', ''); 464 $is_self_hosted_configured = !empty($self_hosted_api_key) && !empty($self_hosted_server_url); 465 466 echo '<div class="post2podcast-tier-card post2podcast-selfhosted-tier-status" style="flex: 1; min-width: 280px; ' . ($is_self_hosted_configured ? 'border: 2px solid #48bb78;' : '') . '">'; 467 echo '<div class="post2podcast-tier-header">'; 468 echo '<div class="post2podcast-tier-badge" style="background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);">' . esc_html__('SELF-HOSTED', 'post2podcast') . '</div>'; 469 if ($is_self_hosted_configured) { 470 echo '<div style="margin-left: auto; background: #48bb78; color: white; padding: 4px 8px; border-radius: 12px; font-size: 11px; font-weight: 600;">' . esc_html__('ENABLED', 'post2podcast') . '</div>'; 471 } 472 echo '</div>'; 473 474 echo '<div class="post2podcast-tier-content">'; 475 echo '<div class="post2podcast-credits-display">'; 476 echo '<div class="post2podcast-credits-count" style="font-size: 2em;">∞</div>'; 477 echo '<span class="post2podcast-credits-label">' . esc_html__('Unlimited Generations', 'post2podcast') . '</span>'; 478 echo '</div>'; 479 480 echo '<ul class="post2podcast-tier-features">'; 481 echo '<li class="post2podcast-tier-feature">' . esc_html__('Use your own OpenAI API key', 'post2podcast') . '</li>'; 482 echo '<li class="post2podcast-tier-feature">' . esc_html__('Unlimited audio length', 'post2podcast') . '</li>'; 483 echo '<li class="post2podcast-tier-feature">' . esc_html__('Custom server configuration', 'post2podcast') . '</li>'; 484 echo '<li class="post2podcast-tier-feature">' . esc_html__('Full data control', 'post2podcast') . '</li>'; 485 echo '</ul>'; 486 487 echo '<div class="post2podcast-tier-actions">'; 488 if ($is_self_hosted_configured) { 489 echo '<div style="font-size: 13px; color: #48bb78; padding: 10px; background: #f0fff4; border-radius: 6px; font-weight: 500; text-align: center;">'; 490 echo '<span class="dashicons dashicons-yes-alt" style="vertical-align: middle;"></span> '; 491 echo esc_html__('Self-hosted mode active', 'post2podcast'); 492 echo '</div>'; 493 } else { 494 echo '<div style="font-size: 13px; color: #718096; padding: 10px; background: #f7fafc; border-radius: 6px; text-align: center;">'; 495 echo esc_html__('Configure API key below to enable', 'post2podcast'); 496 echo '</div>'; 497 } 498 echo '</div>'; 499 echo '</div>'; 500 echo '</div>'; 501 } 459 502 460 503 echo '</div>'; // .post2podcast-options-container -
post2podcast/trunk/post2podcast.php
r3431665 r3431709 4 4 * Plugin server URI: https://github.com/samukbg/post2podcast-server 5 5 * Description: Convert WordPress posts into podcast episodes with AI voices 6 * Version: 1.1. 56 * Version: 1.1.6 7 7 * Author: Samuel Bezerra 8 8 * Author URI: https://github.com/samukbg … … 20 20 21 21 // Define plugin constants 22 define('POST2PODCAST_VERSION', '1.1. 5');22 define('POST2PODCAST_VERSION', '1.1.6'); 23 23 define('POST2PODCAST_PLUGIN_DIR', plugin_dir_path(__FILE__)); 24 24 define('POST2PODCAST_PLUGIN_URL', plugin_dir_url(__FILE__)); -
post2podcast/trunk/readme.txt
r3431665 r3431709 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.1. 57 Stable tag: 1.1.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 273 273 274 274 == Changelog == 275 = 1.1.6 = 276 * IMPROVED: Enhanced subscription tier display in settings page 277 * IMPROVED: Better visual organization of subscription options 278 275 279 = 1.1.5 = 276 280 * REMOVED: Lifetime subscription option (now only Free and PRO tiers available)
Note: See TracChangeset
for help on using the changeset viewer.