Skip to content

Commit

Permalink
v 2.25.0
Browse files Browse the repository at this point in the history
Use WPUBaseToolbox to check plugins dependencies.
  • Loading branch information
Darklg committed Jul 21, 2024
1 parent 895a79f commit ec85e1f
Show file tree
Hide file tree
Showing 13 changed files with 1,117 additions and 250 deletions.
5 changes: 5 additions & 0 deletions inc/WPUBaseToolbox/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deny from all

<FilesMatch "(^$)|(\.(css|js)$)">
Allow From All
</FilesMatch>
37 changes: 37 additions & 0 deletions inc/WPUBaseToolbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
WPU Base Toolbox
---

Cool helpers for WordPress Plugins.

## Insert in the INIT hook

```php
require_once __DIR__ . '/inc/WPUBaseToolbox/WPUBaseToolbox.php';
$this->basetoolbox = new \myplugin\WPUBaseToolbox(array(
'need_form_js' => false
));
```

## Use functions


### Get form HTML

```php
echo $this->basetoolbox->get_form_html('form_edit_note', array(
'note_name' => array(
'label' => __('Note Name', 'myplugin'),
'value' => 'base value'
),
'note_content' => array(
'label' => __('Note Content', 'myplugin'),
'type' => 'textarea'
)
), array(
'button_label' => __('Send modifications', 'myplugin'),
'hidden_fields' => array(
'method' => 'edit_note',
'action' => 'myplugin_callback_crud'
)
));
```
Loading

0 comments on commit ec85e1f

Please sign in to comment.