beans_remove_action

Remove an action.

This function removes an action registered using beans_add_action() or beans_add_smart_action(). The original action can be re-added using beans_reset_action().

beans_remove_action( string $id )

Return: (bool) Will always return true.

Parameters

NameTypeRequiredDefaultDescription
$idstringtrue-The action ID.

Source

function beans_remove_action( $id ) {

	// Remove.
	if ( $action = _beans_get_current_action( $id ) ) {
		remove_action( $action['hook'], $action['callback'], $action['priority'], $action['args'] );
	}

	// Register as removed.
	_beans_set_action( $id, $action, 'removed' );

	return true;

}