Make WordPress Core

Changeset 23468


Ignore:
Timestamp:
02/21/2013 11:02:00 PM (11 years ago)
Author:
helen
Message:

Post formats compat output:

  • Check for theme support of structured-post-formats rather than post-formats.
  • Use \n instead of PHP_EOL constant.
  • Add new lines after opening compat wrapper tag for some wpautop() treatment.

props SergeyBiryukov. see #23347.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-formats.php

    r23466 r23468  
    292292        return $content;
    293293
    294     if ( current_theme_supports( 'post-formats', $format ) )
     294    if ( current_theme_supports( 'structured-post-formats', $format ) )
    295295        return $content;
    296296
     
    413413
    414414    if ( ! empty( $content ) && $show_content && 'before' !== $compat['position'] )
    415         $output .= $content . PHP_EOL . PHP_EOL;
     415        $output .= $content . "\n\n";
    416416
    417417    if ( ! empty( $compat['tag'] ) )
    418418        $output .= sprintf( '<%s class="%s">', tag_escape( $compat['tag'] ), esc_attr( $compat['class'] ) );
    419419
    420     $output .= $format_output;
     420    $output .= "\n\n" . $format_output;
    421421
    422422    if ( ! empty( $compat['tag'] ) )
     
    424424
    425425    if ( ! empty( $content ) && $show_content && 'before' === $compat['position'] )
    426         $output .= PHP_EOL . PHP_EOL . $content;
     426        $output .= "\n\n" . $content;
    427427
    428428    return $output;
Note: See TracChangeset for help on using the changeset viewer.