前言介紹
- 這款 WordPress 外掛「Image Widget」是 2008-07-25 上架。
- 目前有 100000 個安裝啟用數。
- 上一次更新是 2024-11-20,距離現在已有 164 天。
- 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
- 有 288 人給過評分。
- 論壇上目前有 1 個提問,問題解答率 0%
外掛協作開發者
aguseo | vicskf | bordoni | borkweb | lucatume | zbtirrell | brianjessee | leahkoerper | neillmcshea | theeventscalendar |
外掛標籤
ad | image | banner | widget | sidebar |
內容簡介
Image Widget 是一個簡單的外掛程式,利用 WordPress 原生媒體管理員,為您的網站新增圖片小工具。
需要新增幻燈片、燈箱或隨機圖像嗎?
請查看 Image Widget Plus!
Image Widget 的功能
回應式
MU 相容
處理圖片變更大小及對齊
連結圖片
新增標題及描述
多功能 - 所有欄位都是可選的
上傳、連結至外部圖像或從您的媒體集選擇圖像
使用篩選器勾子或主題覆寫自訂外觀與樣式
更多功能與Image Widget Plus一同提供
可信任的品質
Image Widget由 The Events Calendar 開發和維護,他們也是The Events Calendar, Event Tickets以及全套精選的外掛程式開發團隊。
我們的團隊會積極支援這個外掛程式,另外也會接受社群成員的貢獻,如果您在論壇看見可以幫助的問題,或者有很好的主意可以編碼並提交補丁程式,這是很好的!
Image Widget Plus!
Image Widget Plus功能包括:
多圖像支援
隨機圖像
幻燈片
燈箱
立即查看Image Widget Plus!
Pull Requests &Translations
在GitHub上查看以獲得拉取更新的更改。
翻譯可以提交此處於 WordPress.org 上。
文件
內建的範本可以被置於您的樣本中的檔案覆寫。
預設與自訂範本
Image Widget附有用於小工具輸出的預設範本。如果您想要修改小工具顯示程式碼,請在您的樣板目錄中建立一個名為“image-widget”的新資料夾,並複製“views / widget.php”文件。
您可以隨心所欲地編輯新檔案。請不要編輯外掛程式資料夾中的文件,因為當您升級到最新版本時,這會導致衝突。
3.2新增: 現在您還可以使用“sp_template_image-widget_widget.php”篩選器來將.php模板檔的預設範本行為覆寫。例如:如果您想要widget.php留在名為my-custom-templates /的資料夾中,並想要它被稱為my-custom-name.php:
add_filter('sp_template_image-widget_widget.php', 'my_template_filter');
function my_template_filter($template) {
return get_template_directory() . '/my-custom-templates/my-custom-name.php';
}
篩選器
有許多篩選器可供在程式碼中覆寫數據。了解哪些篩選器是可用的最好的方法始終是通過簡單搜索代碼使用“apply_filters”。但是,這裡是一些更基本的篩選器:
widget_title
這實際上是小工具中的一個相當典型的篩選器,用於將篩選器套用於小工具標題。
widget_text
這是另一個非常典型的小工具篩選器,用於將篩選器套用於描述正文文字。此篩選器還接受
原文外掛簡介
Image Widget is a simple plugin that uses the native WordPress media manager to add image widgets to your site.
Image Widget Features
Responsive
MU Compatible
Handles image resizing and alignment
Link the image
Add title and description
Versatile – all fields are optional
Upload, link to external image, or select an image from your media collection
Customize the look & feel with filter hooks or theme overrides
Quality You Can Trust
Image Widget is developed and maintained by The Events Calendar, the same folks behind The Events Calendar, Event Tickets, and a full suite of premium plugins.
This plugin is actively supported by our team and contributions from community members. If you see a question in the forum you can help with or have a great idea and want to code it up or submit a patch, that would be awesome! Not only will we shower you with praise and thanks, it’s also a good way to get to know us and lead into options for paid work if you freelance.
Pull Requests & Translations
Check us out on GitHub to pull request changes.
Translations can be submitted here on WordPress.org.
Documentation
The built in template can be overridden by files within your template.
Default vs. Custom Templates
The Image Widget comes with a default template for the widget output. If you would like to alter the widget display code, create a new folder called “image-widget” in your template directory and copy over the “views/widget.php” file.
Edit the new file to your hearts content. Please do not edit the one in the plugin folder as that will cause conflicts when you update the plugin to the latest release.
New in 3.2: You may now also use the “sp_template_image-widget_widget.php” filter to override the default template behavior for .php template files. Eg: if you wanted widget.php to reside in a folder called my-custom-templates/ and wanted it to be called my-custom-name.php:
add_filter('sp_template_image-widget_widget.php', 'my_template_filter');
function my_template_filter($template) {
return get_template_directory() . '/my-custom-templates/my-custom-name.php';
}
Filters
There are a number of filters in the code that will allow you to override data as you see fit. The best way to learn what filters are available is always by simply searching the code for ‘apply_filters’. But all the same, here are a few of the more essential filters:
widget_title
This is actually a pretty typical filter in widgets and is applied to the widget title.
widget_text
Another very typical widget filter that is applied to the description body text. This filter also takes 2 additional arguments for $args and $instance so that you can learn more about the specific widget instance in the process of filtering the content.
image_widget_image_attachment_id
Filters the attachment id of the image.
Accepts additional $args and $instance arguments.
image_widget_image_url
Filters the url of the image displayed in the widget.
Accepts additional $args and $instance arguments.
THIS IS DEPRECATED AND WILL EVENTUALLY BE DELETED
image_widget_image_width
Filters the display width of the image.
Accepts additional $args and $instance arguments.
image_widget_image_height
Filters the display height of the image.
Accepts additional $args and $instance arguments.
image_widget_image_maxwidth
Filters the inline max-width style of the image. Hint: override this to use this in responsive designs 🙂
Accepts additional $args and $instance arguments.
Return null to remove this css from the image output (defaults to ‘100%’).
image_widget_image_maxheight
Filters the inline max-height style of the image.
Accepts additional $args and $instance arguments.
Return null to remove this css from the image output (defaults to null)
image_widget_image_size
Filters the selected image ‘size’ corresponding to WordPress registered sizes.
If this is set to ‘tribe_image_widget_custom’ then the width and height are used instead.
Accepts additional $args and $instance arguments.
image_widget_image_align
Filters the display alignment of the image.
Accepts additional $args and $instance arguments.
image_widget_image_alt
Filters the alt text of the image.
Accepts additional $args and $instance arguments.
image_widget_image_link
Filters the url that the image links to.
Accepts additional $args and $instance arguments.
image_widget_image_link_target
Filters the link target of the image link.
Accepts additional $args and $instance arguments.
image_widget_image_attributes
Filters a list of image attributes used in the image output. Similar to ‘wp_get_attachment_image_attributes’
Accepts $instance arguments
image_widget_link_attributes
Filters a list of attributes used in the image link. Similar to ‘wp_get_attachment_image_attributes’
Accepts $instance arguments
Have You Supported the Image Widget?
If so, then THANK YOU! Also, feel free to add this line to your wp-config.php file to prevent the image widget from displaying a message after upgrades.
define( ‘I_HAVE_SUPPORTED_THE_IMAGE_WIDGET’, true );
For more info on the philosophy here, check out our blog post
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Image Widget」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 2.0 | 2.1 | 2.2 | 3.0 | 3.1 | 3.2 | 3.3 | 4.0 | 4.1 | 4.2 | 4.3 | 4.4 | 2.2.1 | 2.2.2 | 3.0.1 | 3.0.2 | 3.0.3 | 3.0.4 | 3.0.5 | 3.0.6 | 3.0.7 | 3.0.8 | 3.0.9 | 3.1.1 | 3.1.2 | 3.1.3 | 3.1.4 | 3.1.5 | 3.1.6 | 3.2.1 | 3.2.2 | 3.2.3 | 3.2.4 | 3.2.5 | 3.2.7 | 3.2.8 | 3.2.9 | 3.3.1 | 3.3.2 | 3.3.3 | 3.3.4 | 3.3.5 | 3.3.6 | 3.3.7 | 4.0.1 | 4.0.2 | 4.0.3 | 4.0.4 | 4.0.5 | 4.0.6 | 4.0.7 | 4.0.8 | 4.0.9 | 4.1.1 | 4.1.2 | 4.2.1 | 4.2.2 | 4.3.1 | 4.4.1 | 4.4.2 | 4.4.3 | 4.4.4 | 4.4.5 | 4.4.6 | 4.4.7 | 4.4.8 | 4.4.9 | trunk | 3.2.10 | 3.2.11 | 4.4.11 |
延伸相關外掛(你可能也想知道)
Widgets for Google Reviews 》onal version of our review software, you can:, , , Display unlimited Google Reviews, Customize widget design and behavior, Respond to reviews direc...。
Blocksy Companion 》Blocksy Companion 是一個外掛,將 Blocksy 主題轉化為強大的瑞士軍刀工具。, 只有在安裝並啟用 Blocksy 主題時,它才會運行並添加增強功能。, 最小需求, , W...。
Black Studio TinyMCE Widget 》此外掛添加了一個新的 Visual Editor 小工具類型,讓您能夠在側邊欄中輕鬆地插入豐富的文字和媒體對象。使用 Black Studio TinyMCE Widget 時,您將能夠使用W...。
Widget Importer & Exporter 》Widget Importer & Exporter 是一個有用的外掛,可將小工具從一個WordPress站點移動到另一個站點,備份小工具,並供主題開發人員為用戶提供範例小工具。...。
Orbit Fox by ThemeIsle 》透過Orbit Fox,您可以使用各種模組擴充您的主題功能,例如社交媒體分享按鈕和圖示、自訂選單圖示、頁首和頁尾腳本、一鍵導入頁面模板、頁面建構器附加元件和...。
Recent Posts Widget With Thumbnails 》列出最新的文章標題、縮略圖、摘要、作者、類別、日期等等!, 雖然此外掛僅建立在小工具區域,但使用者報告說它在 Elementor 和 Oxygen 上運作順暢。但它是否...。
WordPress Popular Posts 》WordPress Popular Posts 是一個高度可定製的小工具,可以顯示您最受歡迎的文章。, 主要特點, , 多小工具功能 – 您可以在您的博客上擁有多個 WordPress...。
Widget Logic 》此外掛可在每個小工具中新增一個名為 "Widget logic" 的額外控制欄,讓您控制這個小工具會出現在哪些頁面上。文字欄位允許您使用 WP 的Conditional Tags或任...。
Social Media Share Buttons & Social Sharing Icons 》在你的免費測試網站上試試看:點擊此處 => https://tastewp.com/plugins/ultimate-social-media-icons, (這個技巧適用於所有外掛 – 只需在外掛的 WP 存儲庫 ...。
Fixed Widget and Sticky Elements for WordPress 》使用 Fixed Widget 外掛可以創建黏貼式的小部件、區塊和其他元素,當用戶向上或向下滾動頁面時,它們會保持在可見的屏幕區域內。, 相較於非固定小工具,黏貼...。
PHP Code Widget 》普通的文字小工具允許您插入任意文字和/或 HTML 代碼。這個外掛程式也允許這樣做,但還會解析文本小工具中的任何 PHP 代碼並執行它。, 這可以讓您更輕鬆地遷...。
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager 》使用 Custom Sidebars,一個靈活的小工具管理器,在您的網站上管理和替換側邊欄和其他小工具區。, 製作自訂側邊欄配置,能夠選擇在您網站的每個頁面或文章上...。
Recent Posts Widget Extended 》外掛描述, 此外掛可以啟用自定義、靈活且進階的最新文章功能,您可以透過簡碼或小工具來顯示它。您可以顯示具有縮略圖、摘要和發佈日期的最新文章清單,並且...。
Widget Shortcode 》這個短碼需要小工具的ID,但不需要猜測,外掛會為你生成代碼。如果你想要覆蓋小工具的標題,你可以使用 "title" 參數:, [widget id=”text-1″...。
amr shortcode any widget 》使用shortcode將小工具或多個小工具或整個小工具區域(側邊欄)插入到頁面中。, 首先在正常的側邊欄中設置小工具。 檢查它是否正常運作。, 然後將所選小工具...。