Coder Social home page Coder Social logo

wphierarchy's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.