WordPress.org

Making WordPress.org

Changeset 4310


Ignore:
Timestamp:
10/31/16 01:40:14 (14 months ago)
Author:
dd32
Message:

Plugin Directory: Revert [3863] as the Reviews markup in the API is intentionally different from the markup used on WordPress.org.

This fixes review display when WordPress is using the new API.

See #1579, #1719.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php

    r4197 r4310  
    11<?php 
    22namespace WordPressdotorg\Plugin_Directory\API\Routes; 
    3 use WordPressdotorg\Plugin_Directory\Shortcodes\Reviews; 
    43use WordPressdotorg\Plugin_Directory\Plugin_Directory; 
    54use WordPressdotorg\Plugin_Directory\Template; 
     
    106105        $_pages = preg_split( "#<!--section=(.+?)-->#", $post->post_content, - 1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY ); 
    107106        for ( $i = 0; $i < count( $_pages ); $i += 2 ) { 
    108             $result['sections'][ $_pages[ $i ] ] = apply_filters( 'the_content', $_pages[ $i + 1 ], $_pages[ $i ] ); 
    109         } 
    110         $result['sections']['reviews'] = Reviews::display(); 
     107            $result['sections'][ $_pages[ $i ] ] = apply_filters( 'the_content', $_pages[ $i + 1 ] ); 
     108        } 
     109        $result['sections']['reviews'] = $this->get_plugin_reviews_markup( $post->post_name ); 
    111110        $result['description'] = $result['sections']['description']; 
    112111 
Note: See TracChangeset for help on using the changeset viewer.