Plugin Directory

Changeset 3794173


Ignore:
Timestamp:
11/10/2026 10:59:12 AM (less than one hour ago)
Author:
autoglot
Message:

Extended support for SEO plugins

Location:
autoglot
Files:
69 added
6 edited

Legend:

Unmodified
Added
Removed
  • autoglot/trunk/autoglot.php

    r3785569 r3794173  
    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: 3.0.4
     6Version: 3.0.5
    77Text Domain: autoglot
    88Author: Autoglot WordPress Team
  • autoglot/trunk/changelog.md

    r3785586 r3794173  
     1= 3.0.5 (10/11/2026) =
     2* Added support for SmartCrawl XML sitemaps
     3* Confirmed compatibility with CrawlWP XML sitemaps (CrawlWP Premium is not required)
     4* Confirmed compatibility with SEO SIMPLE PACK XML sitemaps
     5
    16= 3.0.4 (05/11/2026) =
    27* Enabled batch processing for URL translation to improve overall translation speed
  • autoglot/trunk/readme.txt

    r3785586 r3794173  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 3.0.4
     7Stable tag: 3.0.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    408408== Upgrade Notice ==
    409409
     410= 3.0.5 =
     411Extended support for SEO plugins
     412
    410413= 3.0.4 =
    411414Improved URL translation
    … …  
    413416= 3.0.3 =
    414417Minor changes and improvements
    415 
    416 = 3.0.2 =
    417 Extended support for SEO plugins
    418418
    419419= 3.0.0 =
    … …  
    488488
    489489== Changelog ==
     490
     491= 3.0.5 (10/11/2026) =
     492* Added support for SmartCrawl XML sitemaps
     493* Confirmed compatibility with CrawlWP XML sitemaps (CrawlWP Premium is not required)
     494* Confirmed compatibility with SEO SIMPLE PACK XML sitemaps
    490495
    491496= 3.0.4 (05/11/2026) =
  • autoglot/trunk/utils/autoglot_3rdparty.php

    r3759808 r3794173  
    6666                add_filter( 'surerank_sitemap_url_element', array(&$this, 'surerank_sitemap_add_hreflang_links'), 10, 3 );
    6767               
    68                 add_action('template_redirect', array( $this, 'siteseo_register_sitemap_buffer' ), 0);
     68                add_filter( 'wds_partial_sitemap_items', array(&$this, 'wds_partial_sitemap_items'), 10, 3 );
     69               
     70                add_action( 'template_redirect', array( $this, 'siteseo_register_sitemap_buffer' ), 0);
     71                //add_action( 'init', array( $this, 'squirrlyseo_register_sitemap_buffer' ), 0); //for Squirrly SEO: same as above but via init?
    6972
    7073            }
    … …  
    709712        }
    710713   
    711         ob_start( array( $this, 'siteseo_sitemap_buffer' ) );
    712     }
    713 
    714     /**
    715      * Intercept individual SiteSEO XML sitemaps without modifying their output.
     714        ob_start( array( $this, 'add_to_sitemap_buffer' ) );
     715    }
     716
     717    /**
     718     * Intercept individual XML sitemaps and add translated pages.
    716719     *
    717720     * @param string $output Buffered response.
    718721     * @return string modified sitemap with translated pages.
    719722     */
    720     function siteseo_sitemap_buffer( $output ) {
     723    function add_to_sitemap_buffer( $output ) {
    721724   
    722725        if ( '' === $output ) {
    … …  
    761764
    762765        return str_replace("</urlset>", $urlset_langs."</urlset>", $output);
     766    }
     767
     768
     769        /**
     770         * Add translated URLs to SmartCrawl XML sitemap.
     771         *
     772         * @param array  $items  The sitemap urls array on which the output is based.
     773         * @param array  $items  The sitemap urls array that includes translated pages
     774         */
     775
     776    function wds_partial_sitemap_items($items, $type, $page) {
     777
     778        $translation_enable_o = $this->autoglot->options->translation_enable;
     779        $this->autoglot->options->translation_enable = 0;
     780
     781        $items_o = $items;
     782
     783        if (!class_exists('\SmartCrawl\Sitemaps\General\Item', false) || empty($items) || !is_array($items)) {
     784            return $items;
     785        }
     786       
     787        foreach ($this->autoglot->options->active_languages as $lang) {
     788   
     789            if ($lang == $this->autoglot->options->default_language) {
     790                continue;
     791            }
     792   
     793            foreach ($items_o as $item) {
     794   
     795                if (!is_object($item) || !method_exists($item, 'get_location')) {
     796                    continue;
     797                }
     798   
     799                // Get the original URL.
     800                $thisurl = $item->get_location();
     801   
     802                if (empty($thisurl)) {
     803                    continue;
     804                }
     805   
     806                if ($this->autoglot->options->translate_urls) { $thisurl = esc_url($this->autoglot->translate_url($thisurl, $lang)); }
     807                $thisurl = autoglot_utils::add_language_to_url($thisurl, $this->autoglot->homeURL, $lang);
     808   
     809                // Create a new SmartCrawl sitemap item.
     810                $translated_item = new \SmartCrawl\Sitemaps\General\Item();
     811                $translated_item->set_location($thisurl);
     812   
     813                // Preserve the original last modified timestamp.
     814                if (method_exists($item, 'get_last_modified')) {
     815                    $translated_item->set_last_modified($item->get_last_modified());
     816                }
     817   
     818                // Append the translated item.
     819                $items[] = $translated_item;
     820            }
     821        }
     822   
     823        $this->autoglot->options->translation_enable = $translation_enable_o;
     824
     825        return $items;
    763826    }
    764827
  • autoglot/trunk/utils/autoglot_constants.php

    r3785569 r3794173  
    332332
    333333//Define for autoglot plugin version
    334 define('AUTOGLOT_PLUGIN_VER', '3.0.4');//changelog in options
     334define('AUTOGLOT_PLUGIN_VER', '3.0.5');//changelog in options
    335335
    336336//Define for autoglot plugin name
  • autoglot/trunk/utils/autoglot_options.php

    r3785569 r3794173  
    300300        $this->changelog = [
    301301            [
    302                 'version' => '3.0.4',
     302                'version' => '3.0.5',
    303303                'changes' => [
    304304                    ['text' => __('Minor fixes to native WordPress sitemap generation.', 'autoglot')],
    … …  
    307307                     'page' => 'autoglot_translation_languages'],
    308308                    ['text' => __('Enabled batch processing for URL translation to improve overall translation speed.', 'autoglot')],
     309                    ['text' => __('Extended SEO plugin compatibility to include SmartCrawl, SEO SIMPLE PACK and CrawlWP.', 'autoglot')],
    309310                ],
    310311            ],
Note: See TracChangeset for help on using the changeset viewer.