# Extending Publisher

The following hooks are available within Publisher's codebase which you can subscribe to and either alter data (depending on the hook), or perform additional actions when the hooks are called. For full context into the hooks it is best to search the Publisher codebase for instances of the hooks.

If you have an idea for a new hook please don't hesitate to reach out. Just provide an example of what the hook does and the benefit of adding it, and I'll consider adding it to the codebase.

```
publisher_session_start()

publisher_session_end()

publisher_core_boot()

publisher_approval_send($options)

publisher_send_email($to, $subject, $message, Email)

publisher_entry_save_start($entryId, $entryData)

publisher_entry_save_end($entryId, $entryData)

publisher_delete_entry((array) $args)

publisher_delete_approval($entryId)

publisher_delete_draft($entryId, $languageId)

publisher_delete_translation($entryId, $languageId)

publisher_modify_phrase_variables($phrases)

publisher_modify_category_variables($categoryId, $categoryVars)

publisher_request_revision($versionNumber)

publisher_set_language(Session, $langauge)

publisher_load_settings($settings)

publisher_toolbar_status($saveOptions)

publisher_toolbar_extra()

publisher_toolbar_languages($languages)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.boldminded.com/publisher/docs/extending-publisher.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
