Skip to content

Instantly share code, notes, and snippets.

@borislav-angelov
Created November 17, 2013 23:57
Show Gist options
  • Save borislav-angelov/7520027 to your computer and use it in GitHub Desktop.
Save borislav-angelov/7520027 to your computer and use it in GitHub Desktop.
<?php
$dispatcher = new Ai1ec_Event_Dispatcher();
$callback_filter = new Ai1ec_Event_Callback_Filter( $this->_registry, 'model.settings', 'modify2' );
$dispatcher->register( 'title', $callback_filter, 19, 2 );
$callback_filter2 = new Ai1ec_Event_Callback_Filter( $this->_registry, 'model.settings', 'modify' );
$dispatcher->register( 'title', $callback_filter2, 17, 2 );
$callback_filter3 = new Ai1ec_Event_Callback_Filter( $this->_registry, 'model.settings', 'modify' );
$dispatcher->register( 'title', $callback_filter3, 22, 2 );
echo 'Result: ' . apply_filters( 'title', 'Long Name', 23 );
// Result: Long Name (23) [23] (23)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment