Plugin Directory

Changeset 3363118


Ignore:
Timestamp:
09/17/2025 10:58:31 AM (7 months ago)
Author:
autoglot
Message:

Small improvements

Location:
autoglot
Files:
58 added
4 edited

Legend:

Unmodified
Added
Removed
  • autoglot/trunk/admin/autoglot_admin.php

    r3362576 r3363118  
    159159    public function get_plugin_stats() {
    160160
    161         $this->db_stats["w2translate"] = 0;
    162 
    163161        // Handle secure recalculation request for WordPress posts/pages word count
    164162        if ( isset($_GET['autoglot_recalc_wpcount']) && isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], 'ag_recalc_wpcount') && current_user_can('manage_options') ) {
     
    175173        if($this->autoglot->autoglot_database->db_exists()){
    176174            $this->db_stats = $this->autoglot->autoglot_database->db_stats();
     175            $this->db_stats["w2translate"] = 0;
    177176            foreach ($this->autoglot->options->active_languages as $lng){
    178177                if($lng != $this->autoglot->options->default_language){
    179178                    $this->db_stats["w2translate"] += max(0,$this->db_stats['wpcount'] - $this->db_stats['countactivewords'][$lng]);
    180179                }
    181         $this->db_stats["w2translate"] = max(0, $this->db_stats["w2translate"]);
    182             }
     180            }
     181            $this->db_stats["w2translate"] = max(0, $this->db_stats["w2translate"]);
    183182        }
    184183
     
    644643                    if(is_plugin_active( 'woocommerce/woocommerce.php' )) {//recalculate and allow 500 words for WooCommerce pages
    645644                        $this->db_stats["w2translate"] = 0;
    646                         foreach ($this->autoglot->options->active_languages as $lng)
    647                             if($lng != $this->autoglot->options->default_language)
    648                                 $this->db_stats["w2translate"] += max(0, 500 + $this->db_stats['wpcount'] - $this->db_stats['countactivewords'][$lng]);   
    649                     $this->db_stats["w2translate"] = max(0, $this->db_stats["w2translate"]);
     645                        foreach ($this->autoglot->options->active_languages as $lng){
     646                            if($lng != $this->autoglot->options->default_language){
     647                                $this->db_stats["w2translate"] += max(0, 500 + $this->db_stats['wpcount'] - $this->db_stats['countactivewords'][$lng]);
     648                            }
     649                        }
     650                        $this->db_stats["w2translate"] = max(0, $this->db_stats["w2translate"]);
    650651                    }
    651652                    printf('<tr><td>' .($this->db_stats["w2translate"]>0?'<span class="autoglot-bubble-red">!</span> ':'') . esc_html__('Approximate number of words that should be translated to currently active languages:', 'autoglot') . '</td><td style="background-color:%s"><strong>%s</strong> *</td></tr>', ($this->db_stats["w2translate"]>0?"#FF9999":"#99FF99"), esc_html(number_format_i18n($this->db_stats["w2translate"])));   
     
    12241225                    'page' => 'autoglot_translation_advanced',
    12251226                    'helper' => '',
    1226                     'supplemental' => __('Enable/disable translation of URLs (links to posts and pages). If enabled, Autoglot will translate all WordPress permalinks, e.g. <code>http://site.com/page/</code> to <code>http://site.com/fr/p&aacute;gina/</code>. It can also transliterate URLs to url-friendly format, e.g. <code>http://site.com/page/</code> to <code>http://site.com/fr/pagina/</code>', 'autoglot')."<br /><span class='autoglot-bubble-green'>!</span><br />".__('Please note, Translation and Transliteration of URLs will affect only URLs that have not been translated yet. If you need to update already translated URLs, you need to modify or delete them in Translation Editor.','autoglot'),
     1227                    'supplemental' => __('Enable/disable translation of URLs (links to posts and pages). If enabled, Autoglot will translate all WordPress permalinks, e.g. <code>http://site.com/page/</code> to <code>http://site.com/fr/p&aacute;gina/</code>. It can also transliterate URLs to url-friendly format, e.g. <code>http://site.com/page/</code> to <code>http://site.com/fr/pagina/</code>', 'autoglot')."<br /><br /><span class='autoglot-bubble-green'>!</span> ".__('Please note, Translation and Transliteration of URLs will affect only URLs that have not been translated yet. If you need to update already translated URLs, you need to modify or delete them in Translation Editor.','autoglot'),
    12271228                    'type' => 'radio',
    12281229                    'options' => array(
  • autoglot/trunk/autoglot.php

    r3362576 r3363118  
    44Plugin URI: https://autoglot.com/download/
    55Description: Fully automatic SEO-friendly plugin for multilingual WordPress translation. Translate your website and boost your traffic in minutes! No coding, no subscription, no recurring payments, no hurdles!
    6 Version: 2.7.9
     6Version: 2.7.10
    77Text Domain: autoglot
    88Author: Autoglot WordPress Team
     
    129129            }
    130130            $this->allowed_html = $keeparray;
    131                                
    132             $this->plugin_admin = new autoglot_admin($this, AUTOGLOT_PLUGIN_NAME, AUTOGLOT_PLUGIN_VER);
    133            
     131
     132            if(is_admin() && !wp_doing_ajax()) $this->plugin_admin = new autoglot_admin($this, AUTOGLOT_PLUGIN_NAME, AUTOGLOT_PLUGIN_VER);
     133
    134134            register_activation_hook(__FILE__, array($this, 'plugin_activated'));
    135135            register_deactivation_hook(__FILE__, array($this, 'plugin_deactivated'));
    136            
     136
    137137            add_action('plugins_loaded', array($this, 'plugin_loaded'));
    138138
     
    279279         */
    280280        function plugin_install_error() {
    281             $this->plugin_admin->admin_notice(__('There was an error during installation or activation of Autoglot plugin:', 'autoglot').' ',"error");
     281            //$this->plugin_admin->admin_notice(__('There was an error during installation or activation of Autoglot plugin:', 'autoglot').' ',"error");
     282            update_option('autoglot_admin_notice',array(__('There was an error during installation or activation of Autoglot plugin', 'autoglot'),"error"));
     283
    282284        }
    283285   
  • autoglot/trunk/readme.txt

    r3362576 r3363118  
    55Tested up to: 6.8.2
    66Requires PHP: 7.0
    7 Stable tag: 2.7.9
     7Stable tag: 2.7.10
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Reach new audience, boost traffic and SEO with a fully automatic multilingual translation. MTPE translation editor. No subscription required, starting from $0.0005 per word!
     11Reach new audience, boost traffic and SEO with a fully automatic multilingual translation + MTPE editor. No subscription, starting from $0.0005/word!
    1212
    1313== Description ==
     
    310310== Upgrade Notice ==
    311311 
    312 = 2.7.9 =
     312= 2.7.10 =
    313313Improved Word Counter tool
    314314
     
    361361== Changelog ==
    362362
     363= 2.7.10 (17/09/2025) =
     364* Improved overall speed by preventing excessive DB requests from admin dashboard
     365* Minor fixes in admin dashboard
     366* Improved Word Counter tool to use regexp functions from MySQL 8, if possible (coming soon)
     367
    363368= 2.7.9 (16/09/2025) =
    364369* Improved Word Counter tool to include words from custom post types
  • autoglot/trunk/utils/autoglot_constants.php

    r3362576 r3363118  
    256256
    257257//Define for autoglot plugin version
    258 define('AUTOGLOT_PLUGIN_VER', '2.7.9');
     258define('AUTOGLOT_PLUGIN_VER', '2.7.10');
    259259
    260260//Define for autoglot plugin name
Note: See TracChangeset for help on using the changeset viewer.