Skip to content

Commit 53ccfc4

Browse files
committed
Rearrenge some codes
1 parent ceb0041 commit 53ccfc4

File tree

5 files changed

+42
-26
lines changed

5 files changed

+42
-26
lines changed

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v1.0.4 -> May 5, 2020
2+
---------------------------
3+
- [new] Load store page language switcher filter support
4+
15
v1.0.3 -> December 03, 2020
26
---------------------------
37
- [fix] Vendor dashboard page all links coming 404 error fixed

dokan-wpml.php

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?php
2-
/*
3-
Plugin Name: Dokan - WPML Integration
4-
Plugin URI: https://wedevs.com/
5-
Description: WPML and Dokan compitable package
6-
Version: 1.0.3
7-
Author: weDevs
8-
Author URI: https://wedevs.com/
9-
Text Domain: dokan-wpml
10-
WC requires at least: 3.0
11-
WC tested up to: 4.7.1
12-
Domain Path: /languages/
13-
License: GPL2
14-
*/
2+
/**
3+
* Plugin Name: Dokan - WPML Integration
4+
* Plugin URI: https://wedevs.com/
5+
* Description: WPML and Dokan compitable package
6+
* Version: 1.0.4
7+
* Author: weDevs
8+
* Author URI: https://wedevs.com/
9+
* Text Domain: dokan-wpml
10+
* WC requires at least: 3.0
11+
* WC tested up to: 5.2.2
12+
* Domain Path: /languages/
13+
* License: GPL2
14+
*/
1515

1616
/**
1717
* Copyright (c) YEAR weDevs (email: [email protected]). All rights reserved.
@@ -414,6 +414,8 @@ public function get_raw_option( $option, $section, $default = '' ) {
414414
* Remove callback links with WPML on vendor dashboard
415415
*
416416
* @since 1.0.3
417+
*
418+
* @return void
417419
*/
418420
public function dokan_wpml_remove_fix_fallback_links() {
419421
if ( function_exists( 'dokan_is_seller_dashboard' ) && ! dokan_is_seller_dashboard() ) {
@@ -428,16 +430,22 @@ public function dokan_wpml_remove_fix_fallback_links() {
428430
}
429431

430432
/**
433+
* Load store page language switcher filter
434+
*
435+
* @since 1.0.4
436+
*
431437
* @param \WP_query $query
432438
* @param array $store_info
439+
*
440+
* @return void
433441
*/
434442
public function load_store_page_language_switcher_filter( $query, $store_info ) {
435443
// This needs to be improved, I am probably missing a smarter way to get the current store URL.
436444
// Perhaps the current store URL could be included in the $store_info (2nd argument).
437445
$custom_store_url = dokan_get_option( 'custom_store_url', 'dokan_general', 'store' );
438-
$store_slug = $query->get( $custom_store_url );
439-
$store_user = get_user_by( 'slug', $store_slug );
440-
$store_url = dokan_get_store_url( $store_user->ID );
446+
$store_slug = $query->get( $custom_store_url );
447+
$store_user = get_user_by( 'slug', $store_slug );
448+
$store_url = dokan_get_store_url( $store_user->ID );
441449

442450
add_filter( 'wpml_ls_language_url', function( $url, $data ) use ( $store_url ) {
443451
return apply_filters( 'wpml_permalink', $store_url, $data['code'] );

languages/dokan-wpml.pot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Copyright (C) 2020 weDevs
1+
# Copyright (C) 2021 weDevs
22
# This file is distributed under the GPL2.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Dokan - WPML Integration 1.0.3\n"
5+
"Project-Id-Version: Dokan - WPML Integration 1.0.4\n"
66
"Report-Msgid-Bugs-To: http://wedevs.com/support/\n"
7-
"POT-Creation-Date: 2020-12-03 09:37:59+00:00\n"
7+
"POT-Creation-Date: 2021-05-06 17:52:09+00:00\n"
88
"MIME-Version: 1.0\n"
99
"Content-Type: text/plain; charset=utf-8\n"
1010
"Content-Transfer-Encoding: 8bit\n"
11-
"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
11+
"PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
1414
"X-Generator: grunt-wp-i18n 0.4.9\n"
1515

16-
#: dokan-wpml.php:119
16+
#: dokan-wpml.php:121
1717
msgid ""
1818
"<b>Dokan - WPML Integration</b> requires %sDokan plugin%s to be installed & "
1919
"activated!"
2020
msgstr ""
2121

22-
#: dokan-wpml.php:125
22+
#: dokan-wpml.php:127
2323
msgid ""
2424
"<b>Dokan - WPML Integration</b> requires %sWPML Multilingual CMS%s to be "
2525
"installed & activated!"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dokan-wpml",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "WPML compatibility for dokan plugin",
55
"author": "weDevs",
66
"license": "GPL",

readme.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Contributors: wedevs, sabbir1991, rafsuntaskin, alamgircsebd
33
Tags: WPML, i18n, l10n, Translation, Dokan
44
Donate link: https://tareq.co/donate
55
Requires at least: 4.7
6-
Tested up to: 5.5.3
6+
Tested up to: 5.7.1
77
WC requires at least: 3.0
8-
WC tested up to: 4.7.1
8+
WC tested up to: 5.2.2
99
Requires PHP: 5.6
10-
Stable tag: 1.0.3
10+
Stable tag: 1.0.4
1111
License: GPL v2
1212
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1313

@@ -52,6 +52,10 @@ nothing here
5252

5353
== Changelog ==
5454

55+
v1.0.4 -> May 5, 2020
56+
---------------------------
57+
- [new] Load store page language switcher filter support
58+
5559
v1.0.3 -> December 03, 2020
5660
---------------------------
5761
- [fix] Vendor dashboard page all links coming 404 error fixed

0 commit comments

Comments
 (0)