Skip to content

Rename Blog.isHostedAtWPcom for clarity #15089

Open
@guarani

Description

@guarani

Expected behavior

By its name alone, one would expect Blog.isHostedAtWPcom to be true for all WordPress.com sites, whether or not they have plugins installed. It's not true in this scenario, because it's actually just an indication of whether or not Jetpack is installed. So it would be better to rename it to make this clearer.

Actual behavior

Blog.isHostedAtWPcom is false for WordPress.com sites with plugins installed because it's actually just the negation of !blog.jetpack.

The current naming is likely the reason @-mentions is disabled on WordPress.com sites with plugins installed. So there are likely real negative consequences to keeping the current naming.

Steps to reproduce the behavior

  1. Log into WPiOS and choose a WordPress.com site that has plugins installed (requires paid plan).
  2. Put a breakpoint on the following line and observe that isHostedOnWPcom is false/0:
    blog.isHostedAtWPcom = !remoteBlog.jetpack;

Proposed solution

I think we should rename it to Blog.isWPComSimpleSite. This would involve renaming the variable in code as well as in the Core Data data model.

Tested on iPhone, iOS 14, WPiOS 6895ab8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions