wp-includes/shortcodes.php


Lines:

1 to 77 of 77
<?php

/**
 * WordPress API for creating bbcode-like tags or what WordPress calls
 * "shortcodes". The tag and attribute parsing or regular expression code is
 * based on the Textpattern tag parser.
 *
 * A few examples are below:
 *
 * [shortcode /]
 * [shortcode foo="bar" baz="bing" /]
 * [shortcode foo="bar"]content[/shortcode]
 *
 * Shortcode tags support attributes and enclosed content, but does not entirely
 * support inline shortcodes in other shortcodes. You will have to call the
 * shortcode parser in your function to account for that.
 *
 * {@internal
 * Please be aware that the above note was made during the beta of WordPress 2.6
 * and in the future may not be accurate. Please update the note when it is no
 * longer the case.}}
 *
 * To apply shortcode tags to content:
 *
 *     $out = do_shortcode( $content );
 *
 * @link https://developer.wordpress.org/plugins/shortcodes/
 *
 * @package WordPress
 * @subpackage Shortcodes
 * @since 2.5.0
 */


/**
 * Container for storing shortcode tags and their hook to call for the shortcode
 *
 * @since 2.5.0
 *
 * @name $shortcode_tags
 * @var array
 * @global array $shortcode_tags
 */
$shortcode_tags = array();

/* function add_shortcode() – Adds a new shortcode. */

/* function remove_shortcode() – Removes hook for shortcode. */

/* function remove_all_shortcodes() – Clear all shortcodes. */

/* function shortcode_exists() – Whether a registered shortcode exists named $tag */

/* function has_shortcode() – Whether the passed content contains the specified shortcode */

/* function apply_shortcodes() – Search content for shortcodes and filter shortcodes through their hooks. */

/* function do_shortcode() – Search content for shortcodes and filter shortcodes through their hooks. */

/* function get_shortcode_regex() – Retrieve the shortcode regular expression for searching. */

/* function do_shortcode_tag() – Regular Expression callable for do_shortcode() for calling shortcode hook. */

/* function do_shortcodes_in_html_tags() – Search only inside HTML elements for shortcodes and process them. */

/* function unescape_invalid_shortcodes() – Remove placeholders added by do_shortcodes_in_html_tags(). */

/* function get_shortcode_atts_regex() – Retrieve the shortcode attributes regex. */

/* function shortcode_parse_atts() – Retrieve all attributes from the shortcodes tag. */

/* function shortcode_atts() – Combine user attributes with known attributes and fill in defaults when needed. */

/* function strip_shortcodes() – Remove all shortcode tags from the given content. */

/* function strip_shortcode_tag() – Strips a shortcode tag based on RegEx matches against post content. */
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      API Letters: ,,,