Plugin Directory

Changeset 3089848

Timestamp:
05/21/2024 05:09:52 AM (8 weeks ago)
Author:
nico23
Message:

Update plugin to version 10.0.7 with NextgenThemes WordPress Plugin Deploy

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  
    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.0.6
     6 * Version:           10.0.
    77 * Requires PHP:      7.4
    88 * Requires at least: 6.2
     
    2121namespace Nextgenthemes\ARVE;
    2222
    23 const VERSION               = '10.0.6';
     23const VERSION               = '10.0.';
    2424const PRO_VERSION_REQUIRED  = '6.0.0-alpha3';
    2525const NUM_TRACKS            = 3;
  • advanced-responsive-video-embedder/tags/10.0.7/changelog.md

    r3088086 r3089848  
    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
     7
     8
     9
    510
    611### 2024-05-17 10.0.6 ###
  • advanced-responsive-video-embedder/tags/10.0.7/php/Video.php

    r3088086 r3089848  
    4141    private string $brightcove_embed;
    4242    private string $brightcove_player;
     43
    4344    private string $controlslist;
    4445    private string $description;
     
    335336
    336337            $id = "https://www.facebook.com/facebook/videos/{$id}/";
     338
    337339
    338340        } elseif ( 'twitch' === $provider && is_numeric( $id ) ) {
    339341
    340342            $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 ) );
    345343        }
    346344
     
    377375                }
    378376                break;
     377
     378
     379
     380
    379381        }
    380382
     
    833835    private function build_iframe_tag(): string {
    834836
     837
     838
     839
     840
    835841        return $this->build_tag(
    836842            array(
     
    885891    private function build_video_tag(): string {
    886892
    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;
    894901        }
    895902
     
    899906                'tag'        => 'video',
    900907                '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,
    917909            )
    918910        );
     
    984976        $html = '';
    985977
    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' ) );
    993986        }
    994987
  • advanced-responsive-video-embedder/tags/10.0.7/php/fn-oembed.php

    r3088086 r3089848  
    7171    return $html;
    7272}
     73
    7374
    7475/**
     
    116117function extract_oembed_json( string $html, string $url ): ?object {
    117118
    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 );
    119120
    120121    if ( empty( $data ) ) {
     
    122123    }
    123124
    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 );
    131132        arve_errors()->add_data(
    132             compact('html', 'matches', 'data', 'a'),
     133            compact('),
    133134            $error_code
    134135        );
     136
     137
    135138    }
    136139
     
    168171    if ( 'TikTok' === $data->provider_name ) {
    169172
    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 );
    171174
    172175        if ( $tiktok_video_id ) {
     
    177180    } elseif ( 'Facebook' === $data->provider_name ) {
    178181
    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 );
    180183
    181184        if ( $facebook_video_url ) {
     
    185188        }
    186189    } 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 );
    188191
    189192        if ( $iframe_src ) {
  • advanced-responsive-video-embedder/tags/10.0.7/php/fn-shortcode-args.php

    r3084997 r3089848  
    55use function Nextgenthemes\WP\get_url_arg;
    66use function Nextgenthemes\WP\valid_url;
    7 use function Nextgenthemes\WP\get_attribute_value_from_html_tag;
     7use function Nextgenthemes\WP\get_attribute_from_html_tag;
    88
    99function arg_maxwidth( int $maxwidth, string $provider, string $align ): int {
  • advanced-responsive-video-embedder/tags/10.0.7/php/providers.php

    r3084997 r3089848  
    181181        'oembed'         => false,
    182182        'regex'          => '#(?<id>https?://([a-z]+\\.)?facebook\\.com/[-.a-z0-9]+/videos/[^\\s]+)#i',
    183         'url_encode_id'  => true,
    184183        'embed_url'      => 'https://www.facebook.com/plugins/video.php?href=%s',
    185184        'auto_thumbnail' => false,
     
    496495                'url' => 'https://player.vimeo.com/video/265932452',
    497496                'id'  => 265932452,
     497
     498
     499
     500
    498501            ),
    499502        ),
  • advanced-responsive-video-embedder/tags/10.0.7/readme.md

    r3088086 r3089848  
    33#### Level up your basic video embeds! Advanced features, privacy. Use URLs, Shortcodes or Blocks to customize videos to your needs.
    44
    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.
    68
    79Feel free to file issues with the *code*, for support please file a ticket on [nextgenthemes.com/support/](https://nextgenthemes.com/support/)
     
    1214
    1315* [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 complienace, 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.
    1517* [Sticky Videos](https://nextgenthemes.com/plugins/arve-sticky-videos/)
    1618* [Random Video](https://nextgenthemes.com/plugins/arve-random-video)
    1719
    1820If 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  
    66Tested up to: 6.5.0
    77Requires PHP: 7.4
    8 Stable tag: 10.0.6
     8Stable tag: 10.0.
    99License: GPL-3.0
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    194194* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
    195195
     196
     197
     198
     199
     200
    196201### 2024-05-17 10.0.6 ###
    197202
  • advanced-responsive-video-embedder/tags/10.0.7/src/block.json

    r3088086 r3089848  
    1414        "odysee"
    1515    ],
    16     "version": "10.0.6",
     16    "version": "10.0.",
    1717    "textdomain": "advanced-responsive-video-embedder",
    1818    "supports": {
  • advanced-responsive-video-embedder/tags/10.0.7/vendor/composer/installed.json

    r3088086 r3089848  
    7070        {
    7171            "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",
    7474            "dist": {
    7575                "type": "path",
    7676                "url": "../nextgenthemes/wp-shared",
    77                 "reference": "cc6c6d8b4f69377ce1eadb49b111484adac03a20"
     77                "reference": ""
    7878            },
    7979            "require": {
  • advanced-responsive-video-embedder/tags/10.0.7/vendor/composer/installed.php

    r3088086 r3089848  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '0db3ee9ce4cb34e8ae67620e3463da53f93e80fa',
     6        'reference' => '',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-master',
    2424            'version' => 'dev-master',
    25             'reference' => '0db3ee9ce4cb34e8ae67620e3463da53f93e80fa',
     25            'reference' => '',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        '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' => '',
    3535            'type' => 'wp-package',
    3636            'install_path' => __DIR__ . '/../nextgenthemes/wp-shared',
  • advanced-responsive-video-embedder/tags/10.0.7/vendor/composer/jetpack_autoload_filemap.php

    r3088086 r3089848  
    88return array(
    99    '2d1e3b3e432aed88c61afcb4f6d8c262' => array(
    10         'version' => '2024.05.17.07.42.06',
     10        'version' => '2024.05.6',
    1111        'path'    => $vendorDir . '/nextgenthemes/wp-shared/includes/WP/load-files.php'
    1212    ),
    1313    '83b8ee913c5d2d5a8f26b42bc5db8bfb' => array(
    14         'version' => '2024.05.17.07.42.06',
     14        'version' => '2024.05.6',
    1515        'path'    => $vendorDir . '/nextgenthemes/wp-shared/includes/WP/Admin/load-admin-files.php'
    1616    ),
  • advanced-responsive-video-embedder/tags/10.0.7/vendor/nextgenthemes/wp-shared/composer.json

    r3088086 r3089848  
    2020        "update-alpine": "wget https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js -O ./includes/WP/Admin/alpine.js"
    2121    },
    22     "version": "2024.05.17.07.42.06"
     22    "version": "2024.05.6"
    2323}
  • advanced-responsive-video-embedder/tags/10.0.7/vendor/nextgenthemes/wp-shared/includes/WP/fn-misc.php

    r3086767 r3089848  
    4242        } elseif ( is_array( $value ) || is_object( $value ) ) {
    4343
    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 ) );
    5745
    5846        } elseif ( in_array( $key, array( 'href', 'data-href', 'src', 'data-src' ), true ) ) {
     
    6755
    6856    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/29910
    75  *
    76  * @param  array or object $data array or object to be escaped
    77  * @return properly escaped data
    78  */
    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;
    10457}
    10558
     
    147100    );
    148101}
     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  
    1010 * @return string|null attribute value or null if not found or empty
    1111 */
    12 function get_attribute_value_from_html_tag( array $query, string $attribute, string $html ): ?string {
     12function get_attribute_from_html_tag( array $query, string $attribute, string $html ): ?string {
    1313
    1414    $wphtml = new \WP_HTML_Tag_Processor( $html );
     
    7171
    7272/**
    73  * Convert a string with dashes to camel case.
     73 * Convert a string to camel case.
    7474 *
    7575 * @param string $str The input string with dashes.
     76
    7677 * @param bool $capitalize_first_character Whether to capitalize the first character.
    7778 * @return string The converted camel case string.
    7879 */
    79 function dashes_to_camel_case( string $str, bool $capitalize_first_character = false ): string {
     80function , bool $capitalize_first_character = false ): string {
    8081
    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 ) );
    8288
    8389    if ( ! $capitalize_first_character ) {
     
    150156    return $dir . $info['filename'] . '.' . $new_extension;
    151157}
     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  
    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.0.6
     6 * Version:           10.0.
    77 * Requires PHP:      7.4
    88 * Requires at least: 6.2
     
    2121namespace Nextgenthemes\ARVE;
    2222
    23 const VERSION               = '10.0.6';
     23const VERSION               = '10.0.';
    2424const PRO_VERSION_REQUIRED  = '6.0.0-alpha3';
    2525const NUM_TRACKS            = 3;
  • advanced-responsive-video-embedder/trunk/changelog.md

    r3088086 r3089848  
    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
     7
     8
     9
    510
    611### 2024-05-17 10.0.6 ###
  • advanced-responsive-video-embedder/trunk/php/Video.php

    r3088086 r3089848  
    4141    private string $brightcove_embed;
    4242    private string $brightcove_player;
     43
    4344    private string $controlslist;
    4445    private string $description;
     
    335336
    336337            $id = "https://www.facebook.com/facebook/videos/{$id}/";
     338
    337339
    338340        } elseif ( 'twitch' === $provider && is_numeric( $id ) ) {
    339341
    340342            $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( '&', '&amp;', $id ) );
    345343        }
    346344
     
    377375                }
    378376                break;
     377
     378
     379
     380
    379381        }
    380382
     
    833835    private function build_iframe_tag(): string {
    834836
     837
     838
     839
     840
    835841        return $this->build_tag(
    836842            array(
     
    885891    private function build_video_tag(): string {
    886892
    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;
    894901        }
    895902
     
    899906                'tag'        => 'video',
    900907                '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,
    917909            )
    918910        );
     
    984976        $html = '';
    985977
    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' ) );
    993986        }
    994987
  • advanced-responsive-video-embedder/trunk/php/fn-oembed.php

    r3088086 r3089848  
    7171    return $html;
    7272}
     73
    7374
    7475/**
     
    116117function extract_oembed_json( string $html, string $url ): ?object {
    117118
    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 );
    119120
    120121    if ( empty( $data ) ) {
     
    122123    }
    123124
    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 );
    131132        arve_errors()->add_data(
    132             compact('html', 'matches', 'data', 'a'),
     133            compact('),
    133134            $error_code
    134135        );
     136
     137
    135138    }
    136139
     
    168171    if ( 'TikTok' === $data->provider_name ) {
    169172
    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 );
    171174
    172175        if ( $tiktok_video_id ) {
     
    177180    } elseif ( 'Facebook' === $data->provider_name ) {
    178181
    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 );
    180183
    181184        if ( $facebook_video_url ) {
     
    185188        }
    186189    } 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 );
    188191
    189192        if ( $iframe_src ) {
  • advanced-responsive-video-embedder/trunk/php/fn-shortcode-args.php

    r3084997 r3089848  
    55use function Nextgenthemes\WP\get_url_arg;
    66use function Nextgenthemes\WP\valid_url;
    7 use function Nextgenthemes\WP\get_attribute_value_from_html_tag;
     7use function Nextgenthemes\WP\get_attribute_from_html_tag;
    88
    99function arg_maxwidth( int $maxwidth, string $provider, string $align ): int {
  • advanced-responsive-video-embedder/trunk/php/providers.php

    r3084997 r3089848  
    181181        'oembed'         => false,
    182182        'regex'          => '#(?<id>https?://([a-z]+\\.)?facebook\\.com/[-.a-z0-9]+/videos/[^\\s]+)#i',
    183         'url_encode_id'  => true,
    184183        'embed_url'      => 'https://www.facebook.com/plugins/video.php?href=%s',
    185184        'auto_thumbnail' => false,
     
    496495                'url' => 'https://player.vimeo.com/video/265932452',
    497496                'id'  => 265932452,
     497
     498
     499
     500
    498501            ),
    499502        ),
  • advanced-responsive-video-embedder/trunk/readme.md

    r3088086 r3089848  
    33#### Level up your basic video embeds! Advanced features, privacy. Use URLs, Shortcodes or Blocks to customize videos to your needs.
    44
    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.
    68
    79Feel free to file issues with the *code*, for support please file a ticket on [nextgenthemes.com/support/](https://nextgenthemes.com/support/)
     
    1214
    1315* [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 complienace, 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.
    1517* [Sticky Videos](https://nextgenthemes.com/plugins/arve-sticky-videos/)
    1618* [Random Video](https://nextgenthemes.com/plugins/arve-random-video)
    1719
    1820If 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  
    66Tested up to: 6.5.0
    77Requires PHP: 7.4
    8 Stable tag: 10.0.6
     8Stable tag: 10.0.
    99License: GPL-3.0
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    194194* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
    195195
     196
     197
     198
     199
     200
    196201### 2024-05-17 10.0.6 ###
    197202
  • advanced-responsive-video-embedder/trunk/src/block.json

    r3088086 r3089848  
    1414        "odysee"
    1515    ],
    16     "version": "10.0.6",
     16    "version": "10.0.",
    1717    "textdomain": "advanced-responsive-video-embedder",
    1818    "supports": {
  • advanced-responsive-video-embedder/trunk/vendor/composer/installed.json

    r3088086 r3089848  
    7070        {
    7171            "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",
    7474            "dist": {
    7575                "type": "path",
    7676                "url": "../nextgenthemes/wp-shared",
    77                 "reference": "cc6c6d8b4f69377ce1eadb49b111484adac03a20"
     77                "reference": ""
    7878            },
    7979            "require": {
  • advanced-responsive-video-embedder/trunk/vendor/composer/installed.php

    r3088086 r3089848  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '0db3ee9ce4cb34e8ae67620e3463da53f93e80fa',
     6        'reference' => '',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-master',
    2424            'version' => 'dev-master',
    25             'reference' => '0db3ee9ce4cb34e8ae67620e3463da53f93e80fa',
     25            'reference' => '',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        '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' => '',
    3535            'type' => 'wp-package',
    3636            'install_path' => __DIR__ . '/../nextgenthemes/wp-shared',
  • advanced-responsive-video-embedder/trunk/vendor/composer/jetpack_autoload_filemap.php

    r3088086 r3089848  
    88return array(
    99    '2d1e3b3e432aed88c61afcb4f6d8c262' => array(
    10         'version' => '2024.05.17.07.42.06',
     10        'version' => '2024.05.6',
    1111        'path'    => $vendorDir . '/nextgenthemes/wp-shared/includes/WP/load-files.php'
    1212    ),
    1313    '83b8ee913c5d2d5a8f26b42bc5db8bfb' => array(
    14         'version' => '2024.05.17.07.42.06',
     14        'version' => '2024.05.6',
    1515        'path'    => $vendorDir . '/nextgenthemes/wp-shared/includes/WP/Admin/load-admin-files.php'
    1616    ),
  • advanced-responsive-video-embedder/trunk/vendor/nextgenthemes/wp-shared/composer.json

    r3088086 r3089848  
    2020        "update-alpine": "wget https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js -O ./includes/WP/Admin/alpine.js"
    2121    },
    22     "version": "2024.05.17.07.42.06"
     22    "version": "2024.05.6"
    2323}
  • advanced-responsive-video-embedder/trunk/vendor/nextgenthemes/wp-shared/includes/WP/fn-misc.php

    r3086767 r3089848  
    4242        } elseif ( is_array( $value ) || is_object( $value ) ) {
    4343
    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 ) );
    5745
    5846        } elseif ( in_array( $key, array( 'href', 'data-href', 'src', 'data-src' ), true ) ) {
     
    6755
    6856    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/29910
    75  *
    76  * @param  array or object $data array or object to be escaped
    77  * @return properly escaped data
    78  */
    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;
    10457}
    10558
     
    147100    );
    148101}
     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  
    1010 * @return string|null attribute value or null if not found or empty
    1111 */
    12 function get_attribute_value_from_html_tag( array $query, string $attribute, string $html ): ?string {
     12function get_attribute_from_html_tag( array $query, string $attribute, string $html ): ?string {
    1313
    1414    $wphtml = new \WP_HTML_Tag_Processor( $html );
     
    7171
    7272/**
    73  * Convert a string with dashes to camel case.
     73 * Convert a string to camel case.
    7474 *
    7575 * @param string $str The input string with dashes.
     76
    7677 * @param bool $capitalize_first_character Whether to capitalize the first character.
    7778 * @return string The converted camel case string.
    7879 */
    79 function dashes_to_camel_case( string $str, bool $capitalize_first_character = false ): string {
     80function , bool $capitalize_first_character = false ): string {
    8081
    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 ) );
    8288
    8389    if ( ! $capitalize_first_character ) {
     
    150156    return $dir . $info['filename'] . '.' . $new_extension;
    151157}
     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.