iframe src urls, you can control the video players behavior with them. Please read the documentation on.', 'advanced-responsive-video-embedder' ), esc_url( 'https://nextgenthemes.com/arve/documentation' ) ), array( 'code' => array(), 'a' => array( 'href' => true, 'target' => true, 'title' => true, ), ), array( 'https' ) ); ?>
See Youtube Parameters, Dailymotion Parameters, Vimeo Parameters
must comply with GDPR/DSGVO. The ARVE Privacy Addon automatically adds the required 3rd party content notice to your embeds in lazyload and lightbox modes! No option needed, you just need to have the Privacy Addon active!', 'advanced-responsive-video-embedder' ), array( 'strong' => array(), ), array( 'https' ) ); ?>
%s is not active. You may already set options for this addon but they will only take effect if its installed and activated later.', 'advanced-responsive-video-embedder' ), sprintf( '%s', 'https://nextgenthemes.com/plugins/' . $slug . '/', $addon_name ) ), array( 'strong' => array(), 'a' => array( 'href' => true ), ), array( 'https' ) ); } function get_addon_link( string $addon_name, string $slug ): string { return sprintf( '%s', 'https://nextgenthemes.com/plugins/' . $slug . '/', $addon_name ); } function settings_sidebar(): void { if ( ! current_user_can( 'install_plugins' ) ) { echo ''; } if ( ! is_plugin_active( 'arve-pro/arve-pro.php' ) ) { print_settings_box_html( '/partials/settings-sidebar-pro.html' ); } if ( ! is_plugin_active( 'arve-sticky-videos/arve-sticky-videos.php' ) ) { print_settings_box_html( '/partials/settings-sidebar-sticky-videos.html' ); } if ( ! is_plugin_active( 'arve-random-video/arve-random-video.php' ) ) { print_settings_box_html( '/partials/settings-sidebar-random-video.html' ); } print_settings_box_html( '/partials/settings-sidebar-rate.html' ); print_arve_news(); } function print_settings_box_html( string $file ): void { echo ''; } function print_arve_news(): void { if ( ! options()['news_opt_in'] ) { $setting = settings_data()->get( 'news_opt_in' ); ?> 4, 'page' => 1, 'orderby' => 'date', 'categories' => 126, ), 'https://nextgenthemes.com/wp-json/wp/v2/posts' ), ); if ( is_wp_error( $response ) ) { esc_html_e( 'Error fetching news', 'advanced-responsive-video-embedder' ); return; } $posts = json_decode( $response ); if ( ! $posts ) { esc_html_e( 'No ARVE news posts', 'advanced-responsive-video-embedder' ); return; } ?> get_error_code(); $message = $youtube_api_error->get_error_message(); $data = $youtube_api_error->get_error_data(); if ( ! empty( $data['response_code'] ) && 403 === $data['response_code'] ) { $message .= '
' . esc_html( var_export( $data['response']['body'], true ) ) . '';
}
echo wp_kses( $message, ALLOWED_HTML, array( 'https' ) );
}
function get_json_body_error_message( \WP_Error $error ): string {
$data = $error->get_error_data();
if ( empty( $data['response']['body'] ) ) {
return '';
}
try {
// Decode JSON with explicit error throwing
$decoded = json_decode( $data['response']['body'], true, 512, JSON_THROW_ON_ERROR ) ?? null;
// Return message if it exists, false otherwise
return $decoded['error']['message'] ?? '';
} catch ( \JsonException $e ) {
// Catch JSON-specific exceptions
return '';
}
}