---
title: "Developer Hooks for GravityMath"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravitymath/developer-hooks-for-math-by-gravityview/"
---

- `gravityview/math/table_footer_calculation/math_shortcode` Modify Math shortcode parameters before calculation
- `gravityview/math/table_footer_calculation/calculation_result` Modify calculation result
- `gravityview/math/table_footer_calculation/format_time_field_calculation_result` Format calculation result of a time field
- `gravityview/math/entries/visible` Modify visible entries
- `gravityview/math/aggregate_data/modify_field_value` Modify field value used for aggregate data calculation

---

### `gravityview/math/entries/visible` modifies visible entries used in the calculation 

 Since 2.0

| `$entries` | *array\[\]* | Array of visible entries used to calculate the current result. |

|---|---|---|
| `$atts` | *array* | Shortcode parameters |

---

### `gravityview/math/aggregate_data/modify_field_value` modifies field values used for aggregate data calculation

 Since 2.0

| `$value` | *string* | Array of visible entries used to calculate the current result. |
|---|---|---|
| `$transform_value` | *string* | The transformation operation name passed via shortcode |

---

### `gravityview/math/shortcode/output` modify the output of the shortcode

 Since 1.0

| `$result` | *string* | Shortcode output. |
|---|---|---|

 Here's an example to display `0` when the calculation result is empty for some reason:

```

add_filter('gravityview/math/shortcode/output', function( $result) {
	return ($result === '') ? 0 : $result;
});
```

```

add_filter('gravityview/math/shortcode/output', function( $result) {
	return ($result === '') ? 0 : $result;
});
```