' . esc_html__( 'Settings successfully saved.', '24tt-document-verifier' ) . '
';
}
} else {
// Show Error Message
echo '' . esc_html__( 'Security check failed. Please refresh and try again.', '24tt-document-verifier' ) . '
';
}
}
// 2. RETRIEVE CURRENT SETTINGS
$all_categories = get_terms( array( 'taxonomy' => 'ttdvr_doc_category', 'hide_empty' => false ) );
$default_cats = array();
if ( ! empty( $all_categories ) && ! is_wp_error( $all_categories ) ) {
foreach ( $all_categories as $cat ) {
$default_cats[] = $cat->term_id;
}
}
$active_cats = get_option( 'ttdvr_public_categories', $default_cats );
$show_pdf = get_option( 'ttdvr_show_pdf_link', 'yes' );
$search_label = get_option( 'ttdvr_search_label', 'Enter Document ID / Reference Number / Certificate ID:' );
?>