Other plugins can label content through AuthorLabel without changing its code.
| Hook | Type | What it does |
|---|---|---|
authorlabel_mark_content | action | Label a post or file from your own plugin. |
authorlabel_label_text | filter | Change the label wording. |
authorlabel_notice_text | filter | Change the chatbot notice text. |
authorlabel_badge_position | filter | Move the badge (default below). |
authorlabel_post_types | filter | Choose which content types get the panel. |
authorlabel_detectors | filter | Add your chatbot or AI plugin to the scanner. |
authorlabel_cache_purged | action | Runs 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.