Changeset 3089848
- Timestamp:
- 05/21/2024 05:09:52 AM (8 weeks ago)
- Location:
- advanced-responsive-video-embedder
- Files:
-
- 6 added
- 30 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
advanced-responsive-video-embedder/tags/10.0.7/advanced-responsive-video-embedder.php
r3088086 r3089848 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.0. 66 * Version: 10.0. 7 7 * Requires PHP: 7.4 8 8 * Requires at least: 6.2 … … 21 21 namespace Nextgenthemes\ARVE; 22 22 23 const VERSION = '10.0. 6';23 const VERSION = '10.0.'; 24 24 const PRO_VERSION_REQUIRED = '6.0.0-alpha3'; 25 25 const NUM_TRACKS = 3; -
advanced-responsive-video-embedder/tags/10.0.7/changelog.md
r3088086 r3089848 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 7 8 9 5 10 6 11 ### 2024-05-17 10.0.6 ### -
advanced-responsive-video-embedder/tags/10.0.7/php/Video.php
r3088086 r3089848 41 41 private string $brightcove_embed; 42 42 private string $brightcove_player; 43 43 44 private string $controlslist; 44 45 private string $description; … … 335 336 336 337 $id = "https://www.facebook.com/facebook/videos/{$id}/"; 338 337 339 338 340 } elseif ( 'twitch' === $provider && is_numeric( $id ) ) { 339 341 340 342 $pattern = 'https://player.twitch.tv/?video=v%s'; 341 }342 343 if ( isset( $properties[ $provider ]['url_encode_id'] ) && $properties[ $provider ]['url_encode_id'] ) {344 $id = rawurlencode( str_replace( '&', '&', $id ) );345 343 } 346 344 … … 377 375 } 378 376 break; 377 378 379 380 379 381 } 380 382 … … 833 835 private function build_iframe_tag(): string { 834 836 837 838 839 840 835 841 return $this->build_tag( 836 842 array( … … 885 891 private function build_video_tag(): string { 886 892 887 $autoplay = in_array( $this->mode, array( 'lazyload', 'lightbox', 'link-lightbox' ), true ) ? 888 false : 889 $this->autoplay; 890 $preload = 'metadata'; 891 892 if ( in_array( $this->mode, array( 'lazyload', 'lightbox' ), true ) && ! empty( $this->img_src ) ) { 893 $preload = 'none'; 893 if ( 'link-lightbox' === $this->mode ) { 894 return ''; 895 } 896 897 $attr = $this->video_attr; 898 899 if ( in_array( $this->mode, array( 'lazyload', 'lightbox' ), true ) ) { 900 $attr['controls'] = false; 894 901 } 895 902 … … 899 906 'tag' => 'video', 900 907 'inner_html' => $this->video_sources_html . tracks_html( $this->tracks ), 901 'attr' => array( 902 // WP 903 'autoplay' => $autoplay, 904 'controls' => $this->controls, 905 'controlslist' => $this->controlslist, 906 'loop' => $this->loop, 907 'preload' => $preload, 908 'width' => is_feed() ? $this->width : false, 909 'poster' => empty( $this->img_src ) ? false : $this->img_src, 910 // ARVE only 911 'data-arve' => $this->uid, 912 'class' => 'arve-video fitvidsignore', 913 'muted' => $autoplay ? 'muted by ARVE because autoplay is on' : $this->muted, 914 'playsinline' => in_array( $this->mode, array( 'lightbox', 'link-lightbox' ), true ) ? '' : false, 915 'webkit-playsinline' => in_array( $this->mode, array( 'lightbox', 'link-lightbox' ), true ) ? '' : false, 916 ), 908 'attr' => $attr, 917 909 ) 918 910 ); … … 984 976 $html = ''; 985 977 986 if ( ! in_array( $this->mode, array( 'lightbox', 'link-lightbox' ), true ) ) { 987 988 if ( 'html5' === $this->provider ) { 989 $html .= $this->build_video_tag(); 990 } else { 991 $html .= $this->build_iframe_tag(); 992 } 978 if ( 'html5' === $this->provider ) { 979 $html .= $this->build_video_tag(); 980 } else { 981 $html .= $this->build_iframe_tag(); 982 } 983 984 if ( 'normal' === $this->mode ) { 985 $html .= $this->build_tag( array( 'name' => 'description' ) ); 993 986 } 994 987 -
advanced-responsive-video-embedder/tags/10.0.7/php/fn-oembed.php
r3088086 r3089848 71 71 return $html; 72 72 } 73 73 74 74 75 /** … … 116 117 function extract_oembed_json( string $html, string $url ): ?object { 117 118 118 $data = WP\get_attribute_ value_from_html_tag( array( 'tag_name' => 'template' ), 'data-arve', $html );119 $data = WP\get_attribute_from_html_tag( array( 'tag_name' => 'template' ), 'data-arve', $html ); 119 120 120 121 if ( empty( $data ) ) { … … 122 123 } 123 124 124 $data = json_decode( $data, false, 5, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP );125 126 if ( json_last_error() !== JSON_ERROR_NONE) {127 128 $error_code = esc_attr( "$url-extract-json" );129 130 arve_errors()->add( $error_code, 'json decode error code: ' . json_last_error() . '<br>From url: ' . $url );125 126 $data = json_decode($data, false, 5, JSON_THROW_ON_ERROR); 127 ) { 128 129 $error_code = ; 130 131 arve_errors()->add( $error_code, : ' . $url ); 131 132 arve_errors()->add_data( 132 compact( 'html', 'matches', 'data', 'a'),133 compact('), 133 134 $error_code 134 135 ); 136 137 135 138 } 136 139 … … 168 171 if ( 'TikTok' === $data->provider_name ) { 169 172 170 $tiktok_video_id = WP\get_attribute_ value_from_html_tag( array( 'class' => 'tiktok-embed' ), 'data-video-id', $data->html );173 $tiktok_video_id = WP\get_attribute_from_html_tag( array( 'class' => 'tiktok-embed' ), 'data-video-id', $data->html ); 171 174 172 175 if ( $tiktok_video_id ) { … … 177 180 } elseif ( 'Facebook' === $data->provider_name ) { 178 181 179 $facebook_video_url = WP\get_attribute_ value_from_html_tag( array( 'class' => 'fb-video' ), 'data-href', $data->html );182 $facebook_video_url = WP\get_attribute_from_html_tag( array( 'class' => 'fb-video' ), 'data-href', $data->html ); 180 183 181 184 if ( $facebook_video_url ) { … … 185 188 } 186 189 } else { 187 $iframe_src = WP\get_attribute_ value_from_html_tag( array( 'tag_name' => 'iframe' ), 'src', $data->html );190 $iframe_src = WP\get_attribute_from_html_tag( array( 'tag_name' => 'iframe' ), 'src', $data->html ); 188 191 189 192 if ( $iframe_src ) { -
advanced-responsive-video-embedder/tags/10.0.7/php/fn-shortcode-args.php
r3084997 r3089848 5 5 use function Nextgenthemes\WP\get_url_arg; 6 6 use function Nextgenthemes\WP\valid_url; 7 use function Nextgenthemes\WP\get_attribute_ value_from_html_tag;7 use function Nextgenthemes\WP\get_attribute_from_html_tag; 8 8 9 9 function arg_maxwidth( int $maxwidth, string $provider, string $align ): int { -
advanced-responsive-video-embedder/tags/10.0.7/php/providers.php
r3084997 r3089848 181 181 'oembed' => false, 182 182 'regex' => '#(?<id>https?://([a-z]+\\.)?facebook\\.com/[-.a-z0-9]+/videos/[^\\s]+)#i', 183 'url_encode_id' => true,184 183 'embed_url' => 'https://www.facebook.com/plugins/video.php?href=%s', 185 184 'auto_thumbnail' => false, … … 496 495 'url' => 'https://player.vimeo.com/video/265932452', 497 496 'id' => 265932452, 497 498 499 500 498 501 ), 499 502 ), -
advanced-responsive-video-embedder/tags/10.0.7/readme.md
r3088086 r3089848 3 3 #### Level up your basic video embeds! Advanced features, privacy. Use URLs, Shortcodes or Blocks to customize videos to your needs. 4 4 5 [ARVE WordPress Plugin](https://wordpress.org/plugins/advanced-responsive-video-embedder/) is free on [wp.org](https://wordpress.org/plugins/advanced-responsive-video-embedder/). Look there for the feature set. 5 [ARVE WordPress Plugin][1] is free on [wp.org][1]. Look there for the feature set. 6 7 [Permalink download to latest version][2]. It will at times be an alpha or beta version that passed the automatic tests but is not released to wp.org. You can upload it a WordPress site under Dashboard > Plugins -> Add New -> Upload. 6 8 7 9 Feel free to file issues with the *code*, for support please file a ticket on [nextgenthemes.com/support/](https://nextgenthemes.com/support/) … … 12 14 13 15 * [Pro](https://nextgenthemes.com/plugins/arve-pro) for Lightbox, Lazyload, Autofill of SEO data and more. 14 * [Privacy](https://nextgenthemes.com/plugins/arve-privacy) for DSGVO compli enace, self hosted thumbnails, load YouTube videos via an invideo.us instance.16 * [Privacy](https://nextgenthemes.com/plugins/arve-privacy) for DSGVO complice, self hosted thumbnails, load YouTube videos via an invideo.us instance. 15 17 * [Sticky Videos](https://nextgenthemes.com/plugins/arve-sticky-videos/) 16 18 * [Random Video](https://nextgenthemes.com/plugins/arve-random-video) 17 19 18 20 If you have an idea for a functionality or addon you like to pay for, please [reach out](https://nextgenthemes.com/contact/). 21 22 23 -
advanced-responsive-video-embedder/tags/10.0.7/readme.txt
r3088086 r3089848 6 6 Tested up to: 6.5.0 7 7 Requires PHP: 7.4 8 Stable tag: 10.0. 68 Stable tag: 10.0. 9 9 License: GPL-3.0 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 194 194 * [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog) 195 195 196 197 198 199 200 196 201 ### 2024-05-17 10.0.6 ### 197 202 -
advanced-responsive-video-embedder/tags/10.0.7/src/block.json
r3088086 r3089848 14 14 "odysee" 15 15 ], 16 "version": "10.0. 6",16 "version": "10.0.", 17 17 "textdomain": "advanced-responsive-video-embedder", 18 18 "supports": { -
advanced-responsive-video-embedder/tags/10.0.7/vendor/composer/installed.json
r3088086 r3089848 70 70 { 71 71 "name": "nextgenthemes/wp-shared", 72 "version": "2024.05. 17.07.42.06",73 "version_normalized": "2024.05. 17.07.42.06",72 "version": "2024.05.6", 73 "version_normalized": "2024.05.6", 74 74 "dist": { 75 75 "type": "path", 76 76 "url": "../nextgenthemes/wp-shared", 77 "reference": " cc6c6d8b4f69377ce1eadb49b111484adac03a20"77 "reference": "" 78 78 }, 79 79 "require": { -
advanced-responsive-video-embedder/tags/10.0.7/vendor/composer/installed.php
r3088086 r3089848 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 0db3ee9ce4cb34e8ae67620e3463da53f93e80fa',6 'reference' => '', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 'reference' => ' 0db3ee9ce4cb34e8ae67620e3463da53f93e80fa',25 'reference' => '', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', … … 30 30 ), 31 31 'nextgenthemes/wp-shared' => array( 32 'pretty_version' => '2024.05. 17.07.42.06',33 'version' => '2024.05. 17.07.42.06',34 'reference' => ' cc6c6d8b4f69377ce1eadb49b111484adac03a20',32 'pretty_version' => '2024.05.6', 33 'version' => '2024.05.6', 34 'reference' => '', 35 35 'type' => 'wp-package', 36 36 'install_path' => __DIR__ . '/../nextgenthemes/wp-shared', -
advanced-responsive-video-embedder/tags/10.0.7/vendor/composer/jetpack_autoload_filemap.php
r3088086 r3089848 8 8 return array( 9 9 '2d1e3b3e432aed88c61afcb4f6d8c262' => array( 10 'version' => '2024.05. 17.07.42.06',10 'version' => '2024.05.6', 11 11 'path' => $vendorDir . '/nextgenthemes/wp-shared/includes/WP/load-files.php' 12 12 ), 13 13 '83b8ee913c5d2d5a8f26b42bc5db8bfb' => array( 14 'version' => '2024.05. 17.07.42.06',14 'version' => '2024.05.6', 15 15 'path' => $vendorDir . '/nextgenthemes/wp-shared/includes/WP/Admin/load-admin-files.php' 16 16 ), -
advanced-responsive-video-embedder/tags/10.0.7/vendor/nextgenthemes/wp-shared/composer.json
r3088086 r3089848 20 20 "update-alpine": "wget https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js -O ./includes/WP/Admin/alpine.js" 21 21 }, 22 "version": "2024.05. 17.07.42.06"22 "version": "2024.05.6" 23 23 } -
advanced-responsive-video-embedder/tags/10.0.7/vendor/nextgenthemes/wp-shared/includes/WP/fn-misc.php
r3086767 r3089848 42 42 } elseif ( is_array( $value ) || is_object( $value ) ) { 43 43 44 // Fails 45 #$html .= sprintf( " %s='%s'", esc_html( $key ), json_encode( $value ) ); 46 // single quoted works 47 #$html .= sprintf( " %s='%s'", esc_html( $key ), json_encode( $value, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ) ); 48 // for ARVE just escaping single quotes works 49 $html .= sprintf( " %s='%s'", esc_html( $key ), wp_json_encode( $value, JSON_HEX_APOS ) ); 50 // double quoted FAILS! WHY? 51 #$html .= sprintf( ' %s="%s"', esc_html( $key ), wp_json_encode( $value, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ) ); 52 // works, apperantly has issues with double quotes 53 #$html .= sprintf( ' %s="%s"', esc_html( $key ), esc_attr( wp_json_encode( $value ) ) ); 54 // works, no matter the quotes 55 #$html .= sprintf( ' %s="%s"', esc_html( $key ), esc_json_encode( $value ) ); 56 #$html .= sprintf( " %s='%s'", esc_html( $key ), esc_json_encode( $value ) ); 44 $html .= sprintf( " %s='%s'", esc_html( $key ), wp_json_encode( $value, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ); 57 45 58 46 } elseif ( in_array( $key, array( 'href', 'data-href', 'src', 'data-src' ), true ) ) { … … 67 55 68 56 return $html; 69 }70 71 /**72 * Escaping for HTML attributes use this instead of esc_attr( json_encode( ) )73 *74 * @link https://core.trac.wordpress.org/ticket/2991075 *76 * @param array or object $data array or object to be escaped77 * @return properly escaped data78 */79 function esc_json_encode( $data ) {80 81 $data = wp_json_encode( $data, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT );82 83 return _wp_specialchars( $data, ENT_QUOTES, false, true );84 }85 86 /**87 * Retrieves the value of a specific query argument from the given URL.88 *89 * @param string $url The URL containing the query parameters.90 * @param string $arg The name of the query argument to retrieve.91 * @return string|null The value of the specified query argument, or null if it is not found.92 */93 function get_url_arg( string $url, string $arg ): ?string {94 95 $query_string = parse_url( $url, PHP_URL_QUERY );96 97 if ( empty( $query_string ) || ! is_string( $query_string ) ) {98 return null;99 }100 101 parse_str( $query_string, $query_args );102 103 return $query_args[ $arg ] ?? null;104 57 } 105 58 … … 147 100 ); 148 101 } 102 103 104 105 106 107 108 109 110 111 112 113 114 -
advanced-responsive-video-embedder/tags/10.0.7/vendor/nextgenthemes/wp-shared/includes/WP/fn-string.php
r3084997 r3089848 10 10 * @return string|null attribute value or null if not found or empty 11 11 */ 12 function get_attribute_ value_from_html_tag( array $query, string $attribute, string $html ): ?string {12 function get_attribute_from_html_tag( array $query, string $attribute, string $html ): ?string { 13 13 14 14 $wphtml = new \WP_HTML_Tag_Processor( $html ); … … 71 71 72 72 /** 73 * Convert a string with dashesto camel case.73 * Convert a string to camel case. 74 74 * 75 75 * @param string $str The input string with dashes. 76 76 77 * @param bool $capitalize_first_character Whether to capitalize the first character. 77 78 * @return string The converted camel case string. 78 79 */ 79 function dashes_to_camel_case( string $str, bool $capitalize_first_character = false ): string {80 function , bool $capitalize_first_character = false ): string { 80 81 81 $str = str_replace( '-', '', ucwords( $str, '-' ) ); 82 if ( strlen( $separator ) !== 1 ) { 83 wp_trigger_error( __FUNCTION__, '$separator must be a single character.' ); 84 return $str; 85 } 86 87 $str = str_replace( $separator, '', ucwords( $str, $separator ) ); 82 88 83 89 if ( ! $capitalize_first_character ) { … … 150 156 return $dir . $info['filename'] . '.' . $new_extension; 151 157 } 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 -
advanced-responsive-video-embedder/trunk/advanced-responsive-video-embedder.php
r3088086 r3089848 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.0. 66 * Version: 10.0. 7 7 * Requires PHP: 7.4 8 8 * Requires at least: 6.2 … … 21 21 namespace Nextgenthemes\ARVE; 22 22 23 const VERSION = '10.0. 6';23 const VERSION = '10.0.'; 24 24 const PRO_VERSION_REQUIRED = '6.0.0-alpha3'; 25 25 const NUM_TRACKS = 3; -
advanced-responsive-video-embedder/trunk/changelog.md
r3088086 r3089848 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 7 8 9 5 10 6 11 ### 2024-05-17 10.0.6 ### -
advanced-responsive-video-embedder/trunk/php/Video.php
r3088086 r3089848 41 41 private string $brightcove_embed; 42 42 private string $brightcove_player; 43 43 44 private string $controlslist; 44 45 private string $description; … … 335 336 336 337 $id = "https://www.facebook.com/facebook/videos/{$id}/"; 338 337 339 338 340 } elseif ( 'twitch' === $provider && is_numeric( $id ) ) { 339 341 340 342 $pattern = 'https://player.twitch.tv/?video=v%s'; 341 }342 343 if ( isset( $properties[ $provider ]['url_encode_id'] ) && $properties[ $provider ]['url_encode_id'] ) {344 $id = rawurlencode( str_replace( '&', '&', $id ) );345 343 } 346 344 … … 377 375 } 378 376 break; 377 378 379 380 379 381 } 380 382 … … 833 835 private function build_iframe_tag(): string { 834 836 837 838 839 840 835 841 return $this->build_tag( 836 842 array( … … 885 891 private function build_video_tag(): string { 886 892 887 $autoplay = in_array( $this->mode, array( 'lazyload', 'lightbox', 'link-lightbox' ), true ) ? 888 false : 889 $this->autoplay; 890 $preload = 'metadata'; 891 892 if ( in_array( $this->mode, array( 'lazyload', 'lightbox' ), true ) && ! empty( $this->img_src ) ) { 893 $preload = 'none'; 893 if ( 'link-lightbox' === $this->mode ) { 894 return ''; 895 } 896 897 $attr = $this->video_attr; 898 899 if ( in_array( $this->mode, array( 'lazyload', 'lightbox' ), true ) ) { 900 $attr['controls'] = false; 894 901 } 895 902 … … 899 906 'tag' => 'video', 900 907 'inner_html' => $this->video_sources_html . tracks_html( $this->tracks ), 901 'attr' => array( 902 // WP 903 'autoplay' => $autoplay, 904 'controls' => $this->controls, 905 'controlslist' => $this->controlslist, 906 'loop' => $this->loop, 907 'preload' => $preload, 908 'width' => is_feed() ? $this->width : false, 909 'poster' => empty( $this->img_src ) ? false : $this->img_src, 910 // ARVE only 911 'data-arve' => $this->uid, 912 'class' => 'arve-video fitvidsignore', 913 'muted' => $autoplay ? 'muted by ARVE because autoplay is on' : $this->muted, 914 'playsinline' => in_array( $this->mode, array( 'lightbox', 'link-lightbox' ), true ) ? '' : false, 915 'webkit-playsinline' => in_array( $this->mode, array( 'lightbox', 'link-lightbox' ), true ) ? '' : false, 916 ), 908 'attr' => $attr, 917 909 ) 918 910 ); … … 984 976 $html = ''; 985 977 986 if ( ! in_array( $this->mode, array( 'lightbox', 'link-lightbox' ), true ) ) { 987 988 if ( 'html5' === $this->provider ) { 989 $html .= $this->build_video_tag(); 990 } else { 991 $html .= $this->build_iframe_tag(); 992 } 978 if ( 'html5' === $this->provider ) { 979 $html .= $this->build_video_tag(); 980 } else { 981 $html .= $this->build_iframe_tag(); 982 } 983 984 if ( 'normal' === $this->mode ) { 985 $html .= $this->build_tag( array( 'name' => 'description' ) ); 993 986 } 994 987 -
advanced-responsive-video-embedder/trunk/php/fn-oembed.php
r3088086 r3089848 71 71 return $html; 72 72 } 73 73 74 74 75 /** … … 116 117 function extract_oembed_json( string $html, string $url ): ?object { 117 118 118 $data = WP\get_attribute_ value_from_html_tag( array( 'tag_name' => 'template' ), 'data-arve', $html );119 $data = WP\get_attribute_from_html_tag( array( 'tag_name' => 'template' ), 'data-arve', $html ); 119 120 120 121 if ( empty( $data ) ) { … … 122 123 } 123 124 124 $data = json_decode( $data, false, 5, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP );125 126 if ( json_last_error() !== JSON_ERROR_NONE) {127 128 $error_code = esc_attr( "$url-extract-json" );129 130 arve_errors()->add( $error_code, 'json decode error code: ' . json_last_error() . '<br>From url: ' . $url );125 126 $data = json_decode($data, false, 5, JSON_THROW_ON_ERROR); 127 ) { 128 129 $error_code = ; 130 131 arve_errors()->add( $error_code, : ' . $url ); 131 132 arve_errors()->add_data( 132 compact( 'html', 'matches', 'data', 'a'),133 compact('), 133 134 $error_code 134 135 ); 136 137 135 138 } 136 139 … … 168 171 if ( 'TikTok' === $data->provider_name ) { 169 172 170 $tiktok_video_id = WP\get_attribute_ value_from_html_tag( array( 'class' => 'tiktok-embed' ), 'data-video-id', $data->html );173 $tiktok_video_id = WP\get_attribute_from_html_tag( array( 'class' => 'tiktok-embed' ), 'data-video-id', $data->html ); 171 174 172 175 if ( $tiktok_video_id ) { … … 177 180 } elseif ( 'Facebook' === $data->provider_name ) { 178 181 179 $facebook_video_url = WP\get_attribute_ value_from_html_tag( array( 'class' => 'fb-video' ), 'data-href', $data->html );182 $facebook_video_url = WP\get_attribute_from_html_tag( array( 'class' => 'fb-video' ), 'data-href', $data->html ); 180 183 181 184 if ( $facebook_video_url ) { … … 185 188 } 186 189 } else { 187 $iframe_src = WP\get_attribute_ value_from_html_tag( array( 'tag_name' => 'iframe' ), 'src', $data->html );190 $iframe_src = WP\get_attribute_from_html_tag( array( 'tag_name' => 'iframe' ), 'src', $data->html ); 188 191 189 192 if ( $iframe_src ) { -
advanced-responsive-video-embedder/trunk/php/fn-shortcode-args.php
r3084997 r3089848 5 5 use function Nextgenthemes\WP\get_url_arg; 6 6 use function Nextgenthemes\WP\valid_url; 7 use function Nextgenthemes\WP\get_attribute_ value_from_html_tag;7 use function Nextgenthemes\WP\get_attribute_from_html_tag; 8 8 9 9 function arg_maxwidth( int $maxwidth, string $provider, string $align ): int { -
advanced-responsive-video-embedder/trunk/php/providers.php
r3084997 r3089848 181 181 'oembed' => false, 182 182 'regex' => '#(?<id>https?://([a-z]+\\.)?facebook\\.com/[-.a-z0-9]+/videos/[^\\s]+)#i', 183 'url_encode_id' => true,184 183 'embed_url' => 'https://www.facebook.com/plugins/video.php?href=%s', 185 184 'auto_thumbnail' => false, … … 496 495 'url' => 'https://player.vimeo.com/video/265932452', 497 496 'id' => 265932452, 497 498 499 500 498 501 ), 499 502 ), -
advanced-responsive-video-embedder/trunk/readme.md
r3088086 r3089848 3 3 #### Level up your basic video embeds! Advanced features, privacy. Use URLs, Shortcodes or Blocks to customize videos to your needs. 4 4 5 [ARVE WordPress Plugin](https://wordpress.org/plugins/advanced-responsive-video-embedder/) is free on [wp.org](https://wordpress.org/plugins/advanced-responsive-video-embedder/). Look there for the feature set. 5 [ARVE WordPress Plugin][1] is free on [wp.org][1]. Look there for the feature set. 6 7 [Permalink download to latest version][2]. It will at times be an alpha or beta version that passed the automatic tests but is not released to wp.org. You can upload it a WordPress site under Dashboard > Plugins -> Add New -> Upload. 6 8 7 9 Feel free to file issues with the *code*, for support please file a ticket on [nextgenthemes.com/support/](https://nextgenthemes.com/support/) … … 12 14 13 15 * [Pro](https://nextgenthemes.com/plugins/arve-pro) for Lightbox, Lazyload, Autofill of SEO data and more. 14 * [Privacy](https://nextgenthemes.com/plugins/arve-privacy) for DSGVO compli enace, self hosted thumbnails, load YouTube videos via an invideo.us instance.16 * [Privacy](https://nextgenthemes.com/plugins/arve-privacy) for DSGVO complice, self hosted thumbnails, load YouTube videos via an invideo.us instance. 15 17 * [Sticky Videos](https://nextgenthemes.com/plugins/arve-sticky-videos/) 16 18 * [Random Video](https://nextgenthemes.com/plugins/arve-random-video) 17 19 18 20 If you have an idea for a functionality or addon you like to pay for, please [reach out](https://nextgenthemes.com/contact/). 21 22 23 -
advanced-responsive-video-embedder/trunk/readme.txt
r3088086 r3089848 6 6 Tested up to: 6.5.0 7 7 Requires PHP: 7.4 8 Stable tag: 10.0. 68 Stable tag: 10.0. 9 9 License: GPL-3.0 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 194 194 * [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog) 195 195 196 197 198 199 200 196 201 ### 2024-05-17 10.0.6 ### 197 202 -
advanced-responsive-video-embedder/trunk/src/block.json
r3088086 r3089848 14 14 "odysee" 15 15 ], 16 "version": "10.0. 6",16 "version": "10.0.", 17 17 "textdomain": "advanced-responsive-video-embedder", 18 18 "supports": { -
advanced-responsive-video-embedder/trunk/vendor/composer/installed.json
r3088086 r3089848 70 70 { 71 71 "name": "nextgenthemes/wp-shared", 72 "version": "2024.05. 17.07.42.06",73 "version_normalized": "2024.05. 17.07.42.06",72 "version": "2024.05.6", 73 "version_normalized": "2024.05.6", 74 74 "dist": { 75 75 "type": "path", 76 76 "url": "../nextgenthemes/wp-shared", 77 "reference": " cc6c6d8b4f69377ce1eadb49b111484adac03a20"77 "reference": "" 78 78 }, 79 79 "require": { -
advanced-responsive-video-embedder/trunk/vendor/composer/installed.php
r3088086 r3089848 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 0db3ee9ce4cb34e8ae67620e3463da53f93e80fa',6 'reference' => '', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 'reference' => ' 0db3ee9ce4cb34e8ae67620e3463da53f93e80fa',25 'reference' => '', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', … … 30 30 ), 31 31 'nextgenthemes/wp-shared' => array( 32 'pretty_version' => '2024.05. 17.07.42.06',33 'version' => '2024.05. 17.07.42.06',34 'reference' => ' cc6c6d8b4f69377ce1eadb49b111484adac03a20',32 'pretty_version' => '2024.05.6', 33 'version' => '2024.05.6', 34 'reference' => '', 35 35 'type' => 'wp-package', 36 36 'install_path' => __DIR__ . '/../nextgenthemes/wp-shared', -
advanced-responsive-video-embedder/trunk/vendor/composer/jetpack_autoload_filemap.php
r3088086 r3089848 8 8 return array( 9 9 '2d1e3b3e432aed88c61afcb4f6d8c262' => array( 10 'version' => '2024.05. 17.07.42.06',10 'version' => '2024.05.6', 11 11 'path' => $vendorDir . '/nextgenthemes/wp-shared/includes/WP/load-files.php' 12 12 ), 13 13 '83b8ee913c5d2d5a8f26b42bc5db8bfb' => array( 14 'version' => '2024.05. 17.07.42.06',14 'version' => '2024.05.6', 15 15 'path' => $vendorDir . '/nextgenthemes/wp-shared/includes/WP/Admin/load-admin-files.php' 16 16 ), -
advanced-responsive-video-embedder/trunk/vendor/nextgenthemes/wp-shared/composer.json
r3088086 r3089848 20 20 "update-alpine": "wget https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js -O ./includes/WP/Admin/alpine.js" 21 21 }, 22 "version": "2024.05. 17.07.42.06"22 "version": "2024.05.6" 23 23 } -
advanced-responsive-video-embedder/trunk/vendor/nextgenthemes/wp-shared/includes/WP/fn-misc.php
r3086767 r3089848 42 42 } elseif ( is_array( $value ) || is_object( $value ) ) { 43 43 44 // Fails 45 #$html .= sprintf( " %s='%s'", esc_html( $key ), json_encode( $value ) ); 46 // single quoted works 47 #$html .= sprintf( " %s='%s'", esc_html( $key ), json_encode( $value, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ) ); 48 // for ARVE just escaping single quotes works 49 $html .= sprintf( " %s='%s'", esc_html( $key ), wp_json_encode( $value, JSON_HEX_APOS ) ); 50 // double quoted FAILS! WHY? 51 #$html .= sprintf( ' %s="%s"', esc_html( $key ), wp_json_encode( $value, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ) ); 52 // works, apperantly has issues with double quotes 53 #$html .= sprintf( ' %s="%s"', esc_html( $key ), esc_attr( wp_json_encode( $value ) ) ); 54 // works, no matter the quotes 55 #$html .= sprintf( ' %s="%s"', esc_html( $key ), esc_json_encode( $value ) ); 56 #$html .= sprintf( " %s='%s'", esc_html( $key ), esc_json_encode( $value ) ); 44 $html .= sprintf( " %s='%s'", esc_html( $key ), wp_json_encode( $value, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ); 57 45 58 46 } elseif ( in_array( $key, array( 'href', 'data-href', 'src', 'data-src' ), true ) ) { … … 67 55 68 56 return $html; 69 }70 71 /**72 * Escaping for HTML attributes use this instead of esc_attr( json_encode( ) )73 *74 * @link https://core.trac.wordpress.org/ticket/2991075 *76 * @param array or object $data array or object to be escaped77 * @return properly escaped data78 */79 function esc_json_encode( $data ) {80 81 $data = wp_json_encode( $data, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT );82 83 return _wp_specialchars( $data, ENT_QUOTES, false, true );84 }85 86 /**87 * Retrieves the value of a specific query argument from the given URL.88 *89 * @param string $url The URL containing the query parameters.90 * @param string $arg The name of the query argument to retrieve.91 * @return string|null The value of the specified query argument, or null if it is not found.92 */93 function get_url_arg( string $url, string $arg ): ?string {94 95 $query_string = parse_url( $url, PHP_URL_QUERY );96 97 if ( empty( $query_string ) || ! is_string( $query_string ) ) {98 return null;99 }100 101 parse_str( $query_string, $query_args );102 103 return $query_args[ $arg ] ?? null;104 57 } 105 58 … … 147 100 ); 148 101 } 102 103 104 105 106 107 108 109 110 111 112 113 114 -
advanced-responsive-video-embedder/trunk/vendor/nextgenthemes/wp-shared/includes/WP/fn-string.php
r3084997 r3089848 10 10 * @return string|null attribute value or null if not found or empty 11 11 */ 12 function get_attribute_ value_from_html_tag( array $query, string $attribute, string $html ): ?string {12 function get_attribute_from_html_tag( array $query, string $attribute, string $html ): ?string { 13 13 14 14 $wphtml = new \WP_HTML_Tag_Processor( $html ); … … 71 71 72 72 /** 73 * Convert a string with dashesto camel case.73 * Convert a string to camel case. 74 74 * 75 75 * @param string $str The input string with dashes. 76 76 77 * @param bool $capitalize_first_character Whether to capitalize the first character. 77 78 * @return string The converted camel case string. 78 79 */ 79 function dashes_to_camel_case( string $str, bool $capitalize_first_character = false ): string {80 function , bool $capitalize_first_character = false ): string { 80 81 81 $str = str_replace( '-', '', ucwords( $str, '-' ) ); 82 if ( strlen( $separator ) !== 1 ) { 83 wp_trigger_error( __FUNCTION__, '$separator must be a single character.' ); 84 return $str; 85 } 86 87 $str = str_replace( $separator, '', ucwords( $str, $separator ) ); 82 88 83 89 if ( ! $capitalize_first_character ) { … … 150 156 return $dir . $info['filename'] . '.' . $new_extension; 151 157 } 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
Note: See TracChangeset
for help on using the changeset viewer.