Adds filter to allow modification of status inside admin.
This commit is contained in:
parent
3afe409fa5
commit
cc42170623
|
@ -426,8 +426,15 @@ StatusHelperPlugin.install = function (app, options = {}) {
|
||||||
});
|
});
|
||||||
this.statuses.push({
|
this.statuses.push({
|
||||||
name: tainacan_plugin.i18n['status_trash'],
|
name: tainacan_plugin.i18n['status_trash'],
|
||||||
slug: 'trash'}
|
slug: 'trash'
|
||||||
);
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the available status in Tainacan admin.
|
||||||
|
*
|
||||||
|
* @param array Array of objects containing slug and name of each status.
|
||||||
|
*/
|
||||||
|
this.statuses = wp.hooks.applyFilters('tainacan_admin_available_statuses', JSON.parse(JSON.stringify(this.statuses)));
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error( error );
|
console.error( error );
|
||||||
|
|
Loading…
Reference in New Issue