.)?ted\.com/talks/.*#i' => array( 'https://www.ted.com/services/v1/oembed.{format}', true ), '#https?://(www\.)?(animoto|video214)\.com/play/.*#i' => array( 'https://animoto.com/oembeds/create', true ), '#https?://(.+)\.tumblr\.com/.*#i' => array( 'https://www.tumblr.com/oembed/1.0', true ), '#https?://(www\.)?kickstarter\.com/projects/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ), '#https?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ), '#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ), '#https?://(www\.)?reverbnation\.com/.*#i' => array( 'https://www.reverbnation.com/oembed', true ), '#https?://videopress\.com/v/.*#' => array( 'https://public-api.wordpress.com/oembed/?for=' . $host, true ), '#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i' => array( 'https://www.reddit.com/oembed', true ), '#https?://(www\.)?speakerdeck\.com/.*#i' => array( 'https://speakerdeck.com/oembed.{format}', true ), '#https?://([a-z0-9-]+\.)?amazon\.(com|com\.mx|com\.br|ca)/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ), '#https?://([a-z0-9-]+\.)?amazon\.(co\.uk|de|fr|it|es|in|nl|ru)/.*#i' => array( 'https://read.amazon.co.uk/kp/api/oembed', true ), '#https?://([a-z0-9-]+\.)?amazon\.(co\.jp|com\.au)/.*#i' => array( 'https://read.amazon.com.au/kp/api/oembed', true ), '#https?://([a-z0-9-]+\.)?amazon\.cn/.*#i' => array( 'https://read.amazon.cn/kp/api/oembed', true ), '#https?://(www\.)?a\.co/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ), '#https?://(www\.)?amzn\.to/.*#i' => array( 'https://read.amazon.com/kp/api/oembed', true ), '#https?://(www\.)?amzn\.eu/.*#i' => array( 'https://read.amazon.co.uk/kp/api/oembed', true ), '#https?://(www\.)?amzn\.in/.*#i' => array( 'https://read.amazon.in/kp/api/oembed', true ), '#https?://(www\.)?amzn\.asia/.*#i' => array( 'https://read.amazon.com.au/kp/api/oembed', true ), '#https?://(www\.)?z\.cn/.*#i' => array( 'https://read.amazon.cn/kp/api/oembed', true ), '#https?://www\.someecards\.com/.+-cards/.+#i' => array( 'https://www.someecards.com/v2/oembed/', true ), '#https?://www\.someecards\.com/usercards/viewcard/.+#i' => array( 'https://www.someecards.com/v2/oembed/', true ), '#https?://some\.ly\/.+#i' => array( 'https://www.someecards.com/v2/oembed/', true ), '#https?://(www\.)?tiktok\.com/.*/video/.*#i' => array( 'https://www.tiktok.com/oembed', true ), '#https?://(www\.)?tiktok\.com/@.*#i' => array( 'https://www.tiktok.com/oembed', true ), '#https?://([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?/.*#i' => array( 'https://www.pinterest.com/oembed.json', true ), '#https?://(www\.)?wolframcloud\.com/obj/.+#i' => array( 'https://www.wolframcloud.com/oembed', true ), '#https?://pca\.st/.+#i' => array( 'https://pca.st/oembed.json', true ), '#https?://((play|www)\.)?anghami\.com/.*#i' => array( 'https://api.anghami.com/rest/v1/oembed.view', true ), '#https?://bsky.app/profile/.*/post/.*#i' => array( 'https://embed.bsky.app/oembed', true ), '#https?://(www\.)?canva\.com/design/.*/view.*#i' => array( 'https://canva.com/_oembed', true ), ); if ( ! empty( self::$early_providers['add'] ) ) { foreach ( self::$early_providers['add'] as $format => $data ) { $providers[ $format ] = $data; } } if ( ! empty( self::$early_providers['remove'] ) ) { foreach ( self::$early_providers['remove'] as $format ) { unset( $providers[ $format ] ); } } self::$early_providers = array(); /** * Filters the list of sanctioned oEmbed providers. * * Since WordPress 4.4, oEmbed discovery is enabled for all users and allows embedding of sanitized * iframes. The providers in this list are sanctioned, meaning they are trusted and allowed to * embed any content, such as iframes, videos, JavaScript, and arbitrary HTML. * * Supported providers: * * | Provider | Flavor | Since | * | ------------ | ----------------------------------------- | ------- | * | Dailymotion | dailymotion.com | 2.9.0 | * | Flickr | flickr.com | 2.9.0 | * | Scribd | scribd.com | 2.9.0 | * | Vimeo | vimeo.com | 2.9.0 | * | WordPress.tv | wordpress.tv | 2.9.0 | * | YouTube | youtube.com/watch | 2.9.0 | * | Crowdsignal | polldaddy.com | 3.0.0 | * | SmugMug | smugmug.com | 3.0.0 | * | YouTube | youtu.be | 3.0.0 | * | Twitter | twitter.com | 3.4.0 | * | SoundCloud | soundcloud.com | 3.5.0 | * | Dailymotion | dai.ly | 3.6.0 | * | Flickr | flic.kr | 3.6.0 | * | Spotify | spotify.com | 3.6.0 | * | Imgur | imgur.com | 3.9.0 | * | Animoto | animoto.com | 4.0.0 | * | Animoto | video214.com | 4.0.0 | * | Issuu | issuu.com | 4.0.0 | * | Mixcloud | mixcloud.com | 4.0.0 | * | Crowdsignal | poll.fm | 4.0.0 | * | TED | ted.com | 4.0.0 | * | YouTube | youtube.com/playlist | 4.0.0 | * | Tumblr | tumblr.com | 4.2.0 | * | Kickstarter | kickstarter.com | 4.2.0 | * | Kickstarter | kck.st | 4.2.0 | * | Cloudup | cloudup.com | 4.3.0 | * | ReverbNation | reverbnation.com | 4.4.0 | * | VideoPress | videopress.com | 4.4.0 | * | Reddit | reddit.com | 4.4.0 | * | Speaker Deck | speakerdeck.com | 4.4.0 | * | Twitter | twitter.com/timelines | 4.5.0 | * | Twitter | twitter.com/moments | 4.5.0 | * | Twitter | twitter.com/user | 4.7.0 | * | Twitter | twitter.com/likes | 4.7.0 | * | Twitter | twitter.com/lists | 4.7.0 | * | Screencast | screencast.com | 4.8.0 | * | Amazon | amazon.com (com.mx, com.br, ca) | 4.9.0 | * | Amazon | amazon.de (fr, it, es, in, nl, ru, co.uk) | 4.9.0 | * | Amazon | amazon.co.jp (com.au) | 4.9.0 | * | Amazon | amazon.cn | 4.9.0 | * | Amazon | a.co | 4.9.0 | * | Amazon | amzn.to (eu, in, asia) | 4.9.0 | * | Amazon | z.cn | 4.9.0 | * | Someecards | someecards.com | 4.9.0 | * | Someecards | some.ly | 4.9.0 | * | Crowdsignal | survey.fm | 5.1.0 | * | TikTok | tiktok.com | 5.4.0 | * | Pinterest | pinterest.com | 5.9.0 | * | WolframCloud | wolframcloud.com | 5.9.0 | * | Pocket Casts | pocketcasts.com | 6.1.0 | * | Crowdsignal | crowdsignal.net | 6.2.0 | * | Anghami | anghami.com | 6.3.0 | * | Bluesky | bsky.app | 6.6.0 | * | Canva | canva.com | 6.8.0 | * * No longer supported providers: * * | Provider | Flavor | Since | Removed | * | ------------ | -------------------- | --------- | --------- | * | Qik | qik.com | 2.9.0 | 3.9.0 | * | Viddler | viddler.com | 2.9.0 | 4.0.0 | * | Revision3 | revision3.com | 2.9.0 | 4.2.0 | * | Blip | blip.tv | 2.9.0 | 4.4.0 | * | Rdio | rdio.com | 3.6.0 | 4.4.1 | * | Rdio | rd.io | 3.6.0 | 4.4.1 | * | Vine | vine.co | 4.1.0 | 4.9.0 | * | Photobucket | photobucket.com | 2.9.0 | 5.1.0 | * | Funny or Die | funnyordie.com | 3.0.0 | 5.1.0 | * | CollegeHumor | collegehumor.com | 4.0.0 | 5.3.1 | * | Hulu | hulu.com | 2.9.0 | 5.5.0 | * | Instagram | instagram.com | 3.5.0 | 5.5.2 | * | Instagram | instagr.am | 3.5.0 | 5.5.2 | * | Instagram TV | instagram.com | 5.1.0 | 5.5.2 | * | Instagram TV | instagr.am | 5.1.0 | 5.5.2 | * | Facebook | facebook.com | 4.7.0 | 5.5.2 | * | Meetup.com | meetup.com | 3.9.0 | 6.0.1 | * | Meetup.com | meetu.ps | 3.9.0 | 6.0.1 | * | SlideShare | slideshare.net | 3.5.0 | 6.6.0 | * | Screencast | screencast.com | 4.8.0 | 6.8.2 | * * @see wp_oembed_add_provider() * * @since 2.9.0 * * @param array[] $providers An array of arrays containing data about popular oEmbed providers. */ $this->providers = apply_filters( 'oembed_providers', $providers ); // Fix any embeds that contain new lines in the middle of the HTML which breaks wpautop(). add_filter( 'oembed_dataparse', array( $this, '_strip_newlines' ), 10, 3 ); } /** * Exposes private/protected methods for backward compatibility. * * @since 4.0.0 * * @param string $name Method to call. * @param array $arguments Arguments to pass when calling. * @return mixed|false Return value of the callback, false otherwise. */ public function __call( $name, $arguments ) { if ( in_array( $name, $this->compat_methods, true ) ) { return $this->$name( ...$arguments ); } return false; } /** * Takes a URL and returns the corresponding oEmbed provider's URL, if there is one. * * @since 4.0.0 * * @see WP_oEmbed::discover() * * @param string $url The URL to the content. * @param string|array $args { * Optional. Additional provider arguments. Default empty. * * @type bool $discover Optional. Determines whether to attempt to discover link tags * at the given URL for an oEmbed provider when the provider URL * is not found in the built-in providers list. Default true. * } * @return string|false The oEmbed provider URL on success, false on failure. */ public function get_provider( $url, $args = '' ) { $args = wp_parse_args( $args ); $provider = false; if ( ! isset( $args['discover'] ) ) { $args['discover'] = true; } foreach ( $this->providers as $matchmask => $data ) { list( $providerurl, $regex ) = $data; // Turn the asterisk-type provider URLs into regex. if ( ! $regex ) { $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; $matchmask = preg_replace( '|^#http\\\://|', '#https?\://', $matchmask ); } if ( preg_match( $matchmask, $url ) ) { $provider = str_replace( '{format}', 'json', $providerurl ); // JSON is easier to deal with than XML. break; } } if ( ! $provider && $args['discover'] ) { $provider = $this->discover( $url ); } return $provider; } /** * Adds an oEmbed provider. * * The provider is added just-in-time when wp_oembed_add_provider() is called before * the {@see 'plugins_loaded'} hook. * * The just-in-time addition is for the benefit of the {@see 'oembed_providers'} filter. * * @since 4.0.0 * * @see wp_oembed_add_provider() * * @param string $format Format of URL that this provider can handle. You can use * asterisks as wildcards. * @param string $provider The URL to the oEmbed provider.. * @param bool $regex Optional. Whether the $format parameter is in a regex format. * Default false. */ public static function _add_provider_early( $format, $provider, $regex = false ) { if ( empty( self::$early_providers['add'] ) ) { self::$early_providers['add'] = array(); } self::$early_providers['add'][ $format ] = array( $provider, $regex ); } /** * Removes an oEmbed provider. * * The provider is removed just-in-time when wp_oembed_remove_provider() is called before * the {@see 'plugins_loaded'} hook. * * The just-in-time removal is for the benefit of the {@see 'oembed_providers'} filter. * * @since 4.0.0 * * @see wp_oembed_remove_provider() * * @param string $format The format of URL that this provider can handle. You can use * asterisks as wildcards. */ public static function _remove_provider_early( $format ) { if ( empty( self::$early_providers['remove'] ) ) { self::$early_providers['remove'] = array(); } self::$early_providers['remove'][] = $format; } /** * Takes a URL and attempts to return the oEmbed data. * * @see WP_oEmbed::fetch() * * @since 4.8.0 * * @param string $url The URL to the content that should be attempted to be embedded. * @param string|array $args Optional. Additional arguments for retrieving embed HTML. * See wp_oembed_get() for accepted arguments. Default empty. * @return object|false The result in the form of an object on success, false on failure. */ public function get_data( $url, $args = '' ) { $args = wp_parse_args( $args ); $provider = $this->get_provider( $url, $args ); if ( ! $provider ) { return false; } $data = $this->fetch( $provider, $url, $args ); if ( false === $data ) { return false; } return $data; } /** * The do-it-all function that takes a URL and attempts to return the HTML. * * @see WP_oEmbed::fetch() * @see WP_oEmbed::data2html() * * @since 2.9.0 * * @param string $url The URL to the content that should be attempted to be embedded. * @param string|array $args Optional. Additional arguments for retrieving embed HTML. * See wp_oembed_get() for accepted arguments. Default empty. * @return string|false The UNSANITIZED (and potentially unsafe) HTML that should be used to embed * on success, false on failure. */ public function get_html( $url, $args = '' ) { /** * Filters the oEmbed result before any HTTP requests are made. * * This allows one to short-circuit the default logic, perhaps by * replacing it with a routine that is more optimal for your setup. * * Returning a non-null value from the filter will effectively short-circuit retrieval * and return the passed value instead. * * @since 4.5.3 * * @param null|string $result The UNSANITIZED (and potentially unsafe) HTML that should be used to embed. * Default null to continue retrieving the result. * @param string $url The URL to the content that should be attempted to be embedded. * @param string|array $args Optional. Additional arguments for retrieving embed HTML. * See wp_oembed_get() for accepted arguments. Default empty. */ $pre = apply_filters( 'pre_oembed_result', null, $url, $args ); if ( null !== $pre ) { return $pre; } $data = $this->get_data( $url, $args ); if ( false === $data ) { return false; } /** * Filters the HTML returned by the oEmbed provider. * * @since 2.9.0 * * @param string|false $data The returned oEmbed HTML (false if unsafe). * @param string $url URL of the content to be embedded. * @param string|array $args Optional. Additional arguments for retrieving embed HTML. * See wp_oembed_get() for accepted arguments. Default empty. */ return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args ); } /** * Attempts to discover link tags at the given URL for an oEmbed provider. * * @since 2.9.0 * * @param string $url The URL that should be inspected for discovery `` tags. * @return string|false The oEmbed provider URL on success, false on failure. */ public function discover( $url ) { $providers = array(); $args = array( 'limit_response_size' => 153600, // 150 KB ); /** * Filters oEmbed remote get arguments. * * @since 4.0.0 * * @see WP_Http::request() * * @param array $args oEmbed remote get arguments. * @param string $url URL to be inspected. */ $args = apply_filters( 'oembed_remote_get_args', $args, $url ); // Fetch URL content. $request = wp_safe_remote_get( $url, $args ); $html = wp_remote_retrieve_body( $request ); if ( $html ) { /** * Filters the link types that contain oEmbed provider URLs. * * @since 2.9.0 * * @param string[] $format Array of oEmbed link types. Accepts 'application/json+oembed', * 'text/xml+oembed', and 'application/xml+oembed' (incorrect, * used by at least Vimeo). */ $linktypes = apply_filters( 'oembed_linktypes', array( 'application/json+oembed' => 'json', 'text/xml+oembed' => 'xml', 'application/xml+oembed' => 'xml', ) ); // Strip . $html_head_end = stripos( $html, '' ); if ( $html_head_end ) { $html = substr( $html, 0, $html_head_end ); } // Do a quick check. $tagfound = false; foreach ( $linktypes as $linktype => $format ) { if ( stripos( $html, $linktype ) ) { $tagfound = true; break; } } if ( $tagfound && preg_match_all( '#]+)/?>#iU', $html, $links ) ) { foreach ( $links[1] as $link ) { $atts = shortcode_parse_atts( $link ); if ( ! empty( $atts['type'] ) && ! empty( $linktypes[ $atts['type'] ] ) && ! empty( $atts['href'] ) ) { $providers[ $linktypes[ $atts['type'] ] ] = htmlspecialchars_decode( $atts['href'] ); // Stop here if it's JSON (that's all we need). if ( 'json' === $linktypes[ $atts['type'] ] ) { break; } } } } } // JSON is preferred to XML. if ( ! empty( $providers['json'] ) ) { return $providers['json']; } elseif ( ! empty( $providers['xml'] ) ) { return $providers['xml']; } else { return false; } } /** * Connects to an oEmbed provider and returns the result. * * @since 2.9.0 * * @param string $provider The URL to the oEmbed provider. * @param string $url The URL to the content that is desired to be embedded. * @param string|array $args Optional. Additional arguments for retrieving embed HTML. * See wp_oembed_get() for accepted arguments. Default empty. * @return object|false The result in the form of an object on success, false on failure. */ public function fetch( $provider, $url, $args = '' ) { $args = wp_parse_args( $args, wp_embed_defaults( $url ) ); $provider = add_query_arg( 'maxwidth', (int) $args['width'], $provider ); $provider = add_query_arg( 'maxheight', (int) $args['height'], $provider ); $provider = add_query_arg( 'url', urlencode( $url ), $provider ); $provider = add_query_arg( 'dnt', 1, $provider ); /** * Filters the oEmbed URL to be fetched. * * @since 2.9.0 * @since 4.9.0 The `dnt` (Do Not Track) query parameter was added to all oEmbed provider URLs. * * @param string $provider URL of the oEmbed provider. * @param string $url URL of the content to be embedded. * @param array $args Optional. Additional arguments for retrieving embed HTML. * See wp_oembed_get() for accepted arguments. Default empty. */ $provider = apply_filters( 'oembed_fetch_url', $provider, $url, $args ); foreach ( array( 'json', 'xml' ) as $format ) { $result = $this->_fetch_with_format( $provider, $format ); if ( is_wp_error( $result ) && 'not-implemented' === $result->get_error_code() ) { continue; } return ( $result && ! is_wp_error( $result ) ) ? $result : false; } return false; } /** * Fetches result from an oEmbed provider for a specific format and complete provider URL * * @since 3.0.0 * * @param string $provider_url_with_args URL to the provider with full arguments list (url, maxheight, etc.) * @param string $format Format to use. * @return object|false|WP_Error The result in the form of an object on success, false on failure. */ private function _fetch_with_format( $provider_url_with_args, $format ) { $provider_url_with_args = add_query_arg( 'format', $format, $provider_url_with_args ); /** This filter is documented in wp-includes/class-wp-oembed.php */ $args = apply_filters( 'oembed_remote_get_args', array(), $provider_url_with_args ); $response = wp_safe_remote_get( $provider_url_with_args, $args ); if ( 501 === wp_remote_retrieve_response_code( $response ) ) { return new WP_Error( 'not-implemented' ); } $body = wp_remote_retrieve_body( $response ); if ( ! $body ) { return false; } $parse_method = "_parse_$format"; return $this->$parse_method( $body ); } /** * Parses a json response body. * * @since 3.0.0 * * @param string $response_body * @return object|false */ private function _parse_json( $response_body ) { $data = json_decode( trim( $response_body ) ); return ( $data && is_object( $data ) ) ? $data : false; } /** * Parses an XML response body. * * @since 3.0.0 * * @param string $response_body * @return object|false */ private function _parse_xml( $response_body ) { if ( ! function_exists( 'libxml_disable_entity_loader' ) ) { return false; } if ( PHP_VERSION_ID < 80000 ) { /* * This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading * is disabled by default, so this function is no longer needed to protect against XXE attacks. */ $loader = libxml_disable_entity_loader( true ); } $errors = libxml_use_internal_errors( true ); $return = $this->_parse_xml_body( $response_body ); libxml_use_internal_errors( $errors ); if ( PHP_VERSION_ID < 80000 && isset( $loader ) ) { // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.libxml_disable_entity_loaderDeprecated libxml_disable_entity_loader( $loader ); } return $return; } /** * Serves as a helper function for parsing an XML response body. * * @since 3.6.0 * * @param string $response_body * @return stdClass|false */ private function _parse_xml_body( $response_body ) { if ( ! function_exists( 'simplexml_import_dom' ) || ! class_exists( 'DOMDocument', false ) ) { return false; } $dom = new DOMDocument(); $success = $dom->loadXML( $response_body ); if ( ! $success ) { return false; } if ( isset( $dom->doctype ) ) { return false; } foreach ( $dom->childNodes as $child ) { if ( XML_DOCUMENT_TYPE_NODE === $child->nodeType ) { return false; } } $xml = simplexml_import_dom( $dom ); if ( ! $xml ) { return false; } $return = new stdClass(); foreach ( $xml as $key => $value ) { $return->$key = (string) $value; } return $return; } /** * Converts a data object from WP_oEmbed::fetch() and returns the HTML. * * @since 2.9.0 * * @param object $data A data object result from an oEmbed provider. * @param string $url The URL to the content that is desired to be embedded. * @return string|false The HTML needed to embed on success, false on failure. */ public function data2html( $data, $url ) { if ( ! is_object( $data ) || empty( $data->type ) ) { return false; } $return = false; switch ( $data->type ) { case 'photo': if ( empty( $data->url ) || empty( $data->width ) || empty( $data->height ) ) { break; } if ( ! is_string( $data->url ) || ! is_numeric( $data->width ) || ! is_numeric( $data->height ) ) { break; } $title = ! empty( $data->title ) && is_string( $data->title ) ? $data->title : ''; $return = '' . esc_attr( $title ) . ''; break; case 'video': case 'rich': if ( ! empty( $data->html ) && is_string( $data->html ) ) { $return = $data->html; } break; case 'link': if ( ! empty( $data->title ) && is_string( $data->title ) ) { $return = '' . esc_html( $data->title ) . ''; } break; default: $return = false; } /** * Filters the returned oEmbed HTML. * * Use this filter to add support for custom data types, or to filter the result. * * @since 2.9.0 * * @param string|false $return The returned oEmbed HTML, or false on failure. * @param object $data A data object result from an oEmbed provider. * @param string $url The URL of the content to be embedded. */ return apply_filters( 'oembed_dataparse', $return, $data, $url ); } /** * Strips any new lines from the HTML. * * @since 2.9.0 as strip_scribd_newlines() * @since 3.0.0 * * @param string|false $html Existing HTML. * @param object $data Data object from WP_oEmbed::data2html() * @param string $url The original URL passed to oEmbed. * @return string|false Possibly modified $html. */ public function _strip_newlines( $html, $data, $url ) { if ( ! str_contains( $html, "\n" ) ) { return $html; } $count = 1; $found = array(); $token = '__PRE__'; $search = array( "\t", "\n", "\r", ' ' ); $replace = array( '__TAB__', '__NL__', '__CR__', '__SPACE__' ); $tokenized = str_replace( $search, $replace, $html ); preg_match_all( '#(]*>.+?)#i', $tokenized, $matches, PREG_SET_ORDER ); foreach ( $matches as $i => $match ) { $tag_html = str_replace( $replace, $search, $match[0] ); $tag_token = $token . $i; $found[ $tag_token ] = $tag_html; $html = str_replace( $tag_html, $tag_token, $html, $count ); } $replaced = str_replace( $replace, $search, $html ); $stripped = str_replace( array( "\r\n", "\n" ), '', $replaced ); $pre = array_values( $found ); $tokens = array_keys( $found ); return str_replace( $tokens, $pre, $stripped ); } } OST ) !== $host ) { continue; } // Check if the URL isn't a DATA-URI. if ( false !== strpos( $image_url, 'data:image' ) ) { continue; } $html = str_replace( $images_match[0][ $k ], /** * Filter the image HTML output with the CDN link * * @since 2.5.5 * * @param array $html Output that will be printed. */ apply_filters( 'rocket_cdn_images_html', sprintf( '', trim( $images_match[1][ $k ] ), 'src=' . $images_match[2][ $k ] . get_rocket_cdn_url( $image_url, $zone ) . $images_match[4][ $k ], trim( $images_match[5][ $k ] ) ) ), $html ); } } return $html; } /** * Replace URL by CDN of all inline styles containing url() * * @since 2.9 * @deprecated 3.4 * @author Remy Perona * * @param string $html HTML content of the page. * @return string modified HTML content */ function rocket_cdn_inline_styles( $html ) { _deprecated_function( __FUNCTION__ . '()', '3.4' ); if ( is_preview() || empty( $html ) || defined( 'DONOTROCKETOPTIMIZE' ) && DONOTROCKETOPTIMIZE ) { return $html; } $zone = array( 'all', 'images', ); $cnames = get_rocket_cdn_cnames( $zone ); if ( $cnames ) { preg_match_all( '/url\((?![\'\"]?data)[\"\']?([^\)\"\']+)[\"\']?\)/i', $html, $matches ); if ( (bool) $matches ) { foreach ( $matches[1] as $k => $url ) { $url = str_replace( array( ' ', '\t', '\n', '\r', '\0', '\x0B', '"', "'", '"', ''' ), '', $url ); if ( '#' === substr( $url, 0, 1 ) ) { continue; } $url = get_rocket_cdn_url( $url, $zone ); $property = str_replace( $matches[1][ $k ], $url, $matches[0][ $k ] ); $html = str_replace( $matches[0][ $k ], $property, $html ); } } } return $html; } /** * Replace URL by CDN for custom files * * @since 2.9 * @deprecated 3.4 * @author Remy Perona * * @param string $html HTML content of the page. * @return string modified HTML content */ function rocket_cdn_custom_files( $html ) { _deprecated_function( __FUNCTION__ . '()', '3.4' ); if ( is_preview() || empty( $html ) || defined( 'DONOTROCKETOPTIMIZE' ) && DONOTROCKETOPTIMIZE ) { return $html; } $image_types = [ 'jpg', 'jpeg', 'jpe', 'png', 'gif', 'webp', 'bmp', 'tiff', ]; $other_types = [ 'mp3', 'ogg', 'mp4', 'm4v', 'avi', 'mov', 'flv', 'swf', 'webm', 'pdf', 'doc', 'docx', 'txt', 'zip', 'tar', 'bz2', 'tgz', 'rar', ]; $zones = array_filter( array_unique( get_rocket_option( 'cdn_zone', [] ) ) ); if ( empty( $zones ) ) { return $html; } if ( ! in_array( 'all', $zones, true ) && ! in_array( 'images', $zones, true ) ) { return $html; } $cdn_zones = []; $file_types = []; if ( in_array( 'images', $zones, true ) ) { $cdn_zones[] = 'images'; $file_types = array_merge( $file_types, $image_types ); } if ( in_array( 'all', $zones, true ) ) { $cdn_zones[] = 'all'; $file_types = array_merge( $file_types, $image_types, $other_types ); } $cnames = get_rocket_cdn_cnames( $cdn_zones ); if ( empty( $cnames ) ) { return $html; } /** * Filters the filetypes allowed for the CDN * * @since 2.9 * @author Remy Perona * * @param array $filetypes Array of file types. */ $file_types = apply_filters( 'rocket_cdn_custom_filetypes', $file_types ); $file_types = implode( '|', $file_types ); preg_match_all( '#]+?href=[\'"]?([^"\'>]+\.(?:' . $file_types . '))[\'"]?[^>]*>#i', $html, $matches ); if ( ! (bool) $matches ) { return $html; } foreach ( $matches[1] as $key => $url ) { $url = trim( $url, " \t\n\r\0\x0B\"'" ); $url = get_rocket_cdn_url( $url, $cdn_zones ); $src = str_replace( $matches[1][ $key ], $url, $matches[0][ $key ] ); $html = str_replace( $matches[0][ $key ], $src, $html ); } return $html; } /** * Replace URL by CDN of all scripts and styles enqueues with WordPress functions * * @since 2.9 Only add protocol if $src is an absolute url * @since 2.1 * @deprecated 3.4 * * @param string $src URL of the file. * @return string modified URL */ function rocket_cdn_enqueue( $src ) { _deprecated_function( __FUNCTION__ . '()', '3.4' ); // Don't use CDN if in admin, in login page, in register page or in a post preview. if ( is_admin() || is_preview() || in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ), true ) || defined( 'DONOTROCKETOPTIMIZE' ) && DONOTROCKETOPTIMIZE ) { return $src; } if ( rocket_extract_url_component( $src, PHP_URL_HOST ) !== '' ) { $src = rocket_add_url_protocol( $src ); } $zone = array( 'all', 'css_and_js' ); // Add only CSS zone. if ( 'style_loader_src' === current_filter() ) { $zone[] = 'css'; } // Add only JS zone. if ( 'script_loader_src' === current_filter() ) { $zone[] = 'js'; } $cnames = get_rocket_cdn_cnames( $zone ); if ( $cnames ) { // Check if the path isn't empty. if ( trim( rocket_extract_url_component( $src, PHP_URL_PATH ), '/' ) !== '' ) { $src = get_rocket_cdn_url( $src, $zone ); } } return $src; } /** * Get all files we don't allow to get in CDN. * * @since 2.5 * @deprecated 3.4 * * @return string A pipe-separated list of rejected files. */ function get_rocket_cdn_reject_files() { _deprecated_function( __FUNCTION__ . '()', '3.4', '\WP_Rocket\Subscriber\CDN\CDN::get_excluded_files()' ); $files = get_rocket_option( 'cdn_reject_files', [] ); /** * Filter the rejected files. * * @since 2.5 * * @param array $files List of rejected files. */ $files = (array) apply_filters( 'rocket_cdn_reject_files', $files ); $files = array_filter( $files ); $files = array_flip( array_flip( $files ) ); return implode( '|', $files ); } /** * Conflict with Envira Gallery: changes the URL argument if using WP Rocket CDN and Envira * * @since 2.6.5 * @since 3.4 * * @param array $args An array of arguments. * @return array Updated array of arguments */ function rocket_cdn_resize_image_args_on_envira_gallery( $args ) { _deprecated_function( __FUNCTION__ . '()', '3.4' ); if ( ! isset( $args['url'] ) || (int) get_rocket_option( 'cdn' ) === 0 ) { return $args; } $cnames_host = array_flip( get_rocket_cnames_host() ); $url_host = rocket_extract_url_component( $args['url'], PHP_URL_HOST ); $home_host = rocket_extract_url_component( home_url(), PHP_URL_HOST ); if ( isset( $cnames_host[ $url_host ] ) ) { $args['url'] = str_replace( $url_host, $home_host , $args['url'] ); } return $args; } /** * Conflict with Envira Gallery: changes the resized URL if using WP Rocket CDN and Envira * * @since 2.6.5 * @since 3.4 * * @param string $url Resized image URL. * @return string Resized image URL using the CDN URL */ function rocket_cdn_resized_url_on_envira_gallery( $url ) { _deprecated_function( __FUNCTION__ . '()', '3.4' ); if ( (int) get_rocket_option( 'cdn' ) === 0 ) { return $url; } $url = get_rocket_cdn_url( $url, array( 'all', 'images' ) ); return $url; } /** * Apply CDN settings to Beaver Builder parallax. * * @since 3.2.1 * @deprecated 3.4 * @author Grégory Viguier * * @param array $attrs HTML attributes. * @return array */ function rocket_beaver_builder_add_cdn_to_parallax( $attrs ) { _deprecated_function( __FUNCTION__ . '()', '3.4' ); if ( ! empty( $attrs['data-parallax-image'] ) ) { $attrs['data-parallax-image'] = get_rocket_cdn_url( $attrs['data-parallax-image'], [ 'all', 'images' ] ); } return $attrs; } if ( class_exists( 'WR2X_Admin' ) ) : /** * Conflict with WP Retina x2: Apply CDN on srcset attribute. * * @since 2.9.1 Use global $wr2x_admin * @since 2.5.5 * @deprecated 3.4 * * @param string $url URL of the image. * @return string Updated URL with CDN */ function rocket_cdn_on_images_from_wp_retina_x2( $url ) { _deprecated_function( __FUNCTION__ . '()', '3.4' ); global $wr2x_admin; if ( ! method_exists( $wr2x_admin, 'is_pro' ) || ! $wr2x_admin->is_pro() ) { return $url; } $cdn_domain = get_option( 'wr2x_cdn_domain' ); if ( ! empty( $cdn_domain ) ) { return $url; } return get_rocket_cdn_url( $url, array( 'all', 'images' ) ); } endif; /** * Conflict with Avada theme and WP Rocket CDN * * @since 2.6.1 * @deprecated 3.4 * * @param array $vars An array of variables. * @param string $handle Name of the avada resource. * @return array updated array of variables */ function rocket_fix_cdn_for_avada_theme( $vars, $handle ) { _deprecated_function( __FUNCTION__ . '()', '3.4' ); if ( 'avada-dynamic' === $handle && get_rocket_option( 'cdn' ) ) { $src = get_rocket_cdn_url( get_template_directory_uri() . '/assets/less/theme/dynamic.less' ); $vars['template-directory'] = sprintf( '~"%s"', dirname( dirname( dirname( dirname( $src ) ) ) ) ); $vars['lessurl'] = sprintf( '~"%s"', dirname( $src ) ); } return $vars; } /** * Conflict with Aqua Resizer & IrishMiss Framework: Apply CDN without blank src!! * * @since 2.5.8 Add compatibility with IrishMiss Framework * @since 2.5.5 * @deprecated 3.4 */ function rocket_cdn_on_aqua_resizer() { _deprecated_function( __FUNCTION__ . '()', '3.4' ); if ( function_exists( 'aq_resize' ) || function_exists( 'miss_display_image' ) ) { remove_filter( 'wp_get_attachment_url' , 'rocket_cdn_file', PHP_INT_MAX ); add_filter( 'rocket_lazyload_html', 'rocket_add_cdn_on_custom_attr' ); } } /** * Conflict with Revolution Slider & Master Slider: Apply CDN on data-lazyload|data-src attribute. * * @since 2.5.5 * @deprecated 3.4 */ function rocket_cdn_on_sliders_with_lazyload() { _deprecated_function( __FUNCTION__ . '()', '3.4' ); if ( class_exists( 'RevSliderFront' ) || class_exists( 'Master_Slider' ) ) { add_filter( 'rocket_cdn_images_html', 'rocket_add_cdn_on_custom_attr' ); } } Guide complet du casino en ligne – Tout ce que vous devez savoir

