CRAI LinkSense 1.68.6 has 10 actions and 62 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when CRAI LinkSense fires an action
add_action( 'crai_ls_activate', function() {
// Your code runs here.
}, 10, 1 );
// Change a value CRAI LinkSense is about to use
add_filter( 'crai_ls_anchor_phrases', function( $phrases, $target_id ) {
// Change $phrases here.
return $phrases;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters the candidate anchor phrases for a target post. */ apply_filters( 'crai_ls_anchor_phrases', $phrases, $target_id ); -
/** * Whether something can write wording that is not already on the page. */ apply_filters( 'crai_ls_can_word_freely', false ); -
/** * Pending suggestion ids on this post that a force-regeneration must not * delete. */ apply_filters( 'crai_ls_protected_suggestion_ids', array(), (int) $source_id ); -
/** * Fires after the engine's own tables are in place. */ do_action( 'crai_ls_activate' ); -
/** * Fires after the plugin's own admin assets are enqueued. */ do_action( 'crai_ls_admin_assets', $hook, $config ); -
/** * The configuration object handed to the admin scripts. */ apply_filters( 'crai_ls_admin_config', $config, $hook ); -
/** * About to delete and re-derive the pending suggestions. */ do_action( 'crai_ls_before_rebuild' ); -
/** * Fires once the engine is wired up. */ do_action( 'crai_ls_booted' ); -
/** * Filters the full adapter list, allowing order to be changed. */ apply_filters( 'crai_ls_content_sources', self::$adapters ); -
/** * Filters the declared target phrases for a post. */ apply_filters( 'crai_ls_declared_phrases', $out, $post_id ); -
/** * Filters the generic-anchor blocklist. */ apply_filters( 'crai_ls_generic_anchors', $list ); -
/** * Filters the indexable HTML for a post. */ apply_filters( 'crai_ls_indexable_html', $html, $post, $adapter ); -
/** * Place this suggestion instead of the built-in placement. */ apply_filters( 'crai_ls_inject_suggestion', null, $suggestion, $doc, $xpath, $settings ); -
/** * How closely related a page must be to be offered for manual linking. */ apply_filters( 'crai_ls_manual_link_floor', (float) CRAI_LS_Settings::get( 'min_score', 0.30 ) ); -
/** * Block types never written into. */ apply_filters( 'crai_ls_persist_forbidden_blocks', $forbidden ); -
/** * Undo prose edits an extension wrote into this post's content. */ apply_filters( 'crai_ls_persist_unwind', $content, (int) $post_id ); -
/** * Filters the placement judgement for a sentence. */ apply_filters( 'crai_ls_placement_judgement', $judgement, $sentence, $target_id, $source_id ); -
/** * Fires when a scan has read every page. */ do_action( 'crai_ls_rebuild_finished' ); -
/** * Allows third parties to add builder adapters. */ do_action( 'crai_ls_register_content_sources' ); -
/** * Skip the built-in matcher for this source. */ apply_filters( 'crai_ls_skip_generation', false, (int) $source_id ); -
/** * Stored rewrites for a set of suggestions, keyed by suggestion id. */ apply_filters( 'crai_ls_suggestion_rewrites', array(), array_map( 'intval', wp_list_pluck( $rows, 'id' ) ) ); -
/** * The finished suggestion set, immediately before it is written. */ apply_filters( 'crai_ls_suggestions', $suggestions, (int) $source_id, array( 'text' => $text, 'html' => $html, 'word_count' => $word_count, 'candidates' => $candidates, 'existing' => $existing, 'settings' => $settings, 'headroom' => $headroom, ) ); -
/** * Fires once the suggestions for a source have been written. */ do_action( 'crai_ls_suggestions_stored', (int) $source_id, $stored ); -
/** * Run any migrations belonging to an extension. */ do_action( 'crai_ls_upgrade' ); -
/** * How much quality a fresh phrase may give up to avoid a repeat. */ apply_filters( 'crai_ls_variety_band', 0.72 ); -
do_action( 'crai_ls_log', 'info', 'match', 'Looked for links to ' . count( $targets ) . ' page(s) that nothing links to; created ' . $created . ' suggestion(s).', array( 'targets' => count( $targets ), 'created' => $created ) ); -
apply_filters( 'crai_ls_rewrites_table', '' ); -
do_action( 'crai_ls_suggestion_changed', (int) $row['source_id'] ); -
apply_filters( 'crai_ls_max_anchor_words', 10 ); -
apply_filters( 'crai_ls_title_template_limit', self::relaxed_wording() ? 12 : 3 ); -
apply_filters( 'crai_ls_min_anchor_distinctiveness', 0.35 ); -
apply_filters( 'crai_ls_suggestion_rewrite', null, (int) $row['id'] ); -
apply_filters( 'crai_ls_absolute_link_ceiling', 100 ); -
apply_filters( 'crai_ls_bm25_b', 0.75 ); -
apply_filters( 'crai_ls_bm25_k1', 1.2 ); -
apply_filters( 'crai_ls_boilerplate_sample', 60 ); -
apply_filters( 'crai_ls_bulk_limit', 100 ); -
apply_filters( 'crai_ls_container_nouns', array( 'focus', 'overview', 'summary', 'breakdown', 'roundup', 'rundown', 'list', 'listing', 'range', 'selection', 'section', 'part', 'area', 'aspect', 'aspects', 'factor', 'factors', 'point', 'points', 'thing', 'things', 'stuff', 'detail', 'details', 'info', 'basics', 'essentials', 'considerations', 'notes', ) ); -
apply_filters( 'crai_ls_cosine_strong', 0.45 ); -
apply_filters( 'crai_ls_cross_reference_patterns', array( 'compare (with|to|against)', 'check out our', 'read (our|more)', 'see (our|also)', 'learn more', 'our (analysis|guide|review|comparison) of', 'for (comparisons|more) (with|on|about)', 'find out more', 'as (covered|discussed) in', 'related (reading|articles|posts)', 'this article will (explore|cover|explain)', 'below we have listed', 'here we will go into', 'you will find', 'listed below', ) ); -
apply_filters( 'crai_ls_diagnose_seconds', 15 ); -
apply_filters( 'crai_ls_exact_match_cap', 2 ); -
apply_filters( 'crai_ls_furniture_classes', array( 'toc', 'table-of-contents', 'ez-toc', 'ez-toc-container', 'lwptoc', 'breadcrumb', 'breadcrumbs', 'pagination', 'pager', 'share', 'sharing', 'share-buttons', 'social', 'social-share', 'related', 'related-posts', 'related-articles', 'relatedposts', 'widget', 'widget-area', 'sidebar', 'menu', 'nav', 'navigation', 'comment', 'comments', 'commentlist', 'site-header', 'site-footer', ) ); -
apply_filters( 'crai_ls_furniture_markers', array( 'about this article', 'about the author', 'about this guide', 'risk warning', 'affiliate disclosure', 'advertiser disclosure', 'editorial policy', 'how we test', 'our methodology', 'table of contents', 'terms and conditions', 'privacy policy', ) ); -
apply_filters( 'crai_ls_label_heading_openers', array( 'who', 'what', 'when', 'where', 'why', 'how', 'can', 'do', 'does', 'is', 'are', 'should', 'will', 'would', 'could', 'the short', 'our ', 'my ', 'your ', 'frequently', 'side by', 'in summary', 'final', 'bottom', 'key ', 'quick ', 'before ', 'after ', 'getting ', 'let ', 'here', 'there', ) ); -
apply_filters( 'crai_ls_managed_inbound_cap', 25 ); -
apply_filters( 'crai_ls_max_declared_phrases', 8 ); -
apply_filters( 'crai_ls_max_phrase_words', 7 ); -
apply_filters( 'crai_ls_max_suggestions_per_source', 5 ); -
apply_filters( 'crai_ls_min_context_words', 3 ); -
apply_filters( 'crai_ls_min_phrase_words', 2 ); -
apply_filters( 'crai_ls_min_placement_hits', 1 ); -
apply_filters( 'crai_ls_min_word_relevance', 0.12 ); -
apply_filters( 'crai_ls_mining_sentence_budget', 60 ); -
apply_filters( 'crai_ls_opportunities_per_source', 3 ); -
apply_filters( 'crai_ls_orphan_sweep_batch', 10 ); -
apply_filters( 'crai_ls_placement_key_terms', 8 ); -
apply_filters( 'crai_ls_post_types', array( 'post', 'page' ) ); -
apply_filters( 'crai_ls_preview_max_chars', 320 ); -
apply_filters( 'crai_ls_preview_min_words', 14 ); -
apply_filters( 'crai_ls_relevance_weights', array( 'words' => 0.55, 'taxonomy' => 0.28, 'cocite' => 0.12, 'near' => 0.05, ) ); -
apply_filters( 'crai_ls_same_anchor_in_queue', 4 ); -
apply_filters( 'crai_ls_same_anchor_per_source', 2 ); -
apply_filters( 'crai_ls_sibling_title_overlap', 0.45 ); -
apply_filters( 'crai_ls_suggestions_per_target', 6 ); -
apply_filters( 'crai_ls_topic_taxonomies', array( 'category' => 1.0, 'post_tag' => 0.85, ) ); -
apply_filters( 'crai_ls_use_declared_phrases', true ); -
apply_filters( 'crai_ls_vague_openers', array( 'available', 'growing', 'matching', 'existing', 'various', 'certain', 'several', 'related', 'additional', 'further', 'other', 'more', 'best', 'top', 'good', 'great', 'popular', 'leading', 'complete', 'full', 'whole', 'entire', 'detailed', 'comprehensive', 'in-depth', 'ultimate', 'essential', 'general', 'overall', 'simple', 'quick', 'brief', 'short', 'main', 'important', 'useful', 'helpfu... ); -
apply_filters( 'crai_ls_verb_forms', $verbs ); -
apply_filters( 'crai_ls_weak_phrases', $weak );
Generated from CRAI LinkSense's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: