WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r35815 r36153  
    217217    // Look for shortcodes and HTML elements.
    218218
    219     preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20]++)@', $text, $matches );
     219    preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches );
    220220    $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
    221221    $found_shortcodes = ! empty( $tagnames );
     
    234234            } else {
    235235                // This is an HTML element delimiter.
     236
     237                // Replace each & with &#038; unless it already looks like an entity.
     238                $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&#038;', $curl );
     239
    236240                _wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags );
    237241            }
     
    38933897 */
    38943898function map_deep( $value, $callback ) {
    3895     if ( is_array( $value ) || is_object( $value ) ) {
    3896         foreach ( $value as &$item ) {
    3897             $item = map_deep( $item, $callback );
    3898         }
    3899         return $value;
     3899    if ( is_array( $value ) ) {
     3900        foreach ( $value as $index => $item ) {
     3901            $value[ $index ] = map_deep( $item, $callback );
     3902        }
     3903    } elseif ( is_object( $value ) ) {
     3904        $object_vars = get_object_vars( $value );
     3905        foreach ( $object_vars as $property_name => $property_value ) {
     3906            $value->$property_name = map_deep( $property_value, $callback );
     3907        }
    39003908    } else {
    3901         return call_user_func( $callback, $value );
    3902     }
     3909        $value = call_user_func( $callback, $value );
     3910    }
     3911
     3912    return $value;
    39033913}
    39043914
     
    47934803    return $short_url;
    47944804}
     4805
     4806/**
     4807 * 4.4.x hotfix for hidden configure links on admin dashboard.
     4808 *
     4809 * @ignore
     4810 */
     4811function _wp_441_dashboard_display_configure_links_css() {
     4812    echo '<style type="text/css">
     4813        .postbox .button-link .edit-box { display: none; }
     4814        .wp-admin .edit-box { display: block; opacity: 0; }
     4815        .hndle:hover .edit-box, .edit-box:focus { opacity: 1; }
     4816        #dashboard-widgets h2 a { text-decoration: underline; }
     4817        #dashboard-widgets .hndle .postbox-title-action { float: right; line-height: 1.2; }
     4818    </style>';
     4819}
     4820add_action( 'admin_print_styles-index.php', '_wp_441_dashboard_display_configure_links_css' );
Note: See TracChangeset for help on using the changeset viewer.