Make WordPress Core

Changeset 31789


Ignore:
Timestamp:
03/16/2015 01:42:26 AM (9 years ago)
Author:
DrewAPicture
Message:

Clean up some inline documentation for emoji functionality, including a missing @since for mail_emoji(), and a changelog entry for wp_insert_post().

See #31242.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r31786 r31789  
    40584058/**
    40594059 * Convert any 4 byte emoji in a string to their equivalent HTML entity.
     4060 *
    40604061 * Currently, only Unicode 7 emoji are supported. Unicode 8 emoji will be added
    40614062 * when the spec in finalised, along with the new skin-tone modifiers.
     
    41044105
    41054106/**
    4106  * Convert emoji to a static <img> link.
     4107 * Convert emoji to a static img element.
    41074108 *
    41084109 * @since 4.2.0
     
    41204121    /** This filter is documented in wp-includes/script-loader.php */
    41214122    $cdn_url = apply_filters( 'emoji_url', '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' );
     4123
    41224124    /** This filter is documented in wp-includes/script-loader.php */
    41234125    $ext = apply_filters( 'emoji_ext', '.png' );
    41244126
    41254127    $output = '';
    4126     // HTML loop taken from smiley function, which was taking from texturize function. It'll never be consolidated.
    4127     $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // capture the tags as well as in between
    4128     $stop = count( $textarr );// loop stuff
    4129 
    4130     // Ignore proessing of specific tags
     4128    /*
     4129     * HTML loop taken from smiley function, which was taking from texturize function.
     4130     * It'll never be consolidated.
     4131     *
     4132     * First, capture the tags as well as in between.
     4133     */
     4134    $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE );
     4135    $stop = count( $textarr );
     4136
     4137    // Ignore processing of specific tags.
    41314138    $tags_to_ignore = 'code|pre|style|script|textarea';
    41324139    $ignore_block_element = '';
     
    41354142        $content = $textarr[$i];
    41364143
    4137         // If we're in an ignore block, wait until we find its closing tag
     4144        // If we're in an ignore block, wait until we find its closing tag.
    41384145        if ( '' == $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')>/', $content, $matches ) )  {
    41394146            $ignore_block_element = $matches[1];
    41404147        }
    41414148
    4142         // If it's not a tag and not in ignore block
     4149        // If it's not a tag and not in ignore block.
    41434150        if ( '' ==  $ignore_block_element && strlen( $content ) > 0 && '<' != $content[0] ) {
    41444151            $matches = array();
     
    41724179        }
    41734180
    4174         // did we exit ignore block
     4181        // Did we exit ignore block.
    41754182        if ( '' != $ignore_block_element && '</' . $ignore_block_element . '>' == $content )  {
    41764183            $ignore_block_element = '';
     
    41864193 * Convert emoji in emails into static images.
    41874194 *
     4195 * @since 4.2.0
     4196 *
    41884197 * @param array $mail The email data array.
    4189  *
    41904198 * @return array The email data array, with emoji in the message staticized.
    41914199 */
  • trunk/src/wp-includes/post.php

    r31733 r31789  
    30493049 *
    30503050 * @since 1.0.0
     3051 * @since 4.2.0 Support was added for encoding emoji in the post title, content, and excerpt.
    30513052 *
    30523053 * @see sanitize_post()
  • trunk/src/wp-includes/script-loader.php

    r31773 r31789  
    436436         */
    437437        'baseUrl' => apply_filters( 'emoji_url', '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72' ),
     438
    438439        /**
    439440         * Filter the extension of the emoji files.
     
    441442         * @since 4.2.0
    442443         *
    443          * @param string The emoji extension.
     444         * @param string The emoji extension. Default .png.
    444445         */
    445446        'ext'      => apply_filters( 'emoji_ext', '.png' ),
Note: See TracChangeset for help on using the changeset viewer.