Making WordPress.org


Ignore:
Timestamp:
01/31/2018 04:03:15 AM (8 years ago)
Author:
dd32
Message:

API: Theme Directory: Disallow POST requests to the info/1.2 api endpoint.

See #111

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/themes/info/1.0/index.php

    r6465 r6483  
    11<?php
     2
     3if ( ! defined( 'THEMES_API_VERSION' ) ) {
     4    define( 'THEMES_API_VERSION', basename( dirname( $_SERVER['REQUEST_URI'] ) ) );
     5}
     6
    27// Load WordPress, pretend we're the Theme Directory in order to avoid having to switch sites after loading.
    38$_SERVER['HTTP_HOST'] = 'wordpress.org';
     
    510
    611require dirname( dirname( dirname( __DIR__ ) ) ) . '/wp-init.php';
    7 
    8 if ( ! defined( 'THEMES_API_SUPPORTS_ERRORS' ) ) {
    9     define( 'THEMES_API_SUPPORTS_ERRORS', false );
    10 }
    1112
    1213// Set up action and request information.
Note: See TracChangeset for help on using the changeset viewer.