Add missing doc blocks to `shortcodes.php`.

See #32444.

Built from https://develop.svn.wordpress.org/trunk@32624


git-svn-id: http://core.svn.wordpress.org/trunk@32594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-05-27 19:39:25 +00:00
parent e4a574fc87
commit 2bac335bdc
2 changed files with 19 additions and 13 deletions

View File

@ -81,9 +81,9 @@ $shortcode_tags = array();
* *
* @since 2.5.0 * @since 2.5.0
* *
* @uses $shortcode_tags * @global array $shortcode_tags
* *
* @param string $tag Shortcode tag to be searched in post content. * @param string $tag Shortcode tag to be searched in post content.
* @param callable $func Hook to run when shortcode is found. * @param callable $func Hook to run when shortcode is found.
*/ */
function add_shortcode($tag, $func) { function add_shortcode($tag, $func) {
@ -98,7 +98,7 @@ function add_shortcode($tag, $func) {
* *
* @since 2.5.0 * @since 2.5.0
* *
* @uses $shortcode_tags * @global array $shortcode_tags
* *
* @param string $tag Shortcode tag to remove hook for. * @param string $tag Shortcode tag to remove hook for.
*/ */
@ -117,7 +117,7 @@ function remove_shortcode($tag) {
* *
* @since 2.5.0 * @since 2.5.0
* *
* @uses $shortcode_tags * @global array $shortcode_tags
*/ */
function remove_all_shortcodes() { function remove_all_shortcodes() {
global $shortcode_tags; global $shortcode_tags;
@ -217,7 +217,7 @@ function do_shortcode($content) {
* *
* @since 2.5.0 * @since 2.5.0
* *
* @uses $shortcode_tags * @global array $shortcode_tags
* *
* @return string The shortcode search regular expression * @return string The shortcode search regular expression
*/ */
@ -265,10 +265,11 @@ function get_shortcode_regex() {
* *
* @since 2.5.0 * @since 2.5.0
* @access private * @access private
* @uses $shortcode_tags *
* @global array $shortcode_tags
* *
* @param array $m Regular expression match array * @param array $m Regular expression match array
* @return mixed False on failure. * @return string|false False on failure.
*/ */
function do_shortcode_tag( $m ) { function do_shortcode_tag( $m ) {
global $shortcode_tags; global $shortcode_tags;
@ -337,8 +338,8 @@ function shortcode_parse_atts($text) {
* *
* @since 2.5.0 * @since 2.5.0
* *
* @param array $pairs Entire list of supported attributes and their defaults. * @param array $pairs Entire list of supported attributes and their defaults.
* @param array $atts User defined attributes in shortcode tag. * @param array $atts User defined attributes in shortcode tag.
* @param string $shortcode Optional. The name of the shortcode, provided for context to enable filtering * @param string $shortcode Optional. The name of the shortcode, provided for context to enable filtering
* @return array Combined and filtered attribute list. * @return array Combined and filtered attribute list.
*/ */
@ -359,9 +360,9 @@ function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
* *
* @since 3.6.0 * @since 3.6.0
* *
* @param array $out The output array of shortcode attributes. * @param array $out The output array of shortcode attributes.
* @param array $pairs The supported attributes and their defaults. * @param array $pairs The supported attributes and their defaults.
* @param array $atts The user defined shortcode attributes. * @param array $atts The user defined shortcode attributes.
*/ */
if ( $shortcode ) if ( $shortcode )
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts ); $out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts );
@ -374,7 +375,7 @@ function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
* *
* @since 2.5.0 * @since 2.5.0
* *
* @uses $shortcode_tags * @global array $shortcode_tags
* *
* @param string $content Content to remove shortcode tags. * @param string $content Content to remove shortcode tags.
* @return string Content without shortcode tags. * @return string Content without shortcode tags.
@ -394,6 +395,11 @@ function strip_shortcodes( $content ) {
return preg_replace_callback( "/$pattern/s", 'strip_shortcode_tag', $content ); return preg_replace_callback( "/$pattern/s", 'strip_shortcode_tag', $content );
} }
/**
*
* @param array $m
* @return string|false
*/
function strip_shortcode_tag( $m ) { function strip_shortcode_tag( $m ) {
// allow [[foo]] syntax for escaping a tag // allow [[foo]] syntax for escaping a tag
if ( $m[1] == '[' && $m[6] == ']' ) { if ( $m[1] == '[' && $m[6] == ']' ) {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-alpha-32623'; $wp_version = '4.3-alpha-32624';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.