├── vendor
├── estebanforge
│ └── hyperfields
│ │ ├── hyperfields
│ │ ├── metabox-demo.php
│ │ ├── simple-example.php
│ │ ├── simple-metabox-test.php
│ │ ├── index.html
│ │ └── conditional-logic-test.php
│ │ ├── vendor
│ │ ├── composer
│ │ │ ├── installed.json
│ │ │ ├── autoload_namespaces.php
│ │ │ ├── autoload_psr4.php
│ │ │ ├── autoload_files.php
│ │ │ ├── installed.php
│ │ │ ├── platform_check.php
│ │ │ ├── LICENSE
│ │ │ ├── autoload_real.php
│ │ │ └── autoload_classmap.php
│ │ └── autoload.php
│ │ ├── src
│ │ ├── HeadingField.php
│ │ ├── SeparatorField.php
│ │ ├── templates
│ │ │ ├── field-separator.php
│ │ │ ├── field-hidden.php
│ │ │ ├── field-heading.php
│ │ │ ├── index.html
│ │ │ ├── field-html.php
│ │ │ ├── field-time.php
│ │ │ ├── field-footer-scripts.php
│ │ │ ├── field-datetime.php
│ │ │ ├── field-checkbox.php
│ │ │ ├── field-header-scripts.php
│ │ │ ├── field-color.php
│ │ │ ├── field-date.php
│ │ │ ├── field-rich-text.php
│ │ │ ├── field-multiselect.php
│ │ │ ├── field-radio.php
│ │ │ ├── field-oembed.php
│ │ │ ├── field-sidebar.php
│ │ │ ├── field-file.php
│ │ │ ├── field-set.php
│ │ │ ├── field-radio-image.php
│ │ │ ├── field-association.php
│ │ │ └── field-image.php
│ │ ├── Assets.php
│ │ ├── Admin
│ │ │ ├── Activation.php
│ │ │ └── index.html
│ │ ├── Container
│ │ │ ├── ContainerFactory.php
│ │ │ └── index.html
│ │ ├── index.html
│ │ ├── OptionsSection.php
│ │ ├── PostField.php
│ │ ├── TermField.php
│ │ ├── UserField.php
│ │ ├── BlockFieldAdapter.php
│ │ └── CustomField.php
│ │ ├── composer.lock
│ │ ├── hyperfields.php
│ │ ├── composer.json
│ │ ├── includes
│ │ └── index.html
│ │ ├── hyperoptions
│ │ ├── index.html
│ │ └── conditional-logic-test.php
│ │ ├── CHANGELOG.md
│ │ └── README.md
├── starfederation
│ └── datastar-php
│ │ ├── src
│ │ ├── .gitattributes
│ │ ├── enums
│ │ │ ├── EventType.php
│ │ │ └── ElementPatchMode.php
│ │ ├── events
│ │ │ ├── Location.php
│ │ │ ├── EventInterface.php
│ │ │ ├── PatchSignals.php
│ │ │ ├── RemoveElements.php
│ │ │ └── ExecuteScript.php
│ │ ├── ServerSentEventData.php
│ │ └── Consts.php
│ │ ├── LICENSE.md
│ │ ├── composer.json
│ │ └── README.md
├── composer
│ ├── autoload_namespaces.php
│ ├── autoload_psr4.php
│ ├── autoload_files.php
│ ├── platform_check.php
│ ├── LICENSE
│ ├── installed.php
│ └── autoload_real.php
└── autoload.php
├── assets
├── js
│ ├── map-field.asset.php
│ ├── admin-options.asset.php
│ ├── conditional-fields.asset.php
│ ├── editor.asset.php
│ ├── admin-options.js
│ ├── map-field.js
│ └── editor.js
├── libs
│ ├── htmx-extensions
│ │ ├── debug.js
│ │ ├── ajax-header.js
│ │ ├── alpine-morph.js
│ │ ├── method-override.js
│ │ ├── path-params.js
│ │ ├── morphdom-swap.js
│ │ ├── restored.js
│ │ ├── disable-element.js
│ │ ├── remove-me.js
│ │ ├── json-enc.js
│ │ ├── event-header.js
│ │ ├── include-vals.js
│ │ ├── path-deps.js
│ │ ├── multi-swap.js
│ │ ├── index.html
│ │ ├── class-tools.js
│ │ ├── response-targets.js
│ │ ├── head-support.js
│ │ ├── client-side-templates.js
│ │ └── loading-states.js
│ └── index.html
├── css
│ └── index.html
└── index.html
├── context7.json
├── .wp-org-assets
├── icon-128x128.png
├── icon-256x256.png
├── screenshot-1.png
├── screenshot-2.png
├── banner-1544x500.png
├── banner-1544x500.xcf
├── banner-772x250.png
├── icon-1024x1024.png
└── icon-1024x1024.xcf
├── docs
├── faq.md
├── hypermedia-libraries.md
├── installation.md
├── library-detection.md
├── helper-functions.md
└── index.md
├── .gitignore
├── SECURITY.md
├── .editorconfig
├── hypermedia
├── noswap
│ ├── htmx-demo.hp.php
│ ├── index.html
│ ├── alpine-ajax-demo.hp.php
│ └── datastar-demo.hp.php
└── index.html
├── .ci
├── setup-sqlite-dropin.php
└── version-bump.php
├── src
├── Theme.php
├── Admin
│ ├── Activation.php
│ └── index.html
├── js
│ ├── admin-options.js
│ ├── map-field.js
│ └── index.html
├── Libraries
│ ├── AlpineAjaxLib.php
│ └── index.html
├── Compatibility.php
├── index.html
├── Blocks
│ ├── index.html
│ └── FieldGroup.php
└── Router.php
├── api-for-htmx.php
├── run-tests
├── hyperblocks
├── quote-block
│ ├── block.json
│ └── render.php
├── content-card
│ ├── block.json
│ └── render.php
├── hero-banner
│ ├── block.json
│ └── render.php
└── index.html
├── index.html
├── includes
└── index.html
├── languages
└── index.html
├── uninstall.php
├── pest.php
├── package.json
├── composer.json
├── phpunit.xml
└── README.txt
/vendor/estebanforge/hyperfields/hyperfields/metabox-demo.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/js/map-field.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => '03cb22a1a2757b894790');
2 |
--------------------------------------------------------------------------------
/assets/js/admin-options.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => 'b7aeb82d44f034f5390e');
2 |
--------------------------------------------------------------------------------
/assets/js/conditional-fields.asset.php:
--------------------------------------------------------------------------------
1 | array(), 'version' => 'd56116140cc4c8c9152a');
2 |
--------------------------------------------------------------------------------
/context7.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "https://context7.com/estebanforge/hyperpress",
3 | "public_key": "pk_Ms2cIHgncfsrkPJBt5Mko"
4 | }
--------------------------------------------------------------------------------
/.wp-org-assets/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/icon-128x128.png
--------------------------------------------------------------------------------
/.wp-org-assets/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/icon-256x256.png
--------------------------------------------------------------------------------
/.wp-org-assets/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/screenshot-1.png
--------------------------------------------------------------------------------
/.wp-org-assets/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/screenshot-2.png
--------------------------------------------------------------------------------
/.wp-org-assets/banner-1544x500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/banner-1544x500.png
--------------------------------------------------------------------------------
/.wp-org-assets/banner-1544x500.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/banner-1544x500.xcf
--------------------------------------------------------------------------------
/.wp-org-assets/banner-772x250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/banner-772x250.png
--------------------------------------------------------------------------------
/.wp-org-assets/icon-1024x1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/icon-1024x1024.png
--------------------------------------------------------------------------------
/.wp-org-assets/icon-1024x1024.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EstebanForge/Hypermedia-API-WordPress/HEAD/.wp-org-assets/icon-1024x1024.xcf
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/vendor/composer/installed.json:
--------------------------------------------------------------------------------
1 | {
2 | "packages": [],
3 | "dev": false,
4 | "dev-package-names": []
5 | }
6 |
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/src/.gitattributes:
--------------------------------------------------------------------------------
1 | Constants.php linguist-generated=true
2 | enums/ElementPatchMode.php linguist-generated=true
3 | enums/EventType.php linguist-generated=true
--------------------------------------------------------------------------------
/assets/js/editor.asset.php:
--------------------------------------------------------------------------------
1 | array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '3533a090ed44fa36b136');
2 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_namespaces.php:
--------------------------------------------------------------------------------
1 | array($baseDir . '/src'),
10 | );
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ./wp-org-assets/htmx-api-wp-logo.psd
2 | /node_modules/
3 | deploy.sh
4 | deploy-notag.sh
5 | TODO.md
6 | .wp-org-assets/htmx-api-wp-logo.psd
7 | rules-wordpress.md
8 | .php-cs-fixer.cache
9 |
10 | # Test artifacts
11 | coverage/
12 | .phpunit.result.cache
13 | wp-content/
14 | deploy-readme-only.sh
15 |
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/src/enums/EventType.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/starfederation/datastar-php/src'),
10 | 'HyperPress\\' => array($baseDir . '/src'),
11 | 'HyperFields\\' => array($vendorDir . '/estebanforge/hyperfields/src'),
12 | );
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # This file is for unifying the coding style for different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | charset = utf-8
8 | end_of_line = lf
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 | indent_style = space
12 |
13 | [*.yml]
14 | indent_style = space
15 | indent_size = 2
16 |
17 | [*.md]
18 | trim_trailing_whitespace = false
19 |
20 | [{*.txt,wp-config-sample.php}]
21 | end_of_line = crlf
22 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/vendor/composer/autoload_files.php:
--------------------------------------------------------------------------------
1 | $baseDir . '/includes/helpers.php',
10 | '0522701f5d113a2ff6373ccc834dd7d6' => $baseDir . '/includes/backward-compatibility.php',
11 | 'c1c635284e1ca7836efff979fb09390f' => $baseDir . '/bootstrap.php',
12 | );
13 |
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/debug.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-debug@2.0.2/debug.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | htmx.defineExtension("debug",{onEvent:function(e,o){if(console.debug)console.debug(e,o);else{if(!console)throw new Error("NO CONSOLE SUPPORTED");console.log("DEBUG:",e,o)}}});
8 | //# sourceMappingURL=/sm/2483c4a8f9035299d91a9561dd6a36f3fa5f8aa9eafdad3eafc6514520cbc835.map
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/ajax-header.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-ajax-header@2.0.3/dist/ajax-header.esm.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | import htmx from"htmx.org";htmx.defineExtension("ajax-header",{onEvent:function(e,t){"htmx:configRequest"===e&&(t.detail.headers["X-Requested-With"]="XMLHttpRequest")}});
8 | //# sourceMappingURL=/sm/3268047fbcb939c2be5257dd45a252becf78b55874b452269979707d6a106335.map
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/src/events/Location.php:
--------------------------------------------------------------------------------
1 | script = "setTimeout(() => window.location = '$uri')";
13 |
14 | foreach ($options as $key => $value) {
15 | if (property_exists($this, $key)) {
16 | $this->{$key} = $value;
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_files.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/estebanforge/hyperfields/includes/helpers.php',
10 | '0522701f5d113a2ff6373ccc834dd7d6' => $vendorDir . '/estebanforge/hyperfields/includes/backward-compatibility.php',
11 | 'c1c635284e1ca7836efff979fb09390f' => $vendorDir . '/estebanforge/hyperfields/bootstrap.php',
12 | 'b4e0b991acd5ddad926ebc747d73282f' => $baseDir . '/bootstrap.php',
13 | );
14 |
--------------------------------------------------------------------------------
/hypermedia/noswap/htmx-demo.hp.php:
--------------------------------------------------------------------------------
1 | 'success',
17 | 'nonce' => wp_create_nonce('hyperpress_nonce'),
18 | 'message' => 'Server-side processing done.',
19 | 'params' => $hp_vals,
20 | ]
21 | );
22 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-separator.php:
--------------------------------------------------------------------------------
1 |
6 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/alpine-morph.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-alpine-morph@2.0.2/alpine-morph.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | htmx.defineExtension("alpine-morph",{isInlineSwap:function(n){return"morph"===n},handleSwap:function(n,e,i){if("morph"===n)return i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(Alpine.morph(e,i.firstElementChild),[e]):(Alpine.morph(e,i.outerHTML),[e])}});
8 | //# sourceMappingURL=/sm/ac5b03e48d2ec1e0c6427ec93688bfa28e683b2ee2682723c24ad078b5ff8b82.map
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/method-override.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-method-override@2.0.3/dist/method-override.esm.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | import htmx from"htmx.org";htmx.defineExtension("method-override",{onEvent:function(e,t){if("htmx:configRequest"===e){var o=t.detail.verb;"get"!==o&&"post"!==o&&(t.detail.headers["X-HTTP-Method-Override"]=o.toUpperCase(),t.detail.verb="post")}}});
8 | //# sourceMappingURL=/sm/9b1413300cd2a2f6a137102e3885260b6b96308d137f821574b8fe3b7e2f3a01.map
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/path-params.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-path-params@2.0.2/dist/path-params.esm.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | import htmx from"htmx.org";htmx.defineExtension("path-params",{onEvent:function(e,t){"htmx:configRequest"===e&&(t.detail.path=t.detail.path.replace(/{([^}]+)}/g,(function(e,a){var n=t.detail.parameters[a];return delete t.detail.parameters[a],void 0===n?"{"+a+"}":encodeURIComponent(n)})))}});
8 | //# sourceMappingURL=/sm/b130af9ff78c90abcdcb74a7587323fee1b61bb941ba9ba7aa97668b4f3cdccb.map
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/morphdom-swap.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-morphdom-swap@2.0.2/dist/morphdom-swap.esm.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | import htmx from"htmx.org";htmx.defineExtension("morphdom-swap",{isInlineSwap:function(o){return"morphdom"===o},handleSwap:function(o,m,r){if("morphdom"===o)return r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(morphdom(m,r.firstElementChild||r.firstChild),[m]):(morphdom(m,r.outerHTML),[m])}});
8 | //# sourceMappingURL=/sm/da5f46ca7a395541ac5bc6b003204aabfc3399af780649a7d29a074a1ce046ac.map
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/restored.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-restored@2.0.2/dist/restored.esm.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | import htmx from"htmx.org";htmx.defineExtension("restored",{onEvent:function(e,r){if("htmx:restored"===e){var t=r.detail.document.querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']"),o=Array.from(t).find((e=>e.outerHTML===r.detail.elt.outerHTML));r.detail.triggerEvent(o,"restored")}}});
8 | //# sourceMappingURL=/sm/003df42b50b3829b42663fc17e9d50486fc1bfcbb15120c9ef093dd8b33bbbc2.map
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_readme": [
3 | "This file locks the dependencies of your project to a known state",
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 | "This file is @generated automatically"
6 | ],
7 | "content-hash": "8263667c674e6bb7abed786c785c68a7",
8 | "packages": [],
9 | "packages-dev": [],
10 | "aliases": [],
11 | "minimum-stability": "RC",
12 | "stability-flags": {},
13 | "prefer-stable": true,
14 | "prefer-lowest": false,
15 | "platform": {
16 | "php": ">=8.1"
17 | },
18 | "platform-dev": {},
19 | "plugin-api-version": "2.9.0"
20 | }
21 |
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/disable-element.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-disable-element@2.0.2/disable-element.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | !function(){"use strict";htmx.defineExtension("disable-element",{onEvent:function(e,t){const n=t.detail.elt,l=n.getAttribute("hx-disable-element"),i="self"==l?[n]:document.querySelectorAll(l);for(var s=0;seventType = $eventType;
24 | $this->data = $data;
25 | $this->eventId = $eventId;
26 | $this->retryDuration = $retryDuration;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/remove-me.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-remove-me@2.0.2/remove-me.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | !function(){function e(e){var t=e.getAttribute("remove-me")||e.getAttribute("data-remove-me");t&&setTimeout((function(){e.parentElement.removeChild(e)}),htmx.parseInterval(t))}htmx.defineExtension("remove-me",{onEvent:function(t,r){if("htmx:afterProcessNode"===t){var o=r.detail.elt;if(o.getAttribute&&(e(o),o.querySelectorAll))for(var n=o.querySelectorAll("[remove-me], [data-remove-me]"),m=0;m array(
3 | 'name' => 'estebanforge/hyperfields',
4 | 'pretty_version' => '1.0.1',
5 | 'version' => '1.0.1.0',
6 | 'reference' => null,
7 | 'type' => 'wordpress-plugin',
8 | 'install_path' => __DIR__ . '/../../',
9 | 'aliases' => array(),
10 | 'dev' => false,
11 | ),
12 | 'versions' => array(
13 | 'estebanforge/hyperfields' => array(
14 | 'pretty_version' => '1.0.1',
15 | 'version' => '1.0.1.0',
16 | 'reference' => null,
17 | 'type' => 'wordpress-plugin',
18 | 'install_path' => __DIR__ . '/../../',
19 | 'aliases' => array(),
20 | 'dev_requirement' => false,
21 | ),
22 | ),
23 | );
24 |
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/json-enc.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-json-enc@2.0.3/json-enc.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | !function(){let n;htmx.defineExtension("json-enc",{init:function(e){n=e},onEvent:function(n,e){"htmx:configRequest"===n&&(e.detail.headers["Content-Type"]="application/json")},encodeParameters:function(e,t,o){e.overrideMimeType("text/json");const i={};t.forEach((function(n,e){Object.hasOwn(i,e)?(Array.isArray(i[e])||(i[e]=[i[e]]),i[e].push(n)):i[e]=n}));const s=n.getExpressionVars(o);return Object.keys(i).forEach((function(n){i[n]=Object.hasOwn(s,n)?s[n]:i[n]})),JSON.stringify(i)}})}();
8 | //# sourceMappingURL=/sm/b8de7541f9a9441388a80611ad8e4d48fb8b5bdd8ff94a29fa35571e58740232.map
--------------------------------------------------------------------------------
/src/Admin/Activation.php:
--------------------------------------------------------------------------------
1 |
19 |
20 | >
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/event-header.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-event-header@2.0.2/dist/event-header.esm.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | import htmx from"htmx.org";htmx.defineExtension("event-header",{onEvent:function(e,t){"htmx:configRequest"===e&&t.detail.triggeringEvent&&(t.detail.headers["Triggering-Event"]=function(e){var t={};for(var n in e)t[n]=e[n];return JSON.stringify(t,(function(e,t){if(t instanceof Node){var n=t.tagName;return n?(n=n.toLowerCase(),t.id&&(n+="#"+t.id),t.classList&&t.classList.length&&(n+="."+t.classList.toString().replace(" ",".")),n):"Node"}return t instanceof Window?"Window":t}))}(t.detail.triggeringEvent))}});
8 | //# sourceMappingURL=/sm/5b737cdcb145da6f036f0a6544b577ceffd345bf56db6d275a5ca4a06a070c55.map
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/include-vals.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-include-vals@2.0.2/dist/include-vals.esm.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | import htmx from"htmx.org";(function(){function mergeObjects(e,t){for(var l in t)t.hasOwnProperty(l)&&(e[l]=t[l]);return e}htmx.defineExtension("include-vals",{onEvent:function(name,evt){if("htmx:configRequest"===name){var includeValsElt=htmx.closest(evt.detail.elt,"[include-vals],[data-include-vals]");if(includeValsElt){var includeVals=includeValsElt.getAttribute("include-vals")||includeValsElt.getAttribute("data-include-vals"),valuesToInclude=eval("({"+includeVals+"})");mergeObjects(evt.detail.parameters,valuesToInclude)}}}})})();
8 | //# sourceMappingURL=/sm/b2cd017ab1095df071c76dcf53b78a24645f1008c0ab0a9c639b7c3670ddf1af.map
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/src/enums/ElementPatchMode.php:
--------------------------------------------------------------------------------
1 | {this.textContent="Copied!",this.classList.add("button-primary"),this.classList.remove("button-secondary"),setTimeout((()=>{this.textContent=e,this.classList.add("button-secondary"),this.classList.remove("button-primary")}),2e3)})).catch((t=>{console.error("Failed to copy: ",t)}))}))}))}));
--------------------------------------------------------------------------------
/src/js/admin-options.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded",(function(){const t=document.querySelector("#hyperpress_options_active_library");t&&t.addEventListener("change",(function(){const t=document.querySelector('p.submit input[type="submit"]');if(t){const e=document.createElement("span");e.className="spinner is-active",e.style.float="none",e.style.marginTop="5px",t.parentNode.insertBefore(e,t.nextSibling)}document.querySelector("#hyperpress-options-form").submit()})),document.querySelectorAll(".copy-api-url").forEach((function(t){t.addEventListener("click",(function(){const t=this.getAttribute("data-clipboard-text"),e=this.textContent;navigator.clipboard.writeText(t).then((()=>{this.textContent="Copied!",this.classList.add("button-primary"),this.classList.remove("button-secondary"),setTimeout((()=>{this.textContent=e,this.classList.add("button-secondary"),this.classList.remove("button-primary")}),2e3)})).catch((t=>{console.error("Failed to copy: ",t)}))}))}))}));
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-heading.php:
--------------------------------------------------------------------------------
1 |
17 |
18 | >
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/run-tests:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | HyperPress.
13 |
14 | In the case of HTMX, you can also enable any of its extensions in the plugin's options page: Settings > HyperPress.
15 |
16 | ## Local vs CDN Loading
17 |
18 | The plugin includes local copies of all libraries for privacy and offline development. You can choose to load from:
19 |
20 | 1. **Local files** (default): Libraries are served from your WordPress installation
21 | 2. **CDN**: Optional CDN loading from jsdelivr.net. Will always load the latest version of the library.
22 |
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/path-deps.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-path-deps@2.0.2/path-deps.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | (function(){"use strict";function t(t,e){if("ignore"===t)return!1;for(var n=t.split("/"),r=e.split("/"),i=0;i HyperPress.
8 |
9 | ## Installation via Composer
10 | If you want to use this plugin as a library, you can install it via Composer. This allows you to use hypermedia libraries in your own plugins or themes, without the need to install this plugin.
11 |
12 | ```bash
13 | composer require estebanforge/hyperpress
14 | ```
15 |
16 | This plugin/library will determine which instance of itself is the newer one when WordPress is loading. Then, it will use the newer instance between all competing plugins or themes. This is to avoid conflicts with other plugins or themes that may be using the same library for their Hypermedia implementation.
17 |
--------------------------------------------------------------------------------
/vendor/composer/platform_check.php:
--------------------------------------------------------------------------------
1 | = 80100)) {
8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
9 | }
10 |
11 | if ($issues) {
12 | if (!headers_sent()) {
13 | header('HTTP/1.1 500 Internal Server Error');
14 | }
15 | if (!ini_get('display_errors')) {
16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18 | } elseif (!headers_sent()) {
19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20 | }
21 | }
22 | throw new \RuntimeException(
23 | 'Composer detected issues in your platform: ' . implode(' ', $issues)
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/vendor/composer/platform_check.php:
--------------------------------------------------------------------------------
1 | = 80100)) {
8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
9 | }
10 |
11 | if ($issues) {
12 | if (!headers_sent()) {
13 | header('HTTP/1.1 500 Internal Server Error');
14 | }
15 | if (!ini_get('display_errors')) {
16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18 | } elseif (!headers_sent()) {
19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20 | }
21 | }
22 | throw new \RuntimeException(
23 | 'Composer detected issues in your platform: ' . implode(' ', $issues)
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/src/Libraries/AlpineAjaxLib.php:
--------------------------------------------------------------------------------
1 | main = $main;
34 | }
35 |
36 | /**
37 | * Get available extensions for Alpine Ajax.
38 | * This method is included for API consistency but currently returns an empty array
39 | * as Alpine Ajax does not have extensions in the same way HTMX does.
40 | *
41 | * @return array An empty array.
42 | */
43 | public function getExtensions(): array
44 | {
45 | return [];
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright © Star Federation
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 |
--------------------------------------------------------------------------------
/src/Compatibility.php:
--------------------------------------------------------------------------------
1 | =8.1"
17 | },
18 | "autoload": {
19 | "psr-4": {
20 | "HyperFields\\": "src/"
21 | },
22 | "files": [
23 | "includes/helpers.php",
24 | "includes/backward-compatibility.php",
25 | "bootstrap.php"
26 | ]
27 | },
28 | "autoload-dev": {
29 | "psr-4": {
30 | "HyperFields\\Tests\\": "tests/"
31 | }
32 | },
33 |
34 | "config": {
35 | "allow-plugins": {
36 | "composer/installers": true
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/composer/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) Nils Adermann, Jordi Boggiano
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is furnished
9 | to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/hyperblocks/quote-block/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hyperblocks/quote-block-json",
3 | "title": "HB Quote Block (JSON)",
4 | "description": "A quote block with author attribution and styling - block.json implementation.",
5 | "category": "widgets",
6 | "icon": "format-quote",
7 | "keywords": ["quote", "blockquote", "author", "testimonial"],
8 | "supports": {
9 | "html": false,
10 | "anchor": true,
11 | "spacing": {
12 | "padding": true,
13 | "margin": true
14 | }
15 | },
16 | "attributes": {
17 | "quote_text": {
18 | "type": "string",
19 | "default": ""
20 | },
21 | "quote_author": {
22 | "type": "string",
23 | "default": ""
24 | },
25 | "author_title": {
26 | "type": "string",
27 | "default": ""
28 | },
29 | "background_color": {
30 | "type": "string",
31 | "default": "#f9f9f9"
32 | },
33 | "text_color": {
34 | "type": "string",
35 | "default": "#333333"
36 | }
37 | },
38 | "render": "file:./render.php"
39 | }
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/vendor/composer/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) Nils Adermann, Jordi Boggiano
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is furnished
9 | to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/hyperblocks/content-card/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hyperblocks/content-card-json",
3 | "title": "HB Content Card (JSON)",
4 | "description": "A content card block with title, image, and nested content area - block.json implementation.",
5 | "category": "widgets",
6 | "icon": "table-col-before",
7 | "keywords": ["card", "content", "image", "nested"],
8 | "supports": {
9 | "html": false,
10 | "anchor": true,
11 | "spacing": {
12 | "padding": true,
13 | "margin": true
14 | }
15 | },
16 | "attributes": {
17 | "card_title": {
18 | "type": "string",
19 | "default": ""
20 | },
21 | "image_url": {
22 | "type": "string",
23 | "default": ""
24 | },
25 | "image_alt": {
26 | "type": "string",
27 | "default": ""
28 | },
29 | "background_color": {
30 | "type": "string",
31 | "default": "#ffffff"
32 | },
33 | "text_color": {
34 | "type": "string",
35 | "default": "#333333"
36 | }
37 | },
38 | "render": "file:./render.php"
39 | }
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/hyperfields/simple-example.php:
--------------------------------------------------------------------------------
1 | where('post')
33 | ->setContext('side');
34 |
35 | $container
36 | ->addField(HyperFields::makeField('text', 'test_text', 'Test Text'))
37 | ->addField(HyperFields::makeField('textarea', 'test_textarea', 'Test Textarea'))
38 | ->addField(HyperFields::makeField('checkbox', 'test_checkbox', 'Test Checkbox'));
39 | }
40 |
41 | // Activate with: add_action('init', 'hyperfields_simple_example');
42 |
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "starfederation/datastar-php",
3 | "description": "A PHP SDK for working with Datastar.",
4 | "version": "1.0.0-RC.4",
5 | "type": "library",
6 | "license": "mit",
7 | "require": {
8 | "php": ">=8.1"
9 | },
10 | "require-dev": {
11 | "craftcms/ecs": "dev-main",
12 | "craftcms/phpstan": "dev-main",
13 | "pestphp/pest": "^3.5"
14 | },
15 | "autoload": {
16 | "psr-4": {
17 | "starfederation\\datastar\\": "src/"
18 | }
19 | },
20 | "scripts": {
21 | "ecs": "ecs check --ansi --fix",
22 | "phpstan": "phpstan --memory-limit=1G",
23 | "test": "vendor/bin/pest"
24 | },
25 | "config": {
26 | "optimize-autoloader": true,
27 | "sort-packages": true,
28 | "allow-plugins": {
29 | "pestphp/pest-plugin": true
30 | }
31 | },
32 | "authors": [
33 | {
34 | "name": "Ben Croker",
35 | "homepage": "https://putyourlightson.com/",
36 | "role": "Author"
37 | }
38 | ],
39 | "support": {
40 | "docs": "https://github.com/starfederation/datastar-php",
41 | "source": "https://github.com/starfederation/datastar-php",
42 | "issues": "https://github.com/starfederation/datastar-php/issues"
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/hyperfields/simple-metabox-test.php:
--------------------------------------------------------------------------------
1 | where('post')
33 | ->setContext('side');
34 |
35 | $container
36 | ->addField(HyperFields::makeField('text', 'test_text', 'Test Text'))
37 | ->addField(HyperFields::makeField('textarea', 'test_textarea', 'Test Textarea'))
38 | ->addField(HyperFields::makeField('checkbox', 'test_checkbox', 'Test Checkbox'));
39 | }
40 |
41 | // Activate with: add_action('init', 'hyperfields_simple_metabox_test');
42 |
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/src/Consts.php:
--------------------------------------------------------------------------------
1 | OpenStreetMap contributors'}).addTo(d);let c=L.marker([n,a],{draggable:!0}).addTo(d);c.on("dragend",(function(t){const e=c.getLatLng();l.value=e.lat,r.value=e.lng})),d.on("click",(function(t){const e=t.latlng;c.setLatLng(e),l.value=e.lat,r.value=e.lng}));const g=document.querySelector(`.hyperpress-geocode-button[data-field="${e}"]`);g&&g.addEventListener("click",(function(){const t=s.value;t&&fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(t)}`).then((t=>t.json())).then((t=>{if(t&&t.length>0){const e=parseFloat(t[0].lat),n=parseFloat(t[0].lon),a=new L.LatLng(e,n);d.setView(a,o),c.setLatLng(a),l.value=e,r.value=n}else alert("Address not found.")})).catch((t=>console.error("Error during geocoding:",t)))}))}))}));
--------------------------------------------------------------------------------
/assets/js/map-field.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded",(function(){const t=document.querySelectorAll(".hyperpress-map-canvas");0!==t.length&&t.forEach((function(t){const e=t.dataset.field,n=parseFloat(t.dataset.lat)||51.505,a=parseFloat(t.dataset.lng)||-.09,o=parseInt(t.dataset.zoom,10)||13,l=document.getElementById(e+"_lat"),r=document.getElementById(e+"_lng"),s=document.getElementById(e+"_address"),d=L.map(t).setView([n,a],o);L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors'}).addTo(d);let c=L.marker([n,a],{draggable:!0}).addTo(d);c.on("dragend",(function(t){const e=c.getLatLng();l.value=e.lat,r.value=e.lng})),d.on("click",(function(t){const e=t.latlng;c.setLatLng(e),l.value=e.lat,r.value=e.lng}));const g=document.querySelector(`.hyperpress-geocode-button[data-field="${e}"]`);g&&g.addEventListener("click",(function(){const t=s.value;t&&fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(t)}`).then((t=>t.json())).then((t=>{if(t&&t.length>0){const e=parseFloat(t[0].lat),n=parseFloat(t[0].lon),a=new L.LatLng(e,n);d.setView(a,o),c.setLatLng(a),l.value=e,r.value=n}else alert("Address not found.")})).catch((t=>console.error("Error during geocoding:",t)))}))}))}));
--------------------------------------------------------------------------------
/hyperblocks/hero-banner/block.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hyperblocks/hero-banner-json",
3 | "title": "HB Hero Banner (JSON)",
4 | "description": "A hero banner block with headline, subtitle, and call-to-action button - block.json implementation.",
5 | "category": "widgets",
6 | "icon": "format-image",
7 | "keywords": ["hero", "banner", "cta", "headline"],
8 | "supports": {
9 | "html": false,
10 | "anchor": true,
11 | "spacing": {
12 | "padding": true,
13 | "margin": true
14 | }
15 | },
16 | "attributes": {
17 | "headline": {
18 | "type": "string",
19 | "default": ""
20 | },
21 | "subtitle": {
22 | "type": "string",
23 | "default": ""
24 | },
25 | "button_url": {
26 | "type": "string",
27 | "default": ""
28 | },
29 | "button_text": {
30 | "type": "string",
31 | "default": "Learn More"
32 | },
33 | "background_color": {
34 | "type": "string",
35 | "default": "#ffffff"
36 | },
37 | "text_color": {
38 | "type": "string",
39 | "default": "#333333"
40 | }
41 | },
42 | "render": "file:./render.php"
43 | }
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/Container/ContainerFactory.php:
--------------------------------------------------------------------------------
1 | init();
27 |
28 | return $container;
29 | }
30 |
31 | /**
32 | * Create a term meta container.
33 | */
34 | public static function makeTermMeta(string $id, string $title): TermMetaContainer
35 | {
36 | $container = new TermMetaContainer($id, $title);
37 | $container->init();
38 |
39 | return $container;
40 | }
41 |
42 | /**
43 | * Create a user meta container.
44 | */
45 | public static function makeUserMeta(string $id, string $title): UserMetaContainer
46 | {
47 | $container = new UserMetaContainer($id, $title);
48 | $container->init();
49 |
50 | return $container;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/assets/css/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/assets/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/hypermedia/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/includes/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/languages/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/Admin/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/Blocks/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/js/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/assets/libs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/hyperblocks/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/Libraries/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/hypermedia/noswap/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/includes/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/uninstall.php:
--------------------------------------------------------------------------------
1 | get_results("SELECT option_name FROM $wpdb->options WHERE option_name LIKE '_hxwp_%' OR option_name LIKE 'hxwp_%' OR option_name LIKE '_hyperpress_%' OR option_name LIKE 'hyperpress_%'");
35 |
36 | if (is_array($hp_options) && !empty($hp_options)) {
37 | foreach ($hp_options as $option) {
38 | delete_option($option->option_name);
39 | }
40 | }
41 |
42 | // Flush rewrite rules
43 | flush_rewrite_rules();
44 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/hyperfields/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/hyperoptions/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/Admin/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/Container/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | You shall not pass!
14 |
15 |
16 |
17 |
18 |
33 |
34 |
35 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/pest.php:
--------------------------------------------------------------------------------
1 | in('Unit');
16 |
17 | /*
18 | |--------------------------------------------------------------------------
19 | | Expectations
20 | |--------------------------------------------------------------------------
21 | |
22 | | When you're writing tests, you often need to check that values meet
23 | | certain conditions. The "expect()" function gives you access to a set
24 | | of "expectation" methods that you can use to assert different
25 | | conditions.
26 | |
27 | */
28 |
29 | expect()->extend('toBeOne', function () {
30 | return $this->toBe(1);
31 | });
32 |
33 | /*
34 | |--------------------------------------------------------------------------
35 | | Functions
36 | |--------------------------------------------------------------------------
37 | |
38 | | While Pest is very powerful out-of-the-box, you may have some testing
39 | | code specific to your project that you don't want to repeat in every
40 | | file. Here you can also expose helpers as globals to make them
41 | | available in your tests.
42 | |
43 | */
44 |
45 | function something()
46 | {
47 | // ..
48 | }
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/class-tools.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-class-tools@2.0.3/class-tools.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | !function(){function t(t){var e=t.split(/\s+/);if(e.length>1){var s,a,l=e[0],i=e[1].trim();if(i.indexOf(":")>0){var n=i.split(":");s=n[0],a=htmx.parseInterval(n[1])}else s=i,a=100;return{operation:l,cssClass:s,delay:a}}return null}function e(t,e,s,a){setTimeout((function(){t.classList[e.operation].call(t.classList,e.cssClass)}),a)}function s(t,e,s,a){setTimeout((function(){setInterval((function(){t.classList[e.operation].call(t.classList,e.cssClass)}),e.delay)}),a)}function a(a){if(a.getAttribute){var l=a.getAttribute("classes")||a.getAttribute("data-classes");l&&function(a,l){for(var i=l.split("&"),n=0;n
21 |
22 | >
23 |
24 |
25 |
26 |
27 |
28 |
29 |
42 |
43 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## [1.0.2] - 2024-12-07
4 |
5 | ### Added
6 | - Complete custom field system for WordPress
7 | - Post meta, term meta, and user meta container support
8 | - Options pages with sections and tabs
9 | - Conditional logic for dynamic field visibility
10 | - Field types: text, textarea, email, URL, number, select, checkbox, radio, date, color, image, file, wysiwyg, code editor
11 | - Repeater fields for creating dynamic field groups
12 | - Template loader with automatic asset enqueuing
13 | - Block field adapter for Gutenberg integration
14 | - Backward compatibility layer for legacy class names
15 | - PSR-4 autoloading with Composer
16 | - Comprehensive field validation and sanitization
17 | - Admin assets manager for styles and scripts
18 | - Helper functions for field value retrieval
19 |
20 | ### Features
21 | - **Metaboxes**: Add custom fields to posts, pages, and custom post types
22 | - **Options Pages**: Create settings pages with organized sections and tabs
23 | - **Conditional Logic**: Show/hide fields based on other field values
24 | - **Flexible Containers**: Support for post meta, term meta, user meta, and options
25 | - **Rich Field Types**: Extensive collection of field types for any use case
26 | - **Developer-Friendly**: Clean API with extensive hooks and filters
27 | - **Performance**: Optimized autoloading and asset management
28 | - **Extensible**: Easy to extend with custom field types and containers
29 |
30 | ### Requirements
31 | - PHP 8.1 or higher
32 | - WordPress 5.0 or higher
33 | - Composer for dependency management
34 |
35 |
--------------------------------------------------------------------------------
/hypermedia/noswap/alpine-ajax-demo.hp.php:
--------------------------------------------------------------------------------
1 | $status,
39 | 'nonce' => wp_create_nonce('hyperpress_nonce'),
40 | 'message' => $message,
41 | 'demo_type' => $demo_type,
42 | 'params' => $hp_vals,
43 | 'timestamp' => current_time('mysql'),
44 | ]
45 | );
46 |
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/src/events/PatchSignals.php:
--------------------------------------------------------------------------------
1 | signals = $signals;
21 |
22 | foreach ($options as $key => $value) {
23 | if (property_exists($this, $key)) {
24 | $this->{$key} = $value;
25 | }
26 | }
27 | }
28 |
29 | /**
30 | * @inerhitdoc
31 | */
32 | public function getEventType(): EventType
33 | {
34 | return EventType::PatchSignals;
35 | }
36 |
37 | /**
38 | * @inerhitdoc
39 | */
40 | public function getDataLines(): array
41 | {
42 | $dataLines = [];
43 |
44 | if ($this->onlyIfMissing !== Consts::DEFAULT_PATCH_SIGNALS_ONLY_IF_MISSING) {
45 | $dataLines[] = $this->getDataLine(Consts::ONLY_IF_MISSING_DATALINE_LITERAL, $this->getBooleanAsString($this->onlyIfMissing));
46 | }
47 |
48 | $data = is_array($this->signals) ? json_encode($this->signals) : $this->signals;
49 |
50 | return array_merge(
51 | $dataLines,
52 | $this->getMultiDataLines(Consts::SIGNALS_DATALINE_LITERAL, $data),
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/vendor/composer/installed.php:
--------------------------------------------------------------------------------
1 | array(
3 | 'name' => 'estebanforge/hyperpress',
4 | 'pretty_version' => '3.0.2',
5 | 'version' => '3.0.2.0',
6 | 'reference' => null,
7 | 'type' => 'wordpress-plugin',
8 | 'install_path' => __DIR__ . '/../../',
9 | 'aliases' => array(),
10 | 'dev' => false,
11 | ),
12 | 'versions' => array(
13 | 'estebanforge/hyperfields' => array(
14 | 'pretty_version' => '1.0.2',
15 | 'version' => '1.0.2.0',
16 | 'reference' => '911199a77337fb02354c9e45ad112bfec40d4503',
17 | 'type' => 'wordpress-plugin',
18 | 'install_path' => __DIR__ . '/../estebanforge/hyperfields',
19 | 'aliases' => array(),
20 | 'dev_requirement' => false,
21 | ),
22 | 'estebanforge/hyperpress' => array(
23 | 'pretty_version' => '3.0.2',
24 | 'version' => '3.0.2.0',
25 | 'reference' => null,
26 | 'type' => 'wordpress-plugin',
27 | 'install_path' => __DIR__ . '/../../',
28 | 'aliases' => array(),
29 | 'dev_requirement' => false,
30 | ),
31 | 'starfederation/datastar-php' => array(
32 | 'pretty_version' => '1.0.0-RC.4',
33 | 'version' => '1.0.0.0-RC4',
34 | 'reference' => '919c57674bc19e4523eb56926844ad16829f4eee',
35 | 'type' => 'library',
36 | 'install_path' => __DIR__ . '/../starfederation/datastar-php',
37 | 'aliases' => array(),
38 | 'dev_requirement' => false,
39 | ),
40 | ),
41 | );
42 |
--------------------------------------------------------------------------------
/vendor/starfederation/datastar-php/src/events/RemoveElements.php:
--------------------------------------------------------------------------------
1 | selector = $selector;
22 |
23 | foreach ($options as $key => $value) {
24 | if (property_exists($this, $key)) {
25 | $this->{$key} = $value;
26 | }
27 | }
28 | }
29 |
30 | /**
31 | * @inerhitdoc
32 | */
33 | public function getEventType(): EventType
34 | {
35 | return EventType::PatchElements;
36 | }
37 |
38 | /**
39 | * @inerhitdoc
40 | */
41 | public function getDataLines(): array
42 | {
43 | $dataLines = [
44 | $this->getDataLine(Consts::SELECTOR_DATALINE_LITERAL, $this->selector),
45 | $this->getDataLine(Consts::MODE_DATALINE_LITERAL, ElementPatchMode::Remove->value),
46 | ];
47 |
48 | if ($this->useViewTransition !== Consts::DEFAULT_ELEMENTS_USE_VIEW_TRANSITIONS) {
49 | $dataLines[] = $this->getDataLine(Consts::USE_VIEW_TRANSITION_DATALINE_LITERAL, $this->getBooleanAsString($this->useViewTransition));
50 | }
51 |
52 | return $dataLines;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/OptionsSection.php:
--------------------------------------------------------------------------------
1 | id = $id;
17 | $this->title = $title;
18 | $this->description = $description;
19 | }
20 |
21 | public function setDescription(string $description): self
22 | {
23 | $this->description = $description;
24 |
25 | return $this;
26 | }
27 |
28 | public function getId(): string
29 | {
30 | return $this->id;
31 | }
32 |
33 | public function getTitle(): string
34 | {
35 | return $this->title;
36 | }
37 |
38 | public function getDescription(): string
39 | {
40 | return $this->description;
41 | }
42 |
43 | public function addField(Field $field): self
44 | {
45 | $this->fields[$field->getName()] = $field;
46 | $field->setContext('option');
47 |
48 | return $this;
49 | }
50 |
51 | public function getFields(): array
52 | {
53 | return $this->fields;
54 | }
55 |
56 | public function render(): void
57 | {
58 | if ($this->description) {
59 | echo '' . esc_html($this->description) . '
';
60 | }
61 | }
62 |
63 | public static function make(string $id, string $title, string $description = ''): self
64 | {
65 | return new self($id, $title, $description);
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-time.php:
--------------------------------------------------------------------------------
1 |
22 |
23 | >
24 |
28 |
29 |
42 |
--------------------------------------------------------------------------------
/hyperblocks/content-card/render.php:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 |
30 |
31 |
 ?>)
34 |
35 |
36 |
42 |
--------------------------------------------------------------------------------
/src/Blocks/FieldGroup.php:
--------------------------------------------------------------------------------
1 | name = $name;
51 | $this->id = $id;
52 | }
53 |
54 | /**
55 | * Create a new FieldGroup instance.
56 | *
57 | * @param string $name The field group name.
58 | * @param string $id The field group ID.
59 | * @return self
60 | */
61 | public static function make(string $name, string $id): self
62 | {
63 | return new self($name, $id);
64 | }
65 |
66 | /**
67 | * Add fields to the group.
68 | *
69 | * @param Field[] $fields An array of Field objects.
70 | * @return self
71 | */
72 | public function addFields(array $fields): self
73 | {
74 | $this->fields = array_merge($this->fields, $fields);
75 |
76 | return $this;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-footer-scripts.php:
--------------------------------------------------------------------------------
1 |
22 |
23 | >
24 |
28 |
29 |
43 |
--------------------------------------------------------------------------------
/hyperblocks/quote-block/render.php:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
39 |
40 | "
41 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-datetime.php:
--------------------------------------------------------------------------------
1 |
23 |
24 | >
25 |
29 |
30 |
43 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-checkbox.php:
--------------------------------------------------------------------------------
1 |
22 |
23 | >
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-header-scripts.php:
--------------------------------------------------------------------------------
1 |
22 |
23 | >
24 |
28 |
29 |
46 |
--------------------------------------------------------------------------------
/docs/library-detection.md:
--------------------------------------------------------------------------------
1 | # Library Detection Functions
2 |
3 | **`hp_is_library_mode(): bool`**
4 |
5 | Detects whether the plugin is running as a WordPress plugin or as a Composer library. Useful for conditional functionality.
6 |
7 | ```php
8 | if (hp_is_library_mode()) {
9 | // Running as composer library - no admin interface
10 | // Configure via filters only
11 | add_filter('hyperpress/default_options', function($defaults) {
12 | $defaults['active_library'] = 'htmx';
13 | return $defaults;
14 | });
15 | } else {
16 | // Running as WordPress plugin - full functionality available
17 | add_action('admin_menu', 'my_admin_menu');
18 | }
19 |
20 | // Datastar-specific library mode configuration
21 | if (hp_is_library_mode()) {
22 | // Configure Datastar for production use as library
23 | add_filter('hyperpress/default_options', function($defaults) {
24 | $defaults['active_library'] = 'datastar';
25 | $defaults['load_from_cdn'] = false; // Use local files for reliability
26 | $defaults['load_datastar_backend'] = true; // Enable in wp-admin
27 | return $defaults;
28 | });
29 |
30 | // Register custom SSE endpoints for the plugin using this library
31 | add_filter('hyperpress/register_template_path', function($paths) {
32 | $paths['my-plugin'] = plugin_dir_path(__FILE__) . 'datastar-templates/';
33 | return $paths;
34 | });
35 | } else {
36 | // Plugin mode - users can configure via admin interface
37 | // Add custom Datastar functionality only when running as main plugin
38 | add_action('wp_enqueue_scripts', function() {
39 | if (get_option('hyperpress_active_library') === 'datastar') {
40 | wp_add_inline_script('datastar', 'console.log("Datastar ready for SSE!");');
41 | }
42 | });
43 | }
44 | ```
45 |
--------------------------------------------------------------------------------
/hyperblocks/hero-banner/render.php:
--------------------------------------------------------------------------------
1 |
28 |
29 |
30 |
31 |
32 |
33 |
40 |
41 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_real.php:
--------------------------------------------------------------------------------
1 | register(true);
35 |
36 | $filesToLoad = \Composer\Autoload\ComposerStaticInit9df57b10e795f620526ee79a8e50f778::$files;
37 | $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
38 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
39 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
40 |
41 | require $file;
42 | }
43 | }, null, null);
44 | foreach ($filesToLoad as $fileIdentifier => $file) {
45 | $requireFile($fileIdentifier, $file);
46 | }
47 |
48 | return $loader;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/PostField.php:
--------------------------------------------------------------------------------
1 | post_id = $post_id;
16 | $field->setContext('post');
17 |
18 | return $field;
19 | }
20 |
21 | public function setMetaKeyPrefix(string $prefix): self
22 | {
23 | $this->meta_key_prefix = $prefix;
24 |
25 | return $this;
26 | }
27 |
28 | public function getMetaKey(): string
29 | {
30 | $key = $this->meta_key_prefix . $this->getName();
31 |
32 | return apply_filters('hyperpress/fields/post_field_meta_key', $key, $this->getName(), $this->post_id);
33 | }
34 |
35 | public function getValue(): mixed
36 | {
37 | $value = get_post_meta($this->post_id, $this->getMetaKey(), true);
38 |
39 | if ($value === '' || $value === false) {
40 | $value = $this->getDefault();
41 | }
42 |
43 | return $this->sanitizeValue($value);
44 | }
45 |
46 | public function setValue(mixed $value): bool
47 | {
48 | $sanitized_value = $this->sanitizeValue($value);
49 |
50 | if (!$this->validateValue($sanitized_value)) {
51 | return false;
52 | }
53 |
54 | return update_post_meta($this->post_id, $this->getMetaKey(), $sanitized_value) !== false;
55 | }
56 |
57 | public function deleteValue(): bool
58 | {
59 | return delete_post_meta($this->post_id, $this->getMetaKey()) !== false;
60 | }
61 |
62 | public function getPostId(): int
63 | {
64 | return $this->post_id;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/TermField.php:
--------------------------------------------------------------------------------
1 | term_id = $term_id;
16 | $field->setContext('term');
17 |
18 | return $field;
19 | }
20 |
21 | public function setMetaKeyPrefix(string $prefix): self
22 | {
23 | $this->meta_key_prefix = $prefix;
24 |
25 | return $this;
26 | }
27 |
28 | public function getMetaKey(): string
29 | {
30 | $key = $this->meta_key_prefix . $this->getName();
31 |
32 | return apply_filters('hyperpress/fields/term_field_meta_key', $key, $this->getName(), $this->term_id);
33 | }
34 |
35 | public function getValue(): mixed
36 | {
37 | $value = get_term_meta($this->term_id, $this->getMetaKey(), true);
38 |
39 | if ($value === '' || $value === false) {
40 | $value = $this->getDefault();
41 | }
42 |
43 | return $this->sanitizeValue($value);
44 | }
45 |
46 | public function setValue(mixed $value): bool
47 | {
48 | $sanitized_value = $this->sanitizeValue($value);
49 |
50 | if (!$this->validateValue($sanitized_value)) {
51 | return false;
52 | }
53 |
54 | return update_term_meta($this->term_id, $this->getMetaKey(), $sanitized_value) !== false;
55 | }
56 |
57 | public function deleteValue(): bool
58 | {
59 | return delete_term_meta($this->term_id, $this->getMetaKey()) !== false;
60 | }
61 |
62 | public function getTermId(): int
63 | {
64 | return $this->term_id;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/UserField.php:
--------------------------------------------------------------------------------
1 | user_id = $user_id;
16 | $field->setContext('user');
17 |
18 | return $field;
19 | }
20 |
21 | public function setMetaKeyPrefix(string $prefix): self
22 | {
23 | $this->meta_key_prefix = $prefix;
24 |
25 | return $this;
26 | }
27 |
28 | public function getMetaKey(): string
29 | {
30 | $key = $this->meta_key_prefix . $this->getName();
31 |
32 | return apply_filters('hyperpress/fields/user_field_meta_key', $key, $this->getName(), $this->user_id);
33 | }
34 |
35 | public function getValue(): mixed
36 | {
37 | $value = get_user_meta($this->user_id, $this->getMetaKey(), true);
38 |
39 | if ($value === '' || $value === false) {
40 | $value = $this->getDefault();
41 | }
42 |
43 | return $this->sanitizeValue($value);
44 | }
45 |
46 | public function setValue(mixed $value): bool
47 | {
48 | $sanitized_value = $this->sanitizeValue($value);
49 |
50 | if (!$this->validateValue($sanitized_value)) {
51 | return false;
52 | }
53 |
54 | return update_user_meta($this->user_id, $this->getMetaKey(), $sanitized_value) !== false;
55 | }
56 |
57 | public function deleteValue(): bool
58 | {
59 | return delete_user_meta($this->user_id, $this->getMetaKey()) !== false;
60 | }
61 |
62 | public function getUserId(): int
63 | {
64 | return $this->user_id;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/hyperfields/conditional-logic-test.php:
--------------------------------------------------------------------------------
1 | where('post')
16 | ->setContext('normal')
17 | ->setPriority('high');
18 |
19 | $container
20 | ->addField(HyperFields::makeField('select', 'show_extra_fields', 'Show Extra Fields?')
21 | ->setOptions([
22 | 'no' => 'No',
23 | 'yes' => 'Yes',
24 | ])
25 | ->setDefault('no'))
26 |
27 | ->addField(HyperFields::makeField('text', 'extra_text_field', 'Extra Text Field')
28 | ->setConditionalLogic([
29 | 'relation' => 'AND',
30 | 'conditions' => [[
31 | 'field' => 'show_extra_fields',
32 | 'compare' => '=',
33 | 'value' => 'yes',
34 | ]],
35 | ])
36 | ->setPlaceholder('This field is shown conditionally'))
37 |
38 | ->addField(HyperFields::makeField('textarea', 'extra_textarea_field', 'Extra Textarea Field')
39 | ->setConditionalLogic([
40 | 'relation' => 'AND',
41 | 'conditions' => [[
42 | 'field' => 'show_extra_fields',
43 | 'compare' => '=',
44 | 'value' => 'yes',
45 | ]],
46 | ])
47 | ->setPlaceholder('Another conditionally shown field'));
48 |
49 | // Register the container
50 | $container->register();
51 | }
52 |
53 | // Activate the test
54 | add_action('init', 'hyperfields_metabox_conditional_logic_test');
55 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/vendor/composer/autoload_real.php:
--------------------------------------------------------------------------------
1 | register(true);
35 |
36 | $filesToLoad = \Composer\Autoload\ComposerStaticInit0b1779e428d95f593360c4ae583abcbc::$files;
37 | $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
38 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
39 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
40 |
41 | require $file;
42 | }
43 | }, null, null);
44 | foreach ($filesToLoad as $fileIdentifier => $file) {
45 | $requireFile($fileIdentifier, $file);
46 | }
47 |
48 | return $loader;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-color.php:
--------------------------------------------------------------------------------
1 |
23 |
24 | >
25 |
26 |
27 |
31 |
32 |
45 |
46 |
--------------------------------------------------------------------------------
/assets/libs/htmx-extensions/response-targets.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Minified by jsDelivr using Terser v5.39.0.
3 | * Original file: /npm/htmx-ext-response-targets@2.0.4/response-targets.js
4 | *
5 | * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 | */
7 | !function(){var e;function r(e,r){return e.substring(0,r.length)===r}function t(e){e.detail.isError?htmx.config.responseTargetUnsetsError&&(e.detail.isError=!1):htmx.config.responseTargetSetsError&&(e.detail.isError=!0)}htmx.defineExtension("response-targets",{init:function(r){e=r,void 0===htmx.config.responseTargetUnsetsError&&(htmx.config.responseTargetUnsetsError=!0),void 0===htmx.config.responseTargetSetsError&&(htmx.config.responseTargetSetsError=!1),void 0===htmx.config.responseTargetPrefersExisting&&(htmx.config.responseTargetPrefersExisting=!1),void 0===htmx.config.responseTargetPrefersRetargetHeader&&(htmx.config.responseTargetPrefersRetargetHeader=!0)},onEvent:function(s,n){if("htmx:beforeSwap"===s&&n.detail.xhr&&200!==n.detail.xhr.status){if(n.detail.target){if(htmx.config.responseTargetPrefersExisting)return n.detail.shouldSwap=!0,t(n),!0;if(htmx.config.responseTargetPrefersRetargetHeader&&n.detail.xhr.getAllResponseHeaders().match(/HX-Retarget:/i))return n.detail.shouldSwap=!0,t(n),!0}if(!n.detail.requestConfig)return!0;var i=function(t,s){if(!t||!s)return null;var n=s.toString(),i=[n,n.substring(0,2)+"*",n.substring(0,2)+"x",n.substring(0,1)+"*",n.substring(0,1)+"x",n.substring(0,1)+"**",n.substring(0,1)+"xx","*","x","***","xxx"];(r(n,"4")||r(n,"5"))&&i.push("error");for(var o=0;oscript = $script;
23 |
24 | foreach ($options as $key => $value) {
25 | if (property_exists($this, $key)) {
26 | $this->{$key} = $value;
27 | }
28 | }
29 | }
30 |
31 | /**
32 | * @inerhitdoc
33 | */
34 | public function getEventType(): EventType
35 | {
36 | return EventType::PatchElements;
37 | }
38 |
39 | /**
40 | * @inerhitdoc
41 | */
42 | public function getDataLines(): array
43 | {
44 | $dataLines = [];
45 | $dataLines[] = $this->getDataLine(Consts::SELECTOR_DATALINE_LITERAL, 'body');
46 | $dataLines[] = $this->getDataLine(Consts::MODE_DATALINE_LITERAL, ElementPatchMode::Append->value);
47 |
48 | $elements = '';
59 |
60 | return array_merge(
61 | $dataLines,
62 | $this->getMultiDataLines(Consts::ELEMENTS_DATALINE_LITERAL, $elements),
63 | );
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-date.php:
--------------------------------------------------------------------------------
1 |
23 |
24 | >
25 |
26 |
27 |
31 |
32 |
45 |
46 |
--------------------------------------------------------------------------------
/vendor/estebanforge/hyperfields/src/templates/field-rich-text.php:
--------------------------------------------------------------------------------
1 | $name_attr,
25 | 'textarea_rows' => 10,
26 | 'media_buttons' => true,
27 | 'teeny' => false,
28 | 'quicktags' => true,
29 | 'tinymce' => [
30 | 'toolbar1' => 'bold,italic,underline,|,bullist,numlist,|,link,unlink,|,pastetext,removeformat',
31 | 'toolbar2' => 'formatselect,|,outdent,indent,|,undo,redo',
32 | 'toolbar3' => '',
33 | ],
34 | ];
35 |
36 | // Allow customization via filter
37 | $editor_settings = apply_filters('hyperpress/fields/rich_text_editor_settings', $editor_settings, $name);
38 | ?>
39 |
40 | >
41 |
45 |
46 |
53 |
54 |
--------------------------------------------------------------------------------
/src/Router.php:
--------------------------------------------------------------------------------
1 | -1){const f=document.createElement("html");var n=t.replace(/