[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/ipsum/inc/ -> abilities.php (summary)

The design guide ability, which hands agents that work on the site through the Abilities API what Ipsum is built with and how it is meant to be used.

File Size: 869 lines (35 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  ipsum_register_abilities()
  ipsum_get_color_roles()
  ipsum_get_design_guide_default_fields()
  ipsum_get_design_guide_schema()
  ipsum_get_design_guide_presets()
  ipsum_get_design_guide_font_slug()
  ipsum_get_design_guide_pattern_slug()
  ipsum_get_design_guide()

Functions
Functions that are not part of a class:

ipsum_register_abilities()   X-Ref
Registers the design guide ability, so agents that work on the site
through the Abilities API, rather than this repository, can learn how
Ipsum is meant to be built with.

It needs `edit_theme_options`, the capability behind the Site Editor and
Global Styles, since the guide is for whoever builds the site's design.

return: void

ipsum_get_color_roles()   X-Ref
Returns what each palette color is for, keyed by its slug.

Every color variation redefines the same slugs, so the roles hold under
whichever variation is active.

return: array<string, string> Role descriptions, keyed by palette slug.

ipsum_get_design_guide_default_fields()   X-Ref
Returns the design guide sections included when fields is omitted or empty.

Larger lists (style variations, block styles, patterns, templates,
template parts, and template part areas) are left out of the default
response and must be requested through fields.

return: string[] Section names.

ipsum_get_design_guide_schema()   X-Ref
Returns the JSON Schema of the design guide, with one property per section.

Top-level sections stay optional so callers can request a subset. Nested
objects with a fixed set of fields mark guaranteed properties as required
and set additionalProperties to false.

return: array<string, mixed> The output schema of the design guide ability.

ipsum_get_design_guide_presets( $presets, $keys )   X-Ref
Lists the theme's presets of one kind, followed by any the site adds.

param: mixed    $presets The presets from the global settings, keyed by origin.
param: string[] $keys    The preset properties to keep.
return: array<int, array<string, mixed>> The presets, with only the given properties. Empty when

ipsum_get_design_guide_font_slug( $font_family )   X-Ref
Returns the slug of the font family preset a style refers to.

param: mixed $font_family A fontFamily style value.
return: string|null The preset slug, the value itself when it is not a

ipsum_get_design_guide_pattern_slug( $content )   X-Ref
Returns the pattern a template or template part delegates to.

param: string $content The template or template part markup.
return: string|null The pattern slug, or null when the markup is not a

ipsum_get_design_guide( $input = array()   X-Ref
No description



Generated : Tue Nov 24 08:20:01 2026 Cross-referenced by PHPXref