Changeset 41282
- Timestamp:
- 08/20/2017 07:47:20 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/shortcodes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/shortcodes.php
r41281 r41282 54 54 * @global array $shortcode_tags 55 55 * 56 * @param string $tag Shortcode tag to be searched in post content.57 * @param callable $ funcThe callback function to run when the shortcode is found.58 * Every shortcode callback is passed three parameters by default,59 * including an array of attributes (`$atts`), the content60 * the shortcode was found in (`$content`), and finally61 * the shortcode tag itself (`$shortcode_tag`), in that order.62 */ 63 function add_shortcode( $tag, $func) {56 * @param string $tag Shortcode tag to be searched in post content. 57 * @param callable $callback The callback function to run when the shortcode is found. 58 * Every shortcode callback is passed three parameters by default, 59 * including an array of attributes (`$atts`), the content 60 * the shortcode was found in (`$content`), and finally 61 * the shortcode tag itself (`$shortcode_tag`), in that order. 62 */ 63 function add_shortcode( $tag, $callback ) { 64 64 global $shortcode_tags; 65 65 … … 77 77 } 78 78 79 $shortcode_tags[ $tag ] = $ func;79 $shortcode_tags[ $tag ] = $callback; 80 80 } 81 81
Note: See TracChangeset
for help on using the changeset viewer.