Filters change a value without replacing a function. NiroHelp exposes seven.
nirohelp_settings_menus #
apply_filters( 'nirohelp_settings_menus', $menus );
Receives the whole settings schema, keyed by tab slug. Add a tab, a section or
a field; return the modified array. Both the classic Settings API screen and
GET /settings/schema (which the React screen renders from) read the filtered
result.
add_filter( 'nirohelp_settings_menus', function ( $menus ) {
$menus['general']['sections']['branding'] = [
'label' => 'Branding',
'desc' => 'Custom branding overrides.',
'fields' => [
'logo_url' => [
'type' => 'text',
'label' => 'Logo URL',
'default' => '',
],
],
];
return $menus;
} );
Do not call Settings::get() from inside this filter. Settings::get()
reads the option and, on a miss, would call back into the schema — the
recursion this design deliberately breaks. For the same reason, never call
nirohelp_ticket_form_fields() here.
nirohelp_product_post_types #
apply_filters( 'nirohelp_product_post_types', [] );
nirohelp_product is registered against an empty post type list, and NiroHelp
appends docs and tickets through this filter. Append your own CPT to make
products assignable there too:
add_filter( 'nirohelp_product_post_types', function ( $types ) {
$types[] = 'release_note';
return $types;
} );
nirohelp_auto_status_transition_on_comment #
apply_filters( 'nirohelp_auto_status_transition_on_comment', true, $ticket, $is_client, $comment_id );
Default true. Return false to skip the automatic status flip (client reply
-> Waiting, agent reply -> In Progress) for one specific comment. The auto
responder wraps its own add_comment() call in this so a bot reply does not
move the ticket when Change ticket status is off.
add_filter( 'nirohelp_auto_status_transition_on_comment', function ( $allow, $ticket, $is_client, $comment_id ) {
// Don't auto-flip when an agent posts an internal note.
if ( ! $is_client && get_comment_meta( $comment_id, 'is_internal', true ) ) {
return false;
}
return $allow;
}, 10, 4 );
nirohelp_get_posts #
apply_filters( 'nirohelp_get_posts', $posts, $args );
Wraps every call to Helpers\Utility::get_posts(). Receives the result array
and the original arguments. Use it to reorder, to hide posts from some
readers, or to attach extra data to the rows.
nirohelp_docs_api_max_per_page #
apply_filters( 'nirohelp_docs_api_max_per_page', 100 );
The ceiling the count parameter on GET /docs/ and
GET /docs/product/{slug} is clamped to. Raise it if you serve a large library
to a trusted consumer; it exists so an anonymous caller cannot ask for the
whole table in one request.
nirohelp_can_register_users #
apply_filters( 'nirohelp_can_register_users', $allowed );
The single gate on every public path that would create a WordPress account —
nirohelp_get_user(), API\Authenticate::login() and ::wp_signup(), and the
sign-up panel in the login form view. $allowed is already true when core’s
users_can_register is on or the plugin’s own Create accounts for new
clients box is ticked.
// Only ever create accounts for one domain.
add_filter( 'nirohelp_can_register_users', function ( $allowed ) {
$email = isset( $_POST['email'] ) ? sanitize_email( wp_unslash( $_POST['email'] ) ) : '';
return $allowed && str_ends_with( $email, '@example.com' );
} );
Add this check to any new account-creating path you write.
nirohelp_encryption_seed #
apply_filters( 'nirohelp_encryption_seed', $seed );
The seed used to derive the key that encrypts stored credentials. Change it and
existing ciphertext stops decrypting, so treat it as install-time
configuration, not a runtime knob.
Not a filter: NIROHELP_CLOUD_SITE #
Pointing NiroHelp at a different AI backend is a constant, not a filter.
Define it in wp-config.php, before plugins load:
define( 'NIROHELP_CLOUD_SITE', 'https://rag.dev.example.com' );
nirohelp_cloud_site_url() reads it and falls back to
https://my.nirosuite.com. There is no nirohelp_cloud_site_url filter and no
nirohelp_rag_site_url filter; if you find either named in older notes, it is
this constant they meant.
Not a filter yet: nirohelp_ai_upgrade_url #
apply_filters( 'nirohelp_ai_upgrade_url', $url, $creds ) exists in
Controllers\Admin\AI, but it sits behind if ( false && 'free' === $plan )
— an intentionally dead branch waiting on paid plans. It never fires
today. Do not build on it.
A note on stability #
The list is deliberately small. If you want to filter something that is not
exposed, prefer hooking the surrounding action and overwriting the value.
Filters that prove broadly useful get added in later releases; ad-hoc ones
added to a fork break on update.
Was this doc helpful?