0, 'debug_enabled' => 0, 'proxy_type' => 'http', 'proxies' => array(), 'domains' => array( 'api.openai.com', 'api.anthropic.com', 'generativelanguage.googleapis.com', ), 'keys' => array( 'openai' => '', 'anthropic' => '', 'google' => '', ), 'key_enabled' => array( 'openai' => 1, 'anthropic' => 1, 'google' => 1, ), ); } /** * Хук активации: задаёт настройки по умолчанию, если их ещё нет. * * @since 1.0.0 * * @return void */ public static function activate() { if ( false === get_option( AIPMSP_OPTION_KEY, false ) ) { add_option( AIPMSP_OPTION_KEY, self::get_default_settings() ); } } } register_activation_hook( __FILE__, array( 'AIPMSP_Plugin', 'activate' ) ); /** * Запуск плагина после загрузки всех плагинов. * * @since 1.0.0 * * @return void */ function aipmsp_bootstrap() { AIPMSP_Plugin::instance(); } add_action( 'plugins_loaded', 'aipmsp_bootstrap' );