Guide complet du casino en ligne – Tout ce que vous devez savoir

Introduction

Le phénomène des jeux de hasard sur Internet ne montre aucun signe de ralentissement. En France comme à l’étranger, les joueurs affluent chaque jour vers des plateformes qui promettent des graphismes immersifs, des bonus généreux et la possibilité de jouer depuis un smartphone ou un ordinateur portable. Cette popularité s’explique par la commodité d’accéder à des centaines de machines à sous, de tables de roulette ou de parties de poker sans quitter son salon, ainsi que par l’émergence de nouvelles licences qui offrent plus de transparence et de protection aux usagers.

Pour découvrir les meilleures plateformes récentes, consultez notre page du nouveau casino en ligne afin d’obtenir des avis impartiaux et des bonus exclusifs. Basketnews.Net se positionne comme un comparateur indépendant qui teste chaque site selon des critères rigoureux : sécurité, variété de jeux et conditions de bonus.

Dans ce guide nous passerons en revue la législation française, les mesures de sécurité essentielles, les critères pour choisir un site fiable, les différents types de jeux disponibles et les stratégies permettant d’optimiser votre bankroll. Vous apprendrez également à décoder les offres promotionnelles et à sélectionner les méthodes de paiement les plus sûres pour profiter pleinement du casino en ligne nouveau qui s’impose en 2026.

