Hooks & Filters

Extend SiteNivo with WordPress actions and filters at module boundaries instead of editing plugin files. Prefer capability checks, late escaping, and documented hooks.

Lifecycle

HookTypeNotes
sitenivo_loadedactionFires after the plugin boots. Passes the Plugin instance.
sitenivo_modulesfilterFilter the module map before modules register.
sitenivo_activate / sitenivo_deactivateactionActivation / deactivation side effects.
sitenivo_migrationsfilterExtend DB migration list.

Fields & locations

HookTypeNotes
sitenivo_register_field_typesactionRegister custom field types.
sitenivo_register_location_typesactionRegister custom location rule types.
sitenivo_field_docs_urlfilterOverride docs URL for a field type.

Duplicate Post

HookTypeNotes
sitenivo_duplicate_post_typesfilterWhich post types expose Duplicate.
sitenivo_duplicate_post_datafilterFilter the new post array before insert.
sitenivo_duplicate_postactionAfter a duplicate is created ($new_id, original $post).
sitenivo_duplicate_post_fieldsactionPro/extension hook for copying SiteNivo field meta.

Import / Export

HookTypeNotes
sitenivo_ie_typesfilterExportable type keys.
sitenivo_ie_sectionsfilterAdmin UI sections.
sitenivo_ie_collect_{$type}filterCollect payload for a type.

Tools

HookTypeNotes
sitenivo_url_replace_completedactionAfter a replace ($old, $new, $stats).
sitenivo_permalink_manager_post_typesfilterSupported post types for Permalink Manager.
sitenivo_social_buttons_settingsfilterFilter Social Buttons settings.
sitenivo_social_buttons_frontend_htmlfilterFilter rendered front-end HTML.
sitenivo_social_buttons_admin_preview_enabledfilterPro preview gate (default false on Free).
sitenivo_maintenance_register_source / sitenivo_coming_soon_register_sourcefilterPro/extension sources for overlays.

Example

PHP
add_action( 'sitenivo_loaded', function () {
    // Safe place to attach feature integrations.
} );

add_filter( 'sitenivo_duplicate_post_types', function ( array $types ) {
    $types[] = 'product';
    return array_values( array_unique( $types ) );
} );

Portable CPT code

For CPTs/taxonomies without runtime hooks, export PHP from Code Generator.

Related docs

Developers · Template Functions · Code Generator