WordPress.org

Make WordPress Core

Ticket #37751: 37751.diff

File 37751.diff, 487 bytes (added by danhgilmore, 4 years ago)

Patch to check if format is JSON in add_query_arg()

  • wp-includes/embed.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    387387        if ( '' !== $permalink ) {
    388388                $url = add_query_arg( array(
    389389                        'url'    => urlencode( $permalink ),
    390                         'format' => $format,
     390                        'format' => ( 'json' === $format ) ? false : $format,
    391391                ), $url );
    392392        }
    393393