Changeset 3425738
- Timestamp:
- 12/23/2025 02:59:55 AM (3 months ago)
- Location:
- linguise
- Files:
-
- 44 edited
- 1 copied
-
tags/2.2.12 (copied) (copied from linguise/trunk)
-
tags/2.2.12/assets/languages.json (modified) (1 diff)
-
tags/2.2.12/linguise.php (modified) (1 diff)
-
tags/2.2.12/readme.txt (modified) (2 diffs)
-
tags/2.2.12/src/Helper.php (modified) (7 diffs)
-
tags/2.2.12/src/admin/Helper.php (modified) (5 diffs)
-
tags/2.2.12/src/admin/menu.php (modified) (3 diffs)
-
tags/2.2.12/src/cache.php (modified) (1 diff)
-
tags/2.2.12/src/constants.php (modified) (1 diff)
-
tags/2.2.12/src/install.php (modified) (4 diffs)
-
tags/2.2.12/src/rest-ajax.php (modified) (7 diffs)
-
tags/2.2.12/src/synchronization-loader.php (modified) (5 diffs)
-
tags/2.2.12/src/thirdparty/ajax-search-lite.php (modified) (1 diff)
-
tags/2.2.12/src/thirdparty/wc/fibosearch.php (modified) (8 diffs)
-
tags/2.2.12/src/thirdparty/wc/gateway-stripe.php (modified) (4 diffs)
-
tags/2.2.12/src/thirdparty/wc/woocommerce.php (modified) (12 diffs)
-
tags/2.2.12/vendor/autoload.php (modified) (1 diff)
-
tags/2.2.12/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/2.2.12/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/2.2.12/vendor/composer/installed.json (modified) (2 diffs)
-
tags/2.2.12/vendor/composer/installed.php (modified) (3 diffs)
-
tags/2.2.12/vendor/linguise/script-php/.version (modified) (1 diff)
-
tags/2.2.12/vendor/linguise/script-php/assets/languages.json (modified) (1 diff)
-
trunk/assets/languages.json (modified) (1 diff)
-
trunk/linguise.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Helper.php (modified) (7 diffs)
-
trunk/src/admin/Helper.php (modified) (5 diffs)
-
trunk/src/admin/menu.php (modified) (3 diffs)
-
trunk/src/cache.php (modified) (1 diff)
-
trunk/src/constants.php (modified) (1 diff)
-
trunk/src/install.php (modified) (4 diffs)
-
trunk/src/rest-ajax.php (modified) (7 diffs)
-
trunk/src/synchronization-loader.php (modified) (5 diffs)
-
trunk/src/thirdparty/ajax-search-lite.php (modified) (1 diff)
-
trunk/src/thirdparty/wc/fibosearch.php (modified) (8 diffs)
-
trunk/src/thirdparty/wc/gateway-stripe.php (modified) (4 diffs)
-
trunk/src/thirdparty/wc/woocommerce.php (modified) (12 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.json (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (3 diffs)
-
trunk/vendor/linguise/script-php/.version (modified) (1 diff)
-
trunk/vendor/linguise/script-php/assets/languages.json (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
linguise/tags/2.2.12/assets/languages.json
r3393999 r3425738 76 76 "rtl": false, 77 77 "wp_code": "bg_BG" 78 }, 79 "my": { 80 "name": "Burmese", 81 "original_name": "မြန်မာဘာသာ", 82 "code": "my", 83 "rtl": false 78 84 }, 79 85 "ca": { -
linguise/tags/2.2.12/linguise.php
r3421512 r3425738 5 5 * Plugin URI: https://www.linguise.com/ 6 6 * Description: Linguise translation plugin 7 * Version:2.2.1 17 * Version:2.2.12 8 8 * Text Domain: linguise 9 9 * Domain Path: /languages -
linguise/tags/2.2.12/readme.txt
r3421512 r3425738 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2.1 16 Stable tag: 2.2.12 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 107 107 108 108 == Changelog == 109 = 2.2.12 = 110 - Fix: Missing flags: Myanmar / Burmese 111 109 112 = 2.2.11 = 110 113 - Feature: Support Cookie Law Info/CookieYes -
linguise/tags/2.2.12/src/Helper.php
r3415968 r3425738 26 26 { 27 27 $admin_url = strtolower(admin_url()); 28 29 if (strpos(home_url(add_query_arg(null, null)), $admin_url) === 0) { 30 if (0 === strpos(strtolower(wp_get_referer()), $admin_url)) { 28 $referrer = strtolower(wp_get_referer()); 29 $current_url = home_url(add_query_arg(null, null)); 30 31 if (strpos($current_url, $admin_url) === 0) { 32 if (0 === strpos($referrer, $admin_url)) { 31 33 return true; 32 34 } else { 33 35 if (function_exists('wp_doing_ajax')) { 34 return !wp_doing_ajax(); 36 return !wp_doing_ajax(); // @codeCoverageIgnore 35 37 } else { 36 return !(defined('DOING_AJAX') && DOING_AJAX );38 return !(defined('DOING_AJAX') && DOING_AJAX); 37 39 } 38 40 } … … 99 101 if (!empty($site_path) && strpos($path, $site_path) === 0) { 100 102 // Remove the site path from the URL 101 $path = substr($path, strlen($site_path)); 103 $path = substr($path, strlen($site_path)); // @codeCoverageIgnore 102 104 } 103 105 … … 192 194 193 195 if (!$linguise_options) { 194 return false; 196 return false; // @codeCoverageIgnore 195 197 } 196 198 … … 214 216 215 217 if (self::localeCompare($lang_key, $locale)) { 216 return $lang_key; 218 return $lang_key; // @codeCoverageIgnore 217 219 } 218 220 } … … 288 290 // Check if LINGUISE_PLUGIN_URL has / at the end 289 291 if (substr(LINGUISE_PLUGIN_URL, -1) === '/') { 290 return LINGUISE_PLUGIN_URL . $path; 292 return LINGUISE_PLUGIN_URL . $path; // @codeCoverageIgnore 291 293 } 292 294 … … 324 326 return null; 325 327 } 326 328 327 329 if (!ctype_xdigit($hex_color)) { 328 330 return null; 329 331 } 330 332 331 333 $r = hexdec(substr($hex_color, 0, 2)); 332 334 $g = hexdec(substr($hex_color, 2, 2)); 333 335 $b = hexdec(substr($hex_color, 4, 2)); 334 336 335 337 return [ 336 338 'r' => $r, … … 384 386 } 385 387 388 // @codeCoverageIgnoreStart 386 389 $keys = array_keys($arrOrObject); 387 390 return implode('', $keys) !== implode(range(0, count($keys) - 1)); 391 // @codeCoverageIgnoreEnd 388 392 } 389 393 -
linguise/tags/2.2.12/src/admin/Helper.php
r3362901 r3425738 27 27 $errors = defined('LINGUISE_TESTING_ERRORS') ? LINGUISE_TESTING_ERRORS : ''; 28 28 } else { 29 // @codeCoverageIgnoreStart 29 30 $errorsFile = LINGUISE_PLUGIN_PATH . DIRECTORY_SEPARATOR. 'vendor' . DIRECTORY_SEPARATOR . 'linguise' . DIRECTORY_SEPARATOR . 'script-php' . DIRECTORY_SEPARATOR . 'errors.php'; 30 31 if (file_exists($errorsFile)) { … … 33 34 $errors = ''; 34 35 } 36 // @codeCoverageIgnoreEnd 35 37 } 36 38 37 39 $errorsList = []; 38 40 if (!preg_match_all('/^\[([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2})\] (?:([0-9]{3}): )?(.*)$/m', $errors, $matches, PREG_SET_ORDER)) { 39 return $errorsList; 41 return $errorsList; // @codeCoverageIgnore 40 42 } 41 43 … … 156 158 return 'Testing (' . $lang_code . ')'; // In testing mode, we return the code as is 157 159 } 160 // @codeCoverageIgnoreStart 158 161 require_once ABSPATH . 'wp-admin/includes/translation-install.php'; 159 162 $translations = wp_get_available_translations(); … … 163 166 164 167 return 'Unknown'; 168 // @codeCoverageIgnoreEnd 165 169 } 166 170 … … 169 173 * 170 174 * @param string $mode The mode to check for multisite 175 * 176 * @codeCoverageIgnore 171 177 * 172 178 * @return array the multisite information -
linguise/tags/2.2.12/src/admin/menu.php
r3079113 r3425738 1 1 <?php 2 2 3 /* Prohibit direct script loading */ 3 4 defined('ABSPATH') || die('No direct script access allowed!'); … … 67 68 <label class="menu-item-title"> 68 69 <input type="checkbox" class="menu-item-checkbox" 69 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-object-id]"70 value="-1"> <?php esc_html_e('Linguise Languages', 'linguise'); ?>70 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-object-id]" 71 value="-1"> <?php esc_html_e('Linguise Languages', 'linguise'); ?> 71 72 </label> 72 73 <input type="hidden" class="menu-item-type" 73 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-type]"74 value="custom">74 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-type]" 75 value="custom"> 75 76 <input type="hidden" class="menu-item-title" 76 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-title]"77 value="<?php esc_html_e('Linguise Languages', 'linguise'); ?>">77 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-title]" 78 value="<?php esc_html_e('Linguise Languages', 'linguise'); ?>"> 78 79 <input type="hidden" class="menu-item-url" 79 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-url]"80 value="#linguise_switcher">80 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-url]" 81 value="#linguise_switcher"> 81 82 </li> 82 83 </ul> … … 85 86 <span class="add-to-menu"> 86 87 <input type="submit" <?php disabled($nav_menu_selected_id, 0); ?> class="button-secondary submit-add-to-menu right" 87 value="<?php esc_attr_e('Add to Menu', 'linguise'); ?>" name="add-post-type-menu-item"88 id="submit-posttype-lang-switch">88 value="<?php esc_attr_e('Add to Menu', 'linguise'); ?>" name="add-post-type-menu-item" 89 id="submit-posttype-lang-switch"> 89 90 <span class="spinner"></span> 90 91 </span> -
linguise/tags/2.2.12/src/cache.php
r3197925 r3425738 11 11 // check user capabilities 12 12 if (!current_user_can('manage_options')) { 13 header('Content-Type: application/json; charset=UTF-8;'); 13 if (!defined('LINGUISE_WP_PLUGIN_TEST_MODE')) { 14 header('Content-Type: application/json; charset=UTF-8;'); 15 } 14 16 echo json_encode(['success' => false]); 15 die(); 17 if (defined('LINGUISE_WP_PLUGIN_TEST_MODE')) { 18 return; 19 } 20 die(); // @codeCoverageIgnore 16 21 } 17 22 -
linguise/tags/2.2.12/src/constants.php
r3421512 r3425738 1 1 <?php 2 2 if (!defined('LINGUISE_SCRIPT_TRANSLATION_VERSION')) { 3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.1 1');3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.12'); 4 4 } 5 5 6 6 if (!defined('LINGUISE_VERSION')) { 7 define('LINGUISE_VERSION', '2.2.1 1');7 define('LINGUISE_VERSION', '2.2.12'); 8 8 } -
linguise/tags/2.2.12/src/install.php
r3335243 r3425738 1 1 <?php 2 2 3 add_action('admin_init', function () { 3 4 $installed_version = get_option('linguise_version', null); … … 9 10 */ 10 11 if (!defined('LINGUISE_SCRIPT_TRANSLATION')) { 11 define('LINGUISE_SCRIPT_TRANSLATION', 1); 12 define('LINGUISE_SCRIPT_TRANSLATION', 1); // @codeCoverageIgnore 12 13 } 13 14 require_once(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'linguise' . DIRECTORY_SEPARATOR . 'script-php' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'Databases' . DIRECTORY_SEPARATOR . 'Mysql.php'); … … 84 85 <script type="text/javascript"> 85 86 jQuery(function($) { 86 $(document).ready(function() { 87 $(document).on('click', '#linguise_admin_notice .notice-dismiss', function(e) { 88 e.preventDefault(); 89 $('#linguise_feedback_notice_dismiss').trigger('click'); 90 return false; 91 }).on('click', '#linguise_feedback_notice_dismiss', function(e) { 92 e.preventDefault(); 93 // Send ajax to dismiss URL 94 $.ajax({ 95 url: $(this).prop('href'), 96 method: 'GET', 97 success: function(data) { 98 $('#linguise_admin_notice').fadeOut('fast', function() { 99 $(this).remove(); 100 }) 101 } 102 }); 103 return false; 87 $(document).ready(function() { 88 $(document) 89 .on('click', '#linguise_admin_notice .notice-dismiss', function(e) { 90 e.preventDefault(); 91 92 $('#linguise_feedback_notice_dismiss').trigger('click'); 93 return false; 94 }) 95 .on('click', '#linguise_feedback_notice_dismiss', function(e) { 96 e.preventDefault(); 97 // Send ajax to dismiss URL 98 $.ajax({ 99 url: $(this).prop('href'), 100 method: 'GET', 101 success: function(data) { 102 $('#linguise_admin_notice').fadeOut('fast', function() { 103 $(this).remove(); 104 }) 105 } 106 }); 107 return false; 108 }); 104 109 }); 105 });106 110 }); 107 111 </script> … … 113 117 // check user capabilities 114 118 if (!current_user_can('manage_options')) { 119 // @codeCoverageIgnoreStart 115 120 header('Content-Type: application/json; charset=UTF-8;'); 116 121 echo json_encode(['success' => false]); 117 122 die(); 123 // @codeCoverageIgnoreEnd 118 124 } 119 125 -
linguise/tags/2.2.12/src/rest-ajax.php
r3397694 r3425738 26 26 { 27 27 if (!defined('LINGUISE_SCRIPT_TRANSLATION')) { 28 define('LINGUISE_SCRIPT_TRANSLATION', 1); 28 define('LINGUISE_SCRIPT_TRANSLATION', 1); // @codeCoverageIgnore 29 29 } 30 30 … … 35 35 $options = linguiseGetOptions(); 36 36 37 // @codeCoverageIgnoreStart 37 38 if (!empty(Configuration::getInstance()->get('debug')) && Configuration::getInstance()->get('debug')) { 38 39 if (is_int(Configuration::getInstance()->get('debug'))) { … … 43 44 Debug::enable($verbosity, Configuration::getInstance()->get('debug_ip')); 44 45 } 46 // @codeCoverageIgnoreEnd 45 47 46 48 $route = $request->get_route(); … … 121 123 list($translated_content, $response_code) = Translation::getInstance()->_translate($ch, $boundary); 122 124 if (PHP_VERSION_ID < 80000) { 125 // @codeCoverageIgnoreStart 123 126 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated,Generic.PHP.DeprecatedFunctions.Deprecated -- Since PHP 8.0+, we guard it here 124 127 curl_close($ch); // Since, PHP 8+ this thing actually does not do anything (deprecated in PHP 8.5) 128 // @codeCoverageIgnoreEnd 125 129 } 126 130 … … 142 146 $reflect_lang = $req_reflect->getProperty('language'); 143 147 if (PHP_VERSION_ID < 80100) { 148 // @codeCoverageIgnoreStart 144 149 // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated -- Since PHP 8.0+, we guard it here 145 150 $reflect_lang->setAccessible(true); // Since PHP 8.1+, this does not do anything anymore 151 // @codeCoverageIgnoreEnd 146 152 } 147 153 // Get the old value first … … 163 169 164 170 register_shutdown_function(function () use ($db_updated) { 171 // @codeCoverageIgnoreStart 165 172 if ($db_updated) { 166 173 Database::getInstance()->close(); 167 174 } 175 // @codeCoverageIgnoreEnd 168 176 }); 169 177 … … 192 200 $tl_json_frag = $translated_fragments['wp-ajax-json'][$woo_prefix]; 193 201 if (empty($tl_json_frag)) { 194 return $response; 202 return $response; // @codeCoverageIgnore 195 203 } 196 204 197 205 $tl_json_frag_list = $tl_json_frag['fragments']; 198 206 if (empty($tl_json_frag_list)) { 199 return $response; 207 return $response; // @codeCoverageIgnore 200 208 } 201 209 -
linguise/tags/2.2.12/src/synchronization-loader.php
r3339453 r3425738 21 21 // We don't need to sync 22 22 if (defined('REST_REQUEST') && REST_REQUEST) { 23 return $original_data; 23 return $original_data; // @codeCoverageIgnore 24 24 } 25 25 … … 36 36 37 37 if (!$result) { 38 Debug::saveError('configuration synchronization to Linguise failed:'. $token); 38 Debug::saveError('configuration synchronization to Linguise failed:'. $token); // @codeCoverageIgnore 39 39 } 40 40 } 41 } catch (Exception $e) { 42 Debug::saveError('configuration synchronization to Linguise failed: ' . $e->getMessage()); 41 } catch (Exception $e) { // @codeCoverageIgnore 42 Debug::saveError('configuration synchronization to Linguise failed: ' . $e->getMessage()); // @codeCoverageIgnore 43 43 } 44 44 … … 53 53 * @return WP_REST_Response 54 54 */ 55 function update_config(WP_REST_Request$request)55 function linguise_synchronize_update_config($request) 56 56 { 57 57 $jwt_token = $request->get_header('X-Linguise-Hash'); … … 75 75 $config = $synchronization->convertparamsToWPOptions($params); 76 76 $merged_config = array_merge($options, $config); 77 } catch (Exception $e) { 78 return new WP_Error('error', $e->getMessage(), array( 'status' => 500 )); 77 } catch (Exception $e) { // @codeCoverageIgnore 78 return new WP_Error('error', $e->getMessage(), array( 'status' => 500 )); // @codeCoverageIgnore 79 79 } 80 80 … … 84 84 } 85 85 86 // @codeCoverageIgnoreStart 86 87 add_action('rest_api_init', function () { 87 88 register_rest_route('linguise/v1', '/sync', array( 88 89 'methods' => 'POST', 89 'callback' => ' update_config',90 'callback' => 'linguise_synchronize_update_config', 90 91 'permission_callback' => '__return_true', 91 92 )); 92 93 }); 94 // @codeCoverageIgnoreEnd -
linguise/tags/2.2.12/src/thirdparty/ajax-search-lite.php
r3317948 r3425738 74 74 * Decides if the Ajax Search Lite – Live Search & Filter integration should be loaded. 75 75 * 76 * @codeCoverageIgnore 77 * 76 78 * @return boolean 77 79 */ -
linguise/tags/2.2.12/src/thirdparty/wc/fibosearch.php
r3349428 r3425738 75 75 * Decides if the integration should be loaded. 76 76 * 77 * @codeCoverageIgnore 78 * 77 79 * @return boolean 78 80 */ … … 84 86 /** 85 87 * Initializes the integration. 88 * 89 * @codeCoverageIgnore 86 90 * 87 91 * @return void … … 97 101 * Unload the integration 98 102 * 103 * @codeCoverageIgnore 104 * 99 105 * @return void 100 106 */ … … 166 172 * @param string $output The HTML output to be translated 167 173 * 174 * @codeCoverageIgnore 175 * 168 176 * @return string The translated HTML output 169 177 */ … … 181 189 // Add extra template to output 182 190 add_filter('linguise_fragment_filters', function ($filters) { 191 // @codeCoverageIgnoreStart 183 192 $filters[] = [ 184 193 'key' => 'value', … … 194 203 195 204 return $filters; 205 // @codeCoverageIgnoreEnd 196 206 }, 15, 1); 197 207 … … 214 224 215 225 if (empty($result)) { 216 return $output; 226 return $output; // @codeCoverageIgnore 217 227 } 218 228 219 229 if (isset($result->redirect)) { 220 230 // Somehow we got this...? 221 return $output; 231 return $output; // @codeCoverageIgnore 222 232 } 223 233 224 234 $translated_fragments = FragmentHandler::intoJSONFragments($result->content); 225 235 if (empty($translated_fragments)) { 226 return $output; 236 return $output; // @codeCoverageIgnore 227 237 } 228 238 229 239 if (!isset($translated_fragments['fibosearch-tmpl'])) { 230 return $output; 240 return $output; // @codeCoverageIgnore 231 241 } 232 242 233 243 if (!isset($translated_fragments['fibosearch-tmpl']['render-output'])) { 234 return $output; 244 return $output; // @codeCoverageIgnore 235 245 } 236 246 237 247 $tl_json_frag = $translated_fragments['fibosearch-tmpl']['render-output']; 238 248 if (empty($tl_json_frag)) { 239 return $output; 249 return $output; // @codeCoverageIgnore 240 250 } 241 251 242 252 $tl_json_frag_list = $tl_json_frag['fragments']; 243 253 if (empty($tl_json_frag_list)) { 244 return $output; 254 return $output; // @codeCoverageIgnore 245 255 } 246 256 … … 250 260 } 251 261 252 return $output; 262 return $output; // @codeCoverageIgnore 253 263 } 254 264 } -
linguise/tags/2.2.12/src/thirdparty/wc/gateway-stripe.php
r3371505 r3425738 52 52 * Decides if the integration should be loaded. 53 53 * 54 * @codeCoverageIgnore 55 * 54 56 * @return boolean 55 57 */ … … 61 63 /** 62 64 * Initializes the integration. 65 * 66 * @codeCoverageIgnore 63 67 * 64 68 * @return void … … 77 81 /** 78 82 * Unload the integration 83 * 84 * @codeCoverageIgnore 79 85 * 80 86 * @return void … … 176 182 177 183 if (!$stripe_code) { 178 return $params; 184 return $params; // @codeCoverageIgnore 179 185 } 180 186 -
linguise/tags/2.2.12/src/thirdparty/wc/woocommerce.php
r3414869 r3425738 230 230 * Determines if the integration should be loaded. 231 231 * 232 * @codeCoverageIgnore 233 * 232 234 * @return boolean 233 235 */ … … 239 241 /** 240 242 * Load the integration 243 * 244 * @codeCoverageIgnore 241 245 * 242 246 * @return void … … 279 283 * Unload the integration 280 284 * 285 * @codeCoverageIgnore 286 * 281 287 * @return void 282 288 */ … … 311 317 * Reload the integration 312 318 * 319 * @codeCoverageIgnore 320 * 313 321 * @return void 314 322 */ … … 323 331 /** 324 332 * Initializes the common hooks required for this integration to work 333 * 334 * @codeCoverageIgnore 325 335 * 326 336 * @return void … … 387 397 if (!empty($site_path) && $site_path !== '/') { 388 398 // Remove the site path from the URL path 389 $url_path = str_replace($site_path, '', $url_path); 399 $url_path = str_replace($site_path, '', $url_path); // @codeCoverageIgnore 390 400 } 391 401 … … 413 423 { 414 424 if (WPHelper::isAdminRequest()) { 415 return; 425 return; // @codeCoverageIgnore 416 426 } 417 427 … … 511 521 */ 512 522 if (is_plugin_active('funnel-builder/funnel-builder.php')) { 513 return add_query_arg('linguise_language', $language_meta, $endpoint); 523 return add_query_arg('linguise_language', $language_meta, $endpoint); // @codeCoverageIgnore 514 524 } 515 525 … … 586 596 * Hook WC reset password, this function will flush the reset password cookie from user browser 587 597 * when reset password is successful and it's in translated pages 598 * 599 * @codeCoverageIgnore 588 600 * 589 601 * @return void … … 627 639 foreach ($data as $class => $fragment) { 628 640 if (!is_string($fragment)) { 629 continue; // Ignore non-string fragments 641 // Ignore non-string fragments 642 continue; // @codeCoverageIgnore 630 643 } 631 644 … … 722 735 return $replaced; 723 736 } 724 return $html; 737 return $html; // @codeCoverageIgnore 725 738 } 726 739 … … 753 766 return $replaced; 754 767 } 755 return $field; 768 return $field; // @codeCoverageIgnore 756 769 } 757 770 -
linguise/tags/2.2.12/vendor/autoload.php
r3402971 r3425738 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 464a2998e9c988ac7d584a14e1604ea8::getLoader();25 return ComposerAutoloaderInit7960a36ebaed5635997fc39c8c154bac::getLoader(); -
linguise/tags/2.2.12/vendor/composer/autoload_real.php
r3402971 r3425738 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 464a2998e9c988ac7d584a14e1604ea85 class ComposerAutoloaderInit7960a36ebaed5635997fc39c8c154bac 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 464a2998e9c988ac7d584a14e1604ea8', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit7960a36ebaed5635997fc39c8c154bac', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 464a2998e9c988ac7d584a14e1604ea8', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit7960a36ebaed5635997fc39c8c154bac', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::getInitializer($loader)); 31 31 32 32 $loader->register(true); 33 33 34 $filesToLoad = \Composer\Autoload\ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::$files;34 $filesToLoad = \Composer\Autoload\ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::$files; 35 35 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 36 36 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
linguise/tags/2.2.12/vendor/composer/autoload_static.php
r3402971 r3425738 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea87 class ComposerStaticInit7960a36ebaed5635997fc39c8c154bac 8 8 { 9 9 public static $files = array ( … … 156 156 { 157 157 return \Closure::bind(function () use ($loader) { 158 $loader->prefixLengthsPsr4 = ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::$prefixLengthsPsr4;159 $loader->prefixDirsPsr4 = ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::$prefixDirsPsr4;160 $loader->classMap = ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::$classMap;158 $loader->prefixLengthsPsr4 = ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::$prefixLengthsPsr4; 159 $loader->prefixDirsPsr4 = ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::$prefixDirsPsr4; 160 $loader->classMap = ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::$classMap; 161 161 162 162 }, null, ClassLoader::class); -
linguise/tags/2.2.12/vendor/composer/installed.json
r3402971 r3425738 57 57 { 58 58 "name": "linguise/script-php", 59 "version": "v1.3.4 3",60 "version_normalized": "1.3.4 3.0",59 "version": "v1.3.44", 60 "version_normalized": "1.3.44.0", 61 61 "source": { 62 62 "type": "git", 63 63 "url": "git@bitbucket.org:linguise/script-php.git", 64 "reference": " 6db57d8b5179ea31f2858d72442862166b8cabe7"64 "reference": "91cf8a78d12fb1c2caf0d01be16cdecfdf9a6641" 65 65 }, 66 66 "require": { … … 75 75 "vlucas/phpdotenv": "^5.6" 76 76 }, 77 "time": "2025-1 1-26T03:08:27+00:00",77 "time": "2025-12-23T02:37:47+00:00", 78 78 "type": "library", 79 79 "installation-source": "source", -
linguise/tags/2.2.12/vendor/composer/installed.php
r3421512 r3425738 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 909daa4146a0768ccbe122b904804fa40902d816',6 'reference' => '58497631af7ca4eddd9b65d01ea20e7544b65ab0', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 'linguise/script-php' => array( 23 'pretty_version' => 'v1.3.4 3',24 'version' => '1.3.4 3.0',25 'reference' => ' 6db57d8b5179ea31f2858d72442862166b8cabe7',23 'pretty_version' => 'v1.3.44', 24 'version' => '1.3.44.0', 25 'reference' => '91cf8a78d12fb1c2caf0d01be16cdecfdf9a6641', 26 26 'type' => 'library', 27 27 'install_path' => __DIR__ . '/../linguise/script-php', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' 909daa4146a0768ccbe122b904804fa40902d816',34 'reference' => '58497631af7ca4eddd9b65d01ea20e7544b65ab0', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../../', -
linguise/tags/2.2.12/vendor/linguise/script-php/.version
r3402971 r3425738 1 1.3.4 31 1.3.44 -
linguise/tags/2.2.12/vendor/linguise/script-php/assets/languages.json
r3393999 r3425738 59 59 "original_name": "Български", 60 60 "code": "bg" 61 }, 62 "my": { 63 "name": "Burmese", 64 "original_name": "မြန်မာဘာသာ", 65 "code": "my" 61 66 }, 62 67 "ca": { -
linguise/trunk/assets/languages.json
r3393999 r3425738 76 76 "rtl": false, 77 77 "wp_code": "bg_BG" 78 }, 79 "my": { 80 "name": "Burmese", 81 "original_name": "မြန်မာဘာသာ", 82 "code": "my", 83 "rtl": false 78 84 }, 79 85 "ca": { -
linguise/trunk/linguise.php
r3421512 r3425738 5 5 * Plugin URI: https://www.linguise.com/ 6 6 * Description: Linguise translation plugin 7 * Version:2.2.1 17 * Version:2.2.12 8 8 * Text Domain: linguise 9 9 * Domain Path: /languages -
linguise/trunk/readme.txt
r3421512 r3425738 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2.1 16 Stable tag: 2.2.12 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 107 107 108 108 == Changelog == 109 = 2.2.12 = 110 - Fix: Missing flags: Myanmar / Burmese 111 109 112 = 2.2.11 = 110 113 - Feature: Support Cookie Law Info/CookieYes -
linguise/trunk/src/Helper.php
r3415968 r3425738 26 26 { 27 27 $admin_url = strtolower(admin_url()); 28 29 if (strpos(home_url(add_query_arg(null, null)), $admin_url) === 0) { 30 if (0 === strpos(strtolower(wp_get_referer()), $admin_url)) { 28 $referrer = strtolower(wp_get_referer()); 29 $current_url = home_url(add_query_arg(null, null)); 30 31 if (strpos($current_url, $admin_url) === 0) { 32 if (0 === strpos($referrer, $admin_url)) { 31 33 return true; 32 34 } else { 33 35 if (function_exists('wp_doing_ajax')) { 34 return !wp_doing_ajax(); 36 return !wp_doing_ajax(); // @codeCoverageIgnore 35 37 } else { 36 return !(defined('DOING_AJAX') && DOING_AJAX );38 return !(defined('DOING_AJAX') && DOING_AJAX); 37 39 } 38 40 } … … 99 101 if (!empty($site_path) && strpos($path, $site_path) === 0) { 100 102 // Remove the site path from the URL 101 $path = substr($path, strlen($site_path)); 103 $path = substr($path, strlen($site_path)); // @codeCoverageIgnore 102 104 } 103 105 … … 192 194 193 195 if (!$linguise_options) { 194 return false; 196 return false; // @codeCoverageIgnore 195 197 } 196 198 … … 214 216 215 217 if (self::localeCompare($lang_key, $locale)) { 216 return $lang_key; 218 return $lang_key; // @codeCoverageIgnore 217 219 } 218 220 } … … 288 290 // Check if LINGUISE_PLUGIN_URL has / at the end 289 291 if (substr(LINGUISE_PLUGIN_URL, -1) === '/') { 290 return LINGUISE_PLUGIN_URL . $path; 292 return LINGUISE_PLUGIN_URL . $path; // @codeCoverageIgnore 291 293 } 292 294 … … 324 326 return null; 325 327 } 326 328 327 329 if (!ctype_xdigit($hex_color)) { 328 330 return null; 329 331 } 330 332 331 333 $r = hexdec(substr($hex_color, 0, 2)); 332 334 $g = hexdec(substr($hex_color, 2, 2)); 333 335 $b = hexdec(substr($hex_color, 4, 2)); 334 336 335 337 return [ 336 338 'r' => $r, … … 384 386 } 385 387 388 // @codeCoverageIgnoreStart 386 389 $keys = array_keys($arrOrObject); 387 390 return implode('', $keys) !== implode(range(0, count($keys) - 1)); 391 // @codeCoverageIgnoreEnd 388 392 } 389 393 -
linguise/trunk/src/admin/Helper.php
r3362901 r3425738 27 27 $errors = defined('LINGUISE_TESTING_ERRORS') ? LINGUISE_TESTING_ERRORS : ''; 28 28 } else { 29 // @codeCoverageIgnoreStart 29 30 $errorsFile = LINGUISE_PLUGIN_PATH . DIRECTORY_SEPARATOR. 'vendor' . DIRECTORY_SEPARATOR . 'linguise' . DIRECTORY_SEPARATOR . 'script-php' . DIRECTORY_SEPARATOR . 'errors.php'; 30 31 if (file_exists($errorsFile)) { … … 33 34 $errors = ''; 34 35 } 36 // @codeCoverageIgnoreEnd 35 37 } 36 38 37 39 $errorsList = []; 38 40 if (!preg_match_all('/^\[([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2})\] (?:([0-9]{3}): )?(.*)$/m', $errors, $matches, PREG_SET_ORDER)) { 39 return $errorsList; 41 return $errorsList; // @codeCoverageIgnore 40 42 } 41 43 … … 156 158 return 'Testing (' . $lang_code . ')'; // In testing mode, we return the code as is 157 159 } 160 // @codeCoverageIgnoreStart 158 161 require_once ABSPATH . 'wp-admin/includes/translation-install.php'; 159 162 $translations = wp_get_available_translations(); … … 163 166 164 167 return 'Unknown'; 168 // @codeCoverageIgnoreEnd 165 169 } 166 170 … … 169 173 * 170 174 * @param string $mode The mode to check for multisite 175 * 176 * @codeCoverageIgnore 171 177 * 172 178 * @return array the multisite information -
linguise/trunk/src/admin/menu.php
r3079113 r3425738 1 1 <?php 2 2 3 /* Prohibit direct script loading */ 3 4 defined('ABSPATH') || die('No direct script access allowed!'); … … 67 68 <label class="menu-item-title"> 68 69 <input type="checkbox" class="menu-item-checkbox" 69 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-object-id]"70 value="-1"> <?php esc_html_e('Linguise Languages', 'linguise'); ?>70 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-object-id]" 71 value="-1"> <?php esc_html_e('Linguise Languages', 'linguise'); ?> 71 72 </label> 72 73 <input type="hidden" class="menu-item-type" 73 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-type]"74 value="custom">74 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-type]" 75 value="custom"> 75 76 <input type="hidden" class="menu-item-title" 76 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-title]"77 value="<?php esc_html_e('Linguise Languages', 'linguise'); ?>">77 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-title]" 78 value="<?php esc_html_e('Linguise Languages', 'linguise'); ?>"> 78 79 <input type="hidden" class="menu-item-url" 79 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-url]"80 value="#linguise_switcher">80 name="menu-item[<?php echo (int)$_nav_menu_placeholder; ?>][menu-item-url]" 81 value="#linguise_switcher"> 81 82 </li> 82 83 </ul> … … 85 86 <span class="add-to-menu"> 86 87 <input type="submit" <?php disabled($nav_menu_selected_id, 0); ?> class="button-secondary submit-add-to-menu right" 87 value="<?php esc_attr_e('Add to Menu', 'linguise'); ?>" name="add-post-type-menu-item"88 id="submit-posttype-lang-switch">88 value="<?php esc_attr_e('Add to Menu', 'linguise'); ?>" name="add-post-type-menu-item" 89 id="submit-posttype-lang-switch"> 89 90 <span class="spinner"></span> 90 91 </span> -
linguise/trunk/src/cache.php
r3197925 r3425738 11 11 // check user capabilities 12 12 if (!current_user_can('manage_options')) { 13 header('Content-Type: application/json; charset=UTF-8;'); 13 if (!defined('LINGUISE_WP_PLUGIN_TEST_MODE')) { 14 header('Content-Type: application/json; charset=UTF-8;'); 15 } 14 16 echo json_encode(['success' => false]); 15 die(); 17 if (defined('LINGUISE_WP_PLUGIN_TEST_MODE')) { 18 return; 19 } 20 die(); // @codeCoverageIgnore 16 21 } 17 22 -
linguise/trunk/src/constants.php
r3421512 r3425738 1 1 <?php 2 2 if (!defined('LINGUISE_SCRIPT_TRANSLATION_VERSION')) { 3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.1 1');3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.12'); 4 4 } 5 5 6 6 if (!defined('LINGUISE_VERSION')) { 7 define('LINGUISE_VERSION', '2.2.1 1');7 define('LINGUISE_VERSION', '2.2.12'); 8 8 } -
linguise/trunk/src/install.php
r3335243 r3425738 1 1 <?php 2 2 3 add_action('admin_init', function () { 3 4 $installed_version = get_option('linguise_version', null); … … 9 10 */ 10 11 if (!defined('LINGUISE_SCRIPT_TRANSLATION')) { 11 define('LINGUISE_SCRIPT_TRANSLATION', 1); 12 define('LINGUISE_SCRIPT_TRANSLATION', 1); // @codeCoverageIgnore 12 13 } 13 14 require_once(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'linguise' . DIRECTORY_SEPARATOR . 'script-php' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'Databases' . DIRECTORY_SEPARATOR . 'Mysql.php'); … … 84 85 <script type="text/javascript"> 85 86 jQuery(function($) { 86 $(document).ready(function() { 87 $(document).on('click', '#linguise_admin_notice .notice-dismiss', function(e) { 88 e.preventDefault(); 89 $('#linguise_feedback_notice_dismiss').trigger('click'); 90 return false; 91 }).on('click', '#linguise_feedback_notice_dismiss', function(e) { 92 e.preventDefault(); 93 // Send ajax to dismiss URL 94 $.ajax({ 95 url: $(this).prop('href'), 96 method: 'GET', 97 success: function(data) { 98 $('#linguise_admin_notice').fadeOut('fast', function() { 99 $(this).remove(); 100 }) 101 } 102 }); 103 return false; 87 $(document).ready(function() { 88 $(document) 89 .on('click', '#linguise_admin_notice .notice-dismiss', function(e) { 90 e.preventDefault(); 91 92 $('#linguise_feedback_notice_dismiss').trigger('click'); 93 return false; 94 }) 95 .on('click', '#linguise_feedback_notice_dismiss', function(e) { 96 e.preventDefault(); 97 // Send ajax to dismiss URL 98 $.ajax({ 99 url: $(this).prop('href'), 100 method: 'GET', 101 success: function(data) { 102 $('#linguise_admin_notice').fadeOut('fast', function() { 103 $(this).remove(); 104 }) 105 } 106 }); 107 return false; 108 }); 104 109 }); 105 });106 110 }); 107 111 </script> … … 113 117 // check user capabilities 114 118 if (!current_user_can('manage_options')) { 119 // @codeCoverageIgnoreStart 115 120 header('Content-Type: application/json; charset=UTF-8;'); 116 121 echo json_encode(['success' => false]); 117 122 die(); 123 // @codeCoverageIgnoreEnd 118 124 } 119 125 -
linguise/trunk/src/rest-ajax.php
r3397694 r3425738 26 26 { 27 27 if (!defined('LINGUISE_SCRIPT_TRANSLATION')) { 28 define('LINGUISE_SCRIPT_TRANSLATION', 1); 28 define('LINGUISE_SCRIPT_TRANSLATION', 1); // @codeCoverageIgnore 29 29 } 30 30 … … 35 35 $options = linguiseGetOptions(); 36 36 37 // @codeCoverageIgnoreStart 37 38 if (!empty(Configuration::getInstance()->get('debug')) && Configuration::getInstance()->get('debug')) { 38 39 if (is_int(Configuration::getInstance()->get('debug'))) { … … 43 44 Debug::enable($verbosity, Configuration::getInstance()->get('debug_ip')); 44 45 } 46 // @codeCoverageIgnoreEnd 45 47 46 48 $route = $request->get_route(); … … 121 123 list($translated_content, $response_code) = Translation::getInstance()->_translate($ch, $boundary); 122 124 if (PHP_VERSION_ID < 80000) { 125 // @codeCoverageIgnoreStart 123 126 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.curl_closeDeprecated,Generic.PHP.DeprecatedFunctions.Deprecated -- Since PHP 8.0+, we guard it here 124 127 curl_close($ch); // Since, PHP 8+ this thing actually does not do anything (deprecated in PHP 8.5) 128 // @codeCoverageIgnoreEnd 125 129 } 126 130 … … 142 146 $reflect_lang = $req_reflect->getProperty('language'); 143 147 if (PHP_VERSION_ID < 80100) { 148 // @codeCoverageIgnoreStart 144 149 // phpcs:ignore Generic.PHP.DeprecatedFunctions.Deprecated -- Since PHP 8.0+, we guard it here 145 150 $reflect_lang->setAccessible(true); // Since PHP 8.1+, this does not do anything anymore 151 // @codeCoverageIgnoreEnd 146 152 } 147 153 // Get the old value first … … 163 169 164 170 register_shutdown_function(function () use ($db_updated) { 171 // @codeCoverageIgnoreStart 165 172 if ($db_updated) { 166 173 Database::getInstance()->close(); 167 174 } 175 // @codeCoverageIgnoreEnd 168 176 }); 169 177 … … 192 200 $tl_json_frag = $translated_fragments['wp-ajax-json'][$woo_prefix]; 193 201 if (empty($tl_json_frag)) { 194 return $response; 202 return $response; // @codeCoverageIgnore 195 203 } 196 204 197 205 $tl_json_frag_list = $tl_json_frag['fragments']; 198 206 if (empty($tl_json_frag_list)) { 199 return $response; 207 return $response; // @codeCoverageIgnore 200 208 } 201 209 -
linguise/trunk/src/synchronization-loader.php
r3339453 r3425738 21 21 // We don't need to sync 22 22 if (defined('REST_REQUEST') && REST_REQUEST) { 23 return $original_data; 23 return $original_data; // @codeCoverageIgnore 24 24 } 25 25 … … 36 36 37 37 if (!$result) { 38 Debug::saveError('configuration synchronization to Linguise failed:'. $token); 38 Debug::saveError('configuration synchronization to Linguise failed:'. $token); // @codeCoverageIgnore 39 39 } 40 40 } 41 } catch (Exception $e) { 42 Debug::saveError('configuration synchronization to Linguise failed: ' . $e->getMessage()); 41 } catch (Exception $e) { // @codeCoverageIgnore 42 Debug::saveError('configuration synchronization to Linguise failed: ' . $e->getMessage()); // @codeCoverageIgnore 43 43 } 44 44 … … 53 53 * @return WP_REST_Response 54 54 */ 55 function update_config(WP_REST_Request$request)55 function linguise_synchronize_update_config($request) 56 56 { 57 57 $jwt_token = $request->get_header('X-Linguise-Hash'); … … 75 75 $config = $synchronization->convertparamsToWPOptions($params); 76 76 $merged_config = array_merge($options, $config); 77 } catch (Exception $e) { 78 return new WP_Error('error', $e->getMessage(), array( 'status' => 500 )); 77 } catch (Exception $e) { // @codeCoverageIgnore 78 return new WP_Error('error', $e->getMessage(), array( 'status' => 500 )); // @codeCoverageIgnore 79 79 } 80 80 … … 84 84 } 85 85 86 // @codeCoverageIgnoreStart 86 87 add_action('rest_api_init', function () { 87 88 register_rest_route('linguise/v1', '/sync', array( 88 89 'methods' => 'POST', 89 'callback' => ' update_config',90 'callback' => 'linguise_synchronize_update_config', 90 91 'permission_callback' => '__return_true', 91 92 )); 92 93 }); 94 // @codeCoverageIgnoreEnd -
linguise/trunk/src/thirdparty/ajax-search-lite.php
r3317948 r3425738 74 74 * Decides if the Ajax Search Lite – Live Search & Filter integration should be loaded. 75 75 * 76 * @codeCoverageIgnore 77 * 76 78 * @return boolean 77 79 */ -
linguise/trunk/src/thirdparty/wc/fibosearch.php
r3349428 r3425738 75 75 * Decides if the integration should be loaded. 76 76 * 77 * @codeCoverageIgnore 78 * 77 79 * @return boolean 78 80 */ … … 84 86 /** 85 87 * Initializes the integration. 88 * 89 * @codeCoverageIgnore 86 90 * 87 91 * @return void … … 97 101 * Unload the integration 98 102 * 103 * @codeCoverageIgnore 104 * 99 105 * @return void 100 106 */ … … 166 172 * @param string $output The HTML output to be translated 167 173 * 174 * @codeCoverageIgnore 175 * 168 176 * @return string The translated HTML output 169 177 */ … … 181 189 // Add extra template to output 182 190 add_filter('linguise_fragment_filters', function ($filters) { 191 // @codeCoverageIgnoreStart 183 192 $filters[] = [ 184 193 'key' => 'value', … … 194 203 195 204 return $filters; 205 // @codeCoverageIgnoreEnd 196 206 }, 15, 1); 197 207 … … 214 224 215 225 if (empty($result)) { 216 return $output; 226 return $output; // @codeCoverageIgnore 217 227 } 218 228 219 229 if (isset($result->redirect)) { 220 230 // Somehow we got this...? 221 return $output; 231 return $output; // @codeCoverageIgnore 222 232 } 223 233 224 234 $translated_fragments = FragmentHandler::intoJSONFragments($result->content); 225 235 if (empty($translated_fragments)) { 226 return $output; 236 return $output; // @codeCoverageIgnore 227 237 } 228 238 229 239 if (!isset($translated_fragments['fibosearch-tmpl'])) { 230 return $output; 240 return $output; // @codeCoverageIgnore 231 241 } 232 242 233 243 if (!isset($translated_fragments['fibosearch-tmpl']['render-output'])) { 234 return $output; 244 return $output; // @codeCoverageIgnore 235 245 } 236 246 237 247 $tl_json_frag = $translated_fragments['fibosearch-tmpl']['render-output']; 238 248 if (empty($tl_json_frag)) { 239 return $output; 249 return $output; // @codeCoverageIgnore 240 250 } 241 251 242 252 $tl_json_frag_list = $tl_json_frag['fragments']; 243 253 if (empty($tl_json_frag_list)) { 244 return $output; 254 return $output; // @codeCoverageIgnore 245 255 } 246 256 … … 250 260 } 251 261 252 return $output; 262 return $output; // @codeCoverageIgnore 253 263 } 254 264 } -
linguise/trunk/src/thirdparty/wc/gateway-stripe.php
r3371505 r3425738 52 52 * Decides if the integration should be loaded. 53 53 * 54 * @codeCoverageIgnore 55 * 54 56 * @return boolean 55 57 */ … … 61 63 /** 62 64 * Initializes the integration. 65 * 66 * @codeCoverageIgnore 63 67 * 64 68 * @return void … … 77 81 /** 78 82 * Unload the integration 83 * 84 * @codeCoverageIgnore 79 85 * 80 86 * @return void … … 176 182 177 183 if (!$stripe_code) { 178 return $params; 184 return $params; // @codeCoverageIgnore 179 185 } 180 186 -
linguise/trunk/src/thirdparty/wc/woocommerce.php
r3414869 r3425738 230 230 * Determines if the integration should be loaded. 231 231 * 232 * @codeCoverageIgnore 233 * 232 234 * @return boolean 233 235 */ … … 239 241 /** 240 242 * Load the integration 243 * 244 * @codeCoverageIgnore 241 245 * 242 246 * @return void … … 279 283 * Unload the integration 280 284 * 285 * @codeCoverageIgnore 286 * 281 287 * @return void 282 288 */ … … 311 317 * Reload the integration 312 318 * 319 * @codeCoverageIgnore 320 * 313 321 * @return void 314 322 */ … … 323 331 /** 324 332 * Initializes the common hooks required for this integration to work 333 * 334 * @codeCoverageIgnore 325 335 * 326 336 * @return void … … 387 397 if (!empty($site_path) && $site_path !== '/') { 388 398 // Remove the site path from the URL path 389 $url_path = str_replace($site_path, '', $url_path); 399 $url_path = str_replace($site_path, '', $url_path); // @codeCoverageIgnore 390 400 } 391 401 … … 413 423 { 414 424 if (WPHelper::isAdminRequest()) { 415 return; 425 return; // @codeCoverageIgnore 416 426 } 417 427 … … 511 521 */ 512 522 if (is_plugin_active('funnel-builder/funnel-builder.php')) { 513 return add_query_arg('linguise_language', $language_meta, $endpoint); 523 return add_query_arg('linguise_language', $language_meta, $endpoint); // @codeCoverageIgnore 514 524 } 515 525 … … 586 596 * Hook WC reset password, this function will flush the reset password cookie from user browser 587 597 * when reset password is successful and it's in translated pages 598 * 599 * @codeCoverageIgnore 588 600 * 589 601 * @return void … … 627 639 foreach ($data as $class => $fragment) { 628 640 if (!is_string($fragment)) { 629 continue; // Ignore non-string fragments 641 // Ignore non-string fragments 642 continue; // @codeCoverageIgnore 630 643 } 631 644 … … 722 735 return $replaced; 723 736 } 724 return $html; 737 return $html; // @codeCoverageIgnore 725 738 } 726 739 … … 753 766 return $replaced; 754 767 } 755 return $field; 768 return $field; // @codeCoverageIgnore 756 769 } 757 770 -
linguise/trunk/vendor/autoload.php
r3402971 r3425738 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 464a2998e9c988ac7d584a14e1604ea8::getLoader();25 return ComposerAutoloaderInit7960a36ebaed5635997fc39c8c154bac::getLoader(); -
linguise/trunk/vendor/composer/autoload_real.php
r3402971 r3425738 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 464a2998e9c988ac7d584a14e1604ea85 class ComposerAutoloaderInit7960a36ebaed5635997fc39c8c154bac 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 464a2998e9c988ac7d584a14e1604ea8', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit7960a36ebaed5635997fc39c8c154bac', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 464a2998e9c988ac7d584a14e1604ea8', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit7960a36ebaed5635997fc39c8c154bac', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::getInitializer($loader)); 31 31 32 32 $loader->register(true); 33 33 34 $filesToLoad = \Composer\Autoload\ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::$files;34 $filesToLoad = \Composer\Autoload\ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::$files; 35 35 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 36 36 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
linguise/trunk/vendor/composer/autoload_static.php
r3402971 r3425738 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea87 class ComposerStaticInit7960a36ebaed5635997fc39c8c154bac 8 8 { 9 9 public static $files = array ( … … 156 156 { 157 157 return \Closure::bind(function () use ($loader) { 158 $loader->prefixLengthsPsr4 = ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::$prefixLengthsPsr4;159 $loader->prefixDirsPsr4 = ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::$prefixDirsPsr4;160 $loader->classMap = ComposerStaticInit 464a2998e9c988ac7d584a14e1604ea8::$classMap;158 $loader->prefixLengthsPsr4 = ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::$prefixLengthsPsr4; 159 $loader->prefixDirsPsr4 = ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::$prefixDirsPsr4; 160 $loader->classMap = ComposerStaticInit7960a36ebaed5635997fc39c8c154bac::$classMap; 161 161 162 162 }, null, ClassLoader::class); -
linguise/trunk/vendor/composer/installed.json
r3402971 r3425738 57 57 { 58 58 "name": "linguise/script-php", 59 "version": "v1.3.4 3",60 "version_normalized": "1.3.4 3.0",59 "version": "v1.3.44", 60 "version_normalized": "1.3.44.0", 61 61 "source": { 62 62 "type": "git", 63 63 "url": "git@bitbucket.org:linguise/script-php.git", 64 "reference": " 6db57d8b5179ea31f2858d72442862166b8cabe7"64 "reference": "91cf8a78d12fb1c2caf0d01be16cdecfdf9a6641" 65 65 }, 66 66 "require": { … … 75 75 "vlucas/phpdotenv": "^5.6" 76 76 }, 77 "time": "2025-1 1-26T03:08:27+00:00",77 "time": "2025-12-23T02:37:47+00:00", 78 78 "type": "library", 79 79 "installation-source": "source", -
linguise/trunk/vendor/composer/installed.php
r3421512 r3425738 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 909daa4146a0768ccbe122b904804fa40902d816',6 'reference' => '58497631af7ca4eddd9b65d01ea20e7544b65ab0', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 'linguise/script-php' => array( 23 'pretty_version' => 'v1.3.4 3',24 'version' => '1.3.4 3.0',25 'reference' => ' 6db57d8b5179ea31f2858d72442862166b8cabe7',23 'pretty_version' => 'v1.3.44', 24 'version' => '1.3.44.0', 25 'reference' => '91cf8a78d12fb1c2caf0d01be16cdecfdf9a6641', 26 26 'type' => 'library', 27 27 'install_path' => __DIR__ . '/../linguise/script-php', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' 909daa4146a0768ccbe122b904804fa40902d816',34 'reference' => '58497631af7ca4eddd9b65d01ea20e7544b65ab0', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../../', -
linguise/trunk/vendor/linguise/script-php/.version
r3402971 r3425738 1 1.3.4 31 1.3.44 -
linguise/trunk/vendor/linguise/script-php/assets/languages.json
r3393999 r3425738 59 59 "original_name": "Български", 60 60 "code": "bg" 61 }, 62 "my": { 63 "name": "Burmese", 64 "original_name": "မြန်မာဘာသာ", 65 "code": "my" 61 66 }, 62 67 "ca": {
Note: See TracChangeset
for help on using the changeset viewer.