Section 1 – Les bases du casino en ligne

Un casino en ligne est une plateforme numérique où l’on peut miser de l’argent réel sur des jeux électroniques reproduisant l’expérience d’un établissement physique. Contrairement aux salles traditionnelles où le joueur doit se déplacer, le casino virtuel fonctionne grâce à un logiciel générateur de nombres aléatoires (RNG) qui assure l’équité des parties.

L’histoire du secteur débute au milieu des années 1990 avec les premiers sites basés sur le logiciel Microgaming. Rapidement, les opérateurs ont intégré le streaming vidéo pour proposer des tables avec croupier réel, puis ont développé des applications mobiles compatibles iOS et Android. Aujourd’hui, les nouveaux casinos en ligne 2026 offrent une expérience cross‑platform fluide, incluant la réalité augmentée sur certains titres de slots progressifs.

Comprendre la terminologie est indispensable : le RTP (Return to Player) indique le pourcentage moyen que le jeu restitue aux joueurs sur le long terme ; la volatilité mesure la fréquence et l’amplitude des gains ; la mise minimale ou maximale fixe les limites d’entrée pour chaque session. Par exemple, la machine à sous « Starburst » propose un RTP de 96,1 % avec une volatilité moyenne, tandis que « Mega Joker » atteint un RTP de 99 % mais avec une volatilité élevée qui nécessite une bankroll plus importante.

