Changeset 2772023
- Timestamp:
- 08/18/2022 10:39:37 AM (4 years ago)
- Location:
- easytranslate/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (1 diff)
-
admin/class-easy-translate-post-translation-list.php (modified) (1 diff)
-
admin/class-easy-translate-translation-list.php (modified) (1 diff)
-
easy-translate.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easytranslate/trunk/README.txt
r2771692 r2772023 5 5 Requires at least: 4.7 6 6 Tested up to: 6.0 7 Stable tag: 4. 57 Stable tag: 4.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
easytranslate/trunk/admin/class-easy-translate-post-translation-list.php
r2771692 r2772023 367 367 ); 368 368 $this->update_string_status($a_string_id, self::STATUS_WAITING); 369 $this->update_duplicate_status( 370 $_REQUEST['posts'], 371 array_keys($_REQUEST['target_languages']), 372 self::STATUS_WAITING 373 ); 369 try { 370 $this->update_duplicate_status( 371 $_REQUEST['posts'], 372 array_keys($_REQUEST['target_languages']), 373 self::STATUS_WAITING 374 ); 375 } catch (\Exception $exception) { 376 add_settings_error( 377 '', 378 'translate-error', 379 $exception->getMessage(), 380 'error' 381 ); 382 } 374 383 } 375 384 } -
easytranslate/trunk/admin/class-easy-translate-translation-list.php
r2771692 r2772023 326 326 * @param $post_id 327 327 * @param $lang 328 * @throws Exception 328 329 */ 329 330 protected static function duplicate_post($post_id, $lang) 330 331 { 331 $url = get_site_url() . '/wp-admin/admin-ajax.php'; 332 $args = [ 333 'body' => [ 334 'action' => 'wpml_duplicate_dashboard', 335 'duplicate_post_ids[]' => $post_id, 336 'duplicate_target_languages[]' => $lang, 337 '_icl_nonce' => wp_create_nonce('wpml_duplicate_dashboard_nonce'), 338 ], 339 'headers' => [ 340 'Content-Type' => 'application/x-www-form-urlencoded', 341 'Accept' => 'application/json, text/javascript, */*', 342 ], 343 'cookies' => $_COOKIE, 344 'timeout' => 300, 345 ]; 346 wp_remote_post($url, $args); 332 global $sitepress; 333 334 if ($sitepress->make_duplicate($post_id, $lang) === false) { 335 throw new Exception('Unable to duplicate post'); 336 } 347 337 } 348 338 -
easytranslate/trunk/easy-translate.php
r2771692 r2772023 15 15 * Plugin URI: https://www.easytranslate.com/en/integrations/cms/wordpress-plugin/ 16 16 * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. 17 * Version: 1.7. 217 * Version: 1.7.3 18 18 * Author: EasyTranslate 19 19 * Author URI: https://easytranslate.com … … 34 34 * Rename this for your plugin and update it as you release new versions. 35 35 */ 36 define('EASY_TRANSLATE_VERSION', '1.7. 2');36 define('EASY_TRANSLATE_VERSION', '1.7.3'); 37 37 38 38 /**
Note: See TracChangeset
for help on using the changeset viewer.