Skip to content

Laravel Varbox how can I extend the Revision model

I’m using Varbox admin panel inside a Laravel project. The HasRevisions trait on my Article custom entity and everything works as expected. However, recently I’ve extended the revisions database table to also support soft deleting by adding a deleted_at column, but I don’t know how to actually extend th…

Undefined function wptexturize()

I’m really new to wordpress and I had just encountered this error: I also tried checking on https://developer.wordpress.org/reference/functions/wptexturize/ and I had traced the callers and functions used by this wptexturize() to no avail. The main issue seems to be that the function is undefined. So I …

Form Multiselect option is only returning 1 option in message

this is my first time making a form, and I have multi-select option but I think I’m missing out something because the form is working but when selecting multiple options the email I receive is only showing 1 option. send.php Answer You need to do a small change in your HTML. Add a bracket pair to the na…

Sum up the array values

I am working on a custom module in drupal and need to sum up the [value], However I tried different approaches using array_column, array_sum, but didn’t get the solution. Any help would be appreciated. Thanks. Code Answer You could make use of array_map here instead of an accumulator: Edit, as a full ex…