English (United Kingdom)

apply_filters( 'vikappointments_after_delete_{$type}', bool $status, int $id, JTable $table )

Fires after deleting a record.


Description

Trigger hook to allow the plugins to make something after deleting a record from the database. Contrarily to vikappointments_before_delete_{$type} hook, this one triggers once for each ID to delete.

The dynamic portion of the hook name, $type, refers to the name of the table calling the hook. This means that, for example, the service table will trigger an hook called vikappointments_after_delete_service. The name of the table is always equals to the base name of the file that declares the $table instance.

It is possible to read a list of supported types by looking at the files stored within the following directory:

/wp-content/plugins/vikappointments/admin/tables/

Parameters

$status

(bool)  True on success, false otherwise.

$id

(int)  The ID of the deleted record.

$table

(JTable)  The table instance that handles the saving process.


Example

/**
 * Trigger hook to allow the plugins to make something after deleting
 * a record from the database.
 *
 * @param  boolean  $status  True on success, false otherwise.
 * @param  integer  $id      The ID of the deleted record.
 * @param  JTable   $table   The table instance.
 */
add_filter('vikappointments_after_delete_{$type}', function($status, $id, $table)
{
    /**
     * @todo do something after deleting a record
     */

    return $status;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Last Update: 2021-08-29
Helpful?
See Also:

This website uses cookies

This website uses cookies and similar technologies. Some of these technologies are necessary for the proper functioning of the website (Essential). Other technologies are used to evaluate user behavior (Analysis), to integrate external media or for advertising purposes. If you agree, these technologies are activated. For details, please refer to the privacy policy. From this same page you can also update/revoke your consent. If you do not give your consent, only cookies with essential functions will be activated.

We use technologies from the USA on our website. If you give your consent, you therefore consent at the same time to your data being transferred to the USA. We would like to point out that the USA does not have a level of data protection comparable to that of the EU and that any US company can be obliged by state authorities to hand over your data without you having any effective legal protection against this.