內容簡介
這個外掛可以用來列出地點。它會新增一個自訂文章類型作為地點,在管理員面板中可以進行操作。這些地點可以顯示在地圖和表格上。此外,可以添加一個搜尋欄位,讓使用者可以搜尋相關地點。
通過短碼可以將功能新增到頁面或文章中:
[smooth-location-map]
[smooth-location-search]
[smooth-location-table]
可以通過向短碼傳遞屬性來配置設置,例如:
[smooth-location-map width=”500px” height=”300px” …更多屬性]
沒有必要要全部填寫,下列屬性可供選擇:
width:預設為「500px」
height:預設為「300px」
center:預設為「37.752530,-122.447777」
geolocation:預設為「false」
maptype:預設為「HYBRID」
zoom:預設為7
icon_url:不同圖示圖片的 URL
shadow_url:不同圓點陰影的 URL
如果需要,可以通過 do_action() 調用與短碼相同的名稱來使用相同的功能。
此外,如果必要,還提供了以下過濾器來修改 HTML 輸出:
smooth_location_map_filter
smooth_location_search_filter
smooth_location_table_filter
外掛標籤
開發者團隊
原文外掛簡介
This plugin can be used to list locations. It adds a custom post type for locations, which can be manipulated via the admin panel. The locations can be displayed on a map and in a table. In addition, a search field can be added that allows users to search for relevant locations.
The functionality is added to a page or post via shortcodes:
[smooth-location-map]
[smooth-location-search]
[smooth-location-table]
The settings can be configured by passing attributes to the shortcodes, like so:
[smooth-location-map width=”500px” height=”300px” …more attributes]
None of the attributes are required. The following attributes are available:
width: defaults to “500px”
height: defaults to “300px”
center: defaults to “37.752530,-122.447777”
geolocation: defaults to “false”
maptype: defaults to “HYBRID”
zoom: defaults to 7
icon_url: url for different icon image
shadow_url: url for shadow of different icon image
The same functionality is available via do_action() calls with the same name as the shortcode.
In addition, the following filters are available to modify the HTML output, if necessary:
smooth_location_map_filter
smooth_location_search_filter
smooth_location_table_filter