Basketnews.Net recommande toujours aux novices d’analyser ces indicateurs avant de déposer leurs premiers fonds afin d’ajuster leurs attentes et leur gestion du risque.

Section 2 – Choisir un site fiable

La première étape consiste à vérifier que le casino détient une licence officielle délivrée par l’Autorité Nationale des Jeux (ANJ) ou une juridiction reconnue telle que Malta Gaming Authority ou Gibraltar Regulatory Authority. Une licence valide garantit que le site respecte les normes européennes en matière de protection des joueurs et de lutte contre le blanchiment d’argent.

Ensuite, examinez la réputation du site auprès des organismes de régulation et consultez les avis utilisateurs certifiés par Basketnews.Net. Ce dernier agrège plus de 5 000 commentaires vérifiés et attribue une note globale basée sur la transparence financière, la rapidité des retraits et la qualité du support client. Un score supérieur à 8/10 indique généralement un opérateur digne de confiance.

La transparence financière se manifeste par la disponibilité publique d’audits RNG réalisés par des tiers indépendants comme eCOGRA ou iTech Labs. Ces rapports détaillent la distribution aléatoire des résultats et permettent aux joueurs d’assurer qu’aucune manipulation n’est présente dans les algorithmes.

Sur la page « À propos » ou dans la FAQ du site choisi, recherchez des indicateurs tels que :
– La date d’obtention de la licence et son numéro d’enregistrement
– Les partenaires bancaires ou processeurs de paiement utilisés
– Les procédures de vérification KYC clairement expliquées

