Plugin Directory

Changeset 2482768


Ignore:
Timestamp:
02/27/2021 06:31:32 PM (5 years ago)
Author:
ec1warc1
Message:

tagging version 1.1.1

Location:
monitor-chat
Files:
34 added
1 deleted
7 edited
15 copied

Legend:

Unmodified
Added
Removed
  • monitor-chat/tags/1.1.1/functions/monitorchat_general.php

    r2482374 r2482768  
    1212// ########## GENERAL FUNCTIONS ##########
    1313function monitorchat_display_apikey_report(){
     14  if (!current_user_can('activate_plugins')){ return null; }
    1415  $apikey=get_option('monitorchat_global_api_key');
    1516  $last_valid_apikey=get_option('monitorchat_global_last_valid_apikey');
     
    2122}
    2223function monitorchat_display_apikey_report_link(){
     24  if (!current_user_can('activate_plugins')){ return null; }
    2325  $apikey=get_option('monitorchat_global_api_key');
    2426  $last_valid_apikey=get_option('monitorchat_global_last_valid_apikey');
    2527  if($apikey != $last_valid_apikey){return null;} // just leave if not valid api key
    26   return '<a href="#TB_inline?&width=500&height=500&inlineId=apikey-report" class="thickbox">View API Key Report</a>';
     28  return '<a href="#TB_inline?&width=500&height=500&inlineId=apikey-report" class="thickbox">'.__('View API Key Report').'</a>';
    2729}
    2830
    2931function monitorchat_register_session(){
    30     if( !session_id() )
     32    if( (!session_id()) && (current_user_can('activate_plugins')) )
    3133        session_start();
    3234}
     
    549551
    550552function monitorchat_populate_apikey_report(){
     553  if (!current_user_can('activate_plugins')){ return null; } // just leave if not an admin
    551554  $apikey=get_option('monitorchat_global_api_key');
    552555  $last_valid_apikey=get_option('monitorchat_global_last_valid_apikey');
     
    555558  if((!is_numeric($last_check))||(empty($last_check))){$last_check=0;}
    556559  $seconds_since_last=(time()-$last_check);
    557   if($seconds_since_last < 900){return null;}
     560  if($seconds_since_last < 3600){return null;} // new report every hour, no more
    558561
    559562  $hostname=monitorchat_gethostname();
     
    604607// ########## INITIALIZE ##########
    605608  add_action('admin_head', 'monitorchat_custom_admin_styles');
    606   add_action('init','monitorchat_register_session');
     609  add_action('init','monitorchat_register_session'); // register a session for admins only
    607610  add_filter( 'cron_schedules', 'monitorchat_filter_cron_schedules' );
  • monitor-chat/tags/1.1.1/functions/monitorchat_woocommerce.php

    r2475064 r2482768  
    2828  global $woocommerce;
    2929  $currency = get_woocommerce_currency_symbol();
     30  if($currency == '&#36;'){return '<DL>';}
     31  if($currency == '&pound;'){return '<PN>';}
     32  if($currency == '&euro;'){return '<EU>';}
     33  if($currency == '&yen;'){return '<YN>';}
     34  if($currency == '&#3647;'){return '<BTC>';}
     35  return '';
    3036}
    3137
     
    9096  $order = wc_get_order( $order_id );
    9197  $order_data = $order->get_data();
    92   $discount_total = $order_data['discount_total'];
    93   $total = $order_data['total'];
     98  $discount_total = monitorchat_woocommerce_currency_symbol().$order_data['discount_total'];
     99  $total = monitorchat_woocommerce_currency_symbol().$order_data['total'];
    94100  $currency = $order_data['currency'];
    95101  if(!empty($order_data['shipping']['city'])){
  • monitor-chat/tags/1.1.1/functions/monitorchat_wordpress.php

    r2476508 r2482768  
    138138
    139139  if(!monitorchat_is_enabled('monitorchat_profile_update_enabled')){return;} // enabled or not?
    140 
     140  if(!is_user_logged_in()){return;} // We don't want new registrations to trigger this
    141141  $current_user=wp_get_current_user();
    142142  $exclude_role=get_option('monitorchat_profile_update_exclude');
  • monitor-chat/tags/1.1.1/monitor-chat.php

    r2482374 r2482768  
    22/**
    33 * Plugin Name: Monitor.chat
    4  * Version: 1.1.0
     4 * Version: 1.1.1
    55 * Plugin URI: https://monitor.chat
    66 * Description: Monitor Your Wordpress Website with XMPP Instant Messages!
     
    2424}
    2525
    26 define( 'MONITORCHAT_VERSION', '1.1.0' );
     26define( 'MONITORCHAT_VERSION', '1.1.1' );
    2727define( 'MONITORCHAT__MINIMUM_WP_VERSION', '4.0' );
    2828define( 'MONITORCHAT__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • monitor-chat/tags/1.1.1/readme.txt

    r2482376 r2482768  
    55Requires at least: 4.0
    66Tested up to: 5.6.1
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    5858
    5959== Changelog ==
     60= 1.1.1 =
     61* Session variables only for administrators (can activate plugins)
     62* Currency symbol added to messages regarding Woocommerce orders
     63* Profile update message is no longer triggered for new accounts
     64
    6065= 1.1.0 =
    6166* Hostname is now a value stored as a setting and can be edited
  • monitor-chat/trunk/functions/monitorchat_general.php

    r2482374 r2482768  
    1212// ########## GENERAL FUNCTIONS ##########
    1313function monitorchat_display_apikey_report(){
     14  if (!current_user_can('activate_plugins')){ return null; }
    1415  $apikey=get_option('monitorchat_global_api_key');
    1516  $last_valid_apikey=get_option('monitorchat_global_last_valid_apikey');
     
    2122}
    2223function monitorchat_display_apikey_report_link(){
     24  if (!current_user_can('activate_plugins')){ return null; }
    2325  $apikey=get_option('monitorchat_global_api_key');
    2426  $last_valid_apikey=get_option('monitorchat_global_last_valid_apikey');
    2527  if($apikey != $last_valid_apikey){return null;} // just leave if not valid api key
    26   return '<a href="#TB_inline?&width=500&height=500&inlineId=apikey-report" class="thickbox">View API Key Report</a>';
     28  return '<a href="#TB_inline?&width=500&height=500&inlineId=apikey-report" class="thickbox">'.__('View API Key Report').'</a>';
    2729}
    2830
    2931function monitorchat_register_session(){
    30     if( !session_id() )
     32    if( (!session_id()) && (current_user_can('activate_plugins')) )
    3133        session_start();
    3234}
     
    549551
    550552function monitorchat_populate_apikey_report(){
     553  if (!current_user_can('activate_plugins')){ return null; } // just leave if not an admin
    551554  $apikey=get_option('monitorchat_global_api_key');
    552555  $last_valid_apikey=get_option('monitorchat_global_last_valid_apikey');
     
    555558  if((!is_numeric($last_check))||(empty($last_check))){$last_check=0;}
    556559  $seconds_since_last=(time()-$last_check);
    557   if($seconds_since_last < 900){return null;}
     560  if($seconds_since_last < 3600){return null;} // new report every hour, no more
    558561
    559562  $hostname=monitorchat_gethostname();
     
    604607// ########## INITIALIZE ##########
    605608  add_action('admin_head', 'monitorchat_custom_admin_styles');
    606   add_action('init','monitorchat_register_session');
     609  add_action('init','monitorchat_register_session'); // register a session for admins only
    607610  add_filter( 'cron_schedules', 'monitorchat_filter_cron_schedules' );
  • monitor-chat/trunk/functions/monitorchat_woocommerce.php

    r2475064 r2482768  
    2828  global $woocommerce;
    2929  $currency = get_woocommerce_currency_symbol();
     30  if($currency == '&#36;'){return '<DL>';}
     31  if($currency == '&pound;'){return '<PN>';}
     32  if($currency == '&euro;'){return '<EU>';}
     33  if($currency == '&yen;'){return '<YN>';}
     34  if($currency == '&#3647;'){return '<BTC>';}
     35  return '';
    3036}
    3137
     
    9096  $order = wc_get_order( $order_id );
    9197  $order_data = $order->get_data();
    92   $discount_total = $order_data['discount_total'];
    93   $total = $order_data['total'];
     98  $discount_total = monitorchat_woocommerce_currency_symbol().$order_data['discount_total'];
     99  $total = monitorchat_woocommerce_currency_symbol().$order_data['total'];
    94100  $currency = $order_data['currency'];
    95101  if(!empty($order_data['shipping']['city'])){
  • monitor-chat/trunk/functions/monitorchat_wordpress.php

    r2476508 r2482768  
    138138
    139139  if(!monitorchat_is_enabled('monitorchat_profile_update_enabled')){return;} // enabled or not?
    140 
     140  if(!is_user_logged_in()){return;} // We don't want new registrations to trigger this
    141141  $current_user=wp_get_current_user();
    142142  $exclude_role=get_option('monitorchat_profile_update_exclude');
  • monitor-chat/trunk/monitor-chat.php

    r2482374 r2482768  
    22/**
    33 * Plugin Name: Monitor.chat
    4  * Version: 1.1.0
     4 * Version: 1.1.1
    55 * Plugin URI: https://monitor.chat
    66 * Description: Monitor Your Wordpress Website with XMPP Instant Messages!
     
    2424}
    2525
    26 define( 'MONITORCHAT_VERSION', '1.1.0' );
     26define( 'MONITORCHAT_VERSION', '1.1.1' );
    2727define( 'MONITORCHAT__MINIMUM_WP_VERSION', '4.0' );
    2828define( 'MONITORCHAT__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • monitor-chat/trunk/readme.txt

    r2482376 r2482768  
    55Requires at least: 4.0
    66Tested up to: 5.6.1
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    5858
    5959== Changelog ==
     60= 1.1.1 =
     61* Session variables only for administrators (can activate plugins)
     62* Currency symbol added to messages regarding Woocommerce orders
     63* Profile update message is no longer triggered for new accounts
     64
    6065= 1.1.0 =
    6166* Hostname is now a value stored as a setting and can be edited
Note: See TracChangeset for help on using the changeset viewer.