[WordPress] 外掛分享: Simple Blog Card

首頁外掛目錄 › Simple Blog Card
3,000+
安裝啟用
★★★★★
5/5 分(3 則評價)
41 天前
最後更新
100%
問題解決
WordPress 6.6+ PHP 8.0+ v2.38 上架:2019-11-11

內容簡介

部落格卡片

使用快捷方式產生
使用區塊產生
可指定描述中顯示的字元數量。
顯示 ogp 圖像。
可以指定顯示的 ogp 圖像大小。
可以更改標題和描述。

如何運作

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.38) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Simple Blog Card」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Blog card

Generated with shortcode
Generated with block
Can specify the number of characters displayed in the description.
Displays an ogp image.
Can specify the size of the displayed ogp image.
Can change the title and description.

Warning
A redirect loop occurs when all three of the following factors are met:
* When two sites with different domains embed “Simple Blog Card” for each other on their top pages.
* When two sites with different domains are on the same server (same IP address).
* When the ”Simple Blog Card” caches of two sites on different domains are empty.
How it works

Customize

Template files allow for flexible customization.
The default template file is template/simpleblogcard-template.php. Using this as a reference, you can specify a separate template file using the filters below.

/** ==================================================
* Filter for template file.
*
*/
add_filter(
'simple_blog_card_generate_template_file',
function () {
$wp_uploads = wp_upload_dir();
$upload_dir = wp_normalize_path( $wp_uploads['basedir'] );
$upload_dir = untrailingslashit( $upload_dir );
return $upload_dir . '/tmp/simpleblogcard-template.php';
},
10,
1
);

CSS files can be set separately. Please see the filters below.

/** ==================================================
* Filter for CSS file.
*
*/
add_filter(
'simple_blog_card_css_url',
function () {
$wp_uploads = wp_upload_dir();
$upload_url = $wp_uploads['baseurl'];
if ( is_ssl() ) {
$upload_url = str_replace( 'http:', 'https:', $upload_url );
}
$upload_url = untrailingslashit( $upload_url );
return $upload_url . '/tmp/simpleblogcard.css';
},
10,
1
);

延伸相關外掛

文章
Filter
Apply Filters
Mastodon