WordPress Code Reference in WP-CLI.
Quick links: Installation | Using | Contributing
You can install this package with:
wp package install mehrshaddarzi/wp-cli-reference-commandInstalling this package requires WP-CLI v2 or greater. Update to the latest stable release with wp cli update.
NAME
wp reference
DESCRIPTION
WordPress Code Reference.
SYNOPSIS
wp reference <class|method|function|hook>
wp reference absintresult :
If your search results from more than one item. for example:
wp reference wp_insert_postYou will see a list to choose from.
By default WP_CLI reference package search between all WordPress class and functions.
If you want the custom search:
wp reference --class=wp_userwp reference --funcion=wp_insert_postwp reference --method=get_rowwp reference --hook=admin_footerYou can show WordPress code reference in Web browser after search with:
wp reference --browserBy default, WP-CLI cached 1000 last searches for speed result. if you want to remove reference cache:
wp cli cache clearIf you want only remove reference cache:
wp reference --clear- Mehrshad Darzi | PHP Full Stack and WordPress Expert
We appreciate you taking the initiative to contribute to this project.
Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.
Think you’ve found a bug? We’d love for you to help us get it fixed. Before you create a new issue, you should search existing issues to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.
Want to contribute a new feature? Please first open a new issue to discuss whether the feature is a good fit for the project.
Once you've decided to commit the time to seeing your pull request through, please follow our guidelines for creating a pull request to make sure it's a pleasant experience:
- Create a feature branch for each contribution.
- Submit your pull request early for feedback.
- Follow PSR-2 Coding Standards.

