Skip to content

Commit e92eb4f

Browse files
manzoorwanijkmatticbot
authored andcommitted
Social | Fix initial state for simple sites (#40319)
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11984797881 Upstream-Ref: Automattic/jetpack@0ef485d
1 parent d762201 commit e92eb4f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This is an alpha version! The changes listed here are not final.
1414
- Updated package dependencies.
1515

1616
### Fixed
17+
- Fixed initial state error in the editor for simple sites
1718
- Publicize: fix page-detection util methods to stop unnecessary API calls to wp.com
1819

1920
## [0.56.0] - 2024-11-18

src/class-publicize-utils.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Automattic\Jetpack\Connection\Manager;
1111
use Automattic\Jetpack\Modules;
12+
use Automattic\Jetpack\Status\Host;
1213

1314
/**
1415
* Publicize_Utils class.
@@ -49,7 +50,13 @@ public static function should_block_editor_have_social() {
4950
return false;
5051
}
5152

52-
if ( ! self::is_connected() || ! self::is_publicize_active() ) {
53+
$needs_jetpack_connection = ! ( new Host() )->is_wpcom_platform();
54+
55+
if ( $needs_jetpack_connection && ! self::is_connected() ) {
56+
return false;
57+
}
58+
59+
if ( ! self::is_publicize_active() ) {
5360
return false;
5461
}
5562

0 commit comments

Comments
 (0)