Changeset 3829246
- Timestamp:
- 11/27/2026 10:35:57 AM (less than one hour ago)
- Location:
- nora-ai-publisher
- Files:
-
- 8 edited
- 1 copied
-
tags/1.2.1 (copied) (copied from nora-ai-publisher/trunk )
-
tags/1.2.1/includes/class-norap-activation.php (modified) (4 diffs)
-
tags/1.2.1/includes/class-norap-api-client.php (modified) (1 diff)
-
tags/1.2.1/nora-ai-publisher.php (modified) (2 diffs)
-
tags/1.2.1/readme.txt (modified) (3 diffs)
-
trunk/includes/class-norap-activation.php (modified) (4 diffs)
-
trunk/includes/class-norap-api-client.php (modified) (1 diff)
-
trunk/nora-ai-publisher.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nora-ai-publisher/tags/1.2.1/includes/class-norap-activation.php
r3689459 r3829246 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 11 exit; 12 } 13 14 /** 15 * Save a setup failure for the admin page and report it to the backend. 16 * Only for failures the backend cannot see: when registration reaches it and 17 * is refused there, it already logs that itself. 18 */ 19 function norap_registration_failed( $stage, $message ) { 20 update_option( 'norap_registration_error', $message ); 21 Norap_Api_Client::report_registration_error( $stage, $message ); 12 22 } 13 23 … … 25 35 $user = wp_get_current_user(); 26 36 if ( ! $user || ! $user->exists() ) { 27 update_option( 'norap_registration_error', 'No current user context during activation.' );37 norap_registration_failed( 'no_user', 'No current user context during activation.' ); 28 38 return; 29 39 } 30 40 31 41 if ( ! class_exists( 'WP_Application_Passwords' ) ) { 32 update_option( 'norap_registration_error', 'Application Passwords are not available on this WordPress install (requires WordPress 5.6+).' );42 norap_registration_failed( 'no_app_passwords', 'Application Passwords are not available on this WordPress install (requires WordPress 5.6+).' ); 33 43 return; 34 44 } … … 41 51 42 52 if ( is_wp_error( $created ) ) { 43 update_option( 'norap_registration_error', $created->get_error_message() );53 norap_registration_failed( 'app_password_create', $created->get_error_message() ); 44 54 return; 45 55 } … … 60 70 61 71 if ( is_wp_error( $response ) ) { 62 update_option( 'norap_registration_error', $response->get_error_message() );72 norap_registration_failed( 'register_request', $response->get_error_message() ); 63 73 WP_Application_Passwords::delete_application_password( $user->ID, $item['uuid'] ); 64 74 return; -
nora-ai-publisher/tags/1.2.1/includes/class-norap-api-client.php
r3734394 r3829246 61 61 'action' => 'deregister', 62 62 'tenantId' => $tenant_id, 63 ) 64 ); 65 } 66 67 /** 68 * Tell the backend that setup failed on this site, so failures that 69 * never reach registration can still be seen. Sends no credentials. 70 * Fire-and-forget: activation must not wait on it or fail because of it. 71 */ 72 public static function report_registration_error( $stage, $error ) { 73 global $wp_version; 74 wp_remote_post( 75 self::base() . '/api/webhooks/wordpress', 76 array( 77 'timeout' => 5, 78 'blocking' => false, 79 'headers' => array( 'Content-Type' => 'application/json' ), 80 'body' => wp_json_encode( 81 array( 82 'action' => 'registration_error', 83 'siteUrl' => home_url( '/' ), 84 'stage' => $stage, 85 'error' => $error, 86 'wpVersion' => $wp_version, 87 'phpVersion' => PHP_VERSION, 88 'pluginVersion' => NORAP_VERSION, 89 ) 90 ), 63 91 ) 64 92 ); -
nora-ai-publisher/tags/1.2.1/nora-ai-publisher.php
r3734712 r3829246 4 4 * Plugin URI: https://noraaipublisher.com 5 5 * Description: Write and publish blog posts automatically with AI. No API key needed. Articles built to be quoted by Google and AI assistants. Requires connecting to the Nora AI Publisher API (see the "External services" section of the readme). 6 * Version: 1.2. 06 * Version: 1.2.1 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.4 … … 23 23 define( 'NORAP_PLUGIN_FILE', __FILE__ ); 24 24 define( 'NORAP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 25 define( 'NORAP_VERSION', '1.2. 0' );25 define( 'NORAP_VERSION', '1.2.1' ); 26 26 27 27 require_once NORAP_PLUGIN_DIR . 'includes/class-norap-api-client.php'; -
nora-ai-publisher/tags/1.2.1/readme.txt
r3734712 r3829246 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.2. 07 Stable tag: 1.2.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 83 83 * Your settings: the subjects you describe, keywords, tone, languages, publishing mode and schedule (used to write articles that fit your site and to publish them when you asked). 84 84 * Your site name and admin email (used to register your account). 85 * If setup fails on your site: your site's URL, the step that failed, the error message, and your WordPress, PHP and plugin versions (used only so we can find and fix setup problems; no passwords or content are sent). 85 86 86 87 What the service sends back: … … 183 184 184 185 == Changelog == 186 187 = 1.2.1 = 188 * Improved: if setup fails when you activate the plugin, the reason is sent to us so we can fix it (see External services). No passwords or content are sent. 185 189 186 190 = 1.2.0 = -
nora-ai-publisher/trunk/includes/class-norap-activation.php
r3689459 r3829246 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 11 exit; 12 } 13 14 /** 15 * Save a setup failure for the admin page and report it to the backend. 16 * Only for failures the backend cannot see: when registration reaches it and 17 * is refused there, it already logs that itself. 18 */ 19 function norap_registration_failed( $stage, $message ) { 20 update_option( 'norap_registration_error', $message ); 21 Norap_Api_Client::report_registration_error( $stage, $message ); 12 22 } 13 23 … … 25 35 $user = wp_get_current_user(); 26 36 if ( ! $user || ! $user->exists() ) { 27 update_option( 'norap_registration_error', 'No current user context during activation.' );37 norap_registration_failed( 'no_user', 'No current user context during activation.' ); 28 38 return; 29 39 } 30 40 31 41 if ( ! class_exists( 'WP_Application_Passwords' ) ) { 32 update_option( 'norap_registration_error', 'Application Passwords are not available on this WordPress install (requires WordPress 5.6+).' );42 norap_registration_failed( 'no_app_passwords', 'Application Passwords are not available on this WordPress install (requires WordPress 5.6+).' ); 33 43 return; 34 44 } … … 41 51 42 52 if ( is_wp_error( $created ) ) { 43 update_option( 'norap_registration_error', $created->get_error_message() );53 norap_registration_failed( 'app_password_create', $created->get_error_message() ); 44 54 return; 45 55 } … … 60 70 61 71 if ( is_wp_error( $response ) ) { 62 update_option( 'norap_registration_error', $response->get_error_message() );72 norap_registration_failed( 'register_request', $response->get_error_message() ); 63 73 WP_Application_Passwords::delete_application_password( $user->ID, $item['uuid'] ); 64 74 return; -
nora-ai-publisher/trunk/includes/class-norap-api-client.php
r3734394 r3829246 61 61 'action' => 'deregister', 62 62 'tenantId' => $tenant_id, 63 ) 64 ); 65 } 66 67 /** 68 * Tell the backend that setup failed on this site, so failures that 69 * never reach registration can still be seen. Sends no credentials. 70 * Fire-and-forget: activation must not wait on it or fail because of it. 71 */ 72 public static function report_registration_error( $stage, $error ) { 73 global $wp_version; 74 wp_remote_post( 75 self::base() . '/api/webhooks/wordpress', 76 array( 77 'timeout' => 5, 78 'blocking' => false, 79 'headers' => array( 'Content-Type' => 'application/json' ), 80 'body' => wp_json_encode( 81 array( 82 'action' => 'registration_error', 83 'siteUrl' => home_url( '/' ), 84 'stage' => $stage, 85 'error' => $error, 86 'wpVersion' => $wp_version, 87 'phpVersion' => PHP_VERSION, 88 'pluginVersion' => NORAP_VERSION, 89 ) 90 ), 63 91 ) 64 92 ); -
nora-ai-publisher/trunk/nora-ai-publisher.php
r3734712 r3829246 4 4 * Plugin URI: https://noraaipublisher.com 5 5 * Description: Write and publish blog posts automatically with AI. No API key needed. Articles built to be quoted by Google and AI assistants. Requires connecting to the Nora AI Publisher API (see the "External services" section of the readme). 6 * Version: 1.2. 06 * Version: 1.2.1 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.4 … … 23 23 define( 'NORAP_PLUGIN_FILE', __FILE__ ); 24 24 define( 'NORAP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 25 define( 'NORAP_VERSION', '1.2. 0' );25 define( 'NORAP_VERSION', '1.2.1' ); 26 26 27 27 require_once NORAP_PLUGIN_DIR . 'includes/class-norap-api-client.php'; -
nora-ai-publisher/trunk/readme.txt
r3734712 r3829246 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.2. 07 Stable tag: 1.2.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 83 83 * Your settings: the subjects you describe, keywords, tone, languages, publishing mode and schedule (used to write articles that fit your site and to publish them when you asked). 84 84 * Your site name and admin email (used to register your account). 85 * If setup fails on your site: your site's URL, the step that failed, the error message, and your WordPress, PHP and plugin versions (used only so we can find and fix setup problems; no passwords or content are sent). 85 86 86 87 What the service sends back: … … 183 184 184 185 == Changelog == 186 187 = 1.2.1 = 188 * Improved: if setup fails when you activate the plugin, the reason is sent to us so we can fix it (see External services). No passwords or content are sent. 185 189 186 190 = 1.2.0 =
Note:
See TracChangeset
for help on using the changeset viewer.