En suivant ces critères vous réduirez considérablement le risque d’être piégé par un opérateur douteux et vous profiterez pleinement du nouveau paysage du casino en ligne nouveau qui se développe rapidement.

Section 3 – Sécurité & protection des données

Les opérateurs sérieux utilisent le protocole SSL/TLS pour chiffrer toutes les communications entre votre navigateur et leurs serveurs. Ce cryptage empêche toute interception tierce lors du transfert d’informations personnelles ou financières. Un cadenas vert dans la barre d’adresse indique généralement que le certificat est valide et à jour.

Les procédures KYC (Know Your Customer) et AML (Anti‑Money Laundering) sont obligatoires dans l’Union européenne depuis plusieurs années. Elles obligent le joueur à fournir une pièce d’identité officielle ainsi qu’un justificatif de domicile avant tout premier retrait important. Ces exigences protègent non seulement le casino contre la fraude mais aussi le joueur contre l’usurpation d’identité et les transactions illicites. Basketnews.Net souligne que les sites qui simplifient excessivement ces étapes peuvent cacher des pratiques peu scrupuleuses.

Pour renforcer votre propre sécurité :
– Créez un mot‑de‑passe long (au moins 12 caractères) combinant lettres majuscules, minuscules, chiffres et caractères spéciaux
– Activez l’authentification à deux facteurs (2FA) via une application mobile comme Google Authenticator
– Changez régulièrement votre mot‑de‑passe et évitez d’utiliser le même sur plusieurs sites

