I can't get the cp_custom_menu hook to run. Here's my code. The activate_extension() function runs and successfully adds the extension to the db but it never gets called.
public function activate_extension()
{
$hooks = array('cp_custom_menu');
foreach ($hooks as $hook) {
ee()->db->insert(
'extensions',
array(
'class' => __CLASS__,
'hook' => $hook,
'method' => $hook,
'settings' => '',
'priority' => 10,
'version' => $this->version,
'enabled' => 'y'
)
);
}
}
public function cp_custom_menu($menu)
{
// this never runs
$menu->addItem('Title', ee('CP/URL')->make('/xyz'));
}