Skip to content

Show stock photos only for wpcom or jetpack sites#10743

Closed
marecar3 wants to merge 2 commits intodevelopfrom
gutenberg/allow_stock_photos_only_on_wpcom_or_jetpack
Closed

Show stock photos only for wpcom or jetpack sites#10743
marecar3 wants to merge 2 commits intodevelopfrom
gutenberg/allow_stock_photos_only_on_wpcom_or_jetpack

Conversation

@marecar3
Copy link
Copy Markdown
Contributor

@marecar3 marecar3 commented Nov 6, 2019

Fixes # wordpress-mobile/gutenberg-mobile#1539 (comment)

We should not show the Free Media Library option on Self Hosted site, since this is a WPCom/Jetpack-only feature.

To test:

Test 1:

  1. The easiest way is to create a Jurassic Ninja instance:
    https://jurassic.ninja
  2. Then delete the Jetpack plugin from it
  3. Log in with a self-hosted site
  4. Create a new Post
  5. Create a new Image block
  6. Tap on the Image block
  7. Choose from Free Photo Library shouldn't be visible

Test 2:

  1. Use wp.com site
  2. Create a new Post
  3. Create a new Image block
  4. Tap on the Image block
  5. Choose from Free Photo Library should be visible

PR submission checklist:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

String wpcomLocaleSlug = languageString.replace("_", "-").toLowerCase(Locale.ENGLISH);
return GutenbergEditorFragment.newInstance("", "", mIsNewPost, wpcomLocaleSlug);
boolean supportsStockPhotos = mSite.isUsingWpComRestApi();
return GutenbergEditorFragment.newInstance("", "", mIsNewPost, wpcomLocaleSlug, supportsStockPhotos);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reporter: Checkstyle
Rule: com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck
Severity: ERROR
File: /home/circleci/project/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java L2162
Line is longer than 120 characters (found 125).

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Nov 6, 2019

You can test the changes on this Pull Request by downloading the APK here.

@marecar3 marecar3 changed the base branch from develop to release/13.6 November 6, 2019 11:39
@marecar3 marecar3 changed the base branch from release/13.6 to develop November 6, 2019 11:39
@marecar3
Copy link
Copy Markdown
Contributor Author

marecar3 commented Nov 6, 2019

Closing in favor of: #10745

@marecar3 marecar3 closed this Nov 6, 2019
@marecar3 marecar3 deleted the gutenberg/allow_stock_photos_only_on_wpcom_or_jetpack branch November 6, 2019 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants