Changeset 5171
- Timestamp:
- 03/27/2017 07:38:55 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r5161 r5171 44 44 add_action( 'bbp_new_reply', array( $this, 'handle_extra_reply_actions' ), 10, 2 ); 45 45 add_action( 'bbp_edit_reply', array( $this, 'handle_extra_reply_actions' ), 10, 2 ); 46 47 // Honor i18n number formatting. 48 add_filter( 'bbp_number_format', array( $this, 'number_format_i18n' ), 10, 5 ); 46 49 47 50 // Store moderator's username on approve/unapprove actions. … … 326 329 327 330 /** 331 * Override `bbp_number_format()` to behave like `bbp_number_format_i18n()` under default conditions. 332 * 333 * bbPress uses `bbp_number_format()` in lots of places for display. 334 * 335 * @param string $formatted_number Formatted number. 336 * @param string $number Number before formatting. 337 * @param bool $decimals Display decimals? 338 * @param int $dec_point Decimal point character. 339 * @param int $thousands_sep Thousands separator character. 340 * @return string 341 */ 342 public function number_format_i18n( $formatted_number, $number, $decimals, $dec_point, $thousands_sep ) { 343 // Format number for i18n unless non-default decimal point or thousands separator provided. 344 if ( '.' === $dec_point && ',' === $thousands_sep ) { 345 $formatted_number = bbp_number_format_i18n( $number, $decimals ); 346 } 347 348 return $formatted_number; 349 } 350 351 /** 328 352 * Store moderator's username on approve/unapprove actions. 329 353 *
Note: See TracChangeset
for help on using the changeset viewer.