Making WordPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#959 closed enhancement (fixed)

Code examples in the handbooks should expand/collapse

Reported by: siobhan's profile siobhan Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Handbooks Keywords:
Cc:

Description

Some of the code examples in the handbooks are really long. See some of the ones on here for example: https://developer.wordpress.org/themes/basics/theme-functions/

If a code example is over a certain number of lines can we make them collapse (like we do in the code reference: https://developer.wordpress.org/reference/functions/get_posts/ )

Change History (3)

#1 @siobhan
9 years ago

  • Owner set to coffee2code
  • Status changed from new to assigned

#2 @coffee2code
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 1429:

developer.wordpress.org: Enable expand/collapse functionality for syntax-highlighted code in handbooks.

  • Enqueue function-reference.js on handbook pages as well
  • Wrap handbook syntax-highlighted code in similar markup the JS expects as used on coderef pages
  • Modify JS to handle multiple expandable code blocks on a page
  • Change styling for expand/collapse links since for handbooks only one link will be present in that section

Fixes #959.

This ticket was mentioned in Slack in #docs by coffee2code. View the logs.


9 years ago

Note: See TracTickets for help on using tickets.