`: the key * field is saved by the same Save button as every other setting, and the field helper defined there * (`mybot_field_secret()`) draws it, so a stored secret is masked the same way everywhere. * * Until 1.11.0 this was a top-level screen of its own, "AI House → Add-ons". It moved into Settings * because it is a setting, and because two menu entries describing the same plugins meant the answer * to "how do I switch this on?" lived on a different screen from every other answer. * * @package AI House */ defined( 'ABSPATH' ) || exit; $mybot_addons = mybot()->addons; $mybot_known = $mybot_addons->all(); $mybot_rejected = $mybot_addons->problems(); $mybot_settings = mybot()->settings; $mybot_key_status = (string) $mybot_settings->get( 'addon_key_status', '' ); $mybot_key_problem = (string) $mybot_settings->get( 'addon_key_problem', '' ); $mybot_key_checked = (int) $mybot_settings->get( 'addon_key_checked_at', 0 ); /* * The verdict, in words. * * The stored value is a CODE, not a sentence: a message written into the database is a message * frozen in whatever language the administrator was using on the day they pressed the button. The * code is turned into a sentence here, at the moment it is read. */ $mybot_key_message = ''; $mybot_key_tone = 'info'; if ( $mybot_key_checked < 1 ) { $mybot_key_message = __( 'Not checked yet.', 'aihouse' ); } elseif ( 'empty' === $mybot_key_status ) { $mybot_key_message = __( 'Nothing was entered, so there was nothing to check.', 'aihouse' ); } elseif ( 'shape-ok' === $mybot_key_status ) { $mybot_key_tone = 'ok'; $mybot_key_message = __( 'The shape is right — and nothing has been verified. This build has no licence server, so no key is checked against anything yet.', 'aihouse' ); } elseif ( 'shape-bad' === $mybot_key_status ) { $mybot_key_tone = 'error'; $mybot_key_reasons = array( 'too-short' => __( 'it is shorter than the shortest key this plugin issues.', 'aihouse' ), 'too-long' => __( 'it is longer than the longest key this plugin issues.', 'aihouse' ), 'bad-characters' => __( 'it contains something other than letters, digits or dashes.', 'aihouse' ), ); $mybot_key_reason = isset( $mybot_key_reasons[ $mybot_key_problem ] ) ? $mybot_key_reasons[ $mybot_key_problem ] : __( 'the reason was not recorded.', 'aihouse' ); $mybot_key_message = sprintf( /* translators: %s: why the key was rejected, as a short clause */ __( 'The key does not look like a key: %s', 'aihouse' ), $mybot_key_reason ); } ?>

0 ) : ?>


' . esc_html__( 'Plugins', 'aihouse' ) . '' ); ?>

mybot_register_addons' ); ?>

' . esc_html( (string) MYBOT_ADDON_API ) . '', 'MYBOT_ADDON_API' ); ?>