Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/04/2018 02:44:50 PM (8 years ago)
Author:
djpaul
Message:

Core, Media: add parameters to dynamic _cover_image_uploaded action.

Adds the parameters returned in the AJAX response, to make this dynamic action more useful for PHP developers.

Fixes #7657

Props pscolv

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-attachments.php

    r11875 r11879  
    14101410         *
    14111411         * @since 2.4.0
    1412          *
    1413          * @param int $item_id Inform about the item id the cover image was set for.
    1414          */
    1415         do_action( $object_data['component'] . '_cover_image_uploaded', (int) $bp_params['item_id'] );
     1412         * @since 3.0.0 Added $cover_url, $name, $feedback_code arguments.
     1413         *
     1414         * @param int    $item_id       Inform about the item id the cover image was set for.
     1415         * @param string $name          Filename.
     1416         * @param string $cover_url     URL to the image.
     1417         * @param int    $feedback_code If value not 1, an error occured.
     1418         */
     1419        do_action(
     1420                $object_data['component'] . '_cover_image_uploaded',
     1421                (int) $bp_params['item_id'],
     1422                $name,
     1423                $cover_url,
     1424                $feedback_code
     1425        );
    14161426
    14171427        // Finally return the cover image url to the UI.
Note: See TracChangeset for help on using the changeset viewer.