Plugin Directory

Changeset 3133780


Ignore:
Timestamp:
08/11/2024 03:51:42 PM (20 months ago)
Author:
expres-web
Message:

Ver 2.7

Location:
woocommerce-cestina
Files:
61 added
6 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-cestina/trunk/core/plugins/woocommerce.php

    r3132865 r3133780  
    11<?php
    22/*
    3 Plugin Name: WooCommerce translate
     3Plugin Name: WooCommerce èeština
    44Version: 1.0
    5 Description: Merges translations under translate directory in this plugin on top of those installed.
     5Description: Pøeloží WooCommerce a vybrané dodatkové pluginy do èeštiny.
    66*/
    77
    8 function woocommerce_load_textdomain_hook( $domain = '', $mofile = '' ){
    9     $basedir = trailingslashit(WP_LANG_DIR);
    10     $baselen = strlen($basedir);
     8if (!function_exists('woocommerce_cestina_load_textdomain_hook')) {
     9    function woocommerce_cestina_load_textdomain_hook( $domain = '', $mofile = '' ){
     10        $basedir = trailingslashit(WP_LANG_DIR);
     11        $baselen = strlen($basedir);
    1112
    12     // only run this if file being loaded is under WP_LANG_DIR
    13     if ( $basedir === substr($mofile, 0, $baselen) ){
    14         // Correct custom directory path within the plugin's translate directory
    15         $plugin_dir = dirname(dirname(plugin_dir_path(__FILE__))); // two levels up to reach the plugin root
    16         $custom_mofile = $plugin_dir . '/translates/' . substr($mofile, $baselen);
     13        // only run this if file being loaded is under WP_LANG_DIR
     14        if ( $basedir === substr($mofile, 0, $baselen) ){
     15            // Correct custom directory path within the plugin's translate directory
     16            $plugin_dir = dirname(dirname(plugin_dir_path(__FILE__))); // two levels up to reach the plugin root
     17            $custom_mofile = $plugin_dir . '/translates/' . substr($mofile, $baselen);
    1718
    18         if ( file_exists($custom_mofile) ){
    19             load_textdomain($domain, $custom_mofile);
     19            if ( file_exists($custom_mofile) ){
     20                load_textdomain($domain, $custom_mofile);
     21            }
    2022        }
    2123    }
    2224}
    2325
    24 add_action('load_textdomain', 'woocommerce_load_textdomain_hook', 10, 2);
     26add_action('load_textdomain', 'woocommerce_cestina_load_textdomain_hook', 10, 2);
    2527?>
  • woocommerce-cestina/trunk/readme.txt

    r3132916 r3133780  
    66Tested up to: 6.6.1
    77Requires PHP: 5.7
    8 Stable tag: 2.6.1
     8Stable tag: 2.7
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5757
    5858== Changelog ==
     59
     60= 2.7 =
     61* Přidány informace o novém pluginu
    5962
    6063= 2.6.1 =
  • woocommerce-cestina/trunk/woocommerce-cestina.php

    r3132916 r3133780  
    55Plugin URI: http://wpress.tech
    66Description: Přeloží WooCommerce a vybrané dodatkové pluginy do češtiny.
    7 Version: 2.6.1
     7Version: 2.7
    88Author: WPressTech
    99Author URI: https://wpress.tech
    10 Text Domain: woocommerce-cestina
     10Text Domain: wptrans-cestina
    1111Requires Plugins: woocommerce
    1212
     
    2626*/
    2727
     28if (!defined('WC_CZ_PLUGIN_URL')) {
     29    define('WC_CZ_PLUGIN_URL', plugin_dir_url(__FILE__));
     30}
     31
    2832require_once(plugin_dir_path(__FILE__) . 'core/plugins/woocommerce.php');
    29 ?>
     33require_once(plugin_dir_path(__FILE__) . 'core/create-admin-menu.php');
Note: See TracChangeset for help on using the changeset viewer.