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

Include boost in Jetpack #39830

Draft
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
28 changes: 14 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions projects/plugins/boost/app/admin/class-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,22 @@ public function constants() {
$internal_path = apply_filters( 'jetpack_boost_asset_internal_path', 'app/assets/dist/' );

$constants = array(
'version' => JETPACK_BOOST_VERSION,
'pluginDirUrl' => untrailingslashit( JETPACK_BOOST_PLUGINS_DIR_URL ),
'assetPath' => plugins_url( $internal_path, JETPACK_BOOST_PATH ),
'canResizeImages' => wp_image_editor_supports( array( 'methods' => array( 'resize' ) ) ),
'site' => array(
'version' => JETPACK_BOOST_VERSION,
'pluginDirUrl' => untrailingslashit( JETPACK_BOOST_PLUGINS_DIR_URL ),
'assetPath' => plugins_url( $internal_path, JETPACK_BOOST_PATH ),
'canResizeImages' => wp_image_editor_supports( array( 'methods' => array( 'resize' ) ) ),
'site' => array(
'url' => get_home_url(),
'domain' => ( new Status() )->get_site_suffix(),
'online' => ! ( new Status() )->is_offline_mode() && ! ( new Status() )->is_private_site(),
'host' => ( new Host() )->get_known_host_guess(),
),
'api' => array(
'api' => array(
'namespace' => JETPACK_BOOST_REST_NAMESPACE,
'prefix' => JETPACK_BOOST_REST_PREFIX,
),
'postTypes' => (object) $this->get_custom_post_types(),
'postTypes' => (object) $this->get_custom_post_types(),
'loadedFromJetpack' => defined( 'BOOST_LOADED_FROM_JETPACK' ) && \BOOST_LOADED_FROM_JETPACK,
);

/**
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/boost/changelog/boost-in-jp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added


12 changes: 6 additions & 6 deletions projects/plugins/boost/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions projects/plugins/boost/jetpack-boost.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@
define( 'JETPACK_BOOST_CLIENT_NAME', 'jetpack-boost-wp-plugin' );
}

define( 'JETPACK_BOOST_DIR_PATH', __DIR__ );
define( 'JETPACK_BOOST_PATH', __FILE__ );
if ( ! defined( 'JETPACK_BOOST_DIR_PATH' ) ) {
define( 'JETPACK_BOOST_DIR_PATH', __DIR__ );
}

if ( ! defined( 'JETPACK_BOOST_PATH' ) ) {
define( 'JETPACK_BOOST_PATH', __FILE__ );
}

if ( ! defined( 'JETPACK_BOOST_PLUGIN_BASE' ) ) {
define( 'JETPACK_BOOST_PLUGIN_BASE', plugin_basename( __FILE__ ) );
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/boost-in-jp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: major


10 changes: 9 additions & 1 deletion projects/plugins/jetpack/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"automattic/jetpack-waf": "@dev",
"automattic/jetpack-wordads": "@dev",
"automattic/woocommerce-analytics": "@dev",
"scssphp/scssphp": "1.12.0"
"scssphp/scssphp": "1.12.0",
"automattic/jetpack-boost": "*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really probably not the best way to do it. Ideally the functional parts should be put into packages/boost-core or another package, rather than just dumping the entire plugin into Jetpack's vendor directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the convo to p1730113871787929-slack-C016BBAFHHS

},
"require-dev": {
"antecedent/patchwork": "^2.1.28",
Expand Down Expand Up @@ -88,6 +89,13 @@
"options": {
"monorepo": true
}
},
{
"type": "path",
"url": "../../plugins/boost",
"options": {
"monorepo": true
}
}
],
"autoload": {
Expand Down
Loading
Loading