From 4506c528b2040ff9231fca948cc0bddb4ab346fc Mon Sep 17 00:00:00 2001 From: Sabbir Ahmed Date: Mon, 27 Feb 2017 12:55:20 +0600 Subject: [PATCH] Make pot, format code --- dokan-wpml.php | 21 +++++++++++++-------- languages/dokan-wpml.pot | 2 +- readme.txt | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dokan-wpml.php b/dokan-wpml.php index 942dd21..95d95cb 100755 --- a/dokan-wpml.php +++ b/dokan-wpml.php @@ -57,7 +57,6 @@ class Dokan_WPML { * @uses add_action() */ public function __construct() { - add_action( 'init', array( $this, 'is_dependency_installed' ) ); // Localize our plugin @@ -96,8 +95,9 @@ function is_dependency_installed(){ } } - /* - * print error notice if dependency not active + /** + * Print error notice if dependency not active + * * @since 1.0.0 */ function need_dependency(){ @@ -131,13 +131,12 @@ public function localization_setup() { public function enqueue_scripts() { wp_enqueue_style( 'dokan-wpml-styles', plugins_url( 'assets/css/style.css', __FILE__ ), false, date( 'Ymd' ) ); wp_enqueue_script( 'dokan-wpml-scripts', plugins_url( 'assets/js/script.js', __FILE__ ), array( 'jquery' ), false, true ); - } /** * Redirect seller setup wizerd into translated url * - * @since 1.0 + * @since 1.0.0 * * @return void **/ @@ -149,13 +148,14 @@ public function render_wmpl_home_url( $url ) { /** * Load custom wpml translated page url * + * @since 1.0.0 + * * @param string $url * @param string $name * * @return string */ function load_translated_url( $url, $name ) { - if ( function_exists('wpml_object_id_filter') ) { $page_id = dokan_get_option( 'dashboard', 'dokan_pages' ); @@ -172,12 +172,14 @@ function load_translated_url( $url, $name ) { /** * Filter dokan navigation url for specific language + * + * @since 1.0.0 + * * @param string $language * * @return string [$url] */ function get_dokan_url_for_language( $language ) { - $post_id = dokan_get_option( 'dashboard', 'dokan_pages' ); $lang_post_id = wpml_object_id_filter( $post_id , 'page', true, $language ); @@ -195,6 +197,8 @@ function get_dokan_url_for_language( $language ) { /** * Add Dokan Dashboard body class when change language * + * @since 1.0.0 + * * @param array $classes */ function add_dashboard_template_class_if_wpml( $classes ) { @@ -220,6 +224,8 @@ function add_dashboard_template_class_if_wpml( $classes ) { /** * Load All dashboard styles and scripts * + * @since 1.0.0 + * * @return void */ function load_scripts_and_style() { @@ -242,7 +248,6 @@ function load_scripts_and_style() { return false; } - } // Dokan_WPML add_action( 'plugins_loaded', 'dokan_load_wpml', 15 ); diff --git a/languages/dokan-wpml.pot b/languages/dokan-wpml.pot index e14a0fe..d7cc5b3 100644 --- a/languages/dokan-wpml.pot +++ b/languages/dokan-wpml.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Dokan - WPML Integration 1.0.0\n" "Report-Msgid-Bugs-To: http://wedevs.com/support/\n" -"POT-Creation-Date: 2017-02-27 03:35:59+00:00\n" +"POT-Creation-Date: 2017-02-27 06:55:04+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/readme.txt b/readme.txt index 50ce499..adb1136 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: wedevs, rafsuntaskin, sabbir1991 Tags: WPML, i18n, l10n, Translation, Dokan Donate link: https://tareq.co/donate Requires at least: 4.7 -Tested up to: 4.7.4 +Tested up to: 4.7.2 License: GPL v2 WPML integration for Dokan Multivendor Plugin