Plugin Directory

Changeset 3364716


Ignore:
Timestamp:
09/19/2025 06:29:32 PM (5 months ago)
Author:
mediterraneaservices
Message:

UI: dynamic version label ("Free")).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ia-seo-generator/trunk/ia-seo-generator.php

    r3364500 r3364716  
    22/*
    33Plugin Name: IA SEO Generator
     4Plugin URI: https://iaseogenerator.com
    45Description: 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.
    56Version: 1.0.1
    6 Author: Mediterranea Services
    7 Author URI: https://iaseogenerator.com
    8 Text Domain: ia-seo-generator
    9 Domain Path: /languages
    107Requires at least: 5.5
    118Tested up to: 6.8
    129Requires PHP: 7.2
     10Author: Mediterranea Services
     11Author URI: https://mediterraneaservices.com
     12Text Domain: ia-seo-generator
     13Domain Path: /languages
    1314License: GPLv2 or later
    1415License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1516*/
     17
    1618
    1719defined('ABSPATH') or exit;
     
    186188
    187189    $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';
     191if ( $did_generate || $did_download ){
     192    check_admin_referer('iaseo_free_nonce');
     193}
     194if ( $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
     202echo '<div class="wrap">';
     203
     204/* Título dinámico: IA SEO Generator (Free) — {Version} */
     205$iaseo_ver = '1.0.1';
     206if ( 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}
     212echo '<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');
     219echo '<form method="post" style="margin:8px 0;display:flex;gap:8px;align-items:center;">';
     220wp_nonce_field('iaseo_lang_nonce');
     221echo '<label for="iaseo_llms_lang"><strong>' . esc_html__('llms.txt language:', 'ia-seo-generator') . '</strong></label>';
     222
    208223    echo '<select name="iaseo_llms_lang" id="iaseo_llms_lang">';
    209224    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.