En appliquant ces bonnes pratiques vous limiterez les risques liés aux cyber‑attaques tout en profitant sereinement du casino en ligne 2026.

Section 4 – Les différents types de jeux proposés

Catégorie Exemples Particularités
Machines à sous Vidéo slots, jackpots progressifs Retour au joueur (%) variable selon le thème
Jeux de table Roulette européenne vs américaine Influence du bordier sur la probabilité
Jeux avec croupier en direct Blackjack Live, Baccarat Live Interaction réelle grâce au streaming HD
Paris sportifs intégrés Pari combiné sur événements majeurs Possibilité d’utiliser les gains instantanément

Les machines à sous restent le pilier du marché ; elles offrent souvent plus de 30 lignes payantes et intègrent des fonctionnalités bonus comme les tours gratuits ou les multiplicateurs jusqu’à x5000 pour un jackpot progressif tel que « Mega Moolah ». En revanche, elles présentent généralement une volatilité élevée qui peut entraîner des séquences longues sans gain significatif.

Les jeux de table comme la roulette européenne affichent un avantage maison (house edge) seulement de 2,7 %, contre 5,26 % pour la version américaine avec double zéro ; cela rend la version européenne plus attractive pour les joueurs cherchant à maximiser leurs chances à long terme.

Les tables avec croupier réel apportent une dimension sociale : on peut discuter via chat live avec le dealer et voir chaque carte distribuée en temps réel grâce au streaming HD ultra‑rapide proposé par plusieurs nouveaux casinos en ligne 2026. Cependant ces jeux exigent souvent une mise minimale plus élevée que leurs versions virtuelles classiques.

