
內容簡介
- 將您的 WordPress 照片目錄相片添加到您的網站作為畫廊。
- 包含一個顯示您照片的縮略碼。可以添加以下屬性:
- 使用者名稱:wordpress.org 使用者名稱(必填)
- 數量:要顯示的照片數量,範圍從1至100,默认為12張
- 比例:圖片的比例,選項包括“方形”,“橫向”,“縱向”
- 尺寸:從目錄中選擇的照片畫廊大小,選項包括“中等”,“大型”,“縮略圖”,“中大”,“1536×1536”,“2048×2048”,“完整”
- WordPress 照片目錄
- 這個外掛使用由 WordPress 照片目錄免費提供的 REST API 來根據使用者名稱確定作者 ID,並加載對應的照片列表。您也可以在 https://wordpress.org/photos 上訪問這個目錄。
- 所有照片均為 CC0 授權。沒有保留任何權利,因此您可以在任何地方自由使用這些照片,無需歸屬。
- 了解更多信息,請訪問 https://wordpress.org/photos/faq/
問題與答案:
1. 如何將 WordPress 照片目錄的照片添加到我的網站畫廊中?
- 您可以使用這個外掛來將您的 WordPress 照片目錄相片添加到您的網站畫廊中。
2. 這個外掛提供了哪些縮略碼屬性?
- 這個外掛提供了以下縮略碼屬性:
- 使用者名稱:必填的 wordpress.org 使用者名稱。
- 數量:要顯示的照片數量,範圍從1至100,預設為12張。
- 比例:圖片的比例選項,包括“方形”,“橫向”,“縱向”。
- 尺寸:從目錄中選擇的照片畫廊大小,包括“中等”,“大型”,“縮略圖”,“中大”,“1536×1536”,“2048×2048”,“完整”。
3. 這個外掛使用了什麼來源來加載照片?
- 這個外掛使用由 WordPress 照片目錄免費提供的 REST API 來確定作者 ID 並加載對應的照片列表。
4. 我可以在哪裡找到該照片目錄?
- 您可以在 https://wordpress.org/photos 上訪問這個目錄。
5. 照片的使用限制是什麼?
- 所有照片均為 CC0 授權,沒有保留任何權利,所以您可以在任何地方自由使用這些照片,無需歸屬。
外掛標籤
開發者團隊
原文外掛簡介
My WP Photos lets you display WordPress Photo Directory images on your site using either:
– the [wp_photo_directory] shortcode, or
– the WP Photos Gallery block in the block editor.
Both the shortcode and block support the same settings:
– username: wordpress.org username (required unless set as plugin default)
– count: number of photos to display (any positive number)
– columns: number of columns (1-6)
– aspect: image aspect ratio. options: square, landscape, portrait
– size: photo size from the directory. options: medium, large, thumbnail, medium_large, 1536x1536, 2048x2048, full
– random: set to true to randomize photo selection (not only most recent photos)
– show_caption: set to true to show each image caption/content below the image
– show_exif: set to true to show camera EXIF metadata below each image
Example shortcode:
[wp_photo_directory username=”mdburnette” count=”24″ columns=”4″ aspect=”landscape” size=”large” random=”true” show_caption=”true” show_exif=”true”]
Default Settings
Admins can configure plugin defaults at Settings > My WP Photos. These defaults are used when shortcode/block attributes are not explicitly provided.
Editors can override any default at the shortcode or block level.
WordPress Photo Directory
This plugin uses the REST API provided by the WordPress Photo Directory to determine the author ID from the username and load the corresponding photo list. The directory can also be visited at https://wordpress.org/photos.
All photos are CC0 licensed. No rights are reserved, so you are free to use the photos anywhere, for any purpose, without the need for attribution.
Learn more at https://wordpress.org/photos/faq/
Accessibility and Performance
Uses semantic list markup for gallery items.
Includes alt text fallbacks, lazy loading, and async image decoding.
Caches author lookups and photo API responses with transients.
Supports paginated requests so larger count values can exceed 100 photos.
Includes responsive column scaling so configured columns reduce on smaller screens.
Internationalization
Includes Text Domain and Domain Path metadata.
Includes a translation template at languages/my-wp-photos.pot.
