Skip to content

Commit

Permalink
Merge pull request #272 from transifex/devel
Browse files Browse the repository at this point in the history
Release 1.3.39
  • Loading branch information
foteinigk authored Jun 13, 2024
2 parents bda7257 + 21b6d90 commit a075409
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"

env:
PLUGIN_VERSION: 1.3.38
PLUGIN_VERSION: 1.3.39
WP_PROJECT_TYPE: plugin
WP_VERSION: latest
WP_MULTISITE: 0
Expand Down
6 changes: 6 additions & 0 deletions includes/lib/transifex-live-integration-subdirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ function custom_slug_rewrite_rules_hook() {
foreach ($all_post_types as $post_type) {
$post_type_object = get_post_type_object($post_type);
$slug = $post_type_object->rewrite['slug'];

// Handle archive templates of custom post types
if (!empty($post_type_object->has_archive)) {
$rules['%lang%/' . $post_type_object->has_archive . '?$'] = 'index.php?post_type=' . $post_type . '&lang=$matches[1]';
}

$posts = get_posts(array(
'post_type' => $post_type,
'numberposts' => -1
Expand Down
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ Ex. $updated_content = apply_filters('tx_link', $original_content);
* It is also recommended to use [widgets](https://codex.wordpress.org/Widgets_API) in your theme instead of custom code, since this allows you to make your integration more future proof against incompatibilities with 3rd party modules.

== Changelog ==
= 1.3.39 =
Add subdirectory rewrite rules for archive pages of custom post types

= 1.3.38 =
Fix for hierarchical custom post types
Fix for urls start with en
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: txmatthew, ThemeBoy, brooksx
Tags: transifex, localize, localization, multilingual, international, SEO
Requires at least: 3.5.2
Tested up to: 6.5.3
Stable tag: 1.3.38
Stable tag: 1.3.39
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -78,6 +78,9 @@ Ex. $updated_content = apply_filters('tx_link', $original_content);
It is also recommended to use [widgets](https://codex.wordpress.org/Widgets_API) in your theme instead of custom code, since this allows you to make your integration more future proof against incompatibilities with 3rd party modules.

== Changelog ==
= 1.3.39 =
Add subdirectory rewrite rules for archive pages of custom post types

= 1.3.38 =
Fix for hierarchical custom post types
Fix for urls start with en
Expand Down
6 changes: 3 additions & 3 deletions transifex-live-integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*
* @link https://help.transifex.com/en/articles/6261241-wordpress
* @package TransifexLiveIntegration
* @version 1.3.38
* @version 1.3.39
*
* @wordpress-plugin
* Plugin Name: International SEO by Transifex
* Plugin URI: https://help.transifex.com/en/articles/6261241-wordpress
* Description: Translate your WordPress powered website using Transifex.
* Version: 1.3.38
* Version: 1.3.39
* License: GNU General Public License
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: transifex-live-integration
Expand Down Expand Up @@ -75,7 +75,7 @@
}

define( 'LANG_PARAM', 'lang' );
$version = '1.3.38';
$version = '1.3.39';

require_once( dirname( __FILE__ ) . '/transifex-live-integration-main.php' );
Transifex_Live_Integration::do_plugin( is_admin(), $version );

0 comments on commit a075409

Please sign in to comment.