This commit is contained in:
2025-05-06 08:31:49 -07:00
parent db52cd6933
commit e4b8cdf7d1
9 changed files with 20049 additions and 5087 deletions

3
.gitignore vendored
View File

@@ -5,7 +5,6 @@
# Node artifact files # Node artifact files
node_modules/ node_modules/
dist/
# Compiled Java class files # Compiled Java class files
*.class *.class
@@ -21,7 +20,6 @@ dist/
# Maven # Maven
target/ target/
dist/
# JetBrains IDE # JetBrains IDE
.idea/ .idea/
@@ -47,4 +45,3 @@ Thumbs.db
*.flv *.flv
*.mov *.mov
*.wmv *.wmv

12
composer.lock generated
View File

@@ -57,16 +57,16 @@
}, },
{ {
"name": "open-function-computers-llc/rad-theme-engine", "name": "open-function-computers-llc/rad-theme-engine",
"version": "v1.0.25", "version": "v1.0.26",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/open-function-computers-llc/rad-theme-engine.git", "url": "https://github.com/open-function-computers-llc/rad-theme-engine.git",
"reference": "59e337a405555e2eff7aca8de1da9714077aab96" "reference": "17f231ae60eb6b90c5819d11d7c1e540a805f3a6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/open-function-computers-llc/rad-theme-engine/zipball/59e337a405555e2eff7aca8de1da9714077aab96", "url": "https://api.github.com/repos/open-function-computers-llc/rad-theme-engine/zipball/17f231ae60eb6b90c5819d11d7c1e540a805f3a6",
"reference": "59e337a405555e2eff7aca8de1da9714077aab96", "reference": "17f231ae60eb6b90c5819d11d7c1e540a805f3a6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -95,9 +95,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/open-function-computers-llc/rad-theme-engine/issues", "issues": "https://github.com/open-function-computers-llc/rad-theme-engine/issues",
"source": "https://github.com/open-function-computers-llc/rad-theme-engine/tree/v1.0.25" "source": "https://github.com/open-function-computers-llc/rad-theme-engine/tree/v1.0.26"
}, },
"time": "2024-01-25T19:02:08+00:00" "time": "2025-05-06T15:27:11+00:00"
}, },
{ {
"name": "salesforce/handlebars-php", "name": "salesforce/handlebars-php",

11976
dist/app.css vendored Normal file

File diff suppressed because it is too large Load Diff

169
dist/app.js vendored Normal file
View File

@@ -0,0 +1,169 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./src/js/app.js":
/*!***********************!*\
!*** ./src/js/app.js ***!
\***********************/
/***/ (() => {
/***/ }),
/***/ "./src/scss/app.scss":
/*!***************************!*\
!*** ./src/scss/app.scss ***!
\***************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "/app": 0,
/******/ "app": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkofc_wp_theme"] = self["webpackChunkofc_wp_theme"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, ["app"], () => (__webpack_require__("./src/js/app.js")))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["app"], () => (__webpack_require__("./src/scss/app.scss")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;

4
dist/mix-manifest.json vendored Normal file
View File

@@ -0,0 +1,4 @@
{
"/app.js": "/app.js?id=099e96d934e937b07341f2ca9fb82ec2",
"/app.css": "/app.css?id=58e820f334305f8133ab61227bac5d24"
}

12911
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -54,17 +54,17 @@
}, },
{ {
"name": "open-function-computers-llc/rad-theme-engine", "name": "open-function-computers-llc/rad-theme-engine",
"version": "v1.0.25", "version": "v1.0.26",
"version_normalized": "1.0.25.0", "version_normalized": "1.0.26.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/open-function-computers-llc/rad-theme-engine.git", "url": "https://github.com/open-function-computers-llc/rad-theme-engine.git",
"reference": "59e337a405555e2eff7aca8de1da9714077aab96" "reference": "17f231ae60eb6b90c5819d11d7c1e540a805f3a6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/open-function-computers-llc/rad-theme-engine/zipball/59e337a405555e2eff7aca8de1da9714077aab96", "url": "https://api.github.com/repos/open-function-computers-llc/rad-theme-engine/zipball/17f231ae60eb6b90c5819d11d7c1e540a805f3a6",
"reference": "59e337a405555e2eff7aca8de1da9714077aab96", "reference": "17f231ae60eb6b90c5819d11d7c1e540a805f3a6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -75,7 +75,7 @@
"require-dev": { "require-dev": {
"phpunit/phpunit": "^9.5" "phpunit/phpunit": "^9.5"
}, },
"time": "2024-01-25T19:02:08+00:00", "time": "2025-05-06T15:27:11+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -95,7 +95,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/open-function-computers-llc/rad-theme-engine/issues", "issues": "https://github.com/open-function-computers-llc/rad-theme-engine/issues",
"source": "https://github.com/open-function-computers-llc/rad-theme-engine/tree/v1.0.25" "source": "https://github.com/open-function-computers-llc/rad-theme-engine/tree/v1.0.26"
}, },
"install-path": "../open-function-computers-llc/rad-theme-engine" "install-path": "../open-function-computers-llc/rad-theme-engine"
}, },

