' . esc_html__( 'Settings', 'stubli' ) . '' ); return $links; } /** * Render the screen. */ public static function render() { if ( ! current_user_can( 'manage_options' ) ) { return; } $s = Settings::get(); $saved = isset( $_GET['saved'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended $row = static function ( $name, $label, $help, $checked ) { printf( '%2$s', esc_attr( $name ), esc_html( $label ), esc_html( $help ), checked( $checked, true, false ) ); }; ?>

·

' . esc_html__( 'open Webmention in Plugins', 'stubli' ) . '' ); ?>

'; } else { $row( 'look', __( 'Stubli look', 'stubli' ), __( 'Show your site in the Stubli design (recommended). Turn off to keep your current theme.', 'stubli' ), $s['look'] ); } $row( 'credit', __( 'Made with Stubli', 'stubli' ), __( 'Show a small "Made with Stubli · Make your own" line below your photos and in your footer, so visitors can find out how to get their own. Off unless you turn it on.', 'stubli' ), $s['credit'] ); ?>


403 ) ); } check_admin_referer( 'stubli_save_settings' ); // phpcs:disable WordPress.Security.NonceVerification.Missing -- checked above. $changes = array( 'search_engines' => ! empty( $_POST['search_engines'] ), 'credit' => ! empty( $_POST['credit'] ), 'block_ai' => ! empty( $_POST['block_ai'] ), 'on_break' => ! empty( $_POST['on_break'] ), 'who_can_comment' => isset( $_POST['who_can_comment'] ) ? sanitize_key( wp_unslash( $_POST['who_can_comment'] ) ) : 'friends_of_friends', 'pronouns' => isset( $_POST['pronouns'] ) ? sanitize_text_field( wp_unslash( $_POST['pronouns'] ) ) : '', ); if ( 'stubli' !== get_option( 'stylesheet' ) ) { $changes['look'] = ! empty( $_POST['look'] ); } Settings::update( $changes ); update_option( 'stubli_bio', isset( $_POST['bio'] ) ? mb_substr( sanitize_textarea_field( wp_unslash( $_POST['bio'] ) ), 0, 160 ) : '' ); // phpcs:enable wp_safe_redirect( admin_url( 'options-general.php?page=' . self::PAGE . '&saved=1' ) ); exit; } }