-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add uninstall. - Update lang method. - Update dependencies. - Hide popin on a specific page. - Add JS Github action.
- Loading branch information
Showing
27 changed files
with
1,182 additions
and
96 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,21 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": "latest" | ||
}, | ||
"rules": { | ||
"no-prototype-builtins": 0, | ||
"no-console": 1, | ||
"no-unused-vars": 1, | ||
"no-undef": 1 | ||
}, | ||
"globals": { | ||
"wpupopin_settings": true, | ||
"wp": true, | ||
"jQuery": true | ||
} | ||
} |
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,17 @@ | ||
name: ESLint | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install modules | ||
run: npm install -g eslint@^8 | ||
- name: Run ESLint | ||
run: eslint assets/ --ext .js |
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: PHP Lint | ||
uses: michaelw90/[email protected] |
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 @@ | ||
*.mo.php |
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
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
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,41 @@ | ||
WPU Base fields | ||
--- | ||
|
||
Add Custom fields to your plugin. | ||
|
||
## Insert in the plugins_loaded hook | ||
|
||
```php | ||
include 'inc/WPUBaseFields.php'; | ||
$fields = array( | ||
'demo' => array( | ||
'group' => 'group_1', | ||
'label' => 'Demo', | ||
'placeholder' => 'My Placeholder', | ||
'required' => true | ||
), | ||
'select' => array( | ||
'type' => 'select', | ||
'group' => 'group_2', | ||
'label' => 'Select with Data', | ||
'data' => array( | ||
'value_1' => 'Value 1', | ||
'value_2' => 'Value 2', | ||
) | ||
), | ||
'select_nodata' => array( | ||
'type' => 'select', | ||
'group' => 'group_2', | ||
'label' => 'Select without Data' | ||
) | ||
); | ||
$field_groups = array( | ||
'group_1' => array( | ||
'label' => 'Group 1' | ||
), | ||
'group_2' => array( | ||
'label' => 'Group 2' | ||
) | ||
); | ||
$this->basefields = new \wpubaseplugin\WPUBaseFields($fields, $field_groups); | ||
``` |
Oops, something went wrong.