Changeset 3364716
- Timestamp:
- 09/19/2025 06:29:32 PM (5 months ago)
- File:
-
- 1 edited
-
ia-seo-generator/trunk/ia-seo-generator.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ia-seo-generator/trunk/ia-seo-generator.php
r3364500 r3364716 2 2 /* 3 3 Plugin Name: IA SEO Generator 4 Plugin URI: https://iaseogenerator.com 4 5 Description: Generate an AI-ready llms.txt without writing to the site root. Preview, copy, download, or serve /llms.txt dynamically. Includes a Premium info panel. Spanish translation included. 5 6 Version: 1.0.1 6 Author: Mediterranea Services7 Author URI: https://iaseogenerator.com8 Text Domain: ia-seo-generator9 Domain Path: /languages10 7 Requires at least: 5.5 11 8 Tested up to: 6.8 12 9 Requires PHP: 7.2 10 Author: Mediterranea Services 11 Author URI: https://mediterraneaservices.com 12 Text Domain: ia-seo-generator 13 Domain Path: /languages 13 14 License: GPLv2 or later 14 15 License URI: https://www.gnu.org/licenses/gpl-2.0.html 15 16 */ 17 16 18 17 19 defined('ABSPATH') or exit; … … 186 188 187 189 $did_generate = isset($_POST['iaseo_action']) && $_POST['iaseo_action'] === 'gen'; 188 $did_download = isset($_POST['iaseo_action']) && $_POST['iaseo_action'] === 'download'; 189 if ( $did_generate || $did_download ){ 190 check_admin_referer('iaseo_free_nonce'); 191 } 192 if ( $did_download ){ 193 $content = iaseo_free_generate(); 194 header('Content-Type: text/plain; charset=utf-8'); 195 header('Content-Disposition: attachment; filename=llms.txt'); 196 echo esc_textarea( $content ); 197 exit; 198 } 199 200 echo '<div class="wrap">'; 201 echo '<h1>' . esc_html__('IA SEO Generator (Free-LW) — 1.0.0', 'ia-seo-generator') . '</h1>'; 202 203 // llms.txt language selector 204 $curr = get_option('iaseo_llms_lang', 'auto'); 205 echo '<form method="post" style="margin:8px 0;display:flex;gap:8px;align-items:center;">'; 206 wp_nonce_field('iaseo_lang_nonce'); 207 echo '<label for="iaseo_llms_lang"><strong>' . esc_html__('llms.txt language:', 'ia-seo-generator') . '</strong></label>'; 190 $did_download = isset($_POST['iaseo_action']) && $_POST['iaseo_action'] === 'download'; 191 if ( $did_generate || $did_download ){ 192 check_admin_referer('iaseo_free_nonce'); 193 } 194 if ( $did_download ){ 195 $content = iaseo_free_generate(); 196 header('Content-Type: text/plain; charset=utf-8'); 197 header('Content-Disposition: attachment; filename=llms.txt'); 198 echo esc_textarea( $content ); 199 exit; 200 } 201 202 echo '<div class="wrap">'; 203 204 /* Título dinámico: IA SEO Generator (Free) — {Version} */ 205 $iaseo_ver = '1.0.1'; 206 if ( function_exists('get_file_data') ) { 207 $hdr = get_file_data( __FILE__, array( 'Version' => 'Version' ), 'plugin' ); 208 if ( ! empty( $hdr['Version'] ) ) { 209 $iaseo_ver = $hdr['Version']; 210 } 211 } 212 echo '<h1>' . sprintf( 213 esc_html__( 'IA SEO Generator (Free) — %s', 'ia-seo-generator' ), 214 esc_html( $iaseo_ver ) 215 ) . '</h1>'; 216 217 // llms.txt language selector 218 $curr = get_option('iaseo_llms_lang', 'auto'); 219 echo '<form method="post" style="margin:8px 0;display:flex;gap:8px;align-items:center;">'; 220 wp_nonce_field('iaseo_lang_nonce'); 221 echo '<label for="iaseo_llms_lang"><strong>' . esc_html__('llms.txt language:', 'ia-seo-generator') . '</strong></label>'; 222 208 223 echo '<select name="iaseo_llms_lang" id="iaseo_llms_lang">'; 209 224 echo '<option value="auto"' . selected($curr,'auto',false) . '>' . esc_html__('Auto (by site language)', 'ia-seo-generator') . '</option>';
Note: See TracChangeset
for help on using the changeset viewer.