Plugin Directory

Changeset 3370190


Ignore:
Timestamp:
09/30/2025 07:46:17 AM (6 months ago)
Author:
ecaray
Message:

Updated plugin to version 1.1 with [brief description of changes]

Location:
ecatranslator-lite/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ecatranslator-lite/trunk/admin/class-eca-translator-wp-lite-aitranslator.php

    r3343926 r3370190  
    114114   
    115115        // Create a new post with translated content
     116        function transliterate_title_to_slug($title) {
     117            // Use Intl extension transliterator if available
     118            if (class_exists('Transliterator')) {
     119                $slug = Transliterator::create('Any-Latin; Latin-ASCII')->transliterate($title);
     120            } else {
     121                // fallback
     122                $slug = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $title);
     123            }
     124            return sanitize_title($slug);
     125        }
     126
     127       
     128        $slug = transliterate_title_to_slug($translated_title[0]);
    116129        $new_post = [
    117130            'post_title'   => $translated_title[0],
     
    121134            'post_category' => $parent_post->post_category,
    122135            'post_author'  => get_current_user_id(),
     136            'post_name'    => $slug,
    123137        ];
    124138        $new_post_id = wp_insert_post($new_post);
  • ecatranslator-lite/trunk/includes/helper/class-ecatranslator-wp-lite-openai.php

    r3344354 r3370190  
    3737                'method'  => 'POST',
    3838                'data_format' => 'body',
     39                'timeout' => 300,
    3940            ];
    4041
Note: See TracChangeset for help on using the changeset viewer.