Browser Screenshots

説明

Use the [browser-shot] shortcode to automate the process of taking website screenshots. An icon is also added to the TinyMCE editor to make the shortcode creation process easy.

ショートコードのプレビュー

// basic shot 600px wide
[browser-shot url="http://link-to-website" width="600"]

// shot with link to other website
[browser-shot url="http://link-to-website" width="700" link="http://www.binarymoon.co.uk/"]

// shot with caption (uses default WordPress caption styles)
[browser-shot url="http://link-to-website" width="700"]Add Caption[/browser-shot]

使用できるパラメーター

  • url (必須) – 短縮するリンクの URL
  • width – 画像の幅
  • height – 画像の高さ
  • alt – 画像の alt テキスト
  • link – 画像のリンク先。左ブランクはスクリーンショットが取られているウェブサイトを指す
  • target – ブラウザーのターゲット。 新しいウィンドゥで開くには _blank を付ける
  • class – add a class to the browsershots wrapper
  • image_class – change the default browsershots image class from alignnone to your chosen class
  • display_link (true or false – default true) to display a link in your screenshot
  • post_links (true or false – default false) to link to the permalink of the post the screenshot is on

Generating Screenshots with code

If you want to create screenshots in a theme using this plugin then you can do so using the BrowserShots::get_shot method.

For example:

<img src="<?php echo BrowserShots::get_shot( 'https://prothemedesign.com', 600, 450 ); ?>" />

Keep in mind that the plugin must be installed and activated for this to work.

The get_shot method has 3 parameters.

  1. The url.
  2. The width.
  3. The height.

The other parameters, from the shotcode, can be implemented manually when outputting the html.

マルチサイトに互換

The Browser Shots plugin is compatibly with WordPress Multisite, just use the Network Activate feature to enable the shortcode on every site. If you only want to enable the shortcode for a specific site, activate the plugin for that site only.

More…

  • The code can be found on Github
  • You can reach out to me with questions or problems on Twitter

スクリーンショット

  • New Gutenberg block.
  • A view from inside of the WordPress TinyMCE editor.
  • The formatted front-end view of generated screenshots.

ブロック

このプラグインは1個のブロックを提供します。

browser-shots/browser-shots
Browser Shots

インストール

  1. Install easily with the WordPress plugin control panel or manually download the plugin and upload the folder browser-shots to the /wp-content/plugins/ directory
  2. WordPress の「プラグイン」メニューからプラグインを有効化してください

評価

6月 12, 2019
I would like to thank everyone involved for the great work. The fast response time and the helpful support are unique. The adaptation to my special wishes saved me weeks of working time. Thank you very much for that.
6月 11, 2019
I love this plugin. I used to use ShrinkTheWeb but the support was rubbish and it was costing me $5 per month. This is so much more customisable. I can change the sizes, put in backgrounds, add captions and links. So pleased I found this plugin it works great on my site.
6月 9, 2019
I was recently blessed to help contribute a Gutenberg block to Browser Shots. The shortcode, and now the block, are amazing additions. Thanks, Ben, for this great plugin.
2月 15, 2019
Wow, just happened to stumble across this whilst looking for a url to screenshot API wondering if someone had created anything for WordPress. Absolutely amazing, thanks so much for putting this together.
2月 12, 2019
Perfect. Thank you 🙂 There may be another version of this plugin for the favicon.
13件のレビューをすべて表示

貢献者と開発者

Browser Screenshots はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Browser Screenshots” は3ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“Browser Screenshots” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

1.7.4 – 15th July 2019

  • Add a $shortcode parameter to the shortcode_atts function call so that the shortcode properties can be filtered.
  • Added option to allow screenshot to link to the post’s URL.
  • Make get_shots static so it can be used outside of the shortcode/ gutenberg block.

1.7.3 – 12th June 2019

  • Add PERMALINK as a link property. If you set the link url to PERMALINK then the url will point to the currrent page or post.
  • Improve the default alt text. Previously it would display the url for the screenshot, but this could be messy, and is not actually useful. Now displays “Screenshot from domain-name”.

1.7.2 – 11th June 2019

  • Ensuring display_link is a boolean in the shortcode.
  • Code formatting and cleanup.

1.7.1 – 11th June 2019

  • Add a new parameter display_link that allows you to disable the link around the screenshot. Defaults to true. Set to false to remove the link.
  • Add some placeholder text to the input fields to make it clearer what is expected.
  • Change the rel link property to a toggle for one click changes.

1.7 – 8th June 2019

  • Add Gutenberg block for including Browser Shots.
  • Fix image alignment so that it works properly :).

1.6 – 30th May 2019

  • Add rel property to shortcode so that links can include rel=”nofollow” or similar.
  • Fix output of target attribute.
  • Tidy codes.

1.5.2 – 7th January 2017

  • Improve output html to reduce likelihood of html being modified by a plugin
  • Swap urlencode for rawurlencode
  • Switch to yoda conditions

1.5.1

  • add two new class properties. One for the container, one for the image
  • lots of code tidying, and refactoring. Simpler, faster, and more secure
  • new tinymce icon that fits the style of the editor much better 🙂

1.5

  • update localisation strings so that things can be translated more easily

1.4

  • Update the website screen capture path. This ensures the code will work properly on secure domains
  • Add some additional value escaping for extra security

1.3.2

  • Fix a couple of small javascript bugs (thanks again to Ciprian Dracea)

1.3.1

  • Fix a couple of small bugs with the visual editor and add support for all shortcode parameters

1.3

  • Make the visual editor work again (thanks to Ciprian Dracea for the report and the code help!)
  • add a new pop up box for the shortcode properties in visual editor mode

1.2

  • Add ‘link’ attribute. Allows you to change the url that the screenshot links to
  • Sanitize the height attribute and fix a small height related PHP error
  • キャプションのサポートを追加する
  • 新しいウィンドウでリンクを開くためのターゲット属性を追加する

1.1

  • TinyMCEプロンプトに ‘height’属性を追加する
  • Allow users to override ‘height’ attribute in [browser-shot] shortcode

1.0

  • Initial public release to the WordPress plugin repository