| @@ -13,9 +13,9 @@ | ||
| 13 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | 14 | return; |
| 15 | 15 | } |
| 16 | 16 | // Current SDK version and path. |
| 17 | -$themeisle_sdk_version = '3.3.57'; | |
| 17 | +$themeisle_sdk_version = '3.3.44'; | |
| 18 | 18 | $themeisle_sdk_path = dirname( __FILE__ ); |
| 19 | 19 | |
| 20 | 20 | global $themeisle_sdk_max_version; |
| 21 | 21 | global $themeisle_sdk_max_path; |
| @@ -71,87 +71,8 @@ | ||
| 71 | 71 | } |
| 72 | 72 | endif; |
| 73 | 73 | add_action( 'init', 'themeisle_sdk_load_latest' ); |
| 74 | 74 | |
| 75 | -if ( ! function_exists( 'themeisle_sdk_crash_sentinel' ) ) : | |
| 76 | - /** | |
| 77 | - * Early crash sentinel: minimal shutdown-time capture of fatal errors | |
| 78 | - * originating from a registered ThemeIsle product directory. | |
| 79 | - * | |
| 80 | - * Runs only when the full crash reporter module never registered (e.g. the | |
| 81 | - * fatal happened during plugin bootstrap, before the SDK loaded on init). | |
| 82 | - * Stores one raw record locally; the module sanitizes and adopts it on the | |
| 83 | - * next normal load. Never outputs, never exits, fails silently. | |
| 84 | - * | |
| 85 | - * Must stay parseable on PHP 5.4, like the rest of this file. | |
| 86 | - */ | |
| 87 | - function themeisle_sdk_crash_sentinel() { | |
| 88 | - if ( defined( 'THEMEISLE_SDK_CRASH_HANDLER' ) ) { | |
| 89 | - return; | |
| 90 | - } | |
| 91 | - if ( defined( 'WP_SANDBOX_SCRAPING' ) && WP_SANDBOX_SCRAPING ) { | |
| 92 | - return; | |
| 93 | - } | |
| 94 | - if ( ! function_exists( 'apply_filters' ) || ! function_exists( 'get_option' ) || ! function_exists( 'update_option' ) || ! function_exists( 'add_option' ) ) { | |
| 95 | - return; | |
| 96 | - } | |
| 97 | - $error = error_get_last(); | |
| 98 | - if ( empty( $error ) || ! isset( $error['type'] ) || ! in_array( (int) $error['type'], array( E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR ), true ) ) { | |
| 99 | - return; | |
| 100 | - } | |
| 101 | - $error_file = isset( $error['file'] ) ? str_replace( '\\', '/', (string) $error['file'] ) : ''; | |
| 102 | - if ( '' === $error_file ) { | |
| 103 | - return; | |
| 104 | - } | |
| 105 | - $products = apply_filters( 'themeisle_sdk_products', array() ); | |
| 106 | - if ( empty( $products ) || ! is_array( $products ) ) { | |
| 107 | - return; | |
| 108 | - } | |
| 109 | - foreach ( $products as $basefile ) { | |
| 110 | - $product_dir = rtrim( str_replace( '\\', '/', dirname( (string) $basefile ) ), '/' ) . '/'; | |
| 111 | - if ( '/' === $product_dir || 0 !== strpos( $error_file, $product_dir ) ) { | |
| 112 | - continue; | |
| 113 | - } | |
| 114 | - $key = str_replace( '-', '_', strtolower( trim( basename( $product_dir ) ) ) ); | |
| 115 | - $option = $key . '_crash_data'; | |
| 116 | - $data = get_option( $option, array() ); | |
| 117 | - if ( ! is_array( $data ) ) { | |
| 118 | - $data = array(); | |
| 119 | - } | |
| 120 | - if ( ! isset( $data['raw'] ) || ! is_array( $data['raw'] ) ) { | |
| 121 | - $data['raw'] = array(); | |
| 122 | - } | |
| 123 | - if ( count( $data['raw'] ) >= 3 ) { | |
| 124 | - return; | |
| 125 | - } | |
| 126 | - foreach ( $data['raw'] as $record ) { | |
| 127 | - if ( isset( $record['file'] ) && isset( $record['line'] ) && $record['file'] === $error_file && (int) $record['line'] === (int) $error['line'] ) { | |
| 128 | - return; | |
| 129 | - } | |
| 130 | - } | |
| 131 | - $data['raw'][] = array( | |
| 132 | - 'type' => (int) $error['type'], | |
| 133 | - 'message' => substr( isset( $error['message'] ) ? (string) $error['message'] : '', 0, 2000 ), | |
| 134 | - 'file' => $error_file, | |
| 135 | - 'line' => isset( $error['line'] ) ? (int) $error['line'] : 0, | |
| 136 | - 'time' => time(), | |
| 137 | - ); | |
| 138 | - if ( false === get_option( $option, false ) ) { | |
| 139 | - add_option( $option, $data, '', 'no' ); | |
| 140 | - } else { | |
| 141 | - update_option( $option, $data ); | |
| 142 | - } | |
| 143 | - | |
| 144 | - return; | |
| 145 | - } | |
| 146 | - } | |
| 147 | -endif; | |
| 148 | - | |
| 149 | -if ( empty( $GLOBALS['themeisle_sdk_crash_sentinel'] ) ) { | |
| 150 | - $GLOBALS['themeisle_sdk_crash_sentinel'] = true; | |
| 151 | - register_shutdown_function( 'themeisle_sdk_crash_sentinel' ); | |
| 152 | -} | |
| 153 | - | |
| 154 | 75 | if ( ! function_exists( 'tsdk_utmify' ) ) { |
| 155 | 76 | /** |
| 156 | 77 | * Utmify a link. |
| 157 | 78 | * |
| @@ -293,15 +214,8 @@ | ||
| 293 | 214 | function tsdk_translate_link( |
| 294 | 215 | $url, $type = 'path', $available_languages = [ |
| 295 | 216 | 'de_DE' => 'de', |
| 296 | 217 | 'de_DE_formal' => 'de', |
| 297 | - 'es_ES' => 'es', | |
| 298 | - 'fr_FR' => 'fr', | |
| 299 | - 'it_IT' => 'it', | |
| 300 | - 'ja' => 'ja', | |
| 301 | - 'nl_NL' => 'nl', | |
| 302 | - 'nl_NL_formal' => 'nl', | |
| 303 | - 'ro_RO' => 'ro', | |
| 304 | 218 | ] |
| 305 | 219 | ) { |
| 306 | 220 | $language = get_user_locale(); |
| 307 | 221 | if ( ! isset( $available_languages[ $language ] ) ) { |