From c542deaa2bcbfe24cb71bf1510d6992630cfa30b Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Thu, 4 Dec 2025 15:41:59 -0600 Subject: [PATCH 1/8] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Update=20script=20equ?= =?UTF-8?q?eues=20for=20WP=206.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/class-enqueue.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/class-enqueue.php b/lib/class-enqueue.php index 8bb55c3..722eb62 100644 --- a/lib/class-enqueue.php +++ b/lib/class-enqueue.php @@ -51,7 +51,8 @@ class Enqueue { if ( file_exists( $theme_dir . $js_path ) ) { $version = filemtime( $theme_dir . $js_path ); - wp_enqueue_script_module( 'basicwp-theme', $theme_uri . $js_path, array( 'jquery' ), $version, true ); + wp_enqueue_script( 'jquery' ); // Needed by downstream scripts; modules can't depend on classic scripts. + wp_enqueue_script_module( 'basicwp-theme', $theme_uri . $js_path, array(), $version, true ); wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-theme' ), $version, true ); } } @@ -90,7 +91,8 @@ class Enqueue { $admin_js_path = '/static/js/admin.js'; if ( file_exists( $theme_dir . $admin_js_path ) ) { $version = filemtime( $theme_dir . $admin_js_path ); - wp_enqueue_script_module( 'basicwp-admin', $theme_uri . $admin_js_path, array( 'jquery' ), $version, true ); + wp_enqueue_script( 'jquery' ); // Needed by downstream scripts; modules can't depend on classic scripts. + wp_enqueue_script_module( 'basicwp-admin', $theme_uri . $admin_js_path, array(), $version, true ); wp_enqueue_script_module( 'basicwp-button', $theme_uri . '/static/js/components/button.js', array( 'basicwp-admin' ), $version, true ); } } From bd5cf037b5738b6cbe0c58afc018804561a62ca0 Mon Sep 17 00:00:00 2001 From: Aarish <118203269+ImprobableGenius@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:55:12 -0600 Subject: [PATCH 2/8] Add responsive padding to container --- styles/base/global.css | 1 + 1 file changed, 1 insertion(+) diff --git a/styles/base/global.css b/styles/base/global.css index a5bd703..3c65906 100644 --- a/styles/base/global.css +++ b/styles/base/global.css @@ -32,6 +32,7 @@ main#maincontent { .container { margin: 0 auto; width: 100%; + padding-inline: clamp(1.5rem, 5vw, 3rem); } .section { From 2ae983108cceb22793278a00d2c65ec7cb2e86ed Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Fri, 9 Jan 2026 08:37:10 -0600 Subject: [PATCH 3/8] =?UTF-8?q?=E2=9C=A8feature:=20Add=20custom=20excerpt?= =?UTF-8?q?=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/helpers.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/helpers.php b/lib/helpers.php index ad1e75e..a1a5f75 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -164,6 +164,25 @@ function escEmbeds() { ); } +/** + * Generates a custom excerpt for the given text. + * + * @param string $text The text to generate the excerpt from. + * @param int $number_of_words The maximum number of words in the excerpt. Default is 55. + * @param string|null $more The string to append to the end of the excerpt if it is truncated. Default is null. + * @return void + */ +function customExcerpt( $text, $number_of_words = 55, $more = null ) { + $allowed_end = array( '.', '!', '?', '...' ); + $text_no_html = wp_strip_all_tags( $text ); + $trimmed_text = wp_trim_words( $text, $number_of_words, $more ); + $trimmed_text_length = strlen( $trimmed_text ); + $sentence_end_position = strposArray( $text_no_html, $allowed_end, $trimmed_text_length ); + $text_with_html = ( ( $sentence_end_position !== false ) ? substr( $text_no_html, 0, ( $sentence_end_position + 1 ) ) : $trimmed_text ); + + echo wp_kses_post( wpautop( $text_with_html ) ); +} + /** Print a variable to the console for debugging purposes. * * @param mixed $data The data to print to the console. From dfdf12a62ab0968000dcdd196a78bfe6543e5d02 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Fri, 9 Jan 2026 08:41:36 -0600 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Add=20array=20positio?= =?UTF-8?q?n=20helper=20function=20for=20custom=20excerpt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/helpers.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/helpers.php b/lib/helpers.php index a1a5f75..be9223f 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -164,6 +164,31 @@ function escEmbeds() { ); } +/** + * Finds the numeric position of the first occurrence of a needle in a haystack array. + * + * @param string $haystack The string to search in. + * @param mixed $needles The array of strings to search for. + * @param int $offset (Optional) The position to start the search from. + * @return int|false The numeric position of the first occurrence of a needle in the haystack array. + */ +function strposArray( $haystack, $needles, $offset = 0 ) { + if ( is_array( $needles ) ) { + $positions = array(); + + foreach ( $needles as $str ) { + $pos = strpos( $haystack, $str, $offset ); + + if ( $pos !== false ) { + $positions[] = $pos; } + } + + return count( $positions ) ? min( $positions ) : false; + } else { + return strpos( $haystack, $needles, $offset ); + } +} + /** * Generates a custom excerpt for the given text. * From 9d346f3a681718c489aa7d46103b0de70d3dcf95 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Fri, 9 Jan 2026 08:48:48 -0600 Subject: [PATCH 5/8] =?UTF-8?q?=E2=9C=A8feature:=20Add=20excerpt=20to=20po?= =?UTF-8?q?st=20index=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index cca87f6..108af7f 100644 --- a/index.php +++ b/index.php @@ -41,7 +41,7 @@ get_header(); -
+
Posted in: +
+ +
+