1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62:
<?php
class Inbound_Automation_Adminbar {
public static function init() {
self::hooks();
}
public static function hooks() {
add_filter( 'inbound_menu_debug' , array (__CLASS__ , 'load_debug_links') , 10 , 2);
}
public static function load_debug_links( $secondary_menu_items , $debug_key ) {
$secondary_menu_items['automation-view-rule-queue'] = array(
'parent' => $debug_key,
'title' => __( 'View Automation Rule Queue', 'inbound-pro' ),
'href' => admin_url('?automation-view-rule-queue=true'),
'meta' => array( 'title' => __( 'Click here to view automation rules.', 'inbound-pro' ) )
);
$secondary_menu_items['automation-empty-queue=true'] = array(
'parent' => $debug_key,
'title' => __( 'Clear Automation Rule Queue', 'inbound-pro' ),
'href' => admin_url('?automation-empty-queue=true'),
'meta' => array( 'title' => __( 'Click here to empty automation queue.', 'inbound-pro' ) )
);
$secondary_menu_items['automation-run-rules=true'] = array(
'parent' => $debug_key,
'title' => __( 'Run Automation Rules', 'inbound-pro' ),
'href' => admin_url('?automation-run-rules=true'),
'meta' => array( 'title' => __( 'Click here to manually run the automation queue.', 'inbound-pro' ) )
);
return $secondary_menu_items;
}
}
add_action('init' , array( 'Inbound_Automation_Adminbar' , 'init' ) );