Skip to content

pressupinc/wphierarchy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The WordPress Template Hierarchy


Description

wphierarchy.com is a visualization of the WordPress theme template hierarchy.

Official documentation is located at: https://developer.wordpress.org/themes/basics/template-hierarchy.

Credits

Installation

  • Requires gulp (npm install -g gulp)
  • git clone https://github.com/ramiabraham/wphierarchy.git
  • npm install

Contributing

  • Create an issue
  • Fork
  • Submit PR

API

WPHierarchy.com has a rest api available at https://wphierarchy.com/api.

The api contains the following data:

  • Stable version (the WordPress version currently supported by wphierarchy.com)

  • Stable link (a link to the relevant WordPress.org release post)

  • An array of objects in hierarchy_items, each structured as an array itself:

      ```
      array(
      	"object_id"      => "c1r1",
      	"semantic_id"    => "archive_page",
      	"name"           => "Archive Page",
      	"description"    => "",
      	"link"           => "https://codex.wordpress.org/Creating_an_Archive_Index#The_Archives_Page",
      	"classification" => "archive",
      	"tip"            => "",
      	"since"          => ""
      )
      ```
      So if you wish to get the names of all items, your request would be for:
      `data.hierarchy_items.name`
    

To-do:

  • Add links to the Codex for each item
  • Add color-coded legend below header
  • Add json api~~
  • Refactor with css that isn't completely insane (complete rewrite with scss)
  • Provide an easier means of l11n
  • Add contextual highlighting via the hierarchy_items.classification variable.
  • Add example loops, template files, and/or semantic data (coming soon; the parameter in the api which will contain this data is tips). An example of the small, desired strings for tips can be seen in the 4.5 embeds addition.
  • Create an easy-to-use submission process on the site for tips.
  • Finish cool secrets (if there are any, which there aren't).

Changelog:

v2, June 28, 2016

  • Introduce API, located at https://wphierarchy.com/api
  • Complete rewrite of the UI, using a single svg element and <foreignobject> nodes.
  • Some other secret things.
  • Specified license.

Licensing:

Code: MIT License

WordPress template hierarchy design: Copyright 2016, Michelle Schulp

Wapuu character, Dashicons: GPL, via the Japanese WordPress Community

The WordPress logo is a trademark of the WordPress Foundation. More info: http://wordpressfoundation.org/trademark-policy.

About

WordPress template hierarchy resource

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published