Changeset 3442287
- Timestamp:
- 01/19/2026 08:16:00 AM (2 months ago)
- Location:
- trinity-audio/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (4 diffs)
-
js/metaboxes.js (modified) (2 diffs)
-
trinity.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trinity-audio/trunk/README.txt
r3430436 r3442287 166 166 == Screenshots == 167 167 168 3. Create and customize you Trinity Audio player.168 3. Create and customize your Trinity Audio player. 169 169 4. Engage your audience with exclusively tailored audio. 170 170 5. Manage and follow up on your audio journey success. … … 174 174 == Changelog == 175 175 176 = 5.25.0 = 177 *Release Date - Jan 19, 2026* 178 * Fixed Post level saving for non-Gutenberg editors 179 176 180 = 5.24.2 = 177 181 *Release Date - Jan 1, 2026* … … 182 186 * Removed old code 183 187 184 = 5.24 =188 = 5.24.0 = 185 189 *Release Date - Dec 4, 2025* 186 190 * Security improvements … … 198 202 * Fixed the disabled "Register" button on the Register screen 199 203 200 = 5.23 =204 = 5.23.0 = 201 205 *Release Date - Oct 21, 2025* 202 206 * Added more resilience to the plugin -
trinity-audio/trunk/js/metaboxes.js
r3390334 r3442287 1 1 async function trinityMetaVoiceConfig() { 2 const {dispatch} = wp.data;3 const editorDispatch = dispatch('core/editor');4 5 // Save original savePost6 const originalSavePost = editorDispatch.savePost;7 8 2 let originalConfig; 9 3 waitForExpression(() => window.TRINITY_UNIT_CONFIGURATION?.getFormData).then(async () => { … … 11 5 }); 12 6 13 // Replace savePost with our wrapper 14 editorDispatch.savePost = async (...args) => { 15 if (window.TRINITY_UNIT_CONFIGURATION?.getFormData) { 16 const formData = await window.TRINITY_UNIT_CONFIGURATION.getFormData(); 7 const save = async () => { 8 if (!window.TRINITY_UNIT_CONFIGURATION?.getFormData) return console.error('TRINITY_UNIT_CONFIGURATION.getFormData is not defined. Possible issue with loading Unit Configuration widget. Continue saving...'); 9 const formData = await window.TRINITY_UNIT_CONFIGURATION.getFormData(); 17 10 18 if (originalConfig && JSON.stringify(originalConfig) !== JSON.stringify(formData)) {19 const voiceIdInputEl = document.getElementById('trinity_audio_voice_id');20 voiceIdInputEl.value = formData.voiceId; // set public voiceId11 if (originalConfig && JSON.stringify(originalConfig) !== JSON.stringify(formData)) { 12 const voiceIdInputEl = document.getElementById('trinity_audio_voice_id'); 13 voiceIdInputEl.value = formData.voiceId; // set public voiceId 21 14 22 // Good to save locale and not only voiceId, since if voiceId get removed, we have locale which we can rely on 23 const languageInputEl = document.getElementById('trinity_audio_source_language'); 24 languageInputEl.value = formData.code; 25 } 26 } else { 27 console.error('TRINITY_UNIT_CONFIGURATION.getFormData is not defined. Possible issue with loading Unit Configuration widget. Continue saving...'); 15 // Good to save locale and not only voiceId, since if voiceId get removed, we have locale which we can rely on 16 const languageInputEl = document.getElementById('trinity_audio_source_language'); 17 languageInputEl.value = formData.code; 28 18 } 19 }; 29 20 30 // Continue with original save 31 return originalSavePost(...args); 32 }; 21 // Gutenberg 22 const {dispatch} = wp.data; 23 const editorDispatch = dispatch('core/editor'); 24 if (editorDispatch) { 25 // Save original savePost 26 const originalSavePost = editorDispatch.savePost; 27 28 // Replace savePost with our wrapper 29 editorDispatch.savePost = async (...args) => { 30 await save(); 31 32 // Continue with original save 33 return originalSavePost(...args); 34 }; 35 36 return; 37 } 38 39 console.debug('Gutenberg API is not available, trying to hook into saving button'); 40 41 // Target only the post edit form 42 $('#post').on('submit', async (e) => { 43 try { 44 // Only trigger for post editing, not any other form 45 const postId = $('#post_ID').val(); 46 if (!postId) return; // Not a post edit form 47 48 console.debug('Post form submission intercepted!'); 49 50 // Stop the default submit temporarily 51 e.preventDefault(); 52 53 await save(); 54 } catch (error) { 55 console.error('Could not intercept Update button', error); 56 } finally { 57 e.target.submit(); 58 } 59 }); 33 60 } 34 61 -
trinity-audio/trunk/trinity.php
r3430436 r3442287 9 9 * Plugin URI: https://www.trinityaudio.ai/the-trinity-audio-wordpress-plugin-implementation-guide 10 10 * Description: This plugin generates an audio version of the post, for absolutely FREE. You can choose the language and the gender of the voice reading your content. You also have the option to add Trinity Audio's player on select posts or have it audiofy all of your content. In both cases, it only takes a few simple clicks to get it done. The plugin is built through collaboration with the Amazon Polly team. 11 * Version: 5.2 4.211 * Version: 5.25.0 12 12 * Author: Trinity Audio 13 13 * Author URI: https://trinityaudio.ai/
Note: See TracChangeset
for help on using the changeset viewer.