Rarst/wporg-developer — pull request #22 by DrewAPicture (2014-09-22 05:55:58+00:00)
Title: Register four new quick-reference shortcodes for quickly linking to other reference articles

This PR introduces four new shortcodes: `[function]`, `[hook]`, `[class]`, and `[method]`.

The purpose of these shortcodes is to provide a simple, inline method for linking to other reference articles in the Code Reference Explanations and Examples sections. Each of the four shortcodes accepts a 'name' and 'label' attribute, and the method shortcode accepts a 'class' attribute for pairing it with the correct class. For each shortcode use, the function reference link HTML is built, then output.

The shortcodes are registered and output via a new class, WPORG_Shortcodes.

TODO: Figure out the most scalable way to verify the slugs passed via the 'name' attributes are legit. We don't want to hit the database just as we probably don't want to generate a remote request to check each of the URLs. Ugh.

Example usage:
```
[function name="wp_parse_args" label="wp_parse_args()"]
```

```
[hook name="new_status_post-post_type" label="publish_post"]
```

```
[class name="WP_Meta_Query"]
```

```
[method name="have_posts" class="WP_Query" label="WP_Query->have_posts()"]
```