Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [Unreleased] — Phase page review fixes

### Fixed

- Load phase hero styles wherever the pattern renders and redirect bare phase URLs only to published pages.
- Correct introduction heading levels, journey navigation label serialization, current-page semantics, and inactive-link contrast.
- Scale the outline button's circle reveal to cover the button's corners without animating layout dimensions; retain reduced-motion behavior.

---

## [Unreleased] — Fix WCAG color-contrast violations for captions and blog filter pill (LS-2934)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion assets/css/animations.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/css/button-phase.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/css/phase-hero.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/css/phase-journey-nav.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
/** Loads Blog Single "Related Reading" query filtering */
require get_template_directory() . '/inc/blog-single-related-query.php';

/** Loads bare phase-slug (e.g. /discover/) redirects to their real nested URL */
require get_template_directory() . '/inc/phase-page-redirects.php';

/**
* Sets up theme supports.
*/
Expand Down Expand Up @@ -71,6 +74,7 @@ function ls_theme_setup() {
add_editor_style( 'assets/css/card-shells.css' );
add_editor_style( 'assets/css/cta-buttons.css' );
add_editor_style( 'assets/css/home-hero.css' );
add_editor_style( 'assets/css/phase-hero.css' );
add_editor_style( 'assets/css/services-hero.css' );
add_editor_style( 'assets/css/services-linked-decisions.css' );
add_editor_style( 'assets/css/services-service-clusters.css' );
Expand All @@ -85,6 +89,8 @@ function ls_theme_setup() {
add_editor_style( 'assets/css/faq.css' );
add_editor_style( 'assets/css/links.css' );
add_editor_style( 'assets/css/button-secondary.css' );
add_editor_style( 'assets/css/button-phase.css' );
add_editor_style( 'assets/css/phase-journey-nav.css' );
add_editor_style( 'assets/css/featured-work.css' );
add_editor_style( 'assets/css/where-to-fit.css' );
add_editor_style( 'assets/css/homepage-cta.css' );
Expand Down
36 changes: 36 additions & 0 deletions inc/animations.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function ls_theme_get_bundle_render_markers() {
),
),
'home-hero' => array( 'classes' => array( 'ls-home-hero-section' ) ),
'phase-hero' => array( 'classes' => array( 'ls-phase-hero' ) ),
'services-hero' => array( 'classes' => array( 'ls-service-pill' ) ),
'services-linked-decisions' => array( 'classes' => array( 'ls-process-pill' ) ),
'services-service-clusters' => array( 'classes' => array( 'ls-cluster-tag' ) ),
Expand All @@ -83,6 +84,8 @@ function ls_theme_get_bundle_render_markers() {
'blog-all-articles' => array( 'classes' => array( 'is-style-card-post', 'ls-post-card-cta' ) ),
'blog-writing-cta' => array( 'classes' => array( 'ls-writing-cta', 'ls-code-panel' ) ),
'button-secondary' => array( 'classes' => array( 'is-style-button-secondary' ) ),
'button-phase' => array( 'classes' => array( 'is-style-button-phase-primary', 'is-style-button-phase-outline' ) ),
'phase-journey-nav' => array( 'classes' => array( 'ls-phase-journey-nav' ) ),
'featured-work' => array( 'classes' => array( 'ls-featured-work-grid', 'ls-featured-work-card__divider' ) ),
'where-to-fit' => array( 'classes' => array( 'ls-package-card' ) ),
'homepage-cta' => array( 'classes' => array( 'ls-homepage-cta' ) ),
Expand Down Expand Up @@ -283,6 +286,16 @@ function ls_theme_get_effect_styles( $context = 'front' ) {
'contexts' => array( 'front', 'editor' ),
'condition' => 'is_front_page',
),
'phase-hero' => array(
'handle' => 'ls-theme-phase-hero',
'path' => 'assets/css/phase-hero.css',
'contexts' => array( 'front', 'editor' ),
// Load early on all six phase pages; the render-marker fallback also covers
// this pattern when inserted on any other page.
'condition' => static function () {
return is_page( array( 'discover', 'create', 'build', 'launch', 'grow', 'evolve' ) );
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
),
'services-hero' => array(
'handle' => 'ls-theme-services-hero',
'path' => 'assets/css/services-hero.css',
Expand Down Expand Up @@ -408,6 +421,29 @@ function ls_theme_get_effect_styles( $context = 'front' ) {
return is_front_page() || is_post_type_archive( 'project' ) || is_404();
},
),
'button-phase' => array(
'handle' => 'ls-theme-button-phase',
'path' => 'assets/css/button-phase.css',
'contexts' => array( 'front', 'editor' ),
// Fast path for its only known placement so far (the Discover hero and its CTAs).
// Also registered in ls_theme_get_bundle_render_markers() below so it still loads once
// this same button style is reused on the Create/Build/Launch/Grow/Evolve phase pages,
// without needing this condition updated first.
'condition' => static function () {
return is_page( 'discover' );
},
),
'phase-journey-nav' => array(
'handle' => 'ls-theme-phase-journey-nav',
'path' => 'assets/css/phase-journey-nav.css',
'contexts' => array( 'front', 'editor' ),
// Same reasoning as button-phase above: fast path for Discover today, plus the
// render_block fallback registered in ls_theme_get_bundle_render_markers() so it keeps
// working once this same pattern is reused on the other five phase pages.
'condition' => static function () {
return is_page( 'discover' );
},
),
'featured-work' => array(
'handle' => 'ls-theme-featured-work',
'path' => 'assets/css/featured-work.css',
Expand Down
42 changes: 42 additions & 0 deletions inc/phase-page-redirects.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
* Redirects bare phase-page slugs (e.g. /discover/) to their real nested URL
* under /services/ (e.g. /services/discover/).
*
* The six lifecycle phase pages live as children of the "services" page, but
* their slugs (discover, create, build, launch, grow, evolve) are similar
* enough to other existing page slugs (e.g. "discovery") that WordPress's
* built-in wp_guess_404_permalink() fuzzy match can send a bare-slug request
* to the wrong page. Redirecting explicitly, before that guesser runs, avoids
* the ambiguity entirely.
*
* @package ls-theme
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

/**
* Redirects a bare phase slug request straight to its real nested page.
*/
function ls_theme_redirect_bare_phase_slugs() {
if ( is_admin() || ! is_404() ) {
return;
}

$ls_phase_slugs = array( 'discover', 'create', 'build', 'launch', 'grow', 'evolve' );
$ls_request_path = trim( wp_parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ), '/' );

if ( ! in_array( $ls_request_path, $ls_phase_slugs, true ) ) {
return;
}

$ls_target = get_page_by_path( 'services/' . $ls_request_path );

if ( $ls_target instanceof WP_Post && 'publish' === $ls_target->post_status ) {
wp_safe_redirect( get_permalink( $ls_target ), 301 );
exit;
}
}
add_action( 'template_redirect', 'ls_theme_redirect_bare_phase_slugs', 0 );
Loading
Loading