|
3 | 3 | * Plugin Name: WPGPT
|
4 | 4 | * Plugin URI: https://github.com/dreamsicle-io/wpgpt/
|
5 | 5 | * Description: An experimental plugin integrating ChatGPT with WordPress.
|
6 |
| - * Version: 0.3.1 |
| 6 | + * Version: 0.4.0 |
7 | 7 | * Requires at least: 6.0.0
|
8 | 8 | * Requires PHP: 8.1.0
|
9 | 9 | * Author: Dreamsicle
|
|
29 | 29 | require WPGPT_PATH . '/includes/class-wpgpt-caption-generator.php';
|
30 | 30 | require WPGPT_PATH . '/includes/class-wpgpt-utils.php';
|
31 | 31 |
|
32 |
| -add_action( 'plugins_loaded', array( new WPGPT_API(), 'init' ), 10 ); |
33 |
| -add_action( 'plugins_loaded', array( new WPGPT_Settings(), 'init' ), 10 ); |
34 |
| -add_action( 'plugins_loaded', array( new WPGPT_Post_Generator(), 'init' ), 10 ); |
35 |
| -add_action( 'plugins_loaded', array( new WPGPT_Elaborator(), 'init' ), 10 ); |
36 |
| -add_action( 'plugins_loaded', array( new WPGPT_Caption_Generator(), 'init' ), 10 ); |
| 32 | +/** |
| 33 | + * Initialize |
| 34 | + * |
| 35 | + * @since 0.4.0 |
| 36 | + */ |
| 37 | +function wpgpt_init() { |
| 38 | + add_action( 'init', array( new WPGPT_API(), 'init' ), 10 ); |
| 39 | + add_action( 'init', array( new WPGPT_Settings(), 'init' ), 10 ); |
| 40 | + add_action( 'init', array( new WPGPT_Post_Generator(), 'init' ), 10 ); |
| 41 | + add_action( 'init', array( new WPGPT_Elaborator(), 'init' ), 10 ); |
| 42 | + add_action( 'init', array( new WPGPT_Caption_Generator(), 'init' ), 10 ); |
| 43 | +} |
| 44 | + |
| 45 | +add_action( 'init', 'wpgpt_init', 0 ); |
0 commit comments