Changeset 3256533
- Timestamp:
- 03/16/2025 11:20:38 AM (10 months ago)
- Location:
- advanced-responsive-video-embedder
- Files:
-
- 24 edited
- 1 copied
-
tags/10.6.7 (copied) (copied from advanced-responsive-video-embedder/trunk)
-
tags/10.6.7/advanced-responsive-video-embedder.php (modified) (2 diffs)
-
tags/10.6.7/build/block.json (modified) (1 diff)
-
tags/10.6.7/changelog.md (modified) (1 diff)
-
tags/10.6.7/php/Admin/fn-admin.php (modified) (3 diffs)
-
tags/10.6.7/php/Admin/fn-shortcode-creator.php (modified) (5 diffs)
-
tags/10.6.7/readme.txt (modified) (2 diffs)
-
tags/10.6.7/src/block.json (modified) (1 diff)
-
tags/10.6.7/vendor/composer/installed.json (modified) (1 diff)
-
tags/10.6.7/vendor/composer/installed.php (modified) (3 diffs)
-
tags/10.6.7/vendor/nextgenthemes/wp-settings/build/settings.asset.php (modified) (1 diff)
-
tags/10.6.7/vendor/nextgenthemes/wp-settings/build/settings.js (modified) (1 diff)
-
tags/10.6.7/vendor/nextgenthemes/wp-settings/src/settings.ts (modified) (7 diffs)
-
trunk/advanced-responsive-video-embedder.php (modified) (2 diffs)
-
trunk/build/block.json (modified) (1 diff)
-
trunk/changelog.md (modified) (1 diff)
-
trunk/php/Admin/fn-admin.php (modified) (3 diffs)
-
trunk/php/Admin/fn-shortcode-creator.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/block.json (modified) (1 diff)
-
trunk/vendor/composer/installed.json (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (3 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/build/settings.asset.php (modified) (1 diff)
-
trunk/vendor/nextgenthemes/wp-settings/build/settings.js (modified) (1 diff)
-
trunk/vendor/nextgenthemes/wp-settings/src/settings.ts (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-responsive-video-embedder/tags/10.6.7/advanced-responsive-video-embedder.php
r3256343 r3256533 4 4 * Plugin URI: https://nextgenthemes.com/plugins/arve-pro/ 5 5 * Description: Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine. 6 * Version: 10.6. 66 * Version: 10.6.7 7 7 * Requires PHP: 7.4 8 8 * Requires at least: 6.6 … … 23 23 namespace Nextgenthemes\ARVE; 24 24 25 const VERSION = '10.6. 6';25 const VERSION = '10.6.7'; 26 26 const PRO_VERSION_REQUIRED = '7.0.2'; 27 27 const NUM_TRACKS = 3; -
advanced-responsive-video-embedder/tags/10.6.7/build/block.json
r3256343 r3256533 14 14 "odysee" 15 15 ], 16 "version": "10.6.6 -beta2",16 "version": "10.6.6", 17 17 "textdomain": "advanced-responsive-video-embedder", 18 18 "supports": { -
advanced-responsive-video-embedder/tags/10.6.7/changelog.md
r3256343 r3256533 3 3 * [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog) 4 4 * [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. 5 9 6 10 ### 2025-03-15 10.6.6 ### -
advanced-responsive-video-embedder/tags/10.6.7/php/Admin/fn-admin.php
r3256343 r3256533 389 389 function admin_enqueue_styles(): void { 390 390 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; } 394 393 395 394 wp_enqueue_style( … … 432 431 array( 'strategy' => 'defer' ), 433 432 ); 434 435 433 wp_add_inline_script( 436 434 'arve-admin', … … 438 436 'before' 439 437 ); 440 441 438 wp_enqueue_script( 'arve-admin' ); 442 439 -
advanced-responsive-video-embedder/tags/10.6.7/php/Admin/fn-shortcode-creator.php
r3252510 r3256533 12 12 const DIALOG_NAMESPACE = 'nextgenthemes_arve_dialog'; 13 13 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 */ 21 function add_media_button( string $editor_id ): void { 15 22 16 23 dialog_interactivity(); … … 30 37 'data-wp-interactive' => DIALOG_NAMESPACE, 31 38 'data-wp-on--click' => 'actions.openShortcodeDialog', 39 'data-editor' => $editor_id, 32 40 ], 33 41 ); … … 80 88 81 89 ?> 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> 82 97 <dialog 83 98 class="arve-sc-dialog" … … 92 107 <span class="media-modal-icon dashicons dashicons-editor-help"> 93 108 <span class="screen-reader-text"> 94 Toggle Help109 <?php esc_html_e( 'Toggle Help', 'advanced-responsive-video-embedder' ); ?> 95 110 </span> 96 111 </span> … … 100 115 <span class="media-modal-icon"> 101 116 <span class="screen-reader-text"> 102 Close dialog117 <?php esc_html_e( 'Close dialog', 'advanced-responsive-video-embedder' ); ?> 103 118 </span> 104 119 </span> -
advanced-responsive-video-embedder/tags/10.6.7/readme.txt
r3256343 r3256533 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 10.6. 68 Stable tag: 10.6.7 9 9 License: GPL-3.0 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 196 196 * [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog) 197 197 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 198 202 ### 2025-03-15 10.6.6 ### 199 203 -
advanced-responsive-video-embedder/tags/10.6.7/src/block.json
r3256343 r3256533 14 14 "odysee" 15 15 ], 16 "version": "10.6. 6",16 "version": "10.6.7", 17 17 "textdomain": "advanced-responsive-video-embedder", 18 18 "supports": { -
advanced-responsive-video-embedder/tags/10.6.7/vendor/composer/installed.json
r3256343 r3256533 76 76 "type": "path", 77 77 "url": "../../../../../../dev/composer-packages/wp-settings", 78 "reference": " 4e400bdc35f179cd62a04ed4f32c294a68d39c34"78 "reference": "046259272b104d5254e2fea589102cb7da259cdf" 79 79 }, 80 80 "require": { -
advanced-responsive-video-embedder/tags/10.6.7/vendor/composer/installed.php
r3256343 r3256533 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 24960e6ad2d1a9f8a912899c645b18d3009b40fb',6 'reference' => '9eb22b68dbfaa1ddad6cb3d2684f4589d2b7766c', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 'reference' => ' 24960e6ad2d1a9f8a912899c645b18d3009b40fb',25 'reference' => '9eb22b68dbfaa1ddad6cb3d2684f4589d2b7766c', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' 4e400bdc35f179cd62a04ed4f32c294a68d39c34',34 'reference' => '046259272b104d5254e2fea589102cb7da259cdf', 35 35 'type' => 'library', 36 36 '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};`)}();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},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 5 5 const d = document; 6 6 const qs = d.querySelector.bind( d ) as typeof document.querySelector; 7 const dialog = qs< HTMLDialogElement >( 'dialog[data-wp-interactive="nextgenthemes_arve_dialog"]' ); 7 8 8 9 setupInteractivityApi(); … … 17 18 } 18 19 } 20 21 // ACF 22 window.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 } ); 19 37 20 38 function setupInteractivityApi() { … … 52 70 state.help = ! state.help; 53 71 }, 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(); 59 82 }, 60 83 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(); 63 104 }, 64 105 closeShortcodeDialog: () => { 65 state.dialog.close(); 106 if ( dialog ) { 107 dialog.close(); 108 } 66 109 }, 67 110 changeTab: () => { … … 102 145 }, 103 146 selectImage: () => { 104 if ( state.dialog ) {105 state.dialog.close();147 if ( dialog ) { 148 dialog.close(); 106 149 } 107 150 … … 119 162 const attachmentID = uploadedImage.toJSON().id; 120 163 state.options[ context.option_key ] = attachmentID; 121 if ( state.dialog ) {122 state.dialog.showModal();164 if ( dialog ) { 165 dialog.showModal(); 123 166 } 124 167 } ) 125 168 .on( 'close', function () { 126 if ( state.dialog ) {127 state.dialog.showModal();169 if ( dialog ) { 170 dialog.showModal(); 128 171 } 129 172 } ); … … 302 345 media: wpMedia; 303 346 }; 347 jQuery: any; 348 tinymce: { 349 get: ( id: string ) => any; 350 }; 304 351 } 305 352 } … … 318 365 options: Record< string, string | number | boolean >; 319 366 help: boolean; 320 dialog: HTMLDialogElement;321 367 isSaving: boolean; 322 368 message: string; -
advanced-responsive-video-embedder/trunk/advanced-responsive-video-embedder.php
r3256343 r3256533 4 4 * Plugin URI: https://nextgenthemes.com/plugins/arve-pro/ 5 5 * Description: Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine. 6 * Version: 10.6. 66 * Version: 10.6.7 7 7 * Requires PHP: 7.4 8 8 * Requires at least: 6.6 … … 23 23 namespace Nextgenthemes\ARVE; 24 24 25 const VERSION = '10.6. 6';25 const VERSION = '10.6.7'; 26 26 const PRO_VERSION_REQUIRED = '7.0.2'; 27 27 const NUM_TRACKS = 3; -
advanced-responsive-video-embedder/trunk/build/block.json
r3256343 r3256533 14 14 "odysee" 15 15 ], 16 "version": "10.6.6 -beta2",16 "version": "10.6.6", 17 17 "textdomain": "advanced-responsive-video-embedder", 18 18 "supports": { -
advanced-responsive-video-embedder/trunk/changelog.md
r3256343 r3256533 3 3 * [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog) 4 4 * [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. 5 9 6 10 ### 2025-03-15 10.6.6 ### -
advanced-responsive-video-embedder/trunk/php/Admin/fn-admin.php
r3256343 r3256533 389 389 function admin_enqueue_styles(): void { 390 390 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; } 394 393 395 394 wp_enqueue_style( … … 432 431 array( 'strategy' => 'defer' ), 433 432 ); 434 435 433 wp_add_inline_script( 436 434 'arve-admin', … … 438 436 'before' 439 437 ); 440 441 438 wp_enqueue_script( 'arve-admin' ); 442 439 -
advanced-responsive-video-embedder/trunk/php/Admin/fn-shortcode-creator.php
r3252510 r3256533 12 12 const DIALOG_NAMESPACE = 'nextgenthemes_arve_dialog'; 13 13 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 */ 21 function add_media_button( string $editor_id ): void { 15 22 16 23 dialog_interactivity(); … … 30 37 'data-wp-interactive' => DIALOG_NAMESPACE, 31 38 'data-wp-on--click' => 'actions.openShortcodeDialog', 39 'data-editor' => $editor_id, 32 40 ], 33 41 ); … … 80 88 81 89 ?> 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> 82 97 <dialog 83 98 class="arve-sc-dialog" … … 92 107 <span class="media-modal-icon dashicons dashicons-editor-help"> 93 108 <span class="screen-reader-text"> 94 Toggle Help109 <?php esc_html_e( 'Toggle Help', 'advanced-responsive-video-embedder' ); ?> 95 110 </span> 96 111 </span> … … 100 115 <span class="media-modal-icon"> 101 116 <span class="screen-reader-text"> 102 Close dialog117 <?php esc_html_e( 'Close dialog', 'advanced-responsive-video-embedder' ); ?> 103 118 </span> 104 119 </span> -
advanced-responsive-video-embedder/trunk/readme.txt
r3256343 r3256533 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 10.6. 68 Stable tag: 10.6.7 9 9 License: GPL-3.0 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 196 196 * [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog) 197 197 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 198 202 ### 2025-03-15 10.6.6 ### 199 203 -
advanced-responsive-video-embedder/trunk/src/block.json
r3256343 r3256533 14 14 "odysee" 15 15 ], 16 "version": "10.6. 6",16 "version": "10.6.7", 17 17 "textdomain": "advanced-responsive-video-embedder", 18 18 "supports": { -
advanced-responsive-video-embedder/trunk/vendor/composer/installed.json
r3256343 r3256533 76 76 "type": "path", 77 77 "url": "../../../../../../dev/composer-packages/wp-settings", 78 "reference": " 4e400bdc35f179cd62a04ed4f32c294a68d39c34"78 "reference": "046259272b104d5254e2fea589102cb7da259cdf" 79 79 }, 80 80 "require": { -
advanced-responsive-video-embedder/trunk/vendor/composer/installed.php
r3256343 r3256533 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 24960e6ad2d1a9f8a912899c645b18d3009b40fb',6 'reference' => '9eb22b68dbfaa1ddad6cb3d2684f4589d2b7766c', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 'reference' => ' 24960e6ad2d1a9f8a912899c645b18d3009b40fb',25 'reference' => '9eb22b68dbfaa1ddad6cb3d2684f4589d2b7766c', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' 4e400bdc35f179cd62a04ed4f32c294a68d39c34',34 'reference' => '046259272b104d5254e2fea589102cb7da259cdf', 35 35 'type' => 'library', 36 36 '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};`)}();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},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 5 5 const d = document; 6 6 const qs = d.querySelector.bind( d ) as typeof document.querySelector; 7 const dialog = qs< HTMLDialogElement >( 'dialog[data-wp-interactive="nextgenthemes_arve_dialog"]' ); 7 8 8 9 setupInteractivityApi(); … … 17 18 } 18 19 } 20 21 // ACF 22 window.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 } ); 19 37 20 38 function setupInteractivityApi() { … … 52 70 state.help = ! state.help; 53 71 }, 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(); 59 82 }, 60 83 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(); 63 104 }, 64 105 closeShortcodeDialog: () => { 65 state.dialog.close(); 106 if ( dialog ) { 107 dialog.close(); 108 } 66 109 }, 67 110 changeTab: () => { … … 102 145 }, 103 146 selectImage: () => { 104 if ( state.dialog ) {105 state.dialog.close();147 if ( dialog ) { 148 dialog.close(); 106 149 } 107 150 … … 119 162 const attachmentID = uploadedImage.toJSON().id; 120 163 state.options[ context.option_key ] = attachmentID; 121 if ( state.dialog ) {122 state.dialog.showModal();164 if ( dialog ) { 165 dialog.showModal(); 123 166 } 124 167 } ) 125 168 .on( 'close', function () { 126 if ( state.dialog ) {127 state.dialog.showModal();169 if ( dialog ) { 170 dialog.showModal(); 128 171 } 129 172 } ); … … 302 345 media: wpMedia; 303 346 }; 347 jQuery: any; 348 tinymce: { 349 get: ( id: string ) => any; 350 }; 304 351 } 305 352 } … … 318 365 options: Record< string, string | number | boolean >; 319 366 help: boolean; 320 dialog: HTMLDialogElement;321 367 isSaving: boolean; 322 368 message: string;
Note: See TracChangeset
for help on using the changeset viewer.