Skip to content

Instantly share code, notes, and snippets.

@engelen
Created April 15, 2014 12:30
Show Gist options
  • Save engelen/10728603 to your computer and use it in GitHub Desktop.
Save engelen/10728603 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'cac/column/meta/value', 'myplugin_cac_column_format_numbers', 10, 3 );
function myplugin_cac_column_format_numbers( $value, $postid, $column, $post_type ) {
$numval = floatval( $value );
if ( $value == $numval ) {
$value = number_format_i18n( $numval, 2 );
}
return $value;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment