Plugin Directory

Changeset 3256533


Ignore:
Timestamp:
03/16/2025 11:20:38 AM (10 months ago)
Author:
nico23
Message:

Update plugin to version 10.6.7 with NextgenThemes WordPress Plugin Deploy

Location:
advanced-responsive-video-embedder
Files:
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • advanced-responsive-video-embedder/tags/10.6.7/advanced-responsive-video-embedder.php

    r3256343 r3256533  
    44 * Plugin URI:        https://nextgenthemes.com/plugins/arve-pro/
    55 * Description:       Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine.
    6  * Version:           10.6.6
     6 * Version:           10.6.7
    77 * Requires PHP:      7.4
    88 * Requires at least: 6.6
     
    2323namespace Nextgenthemes\ARVE;
    2424
    25 const VERSION               = '10.6.6';
     25const VERSION               = '10.6.7';
    2626const PRO_VERSION_REQUIRED  = '7.0.2';
    2727const NUM_TRACKS            = 3;
  • advanced-responsive-video-embedder/tags/10.6.7/build/block.json

    r3256343 r3256533  
    1414    "odysee"
    1515  ],
    16   "version": "10.6.6-beta2",
     16  "version": "10.6.6",
    1717  "textdomain": "advanced-responsive-video-embedder",
    1818  "supports": {
  • advanced-responsive-video-embedder/tags/10.6.7/changelog.md

    r3256343 r3256533  
    33* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
    44* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
     5
     6### 2025-03-16 10.6.7 ###
     7
     8* Fixed: Compatibility with Advanced Custom Fields WYSIWYG editors. The ARVE shortcode creation button now finally works there.
    59
    610### 2025-03-15 10.6.6 ###
  • advanced-responsive-video-embedder/tags/10.6.7/php/Admin/fn-admin.php

    r3256343 r3256533  
    389389function admin_enqueue_styles(): void {
    390390
    391     if ( did_action( 'wp_enqueue_editor' ) ) {
    392         return;
    393     }
     391    // This shit prevents 'arve-admin-css was added to the iframe incorrectly.' error but it doesn't work with enqueue_block_editor_assets
     392    // if ( did_action( 'wp_enqueue_editor' ) ) { return; }
    394393
    395394    wp_enqueue_style(
     
    432431        array( 'strategy' => 'defer' ),
    433432    );
    434 
    435433    wp_add_inline_script(
    436434        'arve-admin',
     
    438436        'before'
    439437    );
    440 
    441438    wp_enqueue_script( 'arve-admin' );
    442439
  • advanced-responsive-video-embedder/tags/10.6.7/php/Admin/fn-shortcode-creator.php

    r3252510 r3256533  
    1212const DIALOG_NAMESPACE = 'nextgenthemes_arve_dialog';
    1313
    14 function add_media_button(): void {
     14/**
     15 * Adds a media button to the Classic Editor or other editors that use the same API.
     16 *
     17 * The button triggers a shortcode creator dialog when clicked.
     18 *
     19 * @param string $editor_id The ID of the editor to add the button to.
     20 */
     21function add_media_button( string $editor_id ): void {
    1522
    1623    dialog_interactivity();
     
    3037            'data-wp-interactive' => DIALOG_NAMESPACE,
    3138            'data-wp-on--click'   => 'actions.openShortcodeDialog',
     39            'data-editor'         => $editor_id,
    3240        ],
    3341    );
     
    8088
    8189    ?>
     90    <button
     91        type="button"
     92        data-wp-interactive="<?= esc_attr( DIALOG_NAMESPACE ); ?>"
     93        data-wp-on--click="actions.openShortcodeDialog"
     94        data-editor="content"
     95        hidden
     96    ></button>
    8297    <dialog
    8398        class="arve-sc-dialog"
     
    92107                    <span class="media-modal-icon dashicons dashicons-editor-help">
    93108                        <span class="screen-reader-text">
    94                             Toggle Help
     109                            <?php esc_html_e( 'Toggle Help', 'advanced-responsive-video-embedder' ); ?>
    95110                        </span>
    96111                    </span>
     
    100115                    <span class="media-modal-icon">
    101116                        <span class="screen-reader-text">
    102                             Close dialog
     117                            <?php esc_html_e( 'Close dialog', 'advanced-responsive-video-embedder' ); ?>
    103118                        </span>
    104119                    </span>
  • advanced-responsive-video-embedder/tags/10.6.7/readme.txt

    r3256343 r3256533  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 10.6.6
     8Stable tag: 10.6.7
    99License: GPL-3.0
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    196196* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
    197197
     198### 2025-03-16 10.6.7 ###
     199
     200* Fixed: Compatibility with Advanced Custom Fields WYSIWYG editors. The ARVE shortcode creation button now finally works there.
     201
    198202### 2025-03-15 10.6.6 ###
    199203
  • advanced-responsive-video-embedder/tags/10.6.7/src/block.json

    r3256343 r3256533  
    1414        "odysee"
    1515    ],
    16     "version": "10.6.6",
     16    "version": "10.6.7",
    1717    "textdomain": "advanced-responsive-video-embedder",
    1818    "supports": {
  • advanced-responsive-video-embedder/tags/10.6.7/vendor/composer/installed.json

    r3256343 r3256533  
    7676                "type": "path",
    7777                "url": "../../../../../../dev/composer-packages/wp-settings",
    78                 "reference": "4e400bdc35f179cd62a04ed4f32c294a68d39c34"
     78                "reference": "046259272b104d5254e2fea589102cb7da259cdf"
    7979            },
    8080            "require": {
  • advanced-responsive-video-embedder/tags/10.6.7/vendor/composer/installed.php

    r3256343 r3256533  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '24960e6ad2d1a9f8a912899c645b18d3009b40fb',
     6        'reference' => '9eb22b68dbfaa1ddad6cb3d2684f4589d2b7766c',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-master',
    2424            'version' => 'dev-master',
    25             'reference' => '24960e6ad2d1a9f8a912899c645b18d3009b40fb',
     25            'reference' => '9eb22b68dbfaa1ddad6cb3d2684f4589d2b7766c',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
     
    3232            'pretty_version' => 'dev-master',
    3333            'version' => 'dev-master',
    34             'reference' => '4e400bdc35f179cd62a04ed4f32c294a68d39c34',
     34            'reference' => '046259272b104d5254e2fea589102cb7da259cdf',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../nextgenthemes/wp-settings',
  • advanced-responsive-video-embedder/tags/10.6.7/vendor/nextgenthemes/wp-settings/build/settings.asset.php

    r3256343 r3256533  
    1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => 'bb40bae61d4f43a56d48', 'type' => 'module');
     1<?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => '43e5009cee70e468b68a', 'type' => 'module');
  • advanced-responsive-video-embedder/tags/10.6.7/vendor/nextgenthemes/wp-settings/build/settings.js

    r3256343 r3256533  
    1 import*as e from"@wordpress/interactivity";var t={};function o(e,t){if(n(e)&&n(t)){const o=parseInt(e),n=parseInt(t),s=i(o,n);return`${o/s}:${n/s}`}return`${e}:${t}`}function n(e){const t=Math.floor(Number(e));return t!==1/0&&String(t)===e&&t>0}function i(e,t){return t?i(t,e%t):e}t.d=(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=(l={getConfig:()=>e.getConfig,getContext:()=>e.getContext,store:()=>e.store},d={},t.d(d,l),d),a=new DOMParser,r=document,c=r.querySelector.bind(r);var l,d;!function(){const e=c('[data-wp-interactive^="nextgenthemes"]')?.dataset?.wpInteractive;if(!e)return;const{state:t,actions:n,callbacks:i,helpers:r}=(0,s.store)(e,{state:{isValidLicenseKey:()=>{const e=(0,s.getContext)();return"valid"===t.options[e.option_key+"_status"]},is32charactersLong:()=>{const e=(0,s.getContext)();return 32===t.options[e.option_key].length},get isActiveTab(){const e=(0,s.getContext)();return!e.activeTabs||!0===e?.activeTabs[e.tab]}},actions:{toggleHelp:()=>{t.help=!t.help},openShortcodeDialog:()=>{t.dialog=document.querySelector('dialog[data-wp-interactive="nextgenthemes_arve_dialog"]'),t.dialog.showModal()},insertShortcode:()=>{window.wp.media.editor.insert(t.shortcode),t.dialog.close()},closeShortcodeDialog:()=>{t.dialog.close()},changeTab:()=>{const e=(0,s.getContext)();for(const t in e.activeTabs)e.activeTabs[t]=!1;e.activeTabs[e.tab]=!0},inputChange:o=>{const i=(0,s.getContext)(),a=o?.target instanceof HTMLInputElement,c=o?.target instanceof HTMLSelectElement;if(!a&&!c)throw new Error("event.target is not HTMLInputElement or HTMLSelectElement");"arveUrl"in o.target.dataset?r.extractFromEmbedCode(o.target.value):t.options[i.option_key]=o.target.value,"nextgenthemes_arve_dialog"!==e&&n.saveOptions()},checkboxChange:o=>{const i=(0,s.getContext)();t.options[i.option_key]=o.target.checked,"nextgenthemes_arve_dialog"!==e&&n.saveOptions()},selectImage:()=>{t.dialog&&t.dialog.close();const e=(0,s.getContext)(),o=window.wp.media({title:"Upload Image",multiple:!1}).open().on("select",(function(){const n=o.state().get("selection").first().toJSON().id;t.options[e.option_key]=n,t.dialog&&t.dialog.showModal()})).on("close",(function(){t.dialog&&t.dialog.showModal()}))},deleteOembedCache:()=>{n.restCall("/delete-oembed-cache",{delete:!0})},saveOptionsReal:()=>{n.restCall("/save",t.options)},restCall:(e,o,n=!1)=>{if(t.isSaving)return void(t.message="trying to save too fast");const i=(0,s.getConfig)();t.isSaving=!0,t.message="Saving...",fetch(i.restUrl+e,{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json","X-WP-Nonce":i.nonce}}).then((e=>{if(!e.ok)throw console.log(e),new Error("Network response was not ok");return e.json()})).then((e=>{t.message=e,setTimeout((()=>t.message=""),666)})).catch((e=>{t.message=e.message})).finally((()=>{t.isSaving=!1,n&&window.location.reload()}))},eddLicenseAction(){const e=(0,s.getContext)();n.restCall("/edd-license-action",{option_key:e.option_key,edd_store_url:e.edd_store_url,edd_action:e.edd_action,item_id:e.edd_item_id,license:t.options[e.option_key]},!0)},resetOptionsSection(){const e=(0,s.getConfig)(),o=(0,s.getContext)().tab;Object.entries(e.defaultOptions).forEach((([e,n])=>{"all"===o?Object.entries(n).forEach((([e,o])=>{t.options[e]=o})):Object.entries(n).forEach((([n,i])=>{e===o&&(t.options[n]=i)}))})),n.saveOptionsReal()}},callbacks:{updateShortcode(){let e="";for(const[o,n]of Object.entries(t.options))"credentialless"===o?!1===n&&(e+=`${o}="false" `):!0===n?e+=`${o}="true" `:n&&(e+=`${o}="${n}" `);t.shortcode="[arve "+e+"/]"}},helpers:{debugJson:e=>{t.debug=JSON.stringify(e,null,2)},extractFromEmbedCode:e=>{const n=a.parseFromString(e,"text/html").querySelector("iframe"),i=n&&n.getAttribute("src");if(i&&(e=i,n.width&&n.height)){const e=o(n.width,n.height);"16:9"!==e&&(t.options.aspect_ratio=e)}t.options.url=e}}});n.saveOptions=function(e){let t;return function(...o){const n=this;clearTimeout(t),t=window.setTimeout((()=>{t=void 0,e.apply(n,o)}),1111)}}(n.saveOptionsReal)}(),function(){const e=window.getComputedStyle(r.body).backgroundColor,t=c(".wrap--nextgenthemes");t&&t.setAttribute("style",`--ngt-wp-body-bg: ${e};`)}();
     1import*as e from"@wordpress/interactivity";var t={};function o(e,t){if(n(e)&&n(t)){const o=parseInt(e),n=parseInt(t),s=i(o,n);return`${o/s}:${n/s}`}return`${e}:${t}`}function n(e){const t=Math.floor(Number(e));return t!==1/0&&String(t)===e&&t>0}function i(e,t){return t?i(t,e%t):e}t.d=(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=(l={getConfig:()=>e.getConfig,getContext:()=>e.getContext,store:()=>e.store},g={},t.d(g,l),g),r=new DOMParser,a=document,c=a.querySelector.bind(a),d=c('dialog[data-wp-interactive="nextgenthemes_arve_dialog"]');var l,g;!function(){const e=c('[data-wp-interactive^="nextgenthemes"]')?.dataset?.wpInteractive;if(!e)return;const{state:t,actions:n,callbacks:i,helpers:a}=(0,s.store)(e,{state:{isValidLicenseKey:()=>{const e=(0,s.getContext)();return"valid"===t.options[e.option_key+"_status"]},is32charactersLong:()=>{const e=(0,s.getContext)();return 32===t.options[e.option_key].length},get isActiveTab(){const e=(0,s.getContext)();return!e.activeTabs||!0===e?.activeTabs[e.tab]}},actions:{toggleHelp:()=>{t.help=!t.help},openShortcodeDialog:e=>{const t=e.target instanceof HTMLElement&&e.target.dataset.editor;d&&t?(d.dataset.editor=t,d.showModal()):console.error("Dialog or editorId not found")},insertShortcode:()=>{const e=d?.dataset.editor;if(e)if("content"===e)window.wp.media.editor.insert(t.shortcode);else{if(void 0===window.tinymce||!window.tinymce.get(e))return void console.error("TinyMCE not initialized for field: "+e);window.tinymce.get(e).insertContent(t.shortcode)}else console.error("Editor ID not found");n.closeShortcodeDialog()},closeShortcodeDialog:()=>{d&&d.close()},changeTab:()=>{const e=(0,s.getContext)();for(const t in e.activeTabs)e.activeTabs[t]=!1;e.activeTabs[e.tab]=!0},inputChange:o=>{const i=(0,s.getContext)(),r=o?.target instanceof HTMLInputElement,c=o?.target instanceof HTMLSelectElement;if(!r&&!c)throw new Error("event.target is not HTMLInputElement or HTMLSelectElement");"arveUrl"in o.target.dataset?a.extractFromEmbedCode(o.target.value):t.options[i.option_key]=o.target.value,"nextgenthemes_arve_dialog"!==e&&n.saveOptions()},checkboxChange:o=>{const i=(0,s.getContext)();t.options[i.option_key]=o.target.checked,"nextgenthemes_arve_dialog"!==e&&n.saveOptions()},selectImage:()=>{d&&d.close();const e=(0,s.getContext)(),o=window.wp.media({title:"Upload Image",multiple:!1}).open().on("select",(function(){const n=o.state().get("selection").first().toJSON().id;t.options[e.option_key]=n,d&&d.showModal()})).on("close",(function(){d&&d.showModal()}))},deleteOembedCache:()=>{n.restCall("/delete-oembed-cache",{delete:!0})},saveOptionsReal:()=>{n.restCall("/save",t.options)},restCall:(e,o,n=!1)=>{if(t.isSaving)return void(t.message="trying to save too fast");const i=(0,s.getConfig)();t.isSaving=!0,t.message="Saving...",fetch(i.restUrl+e,{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json","X-WP-Nonce":i.nonce}}).then((e=>{if(!e.ok)throw console.log(e),new Error("Network response was not ok");return e.json()})).then((e=>{t.message=e,setTimeout((()=>t.message=""),666)})).catch((e=>{t.message=e.message})).finally((()=>{t.isSaving=!1,n&&window.location.reload()}))},eddLicenseAction(){const e=(0,s.getContext)();n.restCall("/edd-license-action",{option_key:e.option_key,edd_store_url:e.edd_store_url,edd_action:e.edd_action,item_id:e.edd_item_id,license:t.options[e.option_key]},!0)},resetOptionsSection(){const e=(0,s.getConfig)(),o=(0,s.getContext)().tab;Object.entries(e.defaultOptions).forEach((([e,n])=>{"all"===o?Object.entries(n).forEach((([e,o])=>{t.options[e]=o})):Object.entries(n).forEach((([n,i])=>{e===o&&(t.options[n]=i)}))})),n.saveOptionsReal()}},callbacks:{updateShortcode(){let e="";for(const[o,n]of Object.entries(t.options))"credentialless"===o?!1===n&&(e+=`${o}="false" `):!0===n?e+=`${o}="true" `:n&&(e+=`${o}="${n}" `);t.shortcode="[arve "+e+"/]"}},helpers:{debugJson:e=>{t.debug=JSON.stringify(e,null,2)},extractFromEmbedCode:e=>{const n=r.parseFromString(e,"text/html").querySelector("iframe"),i=n&&n.getAttribute("src");if(i&&(e=i,n.width&&n.height)){const e=o(n.width,n.height);"16:9"!==e&&(t.options.aspect_ratio=e)}t.options.url=e}}});n.saveOptions=function(e){let t;return function(...o){const n=this;clearTimeout(t),t=window.setTimeout((()=>{t=void 0,e.apply(n,o)}),1111)}}(n.saveOptionsReal)}(),function(){const e=window.getComputedStyle(a.body).backgroundColor,t=c(".wrap--nextgenthemes");t&&t.setAttribute("style",`--ngt-wp-body-bg: ${e};`)}(),window.jQuery(document).on("click",'.arve-btn:not([data-editor="content"])',(e=>{e.preventDefault();const t=c('[data-wp-on--click="actions.openShortcodeDialog"][data-editor="content"]'),o=c('[data-wp-on--click="actions.insertShortcode"]');t&&o&&d?t.dispatchEvent(new Event("click")):console.error("Open btn, insert btn od dialog not found")}));
  • advanced-responsive-video-embedder/tags/10.6.7/vendor/nextgenthemes/wp-settings/src/settings.ts

    r3256343 r3256533  
    55const d = document;
    66const qs = d.querySelector.bind( d ) as typeof document.querySelector;
     7const dialog = qs< HTMLDialogElement >( 'dialog[data-wp-interactive="nextgenthemes_arve_dialog"]' );
    78
    89setupInteractivityApi();
     
    1718    }
    1819}
     20
     21// ACF
     22window.jQuery( document ).on( 'click', '.arve-btn:not([data-editor="content"])', ( e: Event ) => {
     23    e.preventDefault();
     24
     25    const openBtn = qs< HTMLButtonElement >(
     26        '[data-wp-on--click="actions.openShortcodeDialog"][data-editor="content"]'
     27    );
     28    const insertBtn = qs< HTMLButtonElement >( '[data-wp-on--click="actions.insertShortcode"]' );
     29
     30    if ( ! openBtn || ! insertBtn || ! dialog ) {
     31        console.error( 'Open btn, insert btn od dialog not found' ); // eslint-disable-line
     32        return;
     33    }
     34
     35    openBtn.dispatchEvent( new Event( 'click' ) );
     36} );
    1937
    2038function setupInteractivityApi() {
     
    5270                state.help = ! state.help;
    5371            },
    54             openShortcodeDialog: () => {
    55                 state.dialog = document.querySelector(
    56                     'dialog[data-wp-interactive="nextgenthemes_arve_dialog"]'
    57                 );
    58                 state.dialog.showModal();
     72            openShortcodeDialog: ( event: Event ) => {
     73                const editorId = event.target instanceof HTMLElement && event.target.dataset.editor;
     74
     75                if ( ! dialog || ! editorId ) {
     76                    console.error( 'Dialog or editorId not found' ); // eslint-disable-line
     77                    return;
     78                }
     79
     80                dialog.dataset.editor = editorId;
     81                dialog.showModal();
    5982            },
    6083            insertShortcode: () => {
    61                 window.wp.media.editor.insert( state.shortcode );
    62                 state.dialog.close();
     84                const editorId = dialog?.dataset.editor;
     85
     86                if ( ! editorId ) {
     87                    console.error( 'Editor ID not found' ); // eslint-disable-line
     88                } else if ( 'content' === editorId ) {
     89                    window.wp.media.editor.insert( state.shortcode );
     90                } else {
     91                    // Ensure TinyMCE is loaded and the editor exists
     92                    if (
     93                        typeof window.tinymce === 'undefined' ||
     94                        ! window.tinymce.get( editorId )
     95                    ) {
     96                        console.error( 'TinyMCE not initialized for field: ' + editorId ); // eslint-disable-line
     97                        return;
     98                    }
     99
     100                    window.tinymce.get( editorId ).insertContent( state.shortcode );
     101                }
     102
     103                actions.closeShortcodeDialog();
    63104            },
    64105            closeShortcodeDialog: () => {
    65                 state.dialog.close();
     106                if ( dialog ) {
     107                    dialog.close();
     108                }
    66109            },
    67110            changeTab: () => {
     
    102145            },
    103146            selectImage: () => {
    104                 if ( state.dialog ) {
    105                     state.dialog.close();
     147                if ( dialog ) {
     148                    dialog.close();
    106149                }
    107150
     
    119162                        const attachmentID = uploadedImage.toJSON().id;
    120163                        state.options[ context.option_key ] = attachmentID;
    121                         if ( state.dialog ) {
    122                             state.dialog.showModal();
     164                        if ( dialog ) {
     165                            dialog.showModal();
    123166                        }
    124167                    } )
    125168                    .on( 'close', function () {
    126                         if ( state.dialog ) {
    127                             state.dialog.showModal();
     169                        if ( dialog ) {
     170                            dialog.showModal();
    128171                        }
    129172                    } );
     
    302345            media: wpMedia;
    303346        };
     347        jQuery: any;
     348        tinymce: {
     349            get: ( id: string ) => any;
     350        };
    304351    }
    305352}
     
    318365        options: Record< string, string | number | boolean >;
    319366        help: boolean;
    320         dialog: HTMLDialogElement;
    321367        isSaving: boolean;
    322368        message: string;
  • advanced-responsive-video-embedder/trunk/advanced-responsive-video-embedder.php

    r3256343 r3256533  
    44 * Plugin URI:        https://nextgenthemes.com/plugins/arve-pro/
    55 * Description:       Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine.
    6  * Version:           10.6.6
     6 * Version:           10.6.7
    77 * Requires PHP:      7.4
    88 * Requires at least: 6.6
     
    2323namespace Nextgenthemes\ARVE;
    2424
    25 const VERSION               = '10.6.6';
     25const VERSION               = '10.6.7';
    2626const PRO_VERSION_REQUIRED  = '7.0.2';
    2727const NUM_TRACKS            = 3;
  • advanced-responsive-video-embedder/trunk/build/block.json

    r3256343 r3256533  
    1414    "odysee"
    1515  ],
    16   "version": "10.6.6-beta2",
     16  "version": "10.6.6",
    1717  "textdomain": "advanced-responsive-video-embedder",
    1818  "supports": {
  • advanced-responsive-video-embedder/trunk/changelog.md

    r3256343 r3256533  
    33* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
    44* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
     5
     6### 2025-03-16 10.6.7 ###
     7
     8* Fixed: Compatibility with Advanced Custom Fields WYSIWYG editors. The ARVE shortcode creation button now finally works there.
    59
    610### 2025-03-15 10.6.6 ###
  • advanced-responsive-video-embedder/trunk/php/Admin/fn-admin.php

    r3256343 r3256533  
    389389function admin_enqueue_styles(): void {
    390390
    391     if ( did_action( 'wp_enqueue_editor' ) ) {
    392         return;
    393     }
     391    // This shit prevents 'arve-admin-css was added to the iframe incorrectly.' error but it doesn't work with enqueue_block_editor_assets
     392    // if ( did_action( 'wp_enqueue_editor' ) ) { return; }
    394393
    395394    wp_enqueue_style(
     
    432431        array( 'strategy' => 'defer' ),
    433432    );
    434 
    435433    wp_add_inline_script(
    436434        'arve-admin',
     
    438436        'before'
    439437    );
    440 
    441438    wp_enqueue_script( 'arve-admin' );
    442439
  • advanced-responsive-video-embedder/trunk/php/Admin/fn-shortcode-creator.php

    r3252510 r3256533  
    1212const DIALOG_NAMESPACE = 'nextgenthemes_arve_dialog';
    1313
    14 function add_media_button(): void {
     14/**
     15 * Adds a media button to the Classic Editor or other editors that use the same API.
     16 *
     17 * The button triggers a shortcode creator dialog when clicked.
     18 *
     19 * @param string $editor_id The ID of the editor to add the button to.
     20 */
     21function add_media_button( string $editor_id ): void {
    1522
    1623    dialog_interactivity();
     
    3037            'data-wp-interactive' => DIALOG_NAMESPACE,
    3138            'data-wp-on--click'   => 'actions.openShortcodeDialog',
     39            'data-editor'         => $editor_id,
    3240        ],
    3341    );
     
    8088
    8189    ?>
     90    <button
     91        type="button"
     92        data-wp-interactive="<?= esc_attr( DIALOG_NAMESPACE ); ?>"
     93        data-wp-on--click="actions.openShortcodeDialog"
     94        data-editor="content"
     95        hidden
     96    ></button>
    8297    <dialog
    8398        class="arve-sc-dialog"
     
    92107                    <span class="media-modal-icon dashicons dashicons-editor-help">
    93108                        <span class="screen-reader-text">
    94                             Toggle Help
     109                            <?php esc_html_e( 'Toggle Help', 'advanced-responsive-video-embedder' ); ?>
    95110                        </span>
    96111                    </span>
     
    100115                    <span class="media-modal-icon">
    101116                        <span class="screen-reader-text">
    102                             Close dialog
     117                            <?php esc_html_e( 'Close dialog', 'advanced-responsive-video-embedder' ); ?>
    103118                        </span>
    104119                    </span>
  • advanced-responsive-video-embedder/trunk/readme.txt

    r3256343 r3256533  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 10.6.6
     8Stable tag: 10.6.7
    99License: GPL-3.0
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    196196* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
    197197
     198### 2025-03-16 10.6.7 ###
     199
     200* Fixed: Compatibility with Advanced Custom Fields WYSIWYG editors. The ARVE shortcode creation button now finally works there.
     201
    198202### 2025-03-15 10.6.6 ###
    199203
  • advanced-responsive-video-embedder/trunk/src/block.json

    r3256343 r3256533  
    1414        "odysee"
    1515    ],
    16     "version": "10.6.6",
     16    "version": "10.6.7",
    1717    "textdomain": "advanced-responsive-video-embedder",
    1818    "supports": {
  • advanced-responsive-video-embedder/trunk/vendor/composer/installed.json

    r3256343 r3256533  
    7676                "type": "path",
    7777                "url": "../../../../../../dev/composer-packages/wp-settings",
    78                 "reference": "4e400bdc35f179cd62a04ed4f32c294a68d39c34"
     78                "reference": "046259272b104d5254e2fea589102cb7da259cdf"
    7979            },
    8080            "require": {
  • advanced-responsive-video-embedder/trunk/vendor/composer/installed.php

    r3256343 r3256533  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '24960e6ad2d1a9f8a912899c645b18d3009b40fb',
     6        'reference' => '9eb22b68dbfaa1ddad6cb3d2684f4589d2b7766c',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-master',
    2424            'version' => 'dev-master',
    25             'reference' => '24960e6ad2d1a9f8a912899c645b18d3009b40fb',
     25            'reference' => '9eb22b68dbfaa1ddad6cb3d2684f4589d2b7766c',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
     
    3232            'pretty_version' => 'dev-master',
    3333            'version' => 'dev-master',
    34             'reference' => '4e400bdc35f179cd62a04ed4f32c294a68d39c34',
     34            'reference' => '046259272b104d5254e2fea589102cb7da259cdf',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../nextgenthemes/wp-settings',
  • advanced-responsive-video-embedder/trunk/vendor/nextgenthemes/wp-settings/build/settings.asset.php

    r3256343 r3256533  
    1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => 'bb40bae61d4f43a56d48', 'type' => 'module');
     1<?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => '43e5009cee70e468b68a', 'type' => 'module');
  • advanced-responsive-video-embedder/trunk/vendor/nextgenthemes/wp-settings/build/settings.js

    r3256343 r3256533  
    1 import*as e from"@wordpress/interactivity";var t={};function o(e,t){if(n(e)&&n(t)){const o=parseInt(e),n=parseInt(t),s=i(o,n);return`${o/s}:${n/s}`}return`${e}:${t}`}function n(e){const t=Math.floor(Number(e));return t!==1/0&&String(t)===e&&t>0}function i(e,t){return t?i(t,e%t):e}t.d=(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=(l={getConfig:()=>e.getConfig,getContext:()=>e.getContext,store:()=>e.store},d={},t.d(d,l),d),a=new DOMParser,r=document,c=r.querySelector.bind(r);var l,d;!function(){const e=c('[data-wp-interactive^="nextgenthemes"]')?.dataset?.wpInteractive;if(!e)return;const{state:t,actions:n,callbacks:i,helpers:r}=(0,s.store)(e,{state:{isValidLicenseKey:()=>{const e=(0,s.getContext)();return"valid"===t.options[e.option_key+"_status"]},is32charactersLong:()=>{const e=(0,s.getContext)();return 32===t.options[e.option_key].length},get isActiveTab(){const e=(0,s.getContext)();return!e.activeTabs||!0===e?.activeTabs[e.tab]}},actions:{toggleHelp:()=>{t.help=!t.help},openShortcodeDialog:()=>{t.dialog=document.querySelector('dialog[data-wp-interactive="nextgenthemes_arve_dialog"]'),t.dialog.showModal()},insertShortcode:()=>{window.wp.media.editor.insert(t.shortcode),t.dialog.close()},closeShortcodeDialog:()=>{t.dialog.close()},changeTab:()=>{const e=(0,s.getContext)();for(const t in e.activeTabs)e.activeTabs[t]=!1;e.activeTabs[e.tab]=!0},inputChange:o=>{const i=(0,s.getContext)(),a=o?.target instanceof HTMLInputElement,c=o?.target instanceof HTMLSelectElement;if(!a&&!c)throw new Error("event.target is not HTMLInputElement or HTMLSelectElement");"arveUrl"in o.target.dataset?r.extractFromEmbedCode(o.target.value):t.options[i.option_key]=o.target.value,"nextgenthemes_arve_dialog"!==e&&n.saveOptions()},checkboxChange:o=>{const i=(0,s.getContext)();t.options[i.option_key]=o.target.checked,"nextgenthemes_arve_dialog"!==e&&n.saveOptions()},selectImage:()=>{t.dialog&&t.dialog.close();const e=(0,s.getContext)(),o=window.wp.media({title:"Upload Image",multiple:!1}).open().on("select",(function(){const n=o.state().get("selection").first().toJSON().id;t.options[e.option_key]=n,t.dialog&&t.dialog.showModal()})).on("close",(function(){t.dialog&&t.dialog.showModal()}))},deleteOembedCache:()=>{n.restCall("/delete-oembed-cache",{delete:!0})},saveOptionsReal:()=>{n.restCall("/save",t.options)},restCall:(e,o,n=!1)=>{if(t.isSaving)return void(t.message="trying to save too fast");const i=(0,s.getConfig)();t.isSaving=!0,t.message="Saving...",fetch(i.restUrl+e,{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json","X-WP-Nonce":i.nonce}}).then((e=>{if(!e.ok)throw console.log(e),new Error("Network response was not ok");return e.json()})).then((e=>{t.message=e,setTimeout((()=>t.message=""),666)})).catch((e=>{t.message=e.message})).finally((()=>{t.isSaving=!1,n&&window.location.reload()}))},eddLicenseAction(){const e=(0,s.getContext)();n.restCall("/edd-license-action",{option_key:e.option_key,edd_store_url:e.edd_store_url,edd_action:e.edd_action,item_id:e.edd_item_id,license:t.options[e.option_key]},!0)},resetOptionsSection(){const e=(0,s.getConfig)(),o=(0,s.getContext)().tab;Object.entries(e.defaultOptions).forEach((([e,n])=>{"all"===o?Object.entries(n).forEach((([e,o])=>{t.options[e]=o})):Object.entries(n).forEach((([n,i])=>{e===o&&(t.options[n]=i)}))})),n.saveOptionsReal()}},callbacks:{updateShortcode(){let e="";for(const[o,n]of Object.entries(t.options))"credentialless"===o?!1===n&&(e+=`${o}="false" `):!0===n?e+=`${o}="true" `:n&&(e+=`${o}="${n}" `);t.shortcode="[arve "+e+"/]"}},helpers:{debugJson:e=>{t.debug=JSON.stringify(e,null,2)},extractFromEmbedCode:e=>{const n=a.parseFromString(e,"text/html").querySelector("iframe"),i=n&&n.getAttribute("src");if(i&&(e=i,n.width&&n.height)){const e=o(n.width,n.height);"16:9"!==e&&(t.options.aspect_ratio=e)}t.options.url=e}}});n.saveOptions=function(e){let t;return function(...o){const n=this;clearTimeout(t),t=window.setTimeout((()=>{t=void 0,e.apply(n,o)}),1111)}}(n.saveOptionsReal)}(),function(){const e=window.getComputedStyle(r.body).backgroundColor,t=c(".wrap--nextgenthemes");t&&t.setAttribute("style",`--ngt-wp-body-bg: ${e};`)}();
     1import*as e from"@wordpress/interactivity";var t={};function o(e,t){if(n(e)&&n(t)){const o=parseInt(e),n=parseInt(t),s=i(o,n);return`${o/s}:${n/s}`}return`${e}:${t}`}function n(e){const t=Math.floor(Number(e));return t!==1/0&&String(t)===e&&t>0}function i(e,t){return t?i(t,e%t):e}t.d=(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},t.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const s=(l={getConfig:()=>e.getConfig,getContext:()=>e.getContext,store:()=>e.store},g={},t.d(g,l),g),r=new DOMParser,a=document,c=a.querySelector.bind(a),d=c('dialog[data-wp-interactive="nextgenthemes_arve_dialog"]');var l,g;!function(){const e=c('[data-wp-interactive^="nextgenthemes"]')?.dataset?.wpInteractive;if(!e)return;const{state:t,actions:n,callbacks:i,helpers:a}=(0,s.store)(e,{state:{isValidLicenseKey:()=>{const e=(0,s.getContext)();return"valid"===t.options[e.option_key+"_status"]},is32charactersLong:()=>{const e=(0,s.getContext)();return 32===t.options[e.option_key].length},get isActiveTab(){const e=(0,s.getContext)();return!e.activeTabs||!0===e?.activeTabs[e.tab]}},actions:{toggleHelp:()=>{t.help=!t.help},openShortcodeDialog:e=>{const t=e.target instanceof HTMLElement&&e.target.dataset.editor;d&&t?(d.dataset.editor=t,d.showModal()):console.error("Dialog or editorId not found")},insertShortcode:()=>{const e=d?.dataset.editor;if(e)if("content"===e)window.wp.media.editor.insert(t.shortcode);else{if(void 0===window.tinymce||!window.tinymce.get(e))return void console.error("TinyMCE not initialized for field: "+e);window.tinymce.get(e).insertContent(t.shortcode)}else console.error("Editor ID not found");n.closeShortcodeDialog()},closeShortcodeDialog:()=>{d&&d.close()},changeTab:()=>{const e=(0,s.getContext)();for(const t in e.activeTabs)e.activeTabs[t]=!1;e.activeTabs[e.tab]=!0},inputChange:o=>{const i=(0,s.getContext)(),r=o?.target instanceof HTMLInputElement,c=o?.target instanceof HTMLSelectElement;if(!r&&!c)throw new Error("event.target is not HTMLInputElement or HTMLSelectElement");"arveUrl"in o.target.dataset?a.extractFromEmbedCode(o.target.value):t.options[i.option_key]=o.target.value,"nextgenthemes_arve_dialog"!==e&&n.saveOptions()},checkboxChange:o=>{const i=(0,s.getContext)();t.options[i.option_key]=o.target.checked,"nextgenthemes_arve_dialog"!==e&&n.saveOptions()},selectImage:()=>{d&&d.close();const e=(0,s.getContext)(),o=window.wp.media({title:"Upload Image",multiple:!1}).open().on("select",(function(){const n=o.state().get("selection").first().toJSON().id;t.options[e.option_key]=n,d&&d.showModal()})).on("close",(function(){d&&d.showModal()}))},deleteOembedCache:()=>{n.restCall("/delete-oembed-cache",{delete:!0})},saveOptionsReal:()=>{n.restCall("/save",t.options)},restCall:(e,o,n=!1)=>{if(t.isSaving)return void(t.message="trying to save too fast");const i=(0,s.getConfig)();t.isSaving=!0,t.message="Saving...",fetch(i.restUrl+e,{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json","X-WP-Nonce":i.nonce}}).then((e=>{if(!e.ok)throw console.log(e),new Error("Network response was not ok");return e.json()})).then((e=>{t.message=e,setTimeout((()=>t.message=""),666)})).catch((e=>{t.message=e.message})).finally((()=>{t.isSaving=!1,n&&window.location.reload()}))},eddLicenseAction(){const e=(0,s.getContext)();n.restCall("/edd-license-action",{option_key:e.option_key,edd_store_url:e.edd_store_url,edd_action:e.edd_action,item_id:e.edd_item_id,license:t.options[e.option_key]},!0)},resetOptionsSection(){const e=(0,s.getConfig)(),o=(0,s.getContext)().tab;Object.entries(e.defaultOptions).forEach((([e,n])=>{"all"===o?Object.entries(n).forEach((([e,o])=>{t.options[e]=o})):Object.entries(n).forEach((([n,i])=>{e===o&&(t.options[n]=i)}))})),n.saveOptionsReal()}},callbacks:{updateShortcode(){let e="";for(const[o,n]of Object.entries(t.options))"credentialless"===o?!1===n&&(e+=`${o}="false" `):!0===n?e+=`${o}="true" `:n&&(e+=`${o}="${n}" `);t.shortcode="[arve "+e+"/]"}},helpers:{debugJson:e=>{t.debug=JSON.stringify(e,null,2)},extractFromEmbedCode:e=>{const n=r.parseFromString(e,"text/html").querySelector("iframe"),i=n&&n.getAttribute("src");if(i&&(e=i,n.width&&n.height)){const e=o(n.width,n.height);"16:9"!==e&&(t.options.aspect_ratio=e)}t.options.url=e}}});n.saveOptions=function(e){let t;return function(...o){const n=this;clearTimeout(t),t=window.setTimeout((()=>{t=void 0,e.apply(n,o)}),1111)}}(n.saveOptionsReal)}(),function(){const e=window.getComputedStyle(a.body).backgroundColor,t=c(".wrap--nextgenthemes");t&&t.setAttribute("style",`--ngt-wp-body-bg: ${e};`)}(),window.jQuery(document).on("click",'.arve-btn:not([data-editor="content"])',(e=>{e.preventDefault();const t=c('[data-wp-on--click="actions.openShortcodeDialog"][data-editor="content"]'),o=c('[data-wp-on--click="actions.insertShortcode"]');t&&o&&d?t.dispatchEvent(new Event("click")):console.error("Open btn, insert btn od dialog not found")}));
  • advanced-responsive-video-embedder/trunk/vendor/nextgenthemes/wp-settings/src/settings.ts

    r3256343 r3256533  
    55const d = document;
    66const qs = d.querySelector.bind( d ) as typeof document.querySelector;
     7const dialog = qs< HTMLDialogElement >( 'dialog[data-wp-interactive="nextgenthemes_arve_dialog"]' );
    78
    89setupInteractivityApi();
     
    1718    }
    1819}
     20
     21// ACF
     22window.jQuery( document ).on( 'click', '.arve-btn:not([data-editor="content"])', ( e: Event ) => {
     23    e.preventDefault();
     24
     25    const openBtn = qs< HTMLButtonElement >(
     26        '[data-wp-on--click="actions.openShortcodeDialog"][data-editor="content"]'
     27    );
     28    const insertBtn = qs< HTMLButtonElement >( '[data-wp-on--click="actions.insertShortcode"]' );
     29
     30    if ( ! openBtn || ! insertBtn || ! dialog ) {
     31        console.error( 'Open btn, insert btn od dialog not found' ); // eslint-disable-line
     32        return;
     33    }
     34
     35    openBtn.dispatchEvent( new Event( 'click' ) );
     36} );
    1937
    2038function setupInteractivityApi() {
     
    5270                state.help = ! state.help;
    5371            },
    54             openShortcodeDialog: () => {
    55                 state.dialog = document.querySelector(
    56                     'dialog[data-wp-interactive="nextgenthemes_arve_dialog"]'
    57                 );
    58                 state.dialog.showModal();
     72            openShortcodeDialog: ( event: Event ) => {
     73                const editorId = event.target instanceof HTMLElement && event.target.dataset.editor;
     74
     75                if ( ! dialog || ! editorId ) {
     76                    console.error( 'Dialog or editorId not found' ); // eslint-disable-line
     77                    return;
     78                }
     79
     80                dialog.dataset.editor = editorId;
     81                dialog.showModal();
    5982            },
    6083            insertShortcode: () => {
    61                 window.wp.media.editor.insert( state.shortcode );
    62                 state.dialog.close();
     84                const editorId = dialog?.dataset.editor;
     85
     86                if ( ! editorId ) {
     87                    console.error( 'Editor ID not found' ); // eslint-disable-line
     88                } else if ( 'content' === editorId ) {
     89                    window.wp.media.editor.insert( state.shortcode );
     90                } else {
     91                    // Ensure TinyMCE is loaded and the editor exists
     92                    if (
     93                        typeof window.tinymce === 'undefined' ||
     94                        ! window.tinymce.get( editorId )
     95                    ) {
     96                        console.error( 'TinyMCE not initialized for field: ' + editorId ); // eslint-disable-line
     97                        return;
     98                    }
     99
     100                    window.tinymce.get( editorId ).insertContent( state.shortcode );
     101                }
     102
     103                actions.closeShortcodeDialog();
    63104            },
    64105            closeShortcodeDialog: () => {
    65                 state.dialog.close();
     106                if ( dialog ) {
     107                    dialog.close();
     108                }
    66109            },
    67110            changeTab: () => {
     
    102145            },
    103146            selectImage: () => {
    104                 if ( state.dialog ) {
    105                     state.dialog.close();
     147                if ( dialog ) {
     148                    dialog.close();
    106149                }
    107150
     
    119162                        const attachmentID = uploadedImage.toJSON().id;
    120163                        state.options[ context.option_key ] = attachmentID;
    121                         if ( state.dialog ) {
    122                             state.dialog.showModal();
     164                        if ( dialog ) {
     165                            dialog.showModal();
    123166                        }
    124167                    } )
    125168                    .on( 'close', function () {
    126                         if ( state.dialog ) {
    127                             state.dialog.showModal();
     169                        if ( dialog ) {
     170                            dialog.showModal();
    128171                        }
    129172                    } );
     
    302345            media: wpMedia;
    303346        };
     347        jQuery: any;
     348        tinymce: {
     349            get: ( id: string ) => any;
     350        };
    304351    }
    305352}
     
    318365        options: Record< string, string | number | boolean >;
    319366        help: boolean;
    320         dialog: HTMLDialogElement;
    321367        isSaving: boolean;
    322368        message: string;
Note: See TracChangeset for help on using the changeset viewer.