Plugin Directory

Changeset 2725153


Ignore:
Timestamp:
05/17/2022 09:09:23 AM (4 years ago)
Author:
pressmaximum
Message:

“Update”

Location:
currency-switcher-for-woocommerce/trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • currency-switcher-for-woocommerce/trunk/includes/admin/class-admin.php

    r2069679 r2725153  
    177177        $this->add_tab( 'PMCS_Settings_Exchange_Rate' );
    178178        $this->add_tab( 'PMCS_Settings_switcher' );
     179
     180   
     181
    179182    }
    180183
  • currency-switcher-for-woocommerce/trunk/includes/admin/fields/html.php

    r2069679 r2725153  
    1111        $tooltip_html      = $field_description['tooltip_html'];
    1212
    13         ?>
     13        if ( isset( $value['hook'] ) && $value['hook'] ) {
     14            ?>
     15            <tr valign="top">
     16                <td colspan="2" style="padding-left: 0px; padding-top: 0px;">
     17                    <?php do_action( $value['hook'] ); ?>
     18                </td>
     19            </tr>
     20            <?php
     21        } else {
     22
     23            ?>
    1424        <tr valign="top">
    1525            <th scope="row" class="titledesc">
     
    2838            </td>
    2939        </tr>
    30         <?php
     40            <?php
     41        }
    3142    }
    3243
  • currency-switcher-for-woocommerce/trunk/includes/admin/templates/html-settings.php

    r2069679 r2725153  
    4848            }
    4949
     50            if ( method_exists( $registered_tabs[ $current_tab ], 'before_end' ) ) {
     51                $registered_tabs[ $current_tab ]->before_end();
     52            }
     53
    5054            if ( pmcs()->admin->is_show_submit_btn() ) {
    5155                ?>
  • currency-switcher-for-woocommerce/trunk/includes/class-pmcs-plugin.php

    r2069679 r2725153  
    160160        add_action( 'wp_enqueue_scripts', array( $this, 'scripts' ) );
    161161
     162   
     163
    162164        do_action( 'pmcs_loaded' );
    163165    }
  • currency-switcher-for-woocommerce/trunk/pmcs.php

    r2069679 r2725153  
    44 * Plugin URI:  #
    55 * Description: Currency Switcher for WooCommerce.
    6  * Version:     0.0.1
     6 * Version:     0.0.5
    77 * Author:      PressMaximum
    88 * Author URI:  http://pressmaximum.com/
     
    1010 * Domain Path: /languages
    1111 * License:     GPL-2.0+
     12 * WC requires at least: 5.0
     13 * WC tested up to: 5.9.3
     14 * Requires at least: 5.1
     15 * Requires PHP: 7.0
    1216 */
    1317
     
    3236
    3337
    34 if ( ! class_exists( 'PMCS_Plugin' ) ) {
     38if (!class_exists('PMCS_Plugin')) {
    3539
    3640    // Useful global constants.
    37     define( 'PMCS_URL', plugin_dir_url( __FILE__ ) );
    38     define( 'PMCS_PATH', dirname( __FILE__ ) . '/' );
    39     define( 'PMCS_INC', PMCS_PATH . 'includes/' );
     41    define('PMCS_URL', plugin_dir_url(__FILE__));
     42    define('PMCS_PATH', dirname(__FILE__) . '/');
     43    define('PMCS_INC', PMCS_PATH . 'includes/');
     44
     45    define('PMCS_PLUGIN_FILE', __FILE__);
     46
     47
    4048
    4149    // Include files.
     
    5058     * @return PMCS_Plugin
    5159     */
    52     function pmcs() {
     60    function pmcs()
     61    {
    5362        return PMCS_Plugin::instance();
    5463    }
    5564}
    5665
    57 function pmcs__init() {
     66function pmcs__init()
     67{
    5868    $GLOBALS['pmcs'] = pmcs();
    5969}
    6070
    61 add_action( 'woocommerce_loaded', 'pmcs__init', 2 );
     71add_action('woocommerce_loaded', 'pmcs__init', 2);
    6272
    6373
    64 if ( ! function_exists( 'pmcs_activation_redirect' ) ) {
    65     function pmcs_activation_redirect( $plugin ) {
    66         if ( plugin_basename( __FILE__ ) == $plugin ) {
    67             exit( wp_redirect( admin_url( 'admin.php?page=pm_currency_switcher' ) ) );
     74if (!function_exists('pmcs_activation_redirect')) {
     75    function pmcs_activation_redirect($plugin)
     76    {
     77        if (plugin_basename(__FILE__) == $plugin) {
     78            exit(wp_redirect(admin_url('admin.php?page=pm_currency_switcher')));
    6879        }
    6980    }
    7081}
    7182
    72 add_action( 'activated_plugin', 'pmcs_activation_redirect' );
    73 
     83add_action('activated_plugin', 'pmcs_activation_redirect');
  • currency-switcher-for-woocommerce/trunk/readme.txt

    r2069681 r2725153  
    44Tags: currency, switcher, currency switcher, currency converter, converter, woocommerce
    55Requires at least: 4.5
    6 Tested up to: 5.1.1
     6Tested up to: 5.9.3
    77Stable tag: trunk
    88License: GPL-2.0+
     
    7171== Changelog ==
    7272
    73 = 0.1.0 =
     73= 0.0.2 =
     74* Fix bugs
     75
     76= 0.0.1 =
    7477* First release
    7578
    7679== Upgrade Notice ==
    77 
    78 = 0.1.0 =
    79 First Release
Note: See TracChangeset for help on using the changeset viewer.