Changeset 13371
- Timestamp:
- 11/23/2022 10:22:42 AM (2 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-attachments.php
r13315 r13371 1653 1653 * Returns a file's mime type. 1654 1654 * 1655 * @since 1 0.2.01655 * @since 11.0.0 1656 1656 * 1657 1657 * @param string $file Absolute path of a file or directory. … … 1659 1659 * The mime type of a file or 'directory' for a directory. 1660 1660 */ 1661 function bp_attach ements_get_mime_type( $file = '' ) {1661 function bp_attachments_get_mime_type( $file = '' ) { 1662 1662 $file_type = wp_check_filetype( $file, wp_get_mime_types() ); 1663 1663 $file_mime = $file_type['type']; … … 1681 1681 function bp_attachments_get_file_object( SplFileInfo $file ) { 1682 1682 $path = $file->getPathname(); 1683 $mime_type = bp_attach ements_get_mime_type( $path );1683 $mime_type = bp_attachments_get_mime_type( $path ); 1684 1684 1685 1685 // Mime type not supported by WordPress. … … 1694 1694 $_file->size = $file->getSize(); 1695 1695 $_file->type = $file->getType(); 1696 $_file->mime_type = bp_attach ements_get_mime_type( $_file->path );1696 $_file->mime_type = bp_attachments_get_mime_type( $_file->path ); 1697 1697 $_file->last_modified = $file->getMTime(); 1698 1698 $_file->latest_access_date = $file->getATime(); -
trunk/src/bp-core/deprecated/11.0.php
r13303 r13371 77 77 return array(); 78 78 } 79 80 /** 81 * Returns a file's mime type. 82 * 83 * @since 10.2.0 84 * @deprecated 11.0.0 replaced by `bp_attachments_get_mime_type()` 85 * 86 * @param string $file Absolute path of a file or directory. 87 * @return false|string False if the mime type is not supported by WordPress. 88 * The mime type of a file or 'directory' for a directory. 89 */ 90 function bp_attachements_get_mime_type( $file = '' ) { 91 _deprecated_function( __FUNCTION__, '11.0.0', 'bp_attachments_get_mime_type()' ); 92 return bp_attachments_get_mime_type( $file ); 93 }
Note: See TracChangeset
for help on using the changeset viewer.