Skip to content

Commit

Permalink
Merge branch 'release/1.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
nurul-umbhiya committed Dec 12, 2023
2 parents 9fd9564 + 6865bf2 commit 16ae34f
Show file tree
Hide file tree
Showing 5 changed files with 781 additions and 372 deletions.
22 changes: 20 additions & 2 deletions dokan-wpml.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Plugin Name: Dokan - WPML Integration
* Plugin URI: https://wedevs.com/
* Description: WPML and Dokan compatible package
* Version: 1.0.8
* Version: 1.0.9
* Author: weDevs
* Author URI: https://wedevs.com/
* Text Domain: dokan-wpml
* WC requires at least: 5.5.0
* WC tested up to: 7.7.2
* WC tested up to: 8.2.2
* Domain Path: /languages/
* License: GPL2
*/
Expand Down Expand Up @@ -120,6 +120,7 @@ public function plugins_loaded() {
add_filter( 'dokan_get_navigation_url', [ $this, 'load_translated_url' ], 10, 2 );
add_filter( 'body_class', [ $this, 'add_dashboard_template_class_if_wpml' ], 99 );
add_filter( 'dokan_get_current_page_id', [ $this, 'dokan_set_current_page_id' ] );
add_filter( 'dokan_get_translated_page_id', [ $this, 'dokan_get_translated_page_id' ] );
add_filter( 'dokan_get_dashboard_nav', [ $this, 'replace_dokan_dashboard_nav_key' ] );
add_action( 'wp_head', [ $this, 'dokan_wpml_remove_fix_fallback_links' ] );

Expand Down Expand Up @@ -467,6 +468,23 @@ public function dokan_set_current_page_id( $page_id ) {
return wpml_object_id_filter( $page_id, 'page', true, wpml_get_default_language() );
}

/**
* Dokan get translated page id.
*
* @since 1.0.9
*
* @param int $page_id Page ID to be translated.
*
* @return int
*/
public function dokan_get_translated_page_id( $page_id ) {
if ( ! function_exists( 'wpml_object_id_filter' ) ) {
return $page_id;
}

return wpml_object_id_filter( $page_id, 'page', true, ICL_LANGUAGE_CODE );
}

/**
* Get raw value from database
*
Expand Down
8 changes: 4 additions & 4 deletions languages/dokan-wpml.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GPL2.
msgid ""
msgstr ""
"Project-Id-Version: Dokan - WPML Integration 1.0.8\n"
"Project-Id-Version: Dokan - WPML Integration 1.0.9\n"
"Report-Msgid-Bugs-To: http://wedevs.com/support/\n"
"POT-Creation-Date: 2023-06-08 07:19:39+00:00\n"
"POT-Creation-Date: 2023-12-12 05:23:23+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -13,14 +13,14 @@ msgstr ""
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
"X-Generator: grunt-wp-i18n 1.0.3\n"

#: dokan-wpml.php:178
#: dokan-wpml.php:179
#. translators: %1$s: opening anchor tag, %2$s: closing anchor tag
msgid ""
"<b>Dokan - WPML Integration</b> requires %1$s Dokan plugin %2$s to be "
"installed & activated!"
msgstr ""

#: dokan-wpml.php:184
#: dokan-wpml.php:185
#. translators: %1$s: opening anchor tag, %2$s: closing anchor tag
msgid ""
"<b>Dokan - WPML Integration</b> requires %1$s WPML Multilingual CMS %2$s to "
Expand Down
Loading

0 comments on commit 16ae34f

Please sign in to comment.