Italian (Italy)
Knowledge Base  >  Vik Appointments  >  Hook  >  Media  >  After Save

apply_filters( 'vikappointments_after_save_media', bool $status, array $data, JModel $model )

Fires after saving/uploading a media file.


Description

This hook is triggered after creating or updating a record. External plugins can use this hook to perform further actions after saving a record.


Parameters

$status

(bool)  True on success, false otherwise.

$data

(array)  The properties of the media that have been saved.

$model

(JModel)  The model instance that handles the saving process.


Example

/**
 * Trigger event to allow the plugins to make something after
 * saving a media file.
 *
 * @param  boolean  $status  True on success, false otherwise.
 * @param  mixed    $data    The saved record.
 * @param  JModel   $model   The model instance.
 */
add_filter('vikappointments_after_save_media', function($status, $data, $model)
{
    /**
     * @todo do something after saving/uploading the media file
     */

    return $status;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Ultimo aggiornamento: 2021-08-08
Utile?
Potrebbe interessarti: