-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use WPUBaseToolbox to check plugins dependencies.
- Loading branch information
Showing
13 changed files
with
1,117 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
deny from all | ||
|
||
<FilesMatch "(^$)|(\.(css|js)$)"> | ||
Allow From All | ||
</FilesMatch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
) | ||
)); | ||
``` |
Oops, something went wrong.