Changeset 3437731
- Timestamp:
- 01/12/2026 12:54:13 PM (3 months ago)
- Location:
- post2podcast
- Files:
-
- 6 edited
- 1 copied
-
tags/1.2.4 (copied) (copied from post2podcast/trunk)
-
tags/1.2.4/includes/class-post2podcast-admin.php (modified) (3 diffs)
-
tags/1.2.4/post2podcast.php (modified) (2 diffs)
-
tags/1.2.4/readme.txt (modified) (2 diffs)
-
trunk/includes/class-post2podcast-admin.php (modified) (3 diffs)
-
trunk/post2podcast.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post2podcast/tags/1.2.4/includes/class-post2podcast-admin.php
r3437318 r3437731 111 111 } 112 112 113 public function text_model_callback() {114 // This setting is intentionally left blank as the model is now fixed.115 }116 113 117 114 … … 692 689 echo "<input id='huggingface_token' name='post2podcast_options[huggingface_token]' type='password' value='" . esc_attr($value) . "' class='regular-text' autocomplete='off' />"; 693 690 echo "<p class='description'>" . esc_html__('Required. Your Hugging Face access token.', 'post2podcast') . " <a href='#huggingface-instructions' class='show-instructions'>" . esc_html__('How to get this', 'post2podcast') . "</a></p>"; 694 }695 696 public function render_model_field() {697 $options = get_option('post2podcast_options');698 ?>699 <input type="text" id="text_model" name="post2podcast_options[text_model]"700 value="<?php echo esc_attr($options['text_model'] ?? 'o3-mini'); ?>" class="regular-text">701 <p class="description">702 <?php esc_html_e('Enter the text generation model to use.', 'post2podcast'); ?>703 </p>704 <?php705 691 } 706 692 … … 1631 1617 } 1632 1618 1633 // Ollama Model (text_model): required if self-hosted1634 if (isset($input['text_model']) && !empty(trim($input['text_model']))) {1635 $valid['text_model'] = sanitize_text_field(trim($input['text_model']));1636 } else {1637 add_settings_error('post2podcast_options', 'missing_text_model', __('Ollama Model is required when self-hosting is enabled.', 'post2podcast'));1638 $valid['text_model'] = $options['text_model'] ?? 'llama2';1639 }1640 1641 } else {1642 1619 // If self-hosted is disabled, retain existing values for these fields, 1643 1620 // as the user might toggle back and forth. They are not used if self_hosted_enabled is false. 1644 1621 $valid['api_base_url'] = $options['api_base_url'] ?? ''; 1645 1622 $valid['openai_api_key'] = $options['openai_api_key'] ?? ''; 1646 $valid['text_model'] = $options['text_model'] ?? 'o3-mini'; // Default if not set 1647 } 1648 1649 // Ensure text_model is always set, even if self-hosting is off, it might have a default meaning for the service 1650 if (empty($valid['text_model'])) { // If it somehow became empty and wasn't caught by self-hosted check 1651 $valid['text_model'] = $options['text_model'] ?? 'o3-mini'; 1652 } 1623 } 1624 1653 1625 1654 1626 // WordPress Site URL - Always required for the new auth method -
post2podcast/tags/1.2.4/post2podcast.php
r3437318 r3437731 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.2. 36 * Version: 1.2.4 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.2. 3');22 define('POST2PODCAST_VERSION', '1.2.4'); 23 23 define('POST2PODCAST_PLUGIN_DIR', plugin_dir_path(__FILE__)); 24 24 define('POST2PODCAST_PLUGIN_URL', plugin_dir_url(__FILE__)); -
post2podcast/tags/1.2.4/readme.txt
r3437318 r3437731 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.2. 37 Stable tag: 1.2.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 274 274 == Changelog == 275 275 276 = 1.2.4 = 277 * IMPROVED: Minor bug fixes and performance improvements. 278 276 279 = 1.2.3 = 277 280 * IMPROVED: Minor bug fixes and performance improvements. -
post2podcast/trunk/includes/class-post2podcast-admin.php
r3437318 r3437731 111 111 } 112 112 113 public function text_model_callback() {114 // This setting is intentionally left blank as the model is now fixed.115 }116 113 117 114 … … 692 689 echo "<input id='huggingface_token' name='post2podcast_options[huggingface_token]' type='password' value='" . esc_attr($value) . "' class='regular-text' autocomplete='off' />"; 693 690 echo "<p class='description'>" . esc_html__('Required. Your Hugging Face access token.', 'post2podcast') . " <a href='#huggingface-instructions' class='show-instructions'>" . esc_html__('How to get this', 'post2podcast') . "</a></p>"; 694 }695 696 public function render_model_field() {697 $options = get_option('post2podcast_options');698 ?>699 <input type="text" id="text_model" name="post2podcast_options[text_model]"700 value="<?php echo esc_attr($options['text_model'] ?? 'o3-mini'); ?>" class="regular-text">701 <p class="description">702 <?php esc_html_e('Enter the text generation model to use.', 'post2podcast'); ?>703 </p>704 <?php705 691 } 706 692 … … 1631 1617 } 1632 1618 1633 // Ollama Model (text_model): required if self-hosted1634 if (isset($input['text_model']) && !empty(trim($input['text_model']))) {1635 $valid['text_model'] = sanitize_text_field(trim($input['text_model']));1636 } else {1637 add_settings_error('post2podcast_options', 'missing_text_model', __('Ollama Model is required when self-hosting is enabled.', 'post2podcast'));1638 $valid['text_model'] = $options['text_model'] ?? 'llama2';1639 }1640 1641 } else {1642 1619 // If self-hosted is disabled, retain existing values for these fields, 1643 1620 // as the user might toggle back and forth. They are not used if self_hosted_enabled is false. 1644 1621 $valid['api_base_url'] = $options['api_base_url'] ?? ''; 1645 1622 $valid['openai_api_key'] = $options['openai_api_key'] ?? ''; 1646 $valid['text_model'] = $options['text_model'] ?? 'o3-mini'; // Default if not set 1647 } 1648 1649 // Ensure text_model is always set, even if self-hosting is off, it might have a default meaning for the service 1650 if (empty($valid['text_model'])) { // If it somehow became empty and wasn't caught by self-hosted check 1651 $valid['text_model'] = $options['text_model'] ?? 'o3-mini'; 1652 } 1623 } 1624 1653 1625 1654 1626 // WordPress Site URL - Always required for the new auth method -
post2podcast/trunk/post2podcast.php
r3437318 r3437731 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.2. 36 * Version: 1.2.4 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.2. 3');22 define('POST2PODCAST_VERSION', '1.2.4'); 23 23 define('POST2PODCAST_PLUGIN_DIR', plugin_dir_path(__FILE__)); 24 24 define('POST2PODCAST_PLUGIN_URL', plugin_dir_url(__FILE__)); -
post2podcast/trunk/readme.txt
r3437318 r3437731 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.2. 37 Stable tag: 1.2.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 274 274 == Changelog == 275 275 276 = 1.2.4 = 277 * IMPROVED: Minor bug fixes and performance improvements. 278 276 279 = 1.2.3 = 277 280 * IMPROVED: Minor bug fixes and performance improvements.
Note: See TracChangeset
for help on using the changeset viewer.