Plugin Directory

Changeset 3355815


Ignore:
Timestamp:
09/04/2025 06:52:29 AM (6 months ago)
Author:
techbeeps
Message:

version 1.8

Location:
autoreply-ai
Files:
29 added
4 edited

Legend:

Unmodified
Added
Removed
  • autoreply-ai/trunk/autoreply-ai.php

    r3348595 r3355815  
    44Plugin URI:  https://plugins.techbeeps.com/
    55Description: A plugin that enables automatic replies using AI, allowing admins to configure API keys, word limits, and user selection.
    6 Version:     1.7
     6Version:     1.8
    77Author:      Techbeeps
    88Author URI:  https://techbeeps.co.in/
     
    1414if (! defined('ABSPATH')) { exit; }
    1515
    16 define('AUTO_REPLY_AI_TBS', '1.7');
     16define('AUTO_REPLY_AI_TBS', '1.8');
    1717define('AUTO_REPLY_AI_TBS_PATH', plugin_dir_path(__FILE__));
    1818define('AUTO_REPLY_AI_TBS_URL',  __FILE__);
  • autoreply-ai/trunk/includes/class-generate-llms.php

    r3348595 r3355815  
    178178            global $wp_filesystem;
    179179
    180             $file_path = ABSPATH . 'llms.txt';
     180            $upload_dir = wp_upload_dir();
     181            $dir = trailingslashit($upload_dir['basedir']) . 'autoreply-llms-txt/';
     182            $file_path = $dir . 'llms.txt';
    181183
    182184            if ($wp_filesystem->exists($file_path)) {
     
    188190                }
    189191            } else {
    190                 if (! $wp_filesystem->is_writable(ABSPATH)) {
     192                if (! $wp_filesystem->is_writable($dir)) {
    191193                    echo '<div class="notice notice-error">';
    192194                    echo '<p>Warning: Cannot create llms.txt - the root directory is not writable. Please set permissions to 755 .</p>';
     
    641643        global $wp_filesystem;
    642644
    643         $file_path = ABSPATH . 'llms.txt';
     645         $upload_dir = wp_upload_dir();
     646        $dir = trailingslashit($upload_dir['basedir']) . 'autoreply-llms-txt/';
     647        $file_path = $dir . 'llms.txt';
     648       
     649        if (! file_exists($dir)) {
     650            wp_mkdir_p($dir);
     651        }
    644652        $content   = $this->generate_content();
    645653
  • autoreply-ai/trunk/includes/functions.php

    r3338962 r3355815  
    2929}
    3030add_action('admin_enqueue_scripts', 'autoreply_ai_css_plugin');
     31
     32add_action( 'template_redirect', function() {
     33    $request_uri = '';
     34    if ( isset( $_SERVER['REQUEST_URI'] ) ) {
     35        $request_uri = sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) );
     36    }
     37
     38    if ( $request_uri && preg_match( '/llms\.txt$/', $request_uri ) ) {
     39        $upload_dir = wp_upload_dir();
     40        $file_path  = trailingslashit( $upload_dir['basedir'] ) . 'autoreply-llms-txt/llms.txt';
     41
     42        if ( file_exists( $file_path ) ) {
     43            global $wp_filesystem;
     44            if ( ! $wp_filesystem ) {
     45                require_once ABSPATH . 'wp-admin/includes/file.php';
     46                WP_Filesystem();
     47            }
     48            $content = $wp_filesystem->get_contents( $file_path );
     49            if ( $content !== false ) {
     50               header( 'Content-Type: text/html; charset=utf-8' );
     51                header( 'Content-Disposition: inline; filename="llms.txt"' );
     52                echo "<pre>";
     53                echo esc_textarea($content);
     54                echo "</pre>";
     55                exit;
     56            }
     57        }
     58    }
     59});
  • autoreply-ai/trunk/readme.txt

    r3348595 r3355815  
    55Tested up to: 6.8 
    66Requires PHP: 7.4 
    7 Stable tag: 1.7 
     7Stable tag: 1.8 
    88License: GPL-2.0+ 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html 
     
    170170
    171171== Changelog ==
     172= 1.8 =
     173* Fixed some llms.txt issues
     174
    172175= 1.7 =
    173176* Introduced LLMS.txt Generator (auto/manual site summary generation for AI models)
     
    185188* screenshot or Banner update
    186189
    187 ==1.4==
     190=1.4=
    188191* Increase Response Word Limit
    189192* Tested up to WordPress 6.8
Note: See TracChangeset for help on using the changeset viewer.