Add missing doc blocks to shortcodes.php
.
See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32624 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4eb73b6683
commit
a3f2743f9a
@ -81,9 +81,9 @@ $shortcode_tags = array();
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
function add_shortcode($tag, $func) {
|
||||
@ -98,7 +98,7 @@ function add_shortcode($tag, $func) {
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @uses $shortcode_tags
|
||||
* @global array $shortcode_tags
|
||||
*
|
||||
* @param string $tag Shortcode tag to remove hook for.
|
||||
*/
|
||||
@ -117,7 +117,7 @@ function remove_shortcode($tag) {
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @uses $shortcode_tags
|
||||
* @global array $shortcode_tags
|
||||
*/
|
||||
function remove_all_shortcodes() {
|
||||
global $shortcode_tags;
|
||||
@ -217,7 +217,7 @@ function do_shortcode($content) {
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @uses $shortcode_tags
|
||||
* @global array $shortcode_tags
|
||||
*
|
||||
* @return string The shortcode search regular expression
|
||||
*/
|
||||
@ -265,10 +265,11 @@ function get_shortcode_regex() {
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @access private
|
||||
* @uses $shortcode_tags
|
||||
*
|
||||
* @global array $shortcode_tags
|
||||
*
|
||||
* @param array $m Regular expression match array
|
||||
* @return mixed False on failure.
|
||||
* @return string|false False on failure.
|
||||
*/
|
||||
function do_shortcode_tag( $m ) {
|
||||
global $shortcode_tags;
|
||||
@ -337,8 +338,8 @@ function shortcode_parse_atts($text) {
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param array $pairs Entire list of supported attributes and their defaults.
|
||||
* @param array $atts User defined attributes in shortcode tag.
|
||||
* @param array $pairs Entire list of supported attributes and their defaults.
|
||||
* @param array $atts User defined attributes in shortcode tag.
|
||||
* @param string $shortcode Optional. The name of the shortcode, provided for context to enable filtering
|
||||
* @return array Combined and filtered attribute list.
|
||||
*/
|
||||
@ -359,9 +360,9 @@ function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
|
||||
*
|
||||
* @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 $atts The user defined shortcode attributes.
|
||||
* @param array $atts The user defined shortcode attributes.
|
||||
*/
|
||||
if ( $shortcode )
|
||||
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts );
|
||||
@ -374,7 +375,7 @@ function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @uses $shortcode_tags
|
||||
* @global array $shortcode_tags
|
||||
*
|
||||
* @param string $content Content to remove 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 );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $m
|
||||
* @return string|false
|
||||
*/
|
||||
function strip_shortcode_tag( $m ) {
|
||||
// allow [[foo]] syntax for escaping a tag
|
||||
if ( $m[1] == '[' && $m[6] == ']' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user