Skip to content

Commit

Permalink
Ensure that publicize module is not disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
manzoorwanijk committed Aug 15, 2024
1 parent 0560a92 commit 5c69dfc
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ public static function get_admin_script_data() {
'urls' => array(),
);

$is_wpcom = ( new Host() )->is_wpcom_platform();
if ( ! Utils::is_publicize_active() ) {
return $basic_data;
}

// We don't need a user connection for WPCOM sites.
if ( $is_wpcom || ( Utils::is_publicize_active() && Utils::is_connected() ) ) {
// We don't need a user connection for Simple sites.
if ( ( new Host() )->is_wpcom_simple() || Utils::is_connected() ) {
return array_merge(
$basic_data,
array(
Expand Down

0 comments on commit 5c69dfc

Please sign in to comment.