ID, UserMetaFields::PERSON_NAME, true ); $url = (string) get_user_meta( $user->ID, UserMetaFields::PERSON_URL, true ); printf( '

%s

', esc_html__( 'Acez SEO AI — author data (schema.org Person)', 'acez-seo' ) ); echo ''; printf( '', esc_attr( UserMetaFields::PERSON_NAME ), esc_html__( 'Name in schema.org', 'acez-seo' ), esc_attr( $name ), esc_html__( 'Overrides the author name in the Person node. Leave empty to use the display name from the profile.', 'acez-seo' ) ); printf( '', esc_attr( UserMetaFields::PERSON_URL ), esc_html__( 'Author URL in schema.org', 'acez-seo' ), esc_attr( $url ), esc_html__( 'Overrides the author URL in the Person node (e.g. a personal website). Leave empty to use the author archive URL.', 'acez-seo' ) ); echo ''; } public function save( int $user_id ): void { if ( ! isset( $_POST[ self::NONCE_FIELD ] ) ) { return; } $nonce = sanitize_text_field( wp_unslash( $_POST[ self::NONCE_FIELD ] ) ); if ( ! wp_verify_nonce( $nonce, self::NONCE_ACTION ) ) { return; } if ( ! current_user_can( 'edit_user', $user_id ) ) { return; } $name = isset( $_POST[ UserMetaFields::PERSON_NAME ] ) ? sanitize_text_field( wp_unslash( $_POST[ UserMetaFields::PERSON_NAME ] ) ) : ''; $url = isset( $_POST[ UserMetaFields::PERSON_URL ] ) ? esc_url_raw( wp_unslash( $_POST[ UserMetaFields::PERSON_URL ] ) ) : ''; $changed = $name !== (string) get_user_meta( $user_id, UserMetaFields::PERSON_NAME, true ) || $url !== (string) get_user_meta( $user_id, UserMetaFields::PERSON_URL, true ); update_user_meta( $user_id, UserMetaFields::PERSON_NAME, $name ); update_user_meta( $user_id, UserMetaFields::PERSON_URL, $url ); // The Person node is baked into the cached JSON-LD graph, and the // CacheInvalidator only watches acez_seo_* options — user meta needs // an explicit bump (only on an actual change). if ( $changed ) { CacheVersion::bump(); } } }