View File

@@ -3,7 +3,7 @@
'name' => 'open-function-computers-llc/wp-theme', 'name' => 'open-function-computers-llc/wp-theme',
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'reference' => '6207303b1c6c33071cb620b993a6dbcc95ac0bf4', 'reference' => 'db52cd69338635ed28050c3df73492e8d38fb98f',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@@ -20,9 +20,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'open-function-computers-llc/rad-theme-engine' => array( 'open-function-computers-llc/rad-theme-engine' => array(
'pretty_version' => 'v1.0.25', 'pretty_version' => 'v1.0.26',
'version' => '1.0.25.0', 'version' => '1.0.26.0',
'reference' => '59e337a405555e2eff7aca8de1da9714077aab96', 'reference' => '17f231ae60eb6b90c5819d11d7c1e540a805f3a6',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../open-function-computers-llc/rad-theme-engine', 'install_path' => __DIR__ . '/../open-function-computers-llc/rad-theme-engine',
'aliases' => array(), 'aliases' => array(),
@@ -31,7 +31,7 @@
'open-function-computers-llc/wp-theme' => array( 'open-function-computers-llc/wp-theme' => array(
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'reference' => '6207303b1c6c33071cb620b993a6dbcc95ac0bf4', 'reference' => 'db52cd69338635ed28050c3df73492e8d38fb98f',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),

View File

@@ -29,6 +29,11 @@ class Site
private function bootstrap() private function bootstrap()
{ {
// wordpress added this style for us, but we don't want it
add_action('wp_enqueue_scripts', function () {
wp_dequeue_style('classic-theme-styles');
}, 20);
// disable various things // disable various things
if (isset($this->config["disable"])) { if (isset($this->config["disable"])) {
$this->disable($this->config["disable"]); $this->disable($this->config["disable"]);
@@ -395,6 +400,33 @@ class Site
} }
if ($key === "gutenberg") { if ($key === "gutenberg") {
add_filter('use_block_editor_for_post', '__return_false', 10); add_filter('use_block_editor_for_post', '__return_false', 10);
add_action('wp_enqueue_scripts', function () {
wp_dequeue_style('wp-block-library');
wp_dequeue_style('wp-block-library-theme');
wp_dequeue_style('wc-blocks-style'); // Remove WooCommerce block CSS
wp_dequeue_style('global-styles');
}, 100);
continue;
}
if ($key === "patterns") {
add_action('after_setup_theme', function () {
remove_theme_support('core-block-patterns');
});
add_action('admin_init', function () {
remove_submenu_page('themes.php', 'edit.php?post_type=wp_block');
remove_submenu_page('themes.php', 'site-editor.php?p=/pattern');
remove_submenu_page('themes.php', 'site-editor.php?p=/patterns');
});
continue;
}
if ($key === "meta-generator") {
remove_action('wp_head', 'wp_generator');
add_filter('the_generator', '__return_null');
continue;
}
if ($key === "emojis") {
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
continue; continue;
} }
if ($key === "customizer") { if ($key === "customizer") {
@@ -644,8 +676,8 @@ class Site
$output = []; $output = [];
$categories = []; $categories = [];
$taxonomies = []; $taxonomies = [];
foreach ($fields as $key) { foreach ($fields as $key) {
// handle url/permalink // handle url/permalink
if ($key === "url" || $key === "permalink") { if ($key === "url" || $key === "permalink") {
$output[$key] = get_permalink($p->ID); $output[$key] = get_permalink($p->ID);
@@ -1198,10 +1230,11 @@ class Site
foreach ($templates as $filename => $templateName) { foreach ($templates as $filename => $templateName) {
$tplFileContents = file_get_contents(get_theme_file_path($filename)); $tplFileContents = file_get_contents(get_theme_file_path($filename));
$fields = explode("\$fields", $tplFileContents); $fields = explode("\$fields", $tplFileContents);
if (count($fields) === 0) { if (count($fields) < 2) {
continue; continue;
} }
$fields = explode(";", $fields[1]); $fields = explode(";", $fields[1]);
$fieldArray = eval("use ofc\RadField; return " . preg_replace('/=/', "", $fields[0], 1) . ";"); $fieldArray = eval("use ofc\RadField; return " . preg_replace('/=/', "", $fields[0], 1) . ";");
$templateFields = [...$templateFields, ...$fieldArray]; $templateFields = [...$templateFields, ...$fieldArray];