Hooks and filters for developers

Label content from your own plugin and change AuthorLabel’s texts, badge position, post types and detectors with WordPress hooks.

Other plugins can label content through AuthorLabel without changing its code.

HookTypeWhat it does
authorlabel_mark_contentactionLabel a post or file from your own plugin.
authorlabel_label_textfilterChange the label wording.
authorlabel_notice_textfilterChange the chatbot notice text.
authorlabel_badge_positionfilterMove the badge (default below).
authorlabel_post_typesfilterChoose which content types get the panel.
authorlabel_detectorsfilterAdd your chatbot or AI plugin to the scanner.
authorlabel_cache_purgedactionRuns after AuthorLabel clears page caches for labeled items.

Label from your code

do_action( 'authorlabel_mark_content', $post_id, 'ai_generated', 'My AI Plugin' );

The status is one of ai_generated, ai_assisted, human_reviewed, not_ai, or an empty string to clear it. The change is written to the activity log with the basis “api”.

Change the label text

add_filter( 'authorlabel_label_text', function ( $text, $post_id, $label ) {
    return 'ai_assisted' === $label ? 'Drafted with AI, edited by our team.' : $text;
}, 10, 3 );

Data

Labels are stored as post meta: _authorlabel_status, _authorlabel_tool, _authorlabel_parts, _authorlabel_reviewer. Settings live in the authorlabel_settings option; the log in the {prefix}authorlabel_log table.


Stuck? Write to us or ask on the free support forum. AuthorLabel is a tool, not legal advice.