Enfin, l’intégration des paris sportifs permet aux joueurs d’utiliser leurs gains immédiats pour placer un pari combiné sur un match footballistique ou un tournoi tennis sans quitter la plateforme principale du casino.

Section 5 – Bonus & promotions : comment en profiter intelligemment

Les offres promotionnelles sont souvent divisées en plusieurs catégories :
– Le bonus bienvenue (« match bonus ») qui double généralement votre premier dépôt jusqu’à 200 € + 50 tours gratuits
– Les free spins offerts chaque semaine sur une sélection de slots populaires comme « Gonzo’s Quest »
– Le cashback quotidien allant jusqu’à 15 % sur vos pertes nettes pendant 30 jours consécutifs
– Les programmes VIP qui attribuent des points échangeables contre des retraits sans frais ou des invitations à des tournois exclusifs

Chaque promotion comporte des exigences de mise (« wagering ») qui indiquent combien vous devez jouer avant de pouvoir retirer vos gains associés au bonus. Par exemple, un bonus 200 € avec un wagering 30x signifie qu’il faut placer 6 000 € (200 × 30) avant toute demande de retrait. Certains sites imposent également un plafond maximal retirable sur le bonus – souvent limité à 500 € – ainsi qu’une date d’expiration courte (7 à 14 jours).

