Skip to content

Commit

Permalink
MU WPCOM: Port Dotcom FSE feature from ETK (#38212)
Browse files Browse the repository at this point in the history
* MU WPCOM: Port FSE feature from ETK

* changelog

* Fix some errors

* Use functions from Wpcom_Legacy_FSE

* changelog

* Fix lint

* Clean up site-credit block as it's not in use

* Track whether the legacy fse blocks are rendered

* Fix lint

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10208611893

Upstream-Ref: Automattic/jetpack@2c5616b
  • Loading branch information
arthur791004 authored and matticbot committed Aug 2, 2024
1 parent 40fdf4c commit cf91ac0
Show file tree
Hide file tree
Showing 17 changed files with 1,528 additions and 85 deletions.
58 changes: 29 additions & 29 deletions composer.lock

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

1 change: 1 addition & 0 deletions vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This is an alpha version! The changes listed here are not final.

### Added
- MU WPCOM: Port FSE feature from ETK
- MU WPCOM: Port the newspack blocks from the ETK
- MU WPCOM: Port the starter-page-templates feature from ETK

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public static function load_etk_features() {
require_once __DIR__ . '/features/wpcom-blocks/timeline/timeline.php';
require_once __DIR__ . '/features/wpcom-documentation-links/wpcom-documentation-links.php';
require_once __DIR__ . '/features/wpcom-global-styles/index.php';
require_once __DIR__ . '/features/wpcom-legacy-fse/wpcom-legacy-fse.php';
require_once __DIR__ . '/features/wpcom-whats-new/wpcom-whats-new.php';
require_once __DIR__ . '/features/starter-page-templates/class-starter-page-templates.php';
}
Expand Down
17 changes: 17 additions & 0 deletions vendor/automattic/jetpack-mu-wpcom/src/common/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,20 @@ function wpcom_enqueue_tracking_scripts( string $handle ) {
Tracking::register_tracks_functions_scripts( true );
}
}

/**
* Record tracks event.
*
* @param mixed $event_name The event.
* @param mixed $event_properties The event property.
*
* @return void
*/
function wpcom_record_tracks_event( $event_name, $event_properties ) {
if ( function_exists( 'wpcomsh_record_tracks_event' ) ) {
wpcomsh_record_tracks_event( $event_name, $event_properties );
} elseif ( function_exists( 'require_lib' ) && function_exists( 'tracks_record_event' ) ) {
require_lib( 'tracks/client' );
tracks_record_event( get_current_user_id(), $event_name, $event_properties );
}
}
Loading

0 comments on commit cf91ac0

Please sign in to comment.