WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#9184 closed task (blessed) (fixed)

Add documentation lookup shortcuts to Theme and Plugin Editors

Reported by: beaulebens Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: UI Keywords: has-patch needs-testing blessed
Focuses: Cc:

Description

This patch adds a SELECT box underneath the main editing window for the Theme and Plugin Editors that lists functions used in the current file (PHP files only). If you select a function from the list and click the "Lookup" button, it launches a new window that uses the new documentation API to load the appropriate page for that function.

Includes: Native PHP functions, All user-space functions used in the current file (except those specifically excluded)

Excludes: any classes/functions defined in the current file (since it assumes they are plugin/theme-specific and therefore won't have documentation available via the docs API),

Allows users to filter the list of function names to "ignore" via the new 'documentation_ignore_functions' filter.

The way tokenizer works is a bit funky, so please keep an eye out for things being included in the list that shouldn't be there and let me know so I can clean them up. Could use some testing by loading various plugin/theme files.

Attachments (1)

9184.diff (5.8 KB) - added by beaulebens 5 years ago.
Made the for() loop more efficient. Props jacobsantos

Download all attachments as: .zip

Change History (3)

beaulebens5 years ago

Made the for() loop more efficient. Props jacobsantos

comment:1 matt5 years ago

  • Keywords blessed added

comment:2 ryan5 years ago

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

(In [10607]) Add documentation lookup shortcuts to Theme and Plugin Editors. Props beaulebens. fixes #9184

Note: See TracTickets for help on using tickets.