[ 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: 529 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  ipsum_register_abilities()
  ipsum_get_color_roles()
  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_schema()   X-Ref
Returns the JSON Schema of the design guide, with one property per section.

return: array 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: array    $presets The presets from the global settings, keyed by origin.
param: string[] $keys    The preset properties to keep.
return: array[] The presets, with only the given properties.

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 : Wed Nov 4 08:20:38 2026 Cross-referenced by PHPXref