Make WordPress Core

Ticket #23282: 23282.8.diff

File 23282.8.diff, 19.8 KB (added by wonderboymusic, 12 years ago)
  • wp-admin/includes/ajax-actions.php

    diff --git wp-admin/includes/ajax-actions.php wp-admin/includes/ajax-actions.php
    index bd4d5b9..b0f2c0c 100644
    function wp_ajax_send_attachment_to_editor() { 
    20302030                $caption = isset( $attachment['post_excerpt'] ) ? $attachment['post_excerpt'] : '';
    20312031                $title = ''; // We no longer insert title tags into <img> tags, as they are redundant.
    20322032                $html = get_image_send_to_editor( $id, $caption, $title, $align, $url, (bool) $rel, $size, $alt );
     2033        } elseif ( 'video' === substr( $post->post_mime_type, 0, 5 ) || 'audio' === substr( $post->post_mime_type, 0, 5 )  ) {
     2034                $html = stripslashes_deep( $_POST['html'] );
    20332035        }
    20342036
    20352037        $html = apply_filters( 'media_send_to_editor', $html, $id, $attachment );
    function wp_ajax_heartbeat() { 
    20862088                $screen_id = sanitize_key($_POST['screenid']);
    20872089        else
    20882090                $screen_id = 'site';
    2089        
     2091
    20902092        if ( ! empty($_POST['data']) ) {
    20912093                $data = wp_unslash( (array) $_POST['data'] );
    20922094                // todo: how much to sanitize and preset and what to leave to be accessed from $data or $_POST..?
  • wp-includes/functions.php

    diff --git wp-includes/functions.php wp-includes/functions.php
    index cbd7925..5ac68c7 100644
    function wp_is_stream( $path ) { 
    38833883 */
    38843884function wp_checkdate( $month, $day, $year, $source_date ) {
    38853885        return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date );
     3886}
     3887
     3888/**
     3889 * Return RegEx body to liberally match an opening HTML tag that:
     3890 * 1. Is self-closing or
     3891 * 2. Has no body but has a closing tag of the same name or
     3892 * 3. Contains a body and a closing tag of the same name
     3893 *
     3894 * Note: this RegEx does not balance inner tags and does not attempt to produce valid HTML
     3895 *
     3896 * @since 3.6.0
     3897 *
     3898 * @param string $tag An HTML tag name. Example: 'video'
     3899 * @return string
     3900 */
     3901function get_tag_regex( $tag ) {
     3902        if ( empty( $tag ) )
     3903                return;
     3904
     3905        return sprintf( '(<%1$s[^>]*(?:/?>$|>[\s\S]*?</%1$s>))', tag_escape( $tag ) );
    38863906}
     3907 No newline at end of file
  • wp-includes/js/media-editor.js

    diff --git wp-includes/js/media-editor.js wp-includes/js/media-editor.js
    index 15eff8d..1b5f844 100644
     
    6666                                        src:       size.url,
    6767                                        captionId: 'attachment_' + attachment.id
    6868                                });
    69 
     69                        } else if ( 'video' === attachment.type || 'audio' === attachment.type ) {
     70                                _.extend( props, _.pick( attachment, 'title', 'type', 'icon', 'mime' ) );
    7071                        // Format properties for non-images.
    7172                        } else {
    7273                                props.title = props.title || attachment.filename;
     
    9596                        return wp.html.string( options );
    9697                },
    9798
     99                audio: function( props, attachment ) {
     100                        var shortcode, html;
     101
     102                        props = wp.media.string.props( props, attachment );
     103
     104                        shortcode = {};
     105
     106                        if ( props.mime ) {
     107                                switch ( props.mime ) {
     108                                case 'audio/mpeg':
     109                                        shortcode.mp3 = props.linkUrl;
     110                                        break;
     111                                case 'audio/ogg':
     112                                        shortcode.ogg = props.linkUrl;
     113                                        break;
     114                                case 'audio/wma':
     115                                        shortcode.wma = props.linkUrl;
     116                                        break;
     117                                }
     118                        }
     119
     120                        html = wp.shortcode.string({
     121                                tag:     'audio',
     122                                attrs:   shortcode
     123                        });
     124
     125                        return html;
     126                },
     127
     128                video: function( props, attachment ) {
     129                        var shortcode, html;
     130
     131                        props = wp.media.string.props( props, attachment );
     132
     133                        shortcode = {};
     134
     135                        if ( props.mime ) {
     136                                switch ( props.mime ) {
     137                                case 'video/mp4':
     138                                        shortcode.mp4 = props.linkUrl;
     139                                        break;
     140                                case 'video/webm':
     141                                        shortcode.webm = props.linkUrl;
     142                                        break;
     143                                case 'video/ogg':
     144                                        shortcode.ogv = props.linkUrl;
     145                                        break;
     146                                case 'video/asf':
     147                                        shortcode.wmv = props.linkUrl;
     148                                        break;
     149                                case 'video/x-flv':
     150                                        shortcode.flv = props.linkUrl;
     151                                        break;
     152                                }
     153                        }
     154
     155                        html = wp.shortcode.string({
     156                                tag:     'video',
     157                                attrs:   shortcode
     158                        });
     159
     160                        return html;
     161                },
     162
    98163                image: function( props, attachment ) {
    99164                        var img = {},
    100165                                options, classes, shortcode, html;
     
    575640                                                if ( props[ prop ] )
    576641                                                        options[ option ] = props[ prop ];
    577642                                        });
    578 
     643                                } else if ( 'video' === attachment.type ) {
     644                                        html = wp.media.string.video( props );
     645                                } else if ( 'audio' === attachment.type ) {
     646                                        html = wp.media.string.audio( props );
    579647                                } else {
    580648                                        html = wp.media.string.link( props );
    581649                                        options.post_title = props.title;
  • wp-includes/media.php

    diff --git wp-includes/media.php wp-includes/media.php
    index f1f3737..6e67af1 100644
    function gallery_shortcode($attr) { 
    803803}
    804804
    805805/**
     806 * The Audio shortcode.
     807 *
     808 * This implements the functionality of the Audio Shortcode for displaying
     809 * WordPress mp3s in a post.
     810 *
     811 * @since 3.6.0
     812 *
     813 * @param array $attr Attributes of the shortcode.
     814 * @return string HTML content to display audio.
     815 */
     816function wp_audio_shortcode( $attr ) {
     817        $post = get_post();
     818        $post_id = empty( $post->ID ) ? 0 : $post->ID;
     819
     820        static $instances = 0;
     821        $instances++;
     822
     823        $audio = null;
     824
     825        $default_types = array( 'mp3', 'ogg', 'wma' );
     826
     827        extract( shortcode_atts( array(
     828                'mp3' => '',
     829                'ogg' => '',
     830                'wma' => '',
     831                'src' => ''
     832        ), $attr ) );
     833
     834        $primary = false;
     835        if ( ! empty( $src ) ) {
     836                $type = wp_check_filetype( $src );
     837                if ( ! in_array( $type['ext'], $default_types ) ) {
     838                        printf( '<a class="wp-post-format-link-audio" href="%1$s">%1$s</a>', $src );
     839                        return;
     840                }
     841                $primary = true;
     842                array_unshift( $default_types, 'src' );
     843        } else {
     844                foreach ( $default_types as $ext ) {
     845                        if ( ! empty( $$ext ) ) {
     846                                $type = wp_check_filetype( $$ext );
     847                                if ( $type['ext'] === $ext )
     848                                        $primary = true;
     849                        }
     850                }
     851        }
     852
     853        if ( ! $primary ) {
     854                $audios = get_post_audio( $post_id );
     855                if ( empty( $audios ) )
     856                        return;
     857
     858                $audio = reset( $audios );
     859                $src = wp_get_attachment_url( $audio->ID );
     860                if ( empty( $src ) )
     861                        return;
     862
     863                array_unshift( $default_types, 'src' );
     864        }
     865
     866        wp_enqueue_style( 'wp-mediaelement' );
     867        wp_enqueue_script( 'wp-mediaelement' );
     868
     869        $atts = array(
     870                sprintf( 'class="%s"', apply_filters( 'audio_shortcode_class', 'wp-audio-shortcode' ) ),
     871                sprintf( 'id="audio-%d-%d"', $post_id, $instances ),
     872        );
     873
     874        $html = sprintf( '<audio %s controls="controls" preload="none">', join( ' ', $atts ) );
     875
     876        $source = '<source type="%s" src="%s" />';
     877        foreach ( $default_types as $fallback ) {
     878                if ( ! empty( $$fallback ) ) {
     879                        $type = wp_check_filetype( $$fallback );
     880                        $html .= sprintf( $source, $type['type'], $$fallback );
     881                }
     882        }
     883
     884        $html .= '</audio>';
     885
     886        return apply_filters( 'audio_shortcode', $html, $src, $audio, $post );
     887}
     888add_shortcode( 'audio', 'wp_audio_shortcode' );
     889
     890/**
     891 * The Video shortcode.
     892 *
     893 * This implements the functionality of the Video Shortcode for displaying
     894 * WordPress mp4s in a post.
     895 *
     896 * @since 3.6.0
     897 *
     898 * @param array $attr Attributes of the shortcode.
     899 * @return string HTML content to display video.
     900 */
     901function wp_video_shortcode( $attr ) {
     902        global $content_width;
     903        $post = get_post();
     904        $post_id = empty( $post->ID ) ? 0 : $post->ID;
     905
     906        static $instances = 0;
     907        $instances++;
     908
     909        $video = null;
     910
     911        $default_types = array( 'mp4', 'webm', 'ogv', 'wmv', 'flv' );
     912
     913        extract( shortcode_atts( array(
     914                'src' => '',
     915                'width' => empty( $content_width ) ? 640 : $content_width,
     916                'height' => 360,
     917                'poster' => '',
     918        ), $attr ) );
     919
     920        $primary = false;
     921        if ( ! empty( $src ) ) {
     922                $type = wp_check_filetype( $src );
     923                if ( ! in_array( $type['ext'], $default_types ) ) {
     924                        printf( '<a class="wp-post-format-link-video" href="%1$s">%1$s</a>', $src );
     925                        return;
     926                }
     927                $primary = true;
     928                array_unshift( $default_types, 'src' );
     929        } else {
     930                foreach ( $default_types as $ext ) {
     931                        if ( ! empty( $$ext ) ) {
     932                                $type = wp_check_filetype( $$ext );
     933                                if ( $type['ext'] === $ext )
     934                                        $primary = true;
     935                        }
     936                }
     937        }
     938
     939        if ( ! $primary ) {
     940                $videos = get_post_video( $post_id );
     941                if ( empty( $videos ) )
     942                        return;
     943
     944                $video = reset( $videos );
     945                $src = wp_get_attachment_url( $video->ID );
     946                if ( empty( $src ) )
     947                        return;
     948
     949                array_unshift( $default_types, 'src' );
     950        }
     951
     952        wp_enqueue_style( 'wp-mediaelement' );
     953        wp_enqueue_script( 'wp-mediaelement' );
     954
     955        $atts = array(
     956                sprintf( 'class="%s"', apply_filters( 'video_shortcode_class', 'wp-video-shortcode' ) ),
     957                sprintf( 'id="video-%d-%d"', $post_id, $instances ),
     958                sprintf( 'width="%d"', $width ),
     959                sprintf( 'height="%d"', $height ),
     960        );
     961
     962        if ( ! empty( $poster ) )
     963                $atts[] = sprintf( 'poster="%s"', esc_url( $poster ) );
     964
     965        $html = sprintf( '<video %s controls="controls" preload="none">', join( ' ', $atts ) );
     966
     967        $source = '<source type="%s" src="%s" />';
     968        foreach ( $default_types as $fallback ) {
     969                if ( ! empty( $$fallback ) ) {
     970                        $type = wp_check_filetype( $$fallback );
     971                        $html .= sprintf( $source, $type['type'], $$fallback );
     972                }
     973        }
     974
     975        $html .= '</video>';
     976
     977        return apply_filters( 'video_shortcode', $html, $src, $video, $post );
     978}
     979add_shortcode( 'video', 'wp_video_shortcode' );
     980
     981/**
    806982 * Display previous image link that has the same post parent.
    807983 *
    808984 * @since 2.5.0
    function wp_enqueue_media( $args = array() ) { 
    15421718
    15431719        do_action( 'wp_enqueue_media' );
    15441720}
     1721
     1722/**
     1723 * Retrieve audio attached to the passed post
     1724 *
     1725 * @since 3.6.0
     1726 *
     1727 * @param int $post_id  Post ID
     1728 * @return array Found audio attachments
     1729 */
     1730function get_post_audio( $post_id = 0 ) {
     1731        $post = empty( $post_id ) ? get_post() : get_post( $post_id );
     1732        if ( empty( $post ) )
     1733                return;
     1734
     1735        $children = get_children( array(
     1736                'post_parent' => $post->ID,
     1737                'post_type' => 'attachment',
     1738                'post_mime_type' => 'audio',
     1739                'posts_per_page' => -1
     1740        ) );
     1741
     1742        if ( ! empty( $children ) )
     1743                return $children;
     1744}
     1745
     1746/**
     1747 * Check the content blob for an <audio>, <object>, <embed>, or <iframe>, in that order
     1748 * If no HTML tag is found, check the first line of the post for a URL
     1749 *
     1750 * @param string $content A string which might contain audio data.
     1751 * @param boolean $remove Whether to remove the found URL from the passed content.
     1752 * @return string The found data
     1753 */
     1754function get_content_audio( &$content, $remove = false ) {
     1755        $html = $matches = '';
     1756        foreach ( array( 'audio', 'object', 'embed', 'iframe' ) as $tag ) {
     1757                if ( preg_match( '#' . get_tag_regex( $tag ) . '#i', $content, $matches ) ) {
     1758                        $html = $matches[1];
     1759                        $count = 1;
     1760                        if ( $remove )
     1761                                $content = str_replace( $matches[0], '', $content, $count );
     1762
     1763                        return $html;
     1764                }
     1765        }
     1766
     1767        $lines = explode( "\n", trim( $content ) );
     1768        $line = trim( array_shift( $lines ) );
     1769
     1770        if ( 0 === stripos( $line, 'http' ) ) {
     1771                if ( $remove )
     1772                        $content = join( "\n", $lines );
     1773
     1774                return $line;
     1775        }
     1776}
     1777
     1778/**
     1779 * Return the found audio data for the passed post
     1780 *
     1781 * @since 3.6.0
     1782 *
     1783 * @param int $id Optional. Post ID
     1784 */
     1785function get_the_audio( $id = 0 ) {
     1786        $post = empty( $id ) ? get_post() : get_post( $id );
     1787        if ( empty( $post ) )
     1788                return array();
     1789
     1790        if ( shortcode_exists( 'audio' ) )
     1791                return do_shortcode( '[audio /]' );
     1792
     1793        $data = get_content_audio( $post->post_content );
     1794        if ( ! empty( $data ) )
     1795                return $data;
     1796
     1797        $audios = get_post_audio( $post->ID );
     1798        if ( empty( $audios ) )
     1799                return array();
     1800
     1801        $audio = reset( $audios );
     1802        return wp_get_attachment_url( $audio->ID );
     1803}
     1804
     1805/**
     1806 * Output the found audio data for the current post
     1807 *
     1808 * @since 3.6.0
     1809 */
     1810function the_audio() {
     1811        echo apply_filters( 'the_audio', get_the_audio() );
     1812}
     1813
     1814/**
     1815 * Retrieve video attached to the passed post
     1816 *
     1817 * @since 3.6.0
     1818 *
     1819 * @param int $post_id  Post ID
     1820 * @return array Found video attachments
     1821 */
     1822function get_post_video( $post_id = 0 ) {
     1823        $post = empty( $post_id ) ? get_post() : get_post( $post_id );
     1824        if ( empty( $post ) )
     1825                return;
     1826
     1827        $children = get_children( array(
     1828                'post_parent' => $post->ID,
     1829                'post_type' => 'attachment',
     1830                'post_mime_type' => 'video',
     1831                'posts_per_page' => -1
     1832        ) );
     1833
     1834        if ( ! empty( $children ) )
     1835                return $children;
     1836}
     1837
     1838/**
     1839 * Check the content blob for a <video>, <object>, <embed>, or <iframe>, in that order
     1840 * If no HTML tag is found, check the first line of the post for a URL
     1841 *
     1842 * @param string $content A string which might contain video data.
     1843 * @param boolean $remove Whether to remove the found URL from the passed content.
     1844 * @return string The found data
     1845 */
     1846function get_content_video( &$content, $remove = false ) {
     1847        $html = $matches = '';
     1848        foreach ( array( 'video', 'object', 'embed', 'iframe' ) as $tag ) {
     1849                if ( preg_match( '#' . get_tag_regex( $tag ) . '#i', $content, $matches ) ) {
     1850                        $html = $matches[1];
     1851                        $count = 1;
     1852                        if ( $remove )
     1853                                $content = str_replace( $matches[0], '', $content, $count );
     1854
     1855                        return $html;
     1856                }
     1857        }
     1858
     1859        $lines = explode( "\n", trim( $content ) );
     1860        $line = trim( array_shift( $lines  ) );
     1861
     1862        if ( 0 === stripos( $line, 'http' ) ) {
     1863                if ( $remove )
     1864                        $content = join( "\n", $lines );
     1865
     1866                return $line;
     1867        }
     1868}
     1869
     1870/**
     1871 * Return the found video data for the passed post
     1872 *
     1873 * @since 3.6.0
     1874 *
     1875 * @param int $id Optional. Post ID
     1876 */
     1877function get_the_video( $id = 0 ) {
     1878        $post = empty( $id ) ? get_post() : get_post( $id );
     1879        if ( empty( $post ) )
     1880                return array();
     1881
     1882        if ( shortcode_exists( 'video' ) )
     1883                return do_shortcode( '[video /]' );
     1884
     1885        $data = get_content_video( $post->post_content );
     1886        if ( ! empty( $data ) )
     1887                return $data;
     1888
     1889        $videos = get_post_video( $post->ID );
     1890        if ( empty( $videos ) )
     1891                return array();
     1892
     1893        $video = reset( $videos );
     1894        return wp_get_attachment_url( $video->ID );
     1895}
     1896
     1897/**
     1898 * Output the found video data for the current post
     1899 *
     1900 * @since 3.6.0
     1901 */
     1902function the_video() {
     1903        echo apply_filters( 'the_video', get_the_video() );
     1904}
     1905
     1906/**
     1907 * Audio embed handler callback.
     1908 *
     1909 * @param array $matches The regex matches from the provided regex when calling {@link wp_embed_register_handler()}.
     1910 * @param array $attr Embed attributes.
     1911 * @param string $url The original URL that was matched by the regex.
     1912 * @param array $rawattr The original unmodified attributes.
     1913 * @return string The embed HTML.
     1914 */
     1915function wp_audio_embed( $matches, $attr, $url, $rawattr ) {
     1916        $audio = do_shortcode( '[audio src="' . $url . '" /]' );
     1917        return apply_filters( 'wp_audio_embed', $audio, $attr, $url, $rawattr );
     1918}
     1919wp_embed_register_handler( 'wp_audio_embed', '#https?://.+?\.(mp3|ogg|wma)#i', 'wp_audio_embed', 9999 );
     1920
     1921/**
     1922 * Video embed handler callback.
     1923 *
     1924 * @param array $matches The regex matches from the provided regex when calling {@link wp_embed_register_handler()}.
     1925 * @param array $attr Embed attributes.
     1926 * @param string $url The original URL that was matched by the regex.
     1927 * @param array $rawattr The original unmodified attributes.
     1928 * @return string The embed HTML.
     1929 */
     1930function wp_video_embed( $matches, $attr, $url, $rawattr ) {
     1931        $video = do_shortcode( '[video src="' . $url . '" /]' );
     1932        return apply_filters( 'wp_video_embed', $video, $attr, $url, $rawattr );
     1933}
     1934wp_embed_register_handler( 'wp_video_embed', '#https?://.+?\.(mp4|ogv|webm|wmv|flv)#i', 'wp_video_embed', 9999 );
     1935 No newline at end of file
  • wp-includes/post-formats.php

    diff --git wp-includes/post-formats.php wp-includes/post-formats.php
    index 6d32aea..eddcd7f 100644
    function post_formats_compat( $content, $id = 0 ) { 
    301301                'link_class' => '',
    302302                'image_class' => '',
    303303                'gallery' => '[gallery]',
    304                 'audio' => '',
    305                 'video' => ''
     304                'audio' => '[audio]',
     305                'video' => '[video]'
    306306        );
    307307
    308308        $args = apply_filters( 'post_format_compat', array() );
    function post_formats_compat( $content, $id = 0 ) { 
    386386                case 'video':
    387387                case 'audio':
    388388                        $shortcode_regex = '/' . get_shortcode_regex() . '/s';
    389                         $matches = preg_match( $shortcode_regex, $content );
     389                        preg_match( $shortcode_regex, $content, $matches );
     390
    390391                        if ( ! $matches || $format !== $matches[2] ) {
    391392                                if ( empty( $meta['media'] ) && ! empty( $compat[$format] ) ) {
    392393                                        $format_output .= $compat[$format];
    function post_formats_compat( $content, $id = 0 ) { 
    398399                                                // attempt to embed the URL
    399400                                                $format_output .= sprintf( '[embed]%s[/embed]', $meta['media'] );
    400401                                        }
     402                                } elseif ( empty( $meta['media'] ) ) {
     403                                        $data = '';
     404                                        // attempt to grab an embed code or URL from the content
     405                                        if ( 'audio' === $format ) {
     406                                                $data = get_content_audio( $content, true );
     407                                        } elseif ( 'video' === $format ) {
     408                                                $data = get_content_video( $content, true );
     409                                        }
     410
     411                                        if ( ! empty( $data ) ) {
     412                                                // attempt to embed the URL
     413                                                if ( 0 === stripos( $data, 'http' ) )
     414                                                        $format_output .= sprintf( '[embed]%s[/embed]', $data );
     415                                                else // data is probably an embed code
     416                                                        $format_output .= $data;
     417                                        } elseif ( 'audio' === $format ) {
     418                                                // get attached audio URL
     419                                                $audios = get_post_audio( $post->ID );
     420                                                if ( ! empty( $audios ) ) {
     421                                                        $audio = reset( $audios );
     422                                                        $url = wp_get_attachment_url( $audio->ID );
     423                                                        // core or plugin support for [audio]
     424                                                        if ( shortcode_exists( 'audio' ) ) {
     425                                                                $format_output .= sprintf( '[audio src="%s"/]', $url );
     426                                                        } else {
     427                                                                // no support detected, just add URL
     428                                                                $format_output .= sprintf( '<a class="wp-post-format-link-audio" href="%1$s">%1$s</a>', $url );
     429                                                        }
     430                                                }
     431                                        } elseif ( 'video' === $format ) {
     432                                                // get attached video URL
     433                                                $videos = get_post_video( $post->ID );
     434                                                if ( ! empty( $videos ) ) {
     435                                                        $video = reset( $videos );
     436                                                        $url = wp_get_attachment_url( $video->ID );
     437                                                        // core or plugin support for [video]
     438                                                        if ( shortcode_exists( 'video' ) ) {
     439                                                                $format_output .= sprintf( '[video src="%s"/]', $url );
     440                                                        } else {
     441                                                                // no support detected, just add URL link
     442                                                                $format_output .= sprintf( '<a class="wp-post-format-link-video" href="%1$s">%1$s</a>', $url );
     443                                                        }
     444                                                }
     445                                        }
    401446                                }
    402447                        }
    403448                        break;
  • wp-includes/script-loader.php

    diff --git wp-includes/script-loader.php wp-includes/script-loader.php
    index cfb865e..2e5e527 100644
    function wp_default_scripts( &$scripts ) { 
    274274
    275275        $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), '0.9.8', 1 );
    276276
     277        $scripts->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player$suffix.js", array('jquery'), '2.10.1', 1 );
     278        $scripts->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.js", array('mediaelement'), false, 1 );
     279
    277280        $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array('jquery'), false, 1 );
    278281        did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array(
    279282                'empty' => __('Strength indicator'),
    function wp_default_styles( &$styles ) { 
    538541        $styles->add( 'media-views', "/wp-includes/css/media-views$suffix.css", array( 'buttons' ) );
    539542        $styles->add( 'buttons', "/wp-includes/css/buttons$suffix.css" );
    540543
     544        $styles->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelementplayer$suffix.css" );
     545        $styles->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.css", array( 'mediaelement' ) );
     546
    541547        foreach ( $rtl_styles as $rtl_style ) {
    542548                $styles->add_data( $rtl_style, 'rtl', true );
    543549                if ( $suffix && ! in_array( $rtl_style, $no_suffix ) )
  • wp-includes/shortcodes.php

    diff --git wp-includes/shortcodes.php wp-includes/shortcodes.php
    index 2dfc277..716dae4 100644
    function remove_all_shortcodes() { 
    128128}
    129129
    130130/**
     131 * Whether a registered shortcode exists named $tag
     132 *
     133 * @since 3.6.0
     134 *
     135 * @global array $shortcode_tags
     136 * @param string $tag
     137 * @return boolean
     138 */
     139function shortcode_exists( $tag ) {
     140        global $shortcode_tags;
     141        return array_key_exists( $tag, $shortcode_tags );
     142}
     143
     144/**
    131145 * Search content for shortcodes and filter shortcodes through their hooks.
    132146 *
    133147 * If there are no shortcode tags defined, then the content will be returned