Changeset 3241875
- Timestamp:
- 02/17/2025 11:59:27 AM (12 months ago)
- Location:
- a-testimonial-builder
- Files:
-
- 4 edited
-
tags/1.0.0/a-testimonial-builder.php (modified) (1 diff)
-
tags/1.0.0/includes/ATBS_Main.php (modified) (2 diffs)
-
trunk/a-testimonial-builder.php (modified) (1 diff)
-
trunk/includes/ATBS_Main.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
a-testimonial-builder/tags/1.0.0/a-testimonial-builder.php
r3225086 r3241875 16 16 exit; // Exit if accessed directly 17 17 18 18 19 // Define constants 19 20 define('ATBS_DIR', plugin_dir_path(__FILE__)); 20 21 define('ATBS_URL', plugin_dir_url(__FILE__)); 21 22 23 // Check if Composer autoloader exists. 24 if (!file_exists(ATBS_DIR . 'vendor/autoload.php')) { 25 26 function atbs_plugin_autoload_notice() 27 { 28 echo '<div class="notice notice-error"><p><strong>A+ Testimonial Builder:</strong> The Composer autoloader is missing. Please run <code>composer install</code> inside the plugin folder.</p></div>'; 29 } 30 31 add_action('admin_notices', 'atbs_plugin_autoload_notice'); 32 return; 33 } 34 35 // Load Composer autoloader. 36 require_once ATBS_DIR . 'vendor/autoload.php'; 37 38 // Use the correct namespace 39 use DavidWenner\ATestimonialBuilder\ATBS_Hooks; 22 40 use DavidWenner\ATestimonialBuilder\ATBS_Main; 23 41 24 /** 25 * Checks basic requirements and loads the plugin. 26 * 27 * @since 1.0.0 28 */ 29 function atbs_plugin_load() 30 { 31 // Check Composer autoloader exists. 32 if (!file_exists(ATBS_DIR . 'vendor/autoload.php')) { 33 add_action('admin_notices', 'wp_plugin_check_display_composer_autoload_notice'); 34 return; 35 } 42 // Register activation and deactivation hooks 43 register_activation_hook(__FILE__, [ATBS_Hooks::class, 'atbs_activation_hook']); 44 register_deactivation_hook(__FILE__, [ATBS_Hooks::class, 'atbs_deactivation_hook']); 45 register_uninstall_hook(__FILE__, [ATBS_Hooks::class, 'atbs_deactivation_hook']); 36 46 37 // Load the Composer autoloader. 38 require_once ATBS_DIR . 'vendor/autoload.php'; 39 40 $instance = new ATBS_Main(); 41 } 42 43 atbs_plugin_load(); 44 47 // Initialize the plugin 48 new ATBS_Main(); -
a-testimonial-builder/tags/1.0.0/includes/ATBS_Main.php
r3225086 r3241875 9 9 use DavidWenner\ATestimonialBuilder\ATBS_FlashMessages; 10 10 use DavidWenner\ATestimonialBuilder\ATBS_Shortcodes; 11 use DavidWenner\ATestimonialBuilder\ATBS_Hooks;12 11 13 12 /** … … 26 25 new ATBS_FlashMessages(); 27 26 new ATBS_Shortcodes(); 28 29 $hooks = new ATBS_Hooks();30 31 // Register activation and deactivation hooks32 register_activation_hook(__FILE__, [$hooks, 'atbs_activation_hook']);33 register_deactivation_hook(__FILE__, [$hooks, 'atbs_deactivation_hook']);34 register_uninstall_hook(__FILE__, [$hooks, 'atbs_deactivation_hook']);35 27 } 36 28 } -
a-testimonial-builder/trunk/a-testimonial-builder.php
r3225086 r3241875 16 16 exit; // Exit if accessed directly 17 17 18 18 19 // Define constants 19 20 define('ATBS_DIR', plugin_dir_path(__FILE__)); 20 21 define('ATBS_URL', plugin_dir_url(__FILE__)); 21 22 23 // Check if Composer autoloader exists. 24 if (!file_exists(ATBS_DIR . 'vendor/autoload.php')) { 25 26 function atbs_plugin_autoload_notice() 27 { 28 echo '<div class="notice notice-error"><p><strong>A+ Testimonial Builder:</strong> The Composer autoloader is missing. Please run <code>composer install</code> inside the plugin folder.</p></div>'; 29 } 30 31 add_action('admin_notices', 'atbs_plugin_autoload_notice'); 32 return; 33 } 34 35 // Load Composer autoloader. 36 require_once ATBS_DIR . 'vendor/autoload.php'; 37 38 // Use the correct namespace 39 use DavidWenner\ATestimonialBuilder\ATBS_Hooks; 22 40 use DavidWenner\ATestimonialBuilder\ATBS_Main; 23 41 24 /** 25 * Checks basic requirements and loads the plugin. 26 * 27 * @since 1.0.0 28 */ 29 function atbs_plugin_load() 30 { 31 // Check Composer autoloader exists. 32 if (!file_exists(ATBS_DIR . 'vendor/autoload.php')) { 33 add_action('admin_notices', 'wp_plugin_check_display_composer_autoload_notice'); 34 return; 35 } 42 // Register activation and deactivation hooks 43 register_activation_hook(__FILE__, [ATBS_Hooks::class, 'atbs_activation_hook']); 44 register_deactivation_hook(__FILE__, [ATBS_Hooks::class, 'atbs_deactivation_hook']); 45 register_uninstall_hook(__FILE__, [ATBS_Hooks::class, 'atbs_deactivation_hook']); 36 46 37 // Load the Composer autoloader. 38 require_once ATBS_DIR . 'vendor/autoload.php'; 39 40 $instance = new ATBS_Main(); 41 } 42 43 atbs_plugin_load(); 44 47 // Initialize the plugin 48 new ATBS_Main(); -
a-testimonial-builder/trunk/includes/ATBS_Main.php
r3225086 r3241875 9 9 use DavidWenner\ATestimonialBuilder\ATBS_FlashMessages; 10 10 use DavidWenner\ATestimonialBuilder\ATBS_Shortcodes; 11 use DavidWenner\ATestimonialBuilder\ATBS_Hooks;12 11 13 12 /** … … 26 25 new ATBS_FlashMessages(); 27 26 new ATBS_Shortcodes(); 28 29 $hooks = new ATBS_Hooks();30 31 // Register activation and deactivation hooks32 register_activation_hook(__FILE__, [$hooks, 'atbs_activation_hook']);33 register_deactivation_hook(__FILE__, [$hooks, 'atbs_deactivation_hook']);34 register_uninstall_hook(__FILE__, [$hooks, 'atbs_deactivation_hook']);35 27 } 36 28 }
Note: See TracChangeset
for help on using the changeset viewer.