Changeset 28855
- Timestamp:
- 06/26/2014 05:51:52 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r28841 r28855 3001 3001 * 3002 3002 * @param mixed $maybeint Data you wish to have converted to a nonnegative integer 3003 * @param bool $limit Whether to only return up to PHP_INT_MAX. 3003 3004 * @return int An nonnegative integer 3004 3005 */ 3005 function absint( $maybeint ) { 3006 return abs( intval( $maybeint ) ); 3006 function absint( $maybeint, $limit = false ) { 3007 $int = abs( intval( $maybeint ) ); 3008 if ( $limit && $int > PHP_INT_MAX ) { 3009 $int = PHP_INT_MAX; 3010 } 3011 return $int; 3007 3012 } 3008 3013
Note: See TracChangeset
for help on using the changeset viewer.