Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon Kindle block #13510

Merged
merged 5 commits into from
Jan 25, 2019
Merged

Amazon Kindle block #13510

merged 5 commits into from
Jan 25, 2019

Conversation

Soean
Copy link
Member

@Soean Soean commented Jan 25, 2019

Description

Adds an Amazon Kindle embed block.

Amazon Kindle embed support was added in WP 4.9 https://core.trac.wordpress.org/changeset/41615

Example URL: https://lesen.amazon.de/kp/embed?asin=B07HB5N1YN
How to get URLs: https://www.amazon.com/Kindle-Instant-Preview/b?ie=UTF8&node=13489836011

Fixes #13427

kindle

kindle

@Soean Soean added New Block Suggestion for a new block [Block] Embed Affects the Embed Block labels Jan 25, 2019
@Soean Soean requested a review from notnownikki January 25, 2019 20:30
Copy link
Member

@notnownikki notnownikki left a comment

Choose a reason for hiding this comment

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

Just one request to change to the responsive setting to false, and this is looking good!

@notnownikki notnownikki added this to the 5.0 (Gutenberg) milestone Jan 25, 2019
@notnownikki
Copy link
Member

Thank you!

@notnownikki notnownikki merged commit a474438 into master Jan 25, 2019
@notnownikki notnownikki deleted the add/kindle-embed branch January 25, 2019 22:03
daniloercoli added a commit that referenced this pull request Jan 26, 2019
…rnmobile/372-enter-key-detection-to-title

* 'master' of https://github.com/WordPress/gutenberg: (29 commits)
  Update for RangeControl documentation (#12564)
  Plugin: Deprecate gutenberg_load_list_reusable_blocks (#13456)
  Update the columns attribute in onSelectImages so that if images are removed via the media modal, the columns can't be higher than the new number of images (#13488)
  Replace the fullscreen "exit" icon with a back arrow (#13403)
  Include :visited links in button color (#12183)
  Amazon Kindle block (#13510)
  Plugin: Deprecate gutenberg_prepare_blocks_for_js (#13457)
  Add watcher on Linux: change fs to node-watch (#13448)
  Plugin: Deprecate `gutenberg` theme support (#13458)
  Datepicker: Add inValidDay support (#12962)
  Block Switcher: Render disabled button even if multi-selection (#13431)
  Plugin: Deprecate gutenberg_register_post_types (#13468)
  Plugin: Deprecate register_tinymce_scripts (#13466)
  Set minimum of words for RSS excerpt (#13502)
  Plugin: Deprecate gutenberg_get_block_categories (#13454)
  Plugin: Deprecate gutenberg_content_block_version (#13469)
  API Fetch: Expose nonce on created middleware function (#13451)
  Plugin: Remove list screens integrations (#13459)
  Plugin: Remove core-defined block detection functions (#13467)
  Spec Parser: Move generated spec parser to package (#13493)
  ...
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
@karlcc58
Copy link

Hello,
Thank you very much for your work.
It is possible to add a amazon affiliate code on the links? Which is the way?.
Thanks and Greetings

@Soean
Copy link
Member Author

Soean commented May 28, 2019

@karlcc58 Yes, thats possible. See this step by step guide. On the last step you should have an option to select your affiliate code: https://www.amazon.com/Kindle-Instant-Preview/b?ie=UTF8&node=13489836011

@karlcc58
Copy link

Another question, It is possible to change "Buy on - Share - Free preview " for example with "Comprar en, compartir, Vista previa"
Again thank you very much :-)

@michaelebemis
Copy link

Can the background color be changed?

Comment on lines +351 to +354
patterns: [
/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,
/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i,
],
Copy link
Contributor

Choose a reason for hiding this comment

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

@Soean: This is too eagerly catching items that aren't books and attempting to render them as such.

Try pasting any product URL matching https://www.amazon.com/gp/product/<product code>/ or https://www.amazon.com/-/<locale>/dp/<product code>/, for instance.

Example

Pasting URL https://www.amazon.com/dp/B0198CGQEE/ yields:

output

Copy link
Contributor

Choose a reason for hiding this comment

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

Reported in #27547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Embed Affects the Embed Block New Block Suggestion for a new block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Amazon Kindle Instant Previews block
5 participants