Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
move check for jetpack branch into jurassic_ninja_add_features_after_…
Browse files Browse the repository at this point in the history
…auto_login filter
  • Loading branch information
oskosk committed Sep 27, 2018
1 parent a11f5fa commit 39185bb
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions features/gutenpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,23 @@
} else {
debug( '%s: Adding latest stable Gutenpack blocks. Jetpack dir is %s', $domain, $jetpack_dir );
}

// Force Jetpack Beta given that after this PR got merged,
// we can only test Gutenblocks with Jetpack in `master`
// or a new branch derived from latest `master`.
// https://github.com/Automattic/jetpack/pull/10154
$features['jetpack-beta'] = true;
if ( ! isset( $features['branch'] ) ) {
$features['branch'] = 'master';
}
// Also, force regular jetpack out of the equation
$features['jetpack'] = false;
add_gutenpack( $calypsobranch, $jetpack_dir );
}
}, 100, 3 );

add_filter( 'jurassic_ninja_rest_create_request_features', function( $features, $json_params ) {
if ( isset( $json_params['gutenpack'] ) ) {
$features['gutenpack'] = $json_params['gutenpack'];
if ( $features['gutenpack'] ) {
// Force Jetpack Beta given that after this PR got merged,
// we can only test Gutenblocks with Jetpack in `master`
// or a new branch derived from latest `master`.
// https://github.com/Automattic/jetpack/pull/10154
$features['jetpack-beta'] = true;
if ( ! isset( $features['branch'] ) ) {
$features['branch'] = 'master';
}
// Also, force regular jetpack out of the equation
$features['jetpack'] = false;
}
if (
$features['gutenpack'] &&
isset( $json_params['calypsobranch'] ) &&
Expand Down

0 comments on commit 39185bb

Please sign in to comment.