# Update Action
Elementor Core BasicTo modify an existing action, we need to change the action object value in a specific entry.
# Update Widget Action
In the example below, we'll update the widget-action
action icon:
elementor.hooks.addFilter( 'elements/context-menu/groups', ( customGroups, elementType ) => {
if ( 'widget' === elementType ) {
customGroups.forEach( ( group ) => {
if ( 'custom-widget-actions' === group.name ) {
group.actions.forEach( ( action ) => {
if ( 'widget-action' === action.name ) {
action.icon = 'eicon-code';
}
} );
}
} );
}
return customGroups;
} );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Update Column Action
Now we'll update the label of a column-action
action title:
elementor.hooks.addFilter( 'elements/context-menu/groups', ( customGroups, elementType ) => {
if ( 'column' === elementType ) {
customGroups.forEach( ( group ) => {
if ( 'custom-column-actions' === group.name ) {
group.actions.forEach( ( action ) => {
if ( 'column-action' === action.name ) {
action.title = 'New Label';
}
} );
}
} );
}
return customGroups;
} );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Update Section Action
Next we'll update the entire section-action
action:
elementor.hooks.addFilter( 'elements/context-menu/groups', ( customGroups, elementType ) => {
if ( 'column' === elementType ) {
customGroups.forEach( ( group ) => {
if ( 'custom-column-actions' === group.name ) {
group.actions.forEach( ( action ) => {
if ( 'column-action' === action.name ) {
action.icon = 'eicon-alert';
action.title = 'Hellooo';
action.callback = () => alert( 'bla bla' );
}
} );
}
} );
}
return customGroups;
} );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19