這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

iG:Twitter Cards

外掛說明

iG:Twitter Cards enables Twitter Cards on your WordPress website to present your website in an extra useful and stylish way when anyone shares your website URLs on Twitter, be it Twitter website or Twitter mobile app.

At present only summary and player cards are supported. Support for other cards will be added in future. You can validate your website’s Twitter Cards using official Twitter Cards Validator.

This plugin allows complete customization of Twitter Cards meta tags before output via filters. If you have custom post types and you wish to have Twitter Cards enabled for them too then this plugin allows you to do that using filters to add/remove post types on which Twitter Cards are enabled.

This plugin has been written with WordPress.com VIP compliance in mind, so you can use it as is even if you host your website with WordPress.com VIP.

Requirements: This plugin requires PHP 5.3 or better and is supported on WordPress 3.4 or better. It might work on a lower version of PHP or WordPress but no support would be provided for those platforms.

Pull requests on Github are welcome.

Github: https://github.com/coolamit/ig-twitter-cards

WordPress.org plugin repo: https://plugins.svn.wordpress.org/ig-twitter-cards/

Plugin Usage

Using this plugin is fairly easy. Set the options by going to Settings > iG:Twitter Cards in your wp-admin. If you select to customize cards when creating/editing a post or page then a metabox would be available when you create/edit a post or page. There you can tweak the card by selecting card type, adding/changing Twitter username of author, etc.

螢幕擷圖

  • Settings page of the plugin where global options can be set for plugin
  • Metabox on the post/page add/edit screen which allows fine control over each post and page

安裝方式

Installing The Plugin

Extract all files from the zip file and then upload it to /wp-content/plugins/. Make sure to keep the file/folder structure intact.

Go to WordPress admin section, click on “Plugins” in the menu bar and then click “Activate” link under “iG:Twitter Cards”.

See Also: “Installing Plugins” article on the WP Codex

常見問題集

I selected Player card for a post/page and entered the player URL but video does not play. What is wrong?

Twitter needs your player URL to be served over SSL, so your URL must start with https:// and not http://.

I see some code that I can improve. Do you accept pull requests?

By all means, feel free to submit a pull request.

I want XYZ feature. Can you implement it?

Please feel free to suggest a new feature. Its inclusion might be speedier if you can provide the code to make it work.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈iG:Twitter Cards〉的開發相關工作。

參與者

將〈iG:Twitter Cards〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

v1.3

  • removed video aspect ratio calculation in card options UI on post screen
  • added aspect ratio calculation helper text for video height in card options UI on post screen

v1.2

  • added data escaping to admin UI elements

v1.1

  • Updated labels for admin UI elements
  • Added ig_twitter_cards_post_mb_ui & ig_twitter_cards_post_mb_data hooks to extend card options UI on post screen in wp-admin
  • Added aspect ratio calculation for video in card options UI on post screen in wp-admin

v1.0

  • Initial release with support for Summary and Player cards