[WordPress] 外掛分享: WP Speech Contents

首頁外掛目錄 › WP Speech Contents
30+
安裝啟用
尚無評分
3110 天前
最後更新
問題解決
WordPress 4.8+ v0.3.2 上架:2017-09-12

內容簡介

這個外掛可以在網頁上顯示一個按鈕,用來朗讀網頁內容。
僅限單頁面使用。
必須使用支援 Web Speech API 的瀏覽器。

Web Speech API 瀏覽器相容性。

範例

可以使用過濾器鈎子調整顯示位置。

add_filter( 'wp-speech-contents_mode', function () {
return 'bottom'; // top 或 bottom
});

可以使用過濾器鈎子調整要朗讀的內容。

add_filter( 'wp-speech-contents_content', function ( $content ) {
$content = preg_replace('/\pS/u','',$content); // 刪除符號等等
$content = '朗讀開始!'.$content; // 先念出 "朗讀開始!"
return $content;
});

可以使用過濾器鈎子調整要朗讀的語言。

add_filter( 'wp-speech-contents_language', function ( ) {
return 'ja-JP';
});

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.3.2) 或搜尋安裝

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

原文外掛簡介

Displays a button to speech the content.
Single page only
Web Speech API compatible browser only
Web Speech API Browser compatibility.
Example
You can change the display position with a filter hook.
add_filter( 'wp-speech-contents_mode', function () {
return 'bottom'; // top or bottom
});

You can change the content to be read out with the filter hook.
add_filter( 'wp-speech-contents_content', function ( $content ) {
$content = preg_replace('/\pS/u','',$content); // Delete symbols etc.
$content = 'Speech starts!.'.$content; // First "Speech starts!"
return $content;
});

You can Setting the language to be read out with the filter hook.
add_filter( 'wp-speech-contents_language', function ( ) {
return 'ja-JP';
});

延伸相關外掛

文章
Filter
Apply Filters
Mastodon