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

apply_filters( 'vikappointments_after_rename_media', bool $status, string $new, string $prev, JModel $model )

Fires after saving a media file.


Description

Trigger hook to allow the plugins to make something after renaming one or more media files.


Parameters

$status

(bool)  True on success, false otherwise.

$new

(string)  The new file name.

$prev

(string)  The previous file name.

$model

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


Example

/**
 * Trigger hook to allow the plugins to make something after
 * renaming one or more media files.
 *
 * @param  boolean  $status  True on success, false otherwise.
 * @param  string   $new     The new file name.
 * @param  string   $prev    The previous file name.
 * @param  JModel   $model   The model instance.
 */
add_filter('vikappointments_after_rename_media', function($status, $new, $prev, $model)
{
    /**
     * @todo do something after renaming the media file
     */

    return $status;
}, 10, 4);

Changelog

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