Skip to content
Merged
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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Templates, patterns, `theme.json` and CSS are served as they are in the tree; re
- `functions.php` - Theme PHP: stylesheets, the comments CTA block binding, sidebar template types, block styles. It loads `inc/abilities.php`.
- `inc/abilities.php` - The `ipsum/get-design-guide` ability, which gives agents on a live site the palette roles, presets, style variations, block styles, patterns and templates through the Abilities API. A new palette color needs its role in `ipsum_get_color_roles()`.
- `theme.json` - Global settings and styles, fonts, `customTemplates`, per-block styles.
- `style.css` - The theme header plus the CSS that `theme.json` cannot express. It loads in the editors through `add_editor_style()`, and is inlined on the front end when `SCRIPT_DEBUG` is on or it is newer than `style.min.css`.
- `style.css` - The theme header plus the CSS that `theme.json` cannot express. It loads in the editors through `add_editor_style()`, and is inlined on the front end when `SCRIPT_DEBUG` is on.
- `style.min.css` - `style.css` minified by `npm run build`, inlined on the front end otherwise. Generated: rebuild it, never edit it.
- `readme.txt` - The WordPress.org readme: description, changelog, copyright, font credits.
- `.github/`, `CONTRIBUTING.md`, `README.md`, `package.json`, `.wp-env.json`, `.nvmrc` - Repository tooling and docs, not part of the theme.
Expand Down
20 changes: 3 additions & 17 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,9 @@ function ipsum_add_theme_support() {
* @return void
*/
function ipsum_enqueue_styles() {
$style_path = get_parent_theme_file_path( 'style.css' );
$style_min_path = get_parent_theme_file_path( 'style.min.css' );

/*
* Use the minified stylesheet, unless script debugging is on or style.css
* has changed since style.min.css was built. That keeps edits made in the
* Theme File Editor working: saving style.css makes it the newer file.
*/
if (
SCRIPT_DEBUG
|| ! file_exists( $style_min_path )
|| ( filemtime( $style_path ) > filemtime( $style_min_path ) )
) {
$src = 'style.css';
} else {
$src = 'style.min.css';
}
// Use the minified stylesheet unless script debugging is on, as Twenty Twenty-Five does.
$suffix = SCRIPT_DEBUG ? '' : '.min';
$src = 'style' . $suffix . '.css';

// Register theme stylesheet.
wp_register_style(
Expand Down
4 changes: 3 additions & 1 deletion inc/abilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ function ipsum_get_design_guide_schema() {
* @since Ipsum 1.0
*
* @param mixed $presets The presets from the global settings, keyed by origin.
* Anything other than an array gives an empty list.
* @param string[] $keys The preset properties to keep.
* @return array<int, array<string, mixed>> The presets, with only the given properties.
* @return array<int, array<string, mixed>> The presets, with only the given properties. Empty when
* `$presets` isn't an array.
*/
function ipsum_get_design_guide_presets( $presets, $keys ) {
$items = array();
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-404.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-404
* Template Types: 404
* Inserter: no
* Description: The 404 template. It has the header, a “Page not found.” heading and a short note over the search field, and the footer.
* Description: The 404 template. It has the theme header, a “Page not found.” heading and a short note over the search field, and the theme footer.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-archive-sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-archive-sidebar
* Template Types: archive, category, tag
* Inserter: no
* Description: The All Archives Sidebar template. It has the archive title and the Archive Simple listing beside the Sidebar part on the wide width, between the header and the wide footer, with the search bar pinned to the bottom.
* Description: The All Archives Sidebar template. It has the archive title and the Archive Simple listing beside the Sidebar part on the wide width, between the theme header and the wide theme footer, with the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-archive
* Template Types: archive, category, tag
* Inserter: no
* Description: The All Archives template for categories, tags, authors and dates. It has the header, the archive title over the Archive Compact listing, the footer, and the search bar pinned to the bottom.
* Description: The All Archives template for categories, tags, authors and dates. It has the theme header, the archive title over the Archive Compact listing, the theme footer, and the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-index-sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-index-sidebar
* Template Types: index, home
* Inserter: no
* Description: The Index Sidebar template. It has the latest posts in full, as in Archive Full, beside the Sidebar part on the wide width, between the header and the wide footer, with the search bar pinned to the bottom.
* Description: The Index Sidebar template. It has the latest posts in full, as in Archive Full, beside the Sidebar part on the wide width, between the theme header and the wide theme footer, with the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-index
* Template Types: index, home
* Inserter: no
* Description: The Index template, also the blog home. It has the header, the latest posts in the Archive Full listing with pagination, the footer, and the search bar pinned to the bottom.
* Description: The Index template, also the blog home. It has the theme header, the latest posts in the Archive Full listing with pagination, the theme footer, and the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-page-no-title.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-page-no-title
* Template Types: page
* Inserter: no
* Description: The Pages No Title template, for pages built from patterns. It has the header, the page content with no title or featured image, the footer, and the search bar pinned to the bottom.
* Description: The Pages No Title template, for pages built from patterns. It has the theme header, the page content with no title or featured image, the theme footer, and the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-page-sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-page-sidebar
* Template Types: page
* Inserter: no
* Description: The Pages Sidebar template. It has the featured image, title and content beside the Sidebar part on the wide width, between the header and the wide footer, with the search bar pinned to the bottom.
* Description: The Pages Sidebar template. It has the featured image, title and content beside the Sidebar part on the wide width, between the theme header and the wide theme footer, with the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-page
* Template Types: page
* Inserter: no
* Description: The Pages template. It has the header, the featured image, title and content, the footer, and the search bar pinned to the bottom.
* Description: The Pages template. It has the theme header, the featured image, title and content, the theme footer, and the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-search-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Title: Search Bar
* Slug: ipsum/hidden-search-bar
* Inserter: no
* Description: The Search Bar template part. It has a search button on the right that opens into a field. Most templates place it after the footer and pin it to the bottom of the screen.
* Description: The Search Bar template part. It has a search button on the right that opens into a field. Most templates place it after the theme footer and pin it to the bottom of the screen.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-search
* Template Types: search
* Inserter: no
* Description: The Search Results template. It has the header, the results title over the search field, the matching posts in the Archive Compact listing with a no-results message and pagination, and the footer.
* Description: The Search Results template. It has the theme header, the results title over the search field, the matching posts in the Archive Compact listing with a no-results message and pagination, and the theme footer.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-single-sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-single-sidebar
* Template Types: single
* Inserter: no
* Description: The Single Posts Sidebar template. It has the post with its tags, author card, Comments and Keep Reading sections beside the Sidebar part on the wide width, between the header and the wide footer, with the search bar pinned to the bottom.
* Description: The Single Posts Sidebar template. It has the post with its tags, author card, Comments and Keep Reading sections beside the Sidebar part on the wide width, between the theme header and the wide theme footer, with the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
2 changes: 1 addition & 1 deletion patterns/hidden-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Slug: ipsum/hidden-single
* Template Types: single
* Inserter: no
* Description: The Single Posts template. It has the header, the featured image, title, date and categories, content, tags and author card, then the Comments and Keep Reading sections, the footer, and the search bar pinned to the bottom.
* Description: The Single Posts template. It has the theme header, the featured image, title, date and categories, content, tags and author card, then the Comments and Keep Reading sections, the theme footer, and the search bar pinned to the bottom.
*
* @package Ipsum
* @since Ipsum 1.0
Expand Down
7 changes: 7 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Text Domain: ipsum
Tags: one-column, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, blog
*/

/*
* IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
* in most instances, the `style.min.css` file will be served. It is not recommended that you
* use the Theme File Editor to modify this stylesheet. Instead, add the necessary style
* overrides via "Additional CSS" in the Site Editor.
*/

/* Crossfade page transition */

@media (prefers-reduced-motion: no-preference) {
Expand Down
Loading