Making WordPress.org

Changeset 2985


Ignore:
Timestamp:
04/20/2016 11:08:56 AM (8 years ago)
Author:
dd32
Message:

Plugin Directory: Add an internal API endpoint which will be used to update the stats stored within postmeta.
Currently other w.org systems have to query the DB directly, bypassing WordPress actions and filters, which results in stale data or data not being passed to another service.

See #1596

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
4 added
2 edited

Legend:

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

    r2983 r2985  
    2929
    3030        add_filter( 'map_meta_cap', array( __NAMESPACE__ . '\Capabilities', 'map_meta_cap' ), 10, 4 );
     31
     32        // Load the API routes
     33        add_action( 'rest_api_init', array( __NAMESPACE__ . '\API\Base', 'load_routes' ) );
    3134
    3235        // Load all Admin-specific items.
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-readme-parser.php

    r2970 r2985  
    4343    // These are the valid header mappings for the header
    4444    private $valid_headers = array(
    45             'tested'            => 'tested',
    46             'tested up to'      => 'tested',
    47             'requires'          => 'requires',
    48             'requires at least' => 'requires',
    49             'tags'              => 'tags',
    50             'contributors'      => 'contributors',
    51             'donate link'       => 'donate_link',
    52             'stable tag'        => 'stable_tag',
    53         );
     45        'tested'            => 'tested',
     46        'tested up to'      => 'tested',
     47        'requires'          => 'requires',
     48        'requires at least' => 'requires',
     49        'tags'              => 'tags',
     50        'contributors'      => 'contributors',
     51        'donate link'       => 'donate_link',
     52        'stable tag'        => 'stable_tag',
     53    );
    5454
    5555    public function __construct( $file ) {
Note: See TracChangeset for help on using the changeset viewer.