Changeset 2941315
- Timestamp:
- 07/21/2023 02:29:55 PM (2 years ago)
- Location:
- nlingual
- Files:
-
- 6 edited
- 17 copied
-
tags/2.9.3 (copied) (copied from nlingual/trunk)
-
tags/2.9.3/includes/class-nlingual-backend.php (copied) (copied from nlingual/trunk/includes/class-nlingual-backend.php) (2 diffs)
-
tags/2.9.3/includes/class-nlingual-frontend.php (copied) (copied from nlingual/trunk/includes/class-nlingual-frontend.php)
-
tags/2.9.3/includes/class-nlingual-localizer.php (copied) (copied from nlingual/trunk/includes/class-nlingual-localizer.php)
-
tags/2.9.3/includes/class-nlingual-manager.php (copied) (copied from nlingual/trunk/includes/class-nlingual-manager.php)
-
tags/2.9.3/includes/class-nlingual-registry.php (copied) (copied from nlingual/trunk/includes/class-nlingual-registry.php)
-
tags/2.9.3/includes/class-nlingual-rewriter.php (copied) (copied from nlingual/trunk/includes/class-nlingual-rewriter.php) (2 diffs)
-
tags/2.9.3/includes/class-nlingual-settings.php (copied) (copied from nlingual/trunk/includes/class-nlingual-settings.php)
-
tags/2.9.3/includes/class-nlingual-synchronizer.php (copied) (copied from nlingual/trunk/includes/class-nlingual-synchronizer.php)
-
tags/2.9.3/includes/class-nlingual-system.php (copied) (copied from nlingual/trunk/includes/class-nlingual-system.php)
-
tags/2.9.3/includes/class-nlingual-translator.php (modified) (1 diff)
-
tags/2.9.3/includes/class-nlingual-url.php (copied) (copied from nlingual/trunk/includes/class-nlingual-url.php)
-
tags/2.9.3/includes/functions-nlingual.php (copied) (copied from nlingual/trunk/includes/functions-nlingual.php)
-
tags/2.9.3/js/admin.js (copied) (copied from nlingual/trunk/js/admin.js)
-
tags/2.9.3/js/admin.min.js (copied) (copied from nlingual/trunk/js/admin.min.js)
-
tags/2.9.3/js/admin.min.js.map (copied) (copied from nlingual/trunk/js/admin.min.js.map)
-
tags/2.9.3/nlingual.php (copied) (copied from nlingual/trunk/nlingual.php) (2 diffs)
-
tags/2.9.3/readme.txt (copied) (copied from nlingual/trunk/readme.txt) (2 diffs)
-
trunk/includes/class-nlingual-backend.php (modified) (2 diffs)
-
trunk/includes/class-nlingual-rewriter.php (modified) (2 diffs)
-
trunk/includes/class-nlingual-translator.php (modified) (1 diff)
-
trunk/nlingual.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nlingual/tags/2.9.3/includes/class-nlingual-backend.php
r2681436 r2941315 1338 1338 * Will redirect to the edit screen for the new translation. 1339 1339 * 1340 * @since 2.9.3 Fix permission check. 1340 1341 * @since 2.9.2 Add permissions check, redirected-by for wp_redirect(). 1341 1342 * @since 2.6.0 … … 1361 1362 // Check permissions, must be able to create posts 1362 1363 $post_type_obj = get_post_type_object( $post->post_type ); 1363 if ( current_user_can( $post_type_obj->create_posts ) ) {1364 if ( ! current_user_can( $post_type_obj->cap->create_posts ) ) { 1364 1365 wp_die( __( 'You are now allowed to create a translation for this post.', 'nlingual' ) ); 1365 1366 } -
nlingual/tags/2.9.3/includes/class-nlingual-rewriter.php
r2681436 r2941315 452 452 elseif ( ( is_tax() || is_tag() || is_category() ) 453 453 && count( $wp_query->tax_query->queries ) == 1 454 && count( $wp_query->tax_query->queries[0]['terms'] ) == 1 ) { 454 && count( $wp_query->tax_query->queries[0]['terms'] ) == 1 455 && is_a( get_queried_object(), 'WP_Term' ) 456 && term_exists( get_queried_object()->term_id, get_queried_object()->taxonomy ) ) { 455 457 $url = get_term_link( get_queried_object() ); 456 458 } … … 548 550 549 551 // Get the translation counterpart 550 $translation_id = self::get_post_translation( $post_id, $language );552 $translation_id = Translator::get_post_translation( $post_id, $language ); 551 553 552 554 // Return the translations permalink -
nlingual/tags/2.9.3/includes/class-nlingual-translator.php
r1963115 r2941315 172 172 $group = array(); 173 173 foreach ( $result as $row ) { 174 $group['language_by_object'][ $row['object_id'] ] = $row['language_id'];175 $group['object_by_language'][ $row['language_id'] ] = $row['object_id'];174 $group['language_by_object'][ $row['object_id'] ] = intval( $row['language_id'] ); 175 $group['object_by_language'][ $row['language_id'] ] = intval( $row['object_id'] ); 176 176 177 177 // Cache the group ID for each object -
nlingual/tags/2.9.3/nlingual.php
r2681436 r2941315 4 4 Plugin URI: https://github.com/dougwollison/nlingual 5 5 Description: Easy to manage Multilingual system, with theme development utilities and post data synchronization. 6 Version: 2.9. 26 Version: 2.9.3 7 7 Author: Doug Wollison 8 8 Author URI: https://dougw.me … … 51 51 * @var string 52 52 */ 53 define( 'NL_PLUGIN_VERSION', '2.9. 2' );53 define( 'NL_PLUGIN_VERSION', '2.9.3' ); 54 54 55 55 /** -
nlingual/tags/2.9.3/readme.txt
r2681436 r2941315 3 3 Tags: multilingual, language, bilingual, translation 4 4 Requires at least: 4.9 5 Tested up to: 5.9.05 Tested up to: 6.2.2 6 6 Requires PHP: 5.6.20 7 Stable tag: 2.9. 27 Stable tag: 2.9.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 80 80 **Details on each release can be found [on the GitHub releases page](https://github.com/dougwollison/nlingual/releases) for this project.** 81 81 82 = 2.9.3 = 83 Permission fixes, type checks, bug fixes. 84 82 85 = 2.9.2 = 83 86 Quality of life improvements, Localizer/Synchronizer/Rewriter fixes, opt-out for accepted language. -
nlingual/trunk/includes/class-nlingual-backend.php
r2681436 r2941315 1338 1338 * Will redirect to the edit screen for the new translation. 1339 1339 * 1340 * @since 2.9.3 Fix permission check. 1340 1341 * @since 2.9.2 Add permissions check, redirected-by for wp_redirect(). 1341 1342 * @since 2.6.0 … … 1361 1362 // Check permissions, must be able to create posts 1362 1363 $post_type_obj = get_post_type_object( $post->post_type ); 1363 if ( current_user_can( $post_type_obj->create_posts ) ) {1364 if ( ! current_user_can( $post_type_obj->cap->create_posts ) ) { 1364 1365 wp_die( __( 'You are now allowed to create a translation for this post.', 'nlingual' ) ); 1365 1366 } -
nlingual/trunk/includes/class-nlingual-rewriter.php
r2681436 r2941315 452 452 elseif ( ( is_tax() || is_tag() || is_category() ) 453 453 && count( $wp_query->tax_query->queries ) == 1 454 && count( $wp_query->tax_query->queries[0]['terms'] ) == 1 ) { 454 && count( $wp_query->tax_query->queries[0]['terms'] ) == 1 455 && is_a( get_queried_object(), 'WP_Term' ) 456 && term_exists( get_queried_object()->term_id, get_queried_object()->taxonomy ) ) { 455 457 $url = get_term_link( get_queried_object() ); 456 458 } … … 548 550 549 551 // Get the translation counterpart 550 $translation_id = self::get_post_translation( $post_id, $language );552 $translation_id = Translator::get_post_translation( $post_id, $language ); 551 553 552 554 // Return the translations permalink -
nlingual/trunk/includes/class-nlingual-translator.php
r1963115 r2941315 172 172 $group = array(); 173 173 foreach ( $result as $row ) { 174 $group['language_by_object'][ $row['object_id'] ] = $row['language_id'];175 $group['object_by_language'][ $row['language_id'] ] = $row['object_id'];174 $group['language_by_object'][ $row['object_id'] ] = intval( $row['language_id'] ); 175 $group['object_by_language'][ $row['language_id'] ] = intval( $row['object_id'] ); 176 176 177 177 // Cache the group ID for each object -
nlingual/trunk/nlingual.php
r2681436 r2941315 4 4 Plugin URI: https://github.com/dougwollison/nlingual 5 5 Description: Easy to manage Multilingual system, with theme development utilities and post data synchronization. 6 Version: 2.9. 26 Version: 2.9.3 7 7 Author: Doug Wollison 8 8 Author URI: https://dougw.me … … 51 51 * @var string 52 52 */ 53 define( 'NL_PLUGIN_VERSION', '2.9. 2' );53 define( 'NL_PLUGIN_VERSION', '2.9.3' ); 54 54 55 55 /** -
nlingual/trunk/readme.txt
r2681436 r2941315 3 3 Tags: multilingual, language, bilingual, translation 4 4 Requires at least: 4.9 5 Tested up to: 5.9.05 Tested up to: 6.2.2 6 6 Requires PHP: 5.6.20 7 Stable tag: 2.9. 27 Stable tag: 2.9.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 80 80 **Details on each release can be found [on the GitHub releases page](https://github.com/dougwollison/nlingual/releases) for this project.** 81 81 82 = 2.9.3 = 83 Permission fixes, type checks, bug fixes. 84 82 85 = 2.9.2 = 83 86 Quality of life improvements, Localizer/Synchronizer/Rewriter fixes, opt-out for accepted language.
Note: See TracChangeset
for help on using the changeset viewer.