Making WordPress.org

Changeset 1752


Ignore:
Timestamp:
07/18/2015 02:52:50 PM (9 years ago)
Author:
ocean90
Message:

Translate: Adjust route unregistration for new API in GlotPress.

see #1124.

File:
1 edited

Legend:

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

    r1133 r1752  
    1111        $this->add_action( 'before_login_form' );
    1212        $this->add_filter( 'gp_url_profile', array( 'args' => 2 ) );
    13         $this->add_filter( 'routes' );
     13        $this->add_action( 'init' );
    1414        $this->add_filter( 'projects', array( 'args' => 2 ) );
    1515    }
    1616
    1717    function before_login_form() {
    18         echo '<span class="secondary">' . __( 'Log in with your wordpress.org forums account. If you don&#8217;t have one, you can <a href="http://wordpress.org/support/register.php">register at the forums.</a>' ) . '</span>';
     18        echo '<span class="secondary">' . __( 'Log in with your wordpress.org forums account. If you don&#8217;t have one, you can <a href="https://wordpress.org/support/register.php">register at the forums.</a>' ) . '</span>';
    1919    }
    2020
     
    2323    }
    2424
    25     function routes( $routes ) {
    26         unset( $routes['get:/profile/(.+?)'] );
    27         return $routes;
     25    function init() {
     26        GP::$router->remove( '/profile/(.+?)' );
    2827    }
    2928
Note: See TracChangeset for help on using the changeset viewer.