'sanitize_text_field' ) ); register_setting( 'aigeschikt', 'aigeschikt_api_url', array( 'sanitize_callback' => 'aigeschikt_sanitize_api_url_setting' ) ); register_setting( 'aigeschikt', 'aigeschikt_api_key', array( 'sanitize_callback' => 'aigeschikt_sanitize_api_key_setting' ) ); register_setting( 'aigeschikt', 'aigeschikt_schema_mode', array( 'sanitize_callback' => function ( $v ) { return 'replace' === $v ? 'replace' : 'add'; }, 'default' => 'add', ) ); } /** * https only. Invalid input keeps the stored value and says so, instead of * silently saving an empty or insecure URL. * * @param mixed $v Input. * @return string */ function aigeschikt_sanitize_api_url_setting( $v ) { $schoon = aigeschikt_sanitize_api_url( $v ); if ( '' === $schoon && '' !== trim( (string) $v ) ) { add_settings_error( 'aigeschikt_api_url', 'aigeschikt_api_url_https', __( 'The API URL must start with https://; the previous value was kept.', 'aigeschikt-connector' ) ); return (string) get_option( 'aigeschikt_api_url', '' ); } return $schoon; } /** * The key field is write-only: leaving it empty keeps the stored key. The stored * key never appears in the HTML of the settings page again. * * @param mixed $v Input. * @return string */ function aigeschikt_sanitize_api_key_setting( $v ) { $v = sanitize_text_field( (string) $v ); return '' === $v ? (string) get_option( 'aigeschikt_api_key', '' ) : $v; } /** * Notices of the buttons travel through a per-user transient instead of as text * in the URL — a URL parameter that is shown as a success message is a free * social-engineering channel to an administrator. * * @param string $tekst Message. * @param string $terug URL to return to. * @return string The return URL with the flag. */ function aigeschikt_melding_url( $tekst, $terug ) { set_transient( 'aigeschikt_melding_' . get_current_user_id(), (string) $tekst, 120 ); return add_query_arg( 'aigeschikt_melding', '1', $terug ); } /** * Read and consume the current user's notice. * * @return string */ function aigeschikt_lees_melding() { $sleutel = 'aigeschikt_melding_' . get_current_user_id(); $tekst = get_transient( $sleutel ); if ( false !== $tekst ) { delete_transient( $sleutel ); } return is_string( $tekst ) ? $tekst : ''; } /** * Where the buttons send you back to. * * @return string */ function aigeschikt_settings_back_url() { $back = wp_get_referer(); return $back ? $back : admin_url( 'admin.php?page=aigeschikt' ); } /** * Render the settings page. */ function aigeschikt_render_settings_page() { if ( ! current_user_can( 'manage_options' ) ) { return; } $aig_ok = array( 'code' => array(), 'strong' => array(), ); ?>
' . esc_html( $aig_cache_nm ) . '' ); ?>
advanced-cache.php — WordPress’ own, documented mechanism for early logic, the same hook caching plugins rely on. Nothing changes for your visitors: they get the same page, just as fast. If a caching plugin already has its own advanced-cache.php, it keeps working — our measurement is placed in front of it, not in its place.', 'aigeschikt-connector' ), $aig_ok ); ?>
' . esc_html( $aig_cache_nm ) . '' ); ?>
Early measurement could not load. The safety layer caught the error — your site keeps running, only the measurement is paused. You do not need to do anything.', 'aigeschikt-connector' ), $aig_ok ); ?>
0 ) : ?>
' . esc_html( WP_CONTENT_DIR ) . '' ); ?> WP_CACHE is explicitly turned off (by another plugin or your host) — we do not change that automatically.', 'aigeschikt-connector' ), $aig_ok ); ?> WP_CACHE line to it.', 'aigeschikt-connector' ), $aig_ok ); ?>
wp-content, wp-includes) and create a new file advanced-cache.php in wp-content with the contents below. Is there already an advanced-cache.php from another caching plugin? Do not overwrite it — contact AIGeschikt and we will chain the two for you.', 'aigeschikt-connector' ), $aig_ok ); ?>require_once ABSPATH . \'wp-settings.php\'; near the bottom and paste the second line below directly above it, on its own line.', 'aigeschikt-connector' ), $aig_ok ); ?>
| 90 ? substr( $aig_u, 0, 90 ) . '…' : $aig_u ); ?> |
before the cache = counted before your cache served the page — those visits never reached WordPress and were invisible without this plugin. via WordPress = a visit where WordPress started normally. Every visit should appear here once.', 'aigeschikt-connector' ), $aig_ok ); ?>
Application Passwords (Users → Profile → Application Passwords).', 'aigeschikt-connector' ), $aig_ok ); ?>
' . esc_html__( 'The AIGeschikt Connector keeps a list of visits by AI crawlers (for example GPTBot or ClaudeBot) and, when the site is connected to AIGeschikt, sends it to AIGeschikt. Regular visitors are not recorded.', 'aigeschikt-connector' ) . '
' . '' . esc_html__( 'Suggested text:', 'aigeschikt-connector' ) . ' ' . esc_html__( 'When an AI crawler visits this site we record the crawler\'s name, its IP address, the visited page (URL, and the title if the page is published), the HTTP status and the time. This is stored for up to 90 days and shared with AIGeschikt (https://aigeschikt.nl), which uses it to report on this site\'s visibility in AI search. Visits of regular visitors are not recorded.', 'aigeschikt-connector' ) . '
'; wp_add_privacy_policy_content( 'AIGeschikt Connector', wp_kses_post( $content ) ); }