Items of a context menu cannot be hidden using the API methods pcmf_hide() and pcmf_unhide().
Currently I (have to) use pcmf_disable() and pcmf_enable, but I do not want to show the inactive items.
Relevant code example:
if (isActive) {
activateItem.pcmf_hide();
deactivateItem.pcmf_unhide();
} else {
activateItem.pcmf_unhide();
deactivateItem.pcmf_hide();
}
The item corresponding to the item's current state should not be displayed - not even in "disabled" state.