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

View File

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

View File

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

View File

@@ -29,6 +29,11 @@ class Site
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
if (isset($this->config["disable"])) {
$this->disable($this->config["disable"]);
@@ -395,6 +400,33 @@ class Site
}
if ($key === "gutenberg") {
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;
}
if ($key === "customizer") {
@@ -644,8 +676,8 @@ class Site
$output = [];
$categories = [];
$taxonomies = [];
foreach ($fields as $key) {
// handle url/permalink
if ($key === "url" || $key === "permalink") {
$output[$key] = get_permalink($p->ID);
@@ -1198,10 +1230,11 @@ class Site
foreach ($templates as $filename => $templateName) {
$tplFileContents = file_get_contents(get_theme_file_path($filename));
$fields = explode("\$fields", $tplFileContents);
if (count($fields) === 0) {
if (count($fields) < 2) {
continue;
}
$fields = explode(";", $fields[1]);
$fieldArray = eval("use ofc\RadField; return " . preg_replace('/=/', "", $fields[0], 1) . ";");
$templateFields = [...$templateFields, ...$fieldArray];