Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aiiddqd/htmxer
HTMX for WordPress
https://github.com/aiiddqd/htmxer
htmx woo woocommerce wordpress
Last synced: 15 days ago
JSON representation
HTMX for WordPress
- Host: GitHub
- URL: https://github.com/aiiddqd/htmxer
- Owner: aiiddqd
- License: gpl-3.0
- Created: 2024-11-16T10:43:58.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-01-02T09:23:59.000Z (23 days ago)
- Last Synced: 2025-01-02T10:28:32.131Z (23 days ago)
- Topics: htmx, woo, woocommerce, wordpress
- Language: PHP
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# htmxer
HTMX for WordPress# example
## initial HTML with HTMX
```
```
url https://github.com/aiiddqd/aab/blob/main/main.php## AJAX response
```
add_action('htmxer/toolbar', function ($context) {
echo 'Hello World';
});
```## Context (optional)
```
add_filter('htmxer/context', function ($context) {
global $wp;
$post_id = get_post()->ID ?? null;
$context['post_id'] = $post_id;
$context['url'] = site_url($wp->request);
return $context;
});
```