Making WordPress.org

Changeset 2530


Ignore:
Timestamp:
02/18/2016 11:13:56 PM (9 years ago)
Author:
ocean90
Message:

Translate: Disable plugin and theme overview pages.

Location:
sites/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/routes/redirector.php

    r1721 r2530  
    1414        }
    1515    }
     16
     17    function redirect_index() {
     18        $this->redirect( '/' );
     19    }
    1620}
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/wporg-routes.php

    r2132 r2530  
    2727        if ( gp_startswith( $request_uri, '/' . GP::$router->api_prefix . '/' ) ) { // API requests.
    2828            // Delete default routes.
    29             GP::$router->remove("/languages/$locale");
     29            GP::$router->remove( "/languages/$locale" );
    3030        } else {
    3131            // Delete default routes.
    32             GP::$router->remove("/languages/$locale");
    33             GP::$router->remove("/languages/$locale/$path");
     32            GP::$router->remove( "/languages/$locale" );
     33            GP::$router->remove( "/languages/$locale/$path" );
    3434
    3535            // Redirect routes.
    3636            GP::$router->prepend( '/languages', array( 'GP_WPorg_Route_Redirector', 'redirect_languages' ) );
    3737            GP::$router->prepend( "/languages/$path", array( 'GP_WPorg_Route_Redirector', 'redirect_languages' ) );
     38            GP::$router->prepend( '/projects/wp-plugins', array( 'GP_WPorg_Route_Redirector', 'redirect_index' ) );
     39            GP::$router->prepend( '/projects/wp-themes', array( 'GP_WPorg_Route_Redirector', 'redirect_index' ) );
    3840
    3941            // Register custom routes.
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/redirector.php

    r2109 r2530  
    77class WPorg_GP_Route_Redirector extends GP_Route {
    88
    9     function redirect_languages( $path = '' ) {
     9    public function redirect_languages( $path = '' ) {
    1010        if ( empty( $path ) ) {
    1111            $this->redirect( '/' );
     
    1414        }
    1515    }
     16
     17    public function redirect_index() {
     18        $this->redirect( '/' );
     19    }
    1620}
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/wp-plugins.php

    r2439 r2530  
    254254        $data = [];
    255255        foreach ( $days as $day ) {
    256             $data[ $day ] = array( 'current' => 0, 'waiting' => 0, 'rejected' => 0 );
     256            $data[ $day ] = array_fill_keys( $status, 0 );
    257257            foreach ( $counts as $count ) {
    258258                if ( $count->day !== $day || ! in_array( $count->status, $status ) ) {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/wporg-gp-routes.php

    r2439 r2530  
    6363            GP::$router->prepend( '/languages', array( 'WPorg_GP_Route_Redirector', 'redirect_languages' ) );
    6464            GP::$router->prepend( "/languages/$path", array( 'WPorg_GP_Route_Redirector', 'redirect_languages' ) );
     65            GP::$router->prepend( '/projects/wp-plugins', array( 'GP_WPorg_Route_Redirector', 'redirect_index' ) );
     66            GP::$router->prepend( '/projects/wp-themes', array( 'GP_WPorg_Route_Redirector', 'redirect_index' ) );
    6567
    6668            // Register custom routes.
Note: See TracChangeset for help on using the changeset viewer.