[WordPress] 外掛分享: Press This

首頁外掛目錄 › Press This
WordPress 外掛 Press This 的封面圖片
6,000+
安裝啟用
★★★☆☆
3.7/5 分(25 則評價)
37 天前
最後更新
100%
問題解決
WordPress 6.9+ PHP 7.4+ v2.0.2 上架:2014-06-03

內容簡介

Press This 是一款輕量級工具,讓使用者能輕鬆從網頁抓取內容並創建新文章。它支援選擇頁面中的圖片或影片,並將其用於文章中,提供快速的網頁內容分享方式。

【主要功能】
• Gutenberg 區塊編輯器整合
• 智能文章格式建議
• 增強內容擷取功能
• 客戶端擷取以增強隱私
• 支援特色圖片設定
• 改進的媒體網格顯示

外掛標籤

開發者團隊

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

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

原文外掛簡介

Press This is a little tool that lets you grab bits of the web and create new posts with ease.
It will even allow you to choose from images or videos included on the page and use them in your post.
Use Press This as a quick and lightweight way to highlight another page on the web.
Version 2.0 – Gutenberg Block Editor
Press This 2.0 brings the modern WordPress block editor experience to the bookmarklet popup. You can now compose posts using familiar blocks like Paragraph, Heading, Image, Quote, List, and Embed.
New Features:

Gutenberg Block Editor – Full block editor integration for a consistent WordPress editing experience
Smart Post Format Suggestions – Automatically suggests Video, Quote, or Link formats based on content
Enhanced Content Extraction – Improved scraping with JSON-LD structured data support
Client-Side Only Scraping – All content extraction happens in your browser for better privacy and security
Featured Image Support – Set any scraped image as your post’s featured image
Improved Media Grid – Better thumbnail display with support for video and audio embeds

Filters for Developers
Press This 2.0 includes new filters for customization:

press_this_allowed_blocks – Customize which blocks are available in the editor
press_this_post_format_suggestion – Modify the auto-suggested post format

See the Developer Documentation section below for details.
Contributing
Bugs and PRs can be submitted via https://github.com/WordPress/press-this .
Developer Documentation
New Hooks and Filters in 2.0
press_this_allowed_blocks
Customize which blocks are available in the Press This editor.
add_filter( 'press_this_allowed_blocks', function( $blocks ) {
// Add the gallery block
$blocks[] = 'core/gallery';

// Remove the embed block
$blocks = array_filter( $blocks, function( $block ) {
return $block !== 'core/embed';
} );

return $blocks;
} );

Default blocks: core/paragraph, core/heading, core/image, core/quote, core/list, core/list-item, core/embed
press_this_post_format_suggestion
Modify or override the auto-suggested post format based on content.
add_filter( 'press_this_post_format_suggestion', function( $suggested_format, $data ) {
// If the URL contains 'podcast', suggest audio format
if ( ! empty( $data['u'] ) && strpos( $data['u'], 'podcast' ) !== false ) {
return 'audio';
}

return $suggested_format;
}, 10, 2 );

The $data array contains scraped content including:
– u – Source URL
– s – Selected text
– t – Page title
– _images – Array of image URLs
– _embeds – Array of embed URLs
– _meta – Meta tag data
– _jsonld – JSON-LD structured data
Preserved Hooks from 1.x
All existing hooks continue to work:

press_this_redirect_in_parent – Control post-save redirect behavior
press_this_save_post – Filter post data before saving
press_this_save_redirect – Filter redirect URL after save
enable_press_this_media_discovery – Toggle media scraping
press_this_data – Filter the complete scraped data array
press_this_suggested_html – Filter default content templates
shortcut_link – Customize the bookmarklet URL

History
WordPress, from the earliest days, included some way to bring in snippets from other websites for you to post on your own.
The original “Press It” was removed from WordPress 2.5 and a new “Press This” added in 2.6. It existed pretty much unchanged until WordPress 4.2, which completely refreshed Press This.
In WordPress 4.9, Press This was spun out to a “canonical plugin” — an official plugin from WordPress.org so sites who wanted to use it could, but streamline more niche functionality out of Core. This was previously done with the Importers.
In version 2.0, Press This was modernized to use the Gutenberg block editor, bringing it in line with the modern WordPress editing experience while maintaining backward compatibility with existing installations.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon