Changeset 37991 for trunk/src/wp-includes/functions.php
- Timestamp:
- 07/06/2016 06:08:55 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r37985 r37991 5357 5357 return preg_replace( '/(?:Z|[+-]\d{2}(?::\d{2})?)$/', '', $formatted ); 5358 5358 } 5359 5360 /** 5361 * Check if an object type exists. By default, these are `post`, `comment`, `user`, and `term`. 5362 * 5363 * @param string $object_type Object type to check. 5364 * @return bool True if the object type exists, false if not. 5365 */ 5366 function wp_object_type_exists( $object_type ) { 5367 /** 5368 * Filters WordPress object types. 5369 * 5370 * @since 4.6.0 5371 * 5372 * @param array $types Array of object types. 5373 */ 5374 $types = apply_filters( 'wp_object_types', array( 'post', 'comment', 'user', 'term' ) ); 5375 5376 if ( in_array( $object_type, $types ) ) { 5377 return true; 5378 } 5379 5380 return false; 5381 }
Note: See TracChangeset
for help on using the changeset viewer.