protected static function _doShortcode($m)
    {
        // allow {{foo}} syntax for escaping a tag
        if ($m[1] == '{' && $m[6] == '}') {
            return substr($m[0], 1, -1);
        }

        $tag = $m[2];
        $atts = static::_parseAttributes($m[3]);
        $listeners = EventDispatcher::instance('Shortcode')
            ->eventManager()
            ->listeners($tag);

        if (!empty($listeners)) {
            $options = [
                'atts' => (array)$atts,
                'content' => null,
                'tag' => $tag
            ];

            if (isset($m[5])) {
                $options['content'] = $m[5];
            }

            $result = EventDispatcher::instance('Shortcode')
                ->triggerArray([$tag, static::cache('context')], $options)
                ->result;

            return $m[1] . $result . $m[6];
        }

        return '';
    }
protected static function _doShortcode($m)
    {
        // allow {{foo}} syntax for escaping a tag
        if ($m[1] == '{' && $m[6] == '}') {
            return substr($m[0], 1, -1);
        }

        $tag = $m[2];
        $atts = static::_parseAttributes($m[3]);
        $listeners = EventDispatcher::instance('Shortcode')
            ->eventManager()
            ->listeners($tag);

        if (!empty($listeners)) {
            $options = [
                'atts' => (array)$atts,
                'content' => null,
                'tag' => $tag
            ];

            if (isset($m[5])) {
                $options['content'] = $m[5];
            }

            $result = EventDispatcher::instance('Shortcode')
                ->triggerArray([$tag, static::cache('context')], $options)
                ->result;

            return $m[1] . $result . $m[6];
        }

        return '';
    }
protected static function _doShortcode ( $ m ) { // allow {{foo}} syntax for escaping a tag if ( $ m [ 1 ] == '{' && $ m [ 6 ] == '}' ) { return substr ( $ m [ 0 ] , 1 , - 1 ) ; } $ tag = $ m [ 2 ] ; $ atts = static :: _parseAttributes ( $ m [ 3 ] ) ; $ listeners = EventDispatcher :: instance ( 'Shortcode' ) -> eventManager ( ) -> listeners ( $ tag ) ; if ( ! empty ( $ listeners ) ) { $ options = [ 'atts' => ( array ) $ atts , 'content' => null , 'tag' => $ tag ] ; if ( isset ( $ m [ 5 ] ) ) { $ options [ 'content' ] = $ m [ 5 ] ; } $ result = EventDispatcher :: instance ( 'Shortcode' ) -> triggerArray ( [ $ tag , static :: cache ( 'context' ) ] , $ options ) -> result ; return $ m [ 1 ] . $ result . $ m [ 6 ] ; } return '' ; }
Invokes shortcode lister method for the given shortcode.

@param array $m Shortcode as preg array
@return string
@author WordPress
Invokes shortcode lister method for the given shortcode .