Skip to content

Commit

Permalink
Make pot, format code
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Feb 27, 2017
1 parent 93312c3 commit 4506c52
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
21 changes: 13 additions & 8 deletions dokan-wpml.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class Dokan_WPML {
* @uses add_action()
*/
public function __construct() {

add_action( 'init', array( $this, 'is_dependency_installed' ) );

// Localize our plugin
Expand Down Expand Up @@ -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(){
Expand Down Expand Up @@ -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
**/
Expand All @@ -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' );

Expand All @@ -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 );

Expand All @@ -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 ) {
Expand All @@ -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() {
Expand All @@ -242,7 +248,6 @@ function load_scripts_and_style() {
return false;
}


} // Dokan_WPML

add_action( 'plugins_loaded', 'dokan_load_wpml', 15 );
Expand Down
2 changes: 1 addition & 1 deletion languages/dokan-wpml.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4506c52

Please sign in to comment.