Plugin Directory

Changeset 3442287


Ignore:
Timestamp:
01/19/2026 08:16:00 AM (2 months ago)
Author:
sergiotrinity
Message:

v5.25.0

Location:
trinity-audio/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trinity-audio/trunk/README.txt

    r3430436 r3442287  
    166166== Screenshots ==
    167167
    168 3. Create and customize you Trinity Audio player.
     1683. Create and customize your Trinity Audio player.
    1691694. Engage your audience with exclusively tailored audio.
    1701705. Manage and follow up on your audio journey success.
     
    174174== Changelog ==
    175175
     176= 5.25.0 =
     177 *Release Date - Jan 19, 2026*
     178 * Fixed Post level saving for non-Gutenberg editors
     179
    176180= 5.24.2 =
    177181 *Release Date - Jan 1, 2026*
     
    182186 * Removed old code
    183187
    184 = 5.24 =
     188= 5.24.0 =
    185189 *Release Date - Dec 4, 2025*
    186190 * Security improvements
     
    198202 * Fixed the disabled "Register" button on the Register screen
    199203
    200 = 5.23 =
     204= 5.23.0 =
    201205 *Release Date - Oct 21, 2025*
    202206 * Added more resilience to the plugin
  • trinity-audio/trunk/js/metaboxes.js

    r3390334 r3442287  
    11async function trinityMetaVoiceConfig() {
    2   const {dispatch} = wp.data;
    3   const editorDispatch = dispatch('core/editor');
    4 
    5   // Save original savePost
    6   const originalSavePost = editorDispatch.savePost;
    7 
    82  let originalConfig;
    93  waitForExpression(() => window.TRINITY_UNIT_CONFIGURATION?.getFormData).then(async () => {
     
    115  });
    126
    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();
    1710
    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 voiceId
     11    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
    2114
    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;
    2818    }
     19  };
    2920
    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  });
    3360}
    3461
  • trinity-audio/trunk/trinity.php

    r3430436 r3442287  
    99   * Plugin URI:        https://www.trinityaudio.ai/the-trinity-audio-wordpress-plugin-implementation-guide
    1010   * 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.24.2
     11   * Version:           5.25.0
    1212   * Author:            Trinity Audio
    1313   * Author URI:        https://trinityaudio.ai/
Note: See TracChangeset for help on using the changeset viewer.