AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase::_replyToProcessShortcode_embed PHP Метод

_replyToProcessShortcode_embed() публичный Метод

С версии: 3.6.1
public _replyToProcessShortcode_embed ( $aAttributes, $sURL, $sShortcode = '' ) : string
Результат string The generate HTML output.
    public function _replyToProcessShortcode_embed($aAttributes, $sURL, $sShortcode = '')
    {
        $sURL = isset($aAttributes['src']) ? $aAttributes['src'] : $sURL;
        $_sHTML = wp_oembed_get($sURL);
        // If there was a result, return it
        if ($_sHTML) {
            // This filter is documented in wp-includes/class-wp-embed.php
            return "<div class='video oembed'>" . apply_filters('embed_oembed_html', $_sHTML, $sURL, $aAttributes, 0) . "</div>";
        }
        // If not found, return the link.
        $_oWPEmbed = new WP_Embed();
        return "<div class='video oembed'>" . $_oWPEmbed->maybe_make_link($sURL) . "</div>";
    }