Confirmed users
764
edits
m (→API Methods) |
|||
Line 47: | Line 47: | ||
Adds an item to the context menu. The position at which the item is inserted is at the discretion of Jetpack. | Adds an item to the context menu. The position at which the item is inserted is at the discretion of Jetpack. | ||
; context : | ; context : A value describing the context under which to add the item. See [[#Specifying Contexts]]. | ||
; menuitem : The menuitem to add. See [[#Specifying Menuitems]]. | ; menuitem : The menuitem to add. See [[#Specifying Menuitems]]. | ||
Line 54: | Line 54: | ||
Replaces an existing item in the context menu. If the target item does not exist, this function silently fails, and the context menu is not modified. | Replaces an existing item in the context menu. If the target item does not exist, this function silently fails, and the context menu is not modified. | ||
; context : | ; context : A value describing the context under which to add the item. See [[#Specifying Contexts]]. | ||
; target : A value describing the existing item to replace. See [[#Specifying Existing Menuitems]]. | ; target : A value describing the existing item to replace. See [[#Specifying Existing Menuitems]]. | ||
; menuitem : The menuitem to add. See [[#Specifying Menuitems]]. | ; menuitem : The menuitem to add. See [[#Specifying Menuitems]]. | ||
Line 62: | Line 62: | ||
Inserts a new item before an existing one. If the target item does not exist, this function silently fails, and the context menu not modified. | Inserts a new item before an existing one. If the target item does not exist, this function silently fails, and the context menu not modified. | ||
; context : | ; context : A value describing the context under which to add the item. See [[#Specifying Contexts]]. | ||
; target : A value describing the existing item before which to insert the new item. See [[#Specifying Existing Menuitems]]. | ; target : A value describing the existing item before which to insert the new item. See [[#Specifying Existing Menuitems]]. | ||
; menuitem : The menuitem to add. See [[#Specifying Menuitems]]. | ; menuitem : The menuitem to add. See [[#Specifying Menuitems]]. |