Not a developer? Go to MovableType.com

Documentation

Application Callbacks

Application callbacks are invoked by Movable Type during the course of a user interacting with the core Movable Type application. They mark key points during the life-cycle of a request, like the initialization phase, or the terminus. They are (in the order in which they are invoked):

  1. init_request
  2. pre_run
  3. post_run
  4. TakeDown

Because Movable Type is broken up into multiple distinct applications, you will need to know specifically which application you wish to attach your callback handler to by its package name. The following is a list of known Movable Type applications:

  • MT::App::ActivityFeeds - this application renders Movable Type’s activity feeds in Atom.
  • MT::App::Comments - this application processes incoming comments.
  • MT::App::CMS - this application processes all requests to the main Movable Type administration user interface.
  • MT::App::NotifyList - this application processes subscriptions (deprecated).
  • MT::App::Search - this application processes search requests made from the published blog.
  • MT::App::Trackback - this application processes incoming pings.
  • MT::App::Upgrader - this application processes all automated upgrades.
  • MT::App::Wizard - this application process the installation wizard.

Let’s take a look at an example. Let’s say you wanted to attach a handler to the initialization phase of the commenting application. You would do this by appending the name of the application with the name of the callback, and registering in association with that the handler to process the callback in your config.yaml like so:

name: Example Plugin for Movable Type
id: Example
key: Example
description: This plugin is an example plugin for Movable Type.
callbacks:
    MT::App::Comments::init_request: $Example::Example::Plugin::handler
Back

Leave a Comment