Developer Hooks for GravityMath
gravityview/math/table_footer_calculation/math_shortcodeModify Math shortcode parameters before calculationgravityview/math/table_footer_calculation/calculation_resultModify calculation resultgravityview/math/table_footer_calculation/format_time_field_calculation_resultFormat calculation result of a time fieldgravityview/math/entries/visibleModify visible entriesgravityview/math/aggregate_data/modify_field_valueModify 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;
});