Skip to content

Instantly share code, notes, and snippets.

View matthewlarkin's full-sized avatar

Matthew Larkin matthewlarkin

View GitHub Profile
// append to couch/addons/kfunctions.php file
if( defined('K_ADMIN') ){ // if admin-panel being displayed ..
// 1. Add a 'Save and back' button to form view
$my_target_action = 'page'; // available targets on the form are - toolbar, filter, page and extended
$FUNCS->add_event_listener( 'alter_pages_form_'.$my_target_action.'_actions', 'my_add_button' );
function my_add_button( &$arr_actions, &$obj ){
global $FUNCS, $PAGE;