Plugin Directory

Changeset 3358086


Ignore:
Timestamp:
09/08/2025 05:37:54 PM (7 months ago)
Author:
grzelkowski
Message:

version 1.8.1

  • refactored internal structure
  • removed old unused files
  • added new files
Location:
quick-ajax-post-loader/trunk
Files:
40 added
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • quick-ajax-post-loader/trunk/quick-ajax-post-loader.php

    r3352831 r3358086  
    55* Text Domain: quick-ajax-post-loader
    66* Domain Path: /languages
    7 * Version: 1.8.0
     7* Version: 1.8.1
    88* Description: Supercharge post loading with Quick Ajax Post Loader. Enhance user experience and optimize site performance using AJAX technology.
    99* Author: Pawel Grzelkowski
     
    1717    exit;
    1818}
    19 require_once plugin_dir_path(__FILE__) . 'inc/class-activator.php';
    20 register_activation_hook(__FILE__, ['QAPL_Quick_Ajax_Activator', 'activate']);
    2119
    22 function qapl_initialize_plugin() {
    23     if (class_exists('QAPL_Quick_Ajax_Plugin_Starter')) {
    24         function qapl_quick_ajax_admin_notice() {
    25             echo '<div class="error"><p><strong>Quick Ajax Post Loader:</strong> A class named <strong>"QAPL_Quick_Ajax_Plugin_Starter"</strong> already exists, which may have been declared by another plugin.</p></div>';
     20require_once plugin_dir_path(__FILE__) . 'includes/resources/class-constants.php';
     21
     22if (version_compare(PHP_VERSION, QAPL_Quick_Ajax_Constants::PLUGIN_MINIMUM_PHP_VERSION, '<')) {
     23    add_action( 'admin_notices', static function () {
     24        $message = sprintf(
     25            __('This plugin requires PHP %1$s or higher. Your server is running %2$s.', 'quick-ajax-post-loader'),
     26            QAPL_Quick_Ajax_Constants::PLUGIN_MINIMUM_PHP_VERSION,
     27            PHP_VERSION
     28        );
     29        echo '<div class="notice notice-error"><p><strong>Quick Ajax Post Loader:</strong> '.esc_html($message).'</p></div>';
     30    } );
     31    return;
     32}
     33
     34global $wp_version;
     35if (version_compare($wp_version, QAPL_Quick_Ajax_Constants::PLUGIN_MINIMUM_WP_VERSION, '<')) {
     36    add_action( 'admin_notices', static function () use ($wp_version) {
     37        $message = sprintf(
     38            __('This plugin was tested only with WordPress %1$s or higher. Your site is running %2$s. It may not work correctly.', 'quick-ajax-post-loader'),
     39            QAPL_Quick_Ajax_Constants::PLUGIN_MINIMUM_WP_VERSION,
     40            $wp_version
     41        );
     42        echo '<div class="notice notice-warning"><p><strong>Quick Ajax Post Loader:</strong> '.esc_html($message).'</p></div>';
     43    } );
     44}
     45
     46register_activation_hook(plugin_basename(__FILE__), static function () {
     47    // load activator only on activation
     48    $activator_path = plugin_dir_path(__FILE__) . 'includes/maintenance/class-activator.php';
     49    if (!file_exists($activator_path)) {
     50        if (defined('WP_DEBUG') && WP_DEBUG === true && defined('WP_DEBUG_LOG') && WP_DEBUG_LOG === true) {
     51            error_log('Quick Ajax Post Loader: Missing class-activator.php during activation.');
    2652        }
    27         add_action('admin_notices', 'qapl_quick_ajax_admin_notice');
    28     }else{
    29         require_once(plugin_dir_path( __FILE__ ).'inc/class-helper.php');
     53        return;
    3054    }
     55    require_once $activator_path;
     56    if (!class_exists('QAPL_Quick_Ajax_Activator')) {
     57        if (defined('WP_DEBUG') && WP_DEBUG === true && defined('WP_DEBUG_LOG') && WP_DEBUG_LOG === true) {
     58            error_log('Quick Ajax Post Loader: QAPL_Quick_Ajax_Activator class not found after including activator.');
     59        }
     60        return;
     61    }
     62    QAPL_Quick_Ajax_Activator::activate();
     63});
     64
     65if (class_exists('QAPL_Quick_Ajax_Initializer')) {
     66    add_action('admin_notices', static function () {
     67        echo '<div class="notice notice-error"><p><strong>Quick Ajax Post Loader:</strong> Class QAPL_Quick_Ajax_Initializer already exists. Conflict detected. Plugin aborted.</p></div>';
     68    });
     69    return;
    3170}
    32 add_action('plugins_loaded', 'qapl_initialize_plugin');
     71require_once plugin_dir_path(__FILE__) . 'includes/class-initializer.php';
     72
     73add_action('plugins_loaded', static function () {
     74    QAPL_Quick_Ajax_Initializer::initialize();
     75});
  • quick-ajax-post-loader/trunk/readme.txt

    r3352831 r3358086  
    55Requires at least: 5.6
    66Tested up to: 6.8
    7 Stable tag: 1.8.0
     7Stable tag: 1.8.1
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    106106== Changelog ==
    107107
     108= 1.8.1 - 2025-09-08 =
     109- Improved plugin startup process with better class loading and dependency checks.
     110- Improved the way plugin scripts and styles are loaded for better reliability.
     111- Enhanced plugin stability by adding internal class verification before startup.
     112- Introduced internal logger with fallback to WordPress debug log.
     113- Cleaned up internal utility functions to support better error handling and production readiness.
     114
    108115= 1.8.0 - 2025-08-29 =
    109116- Major internal refactoring to improve plugin stability and long-term reliability.
Note: See TracChangeset for help on using the changeset viewer.