Pour optimiser votre valeur réelle :
1️⃣ Sélectionnez uniquement les offres dont le wagering ne dépasse pas 25x afin de limiter l’exposition financière nécessaire
2️⃣ Privilégiez les jeux dont le RTP est élevé (>96 %) lorsque vous remplissez ces exigences afin d’augmenter vos chances théoriques
3️⃣ Utilisez les programmes VIP dès que possible ; même si vous jouez modestement ils offrent souvent un cashback mensuel garanti qui compense partiellement les pertes éventuelles

Basketnews.Net conseille toujours aux joueurs responsables d’établir un budget dédié aux promotions afin d’éviter toute tentation excessive liée aux exigences élevées.

Section 6 – Méthodes de paiement sécurisées

Aperçu des options populaires en France :

• Cartes bancaires Visa/MasterCard – traitement instantané mais parfois soumis à frais supplémentaires selon l’opérateur du casino
• Portefeuilles électroniques PayPal®, Skrill®, Neteller® – rapidité élevée et anonymat partiel grâce au masquage partiel du numéro bancaire
• Cryptomonnaies Bitcoin / Ethereum – transactions quasi‑instantanées avec limites élevées ; toutefois leur valeur volatile peut impacter vos gains exprimés en euros
• Virements SEPA & prépaiements Paysafecard® – bonne alternative pour ceux qui ne détiennent pas de carte bancaire ; délais variables entre 24 h et trois jours ouvrés

Points essentiels à retenir :

1️⃣ Vérifier que la méthode choisie est prise en charge par le casino sélectionné ; certains sites refusent les crypto‑dépôts pour raisons réglementaires
2️⃣ Prendre connaissance des délais d’encaissement/de retrait associés à chaque mode ; généralement les e‑wallets sont traités sous quelques minutes tandis que les virements SEPA peuvent prendre jusqu’à trois jours ouvrés
3️⃣ Toujours choisir une option offrant une protection antifraude reconnue ; par exemple PayPal® propose une garantie « acheteur protégé » qui couvre les litiges liés aux transactions non autorisées

En suivant ces recommandations vous profiterez pleinement du nouveau paysage financier offert par les casinos en ligne nouveau tout en conservant votre tranquillité d’esprit.

Section 7 – Stratégies gagnantes & gestion bankroll

Le concept fondamental reste simple : ne jamais miser plus que ce que l’on peut se permettre de perdre. Une gestion rigoureuse de votre bankroll vous évite l’épuisement prématuré lors d’une mauvaise série et prolonge votre temps de jeu pour profiter davantage des opportunités offertes par le site choisi.

Parmi les méthodes classiques figurent :
– La méthode Martingale adaptée aux jeux à faible volatilité comme la roulette européenne rouge/noir ; elle consiste à doubler sa mise après chaque perte afin de récupérer toutes les pertes précédentes dès qu’un gain survient (attention toutefois aux limites maximales imposées par le casino)
– Le système Paroli pour capitaliser sur les séries gagnantes sans trop risquer ; il prévoit d’augmenter progressivement sa mise après chaque victoire tout en fixant un plafond (par exemple trois victoires consécutives) puis revenir à la mise initiale

Basketnews.Net recommande également d’utiliser une règle simple dite « 20 % bankroll per session » : ne jamais engager plus d’un cinquième du capital total lors d’une même session afin de limiter l’impact psychologique négatif lié aux pertes importantes. Enfin, gardez toujours un œil sur vos statistiques personnelles via l’historique fourni par le casino ; cela vous aidera à identifier quels jeux offrent réellement le meilleur ROI selon votre style individuel.

Cet article a été rédigé dans une optique informative et responsable.

THU MUA PHẾ LIỆU PHÚC ĐẠT

  • Địa chỉ: 19/1 Lê Trọng Tấn, Quận Tân Phú, Thành phố Hồ Chí Minh
  • Điện thoại: 0973661951
  • Email: phelieubaoanh@gmail.com
  • Hỗ trợ - Tư vấn: 24/7

DMCA.com Protection Status

DANH MỤC THU MUA

NHẬN BÁO GIÁ MỚI

Liên hệ với chúng tôi ngay hôm nay để được báo giá chi tiết đầy đủ nhất.

    .
    Lấy Code