Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoints: don't load wp-admin/includes/plugins.php when building a connection URL #5284

Merged
merged 1 commit into from
Oct 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions _inc/lib/class.core-rest-api-endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,15 @@ public static function disconnect_site( $data ) {
}

/**
* Gets a new connect URL with fresh nonce
* Gets a new connect raw URL with fresh nonce.
*
* @uses Jetpack::disconnect();
* @since 4.3.0
* @return bool|WP_Error True if Jetpack successfully disconnected.
* @return string|WP_Error A raw URL if the connection URL could be built; error message otherwise.
*/
public static function build_connect_url() {
if ( require_once( ABSPATH . 'wp-admin/includes/plugin.php' ) ) {
$url = Jetpack::init()->build_connect_url( true, false, false );
$url = Jetpack::init()->build_connect_url( true, false, false );
if ( $url ) {
return rest_ensure_response( $url );
}

Expand Down