Skip to:
Content

BuddyPress.org

Ticket #8769: 8769.patch

File 8769.patch, 2.6 KB (added by imath, 2 years ago)
  • src/bp-core/bp-core-attachments.php

    diff --git src/bp-core/bp-core-attachments.php src/bp-core/bp-core-attachments.php
    index 1f7255bf0..74de70698 100644
    add_action( 'wp_ajax_bp_cover_image_delete', 'bp_attachments_cover_image_ajax_de 
    16521652/**
    16531653 * Returns a file's mime type.
    16541654 *
    1655  * @since 10.2.0
     1655 * @since 11.0.0
    16561656 *
    16571657 * @param string $file Absolute path of a file or directory.
    16581658 * @return false|string False if the mime type is not supported by WordPress.
    16591659 *                      The mime type of a file or 'directory' for a directory.
    16601660 */
    1661 function bp_attachements_get_mime_type( $file = '' ) {
     1661function bp_attachments_get_mime_type( $file = '' ) {
    16621662        $file_type = wp_check_filetype( $file, wp_get_mime_types() );
    16631663        $file_mime = $file_type['type'];
    16641664
    function bp_attachements_get_mime_type( $file = '' ) { 
    16801680 */
    16811681function bp_attachments_get_file_object( SplFileInfo $file ) {
    16821682        $path      = $file->getPathname();
    1683         $mime_type = bp_attachements_get_mime_type( $path );
     1683        $mime_type = bp_attachments_get_mime_type( $path );
    16841684
    16851685        // Mime type not supported by WordPress.
    16861686        if ( false === $mime_type ) {
    function bp_attachments_get_file_object( SplFileInfo $file ) { 
    16931693        $_file->path               = $path;
    16941694        $_file->size               = $file->getSize();
    16951695        $_file->type               = $file->getType();
    1696         $_file->mime_type          = bp_attachements_get_mime_type( $_file->path );
     1696        $_file->mime_type          = bp_attachments_get_mime_type( $_file->path );
    16971697        $_file->last_modified      = $file->getMTime();
    16981698        $_file->latest_access_date = $file->getATime();
    16991699        $_file->id                 = pathinfo( $_file->name, PATHINFO_FILENAME );
  • src/bp-core/deprecated/11.0.php

    diff --git src/bp-core/deprecated/11.0.php src/bp-core/deprecated/11.0.php
    index adfae7d8f..0f4847eca 100644
    function bp_nouveau_blogs_catch_button_args( $button = array() ) { 
    7676        // return an empty array to stop the button creation process
    7777        return array();
    7878}
     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 */
     90function 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}