這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Raw HTML Snippets

描述

Create a library of raw HTML snippets that you can easily insert into any page/post content using a shortcode:

[raw_html_snippet id=”my-snippet”]

Snippets consist of a unique ID (e.g. “my-snippet”) and raw HTML code. This plugin was written to stop using hacks that override WordPress’ core content filters and affect shortcode output.

This plugin will NOT taint your content or the output of other shortcodes. If you delete a snippet, any existing shortcodes with that snipet’s ID will output an empty string.

Remember, this allows you to output raw HTML. Use at your own risk. It will not check for malicious HTML/CSS/Javascript!

螢幕截圖

  • Plugin admin screen.
  • Editing a snippet
  • Inserting a snippet

安裝

  1. Download and unzip to the ‘wp-content/plugins/’ directory
  2. Activate the plugin.
  3. Use Settings > Raw HTML Snippets to add, edit and remove your snippets.
  4. Insert snippets at your will

常見問題

None.

評價

2023年10月5日
HTML, Styles, Javascript... Code als 'Snippet' speichern, Namen mit Bindestrichen vergeben, speichern und auf jedder Seite 'Snippet-Code' einfügen. Wow! It works! Ich musste eine Sicherheitswarnung von WP-Security oder Wordfence, nicht aufgepasst :)) als 'false positive' quittieren, Seite ein einziges mal neuladen, dann ist alles dauerhaft ok. Aber Vorsicht, dass der Code auch funzt. Entwickeln unbedingt außerhalb WP!10 Stars, if possible :))
2021年2月9日
It feels a little dangerous but sometimes you just want to do something quick and simple the html way without having to write a block or a plugin or a template and then frig around with ftp uploads. It's so simple to use if you know html that if you're not careful it could easily become a crutch to not do things the WordPress way but I think I can live with that.
2020年12月9日
This plugin is just great for table of content kind of snippets. I have been using it for some time and it's great.
2019年11月26日
This plugin does exactly what you think it does from the description. That said ... I went through about a dozen solutions to the problem and finally found this one. Would have saved me a couple hours had I found it first. 🙂
2016年9月3日
Saved us a lot of headaches! Worked perfectly in the newest version of wordpress. Thanks
閱讀全部10個評價

貢獻者及開發者

“Raw HTML Snippets” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Raw HTML Snippets 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

2.0

  • Moved RAW HTML Snippets management to Admin > Tools menu.
  • Added copy/paste support in list view.
  • Works with latest version of WP (5.6)
  • Minor code clean up for PHP 7.4

1.1.4

  • Works with latest version of WP (5.2)

1.1.3

  • Works with latest version of WP (4.1.1)

1.1.2

  • Fixed error where snippet id (slug) containing an ampersand (&) would break the plugin’s admin UI.

1.1.1

  • Updated some code for textarea direction attributes in admin panels (left to right)
  • Added isset() to avoid PHP errors / warnings

1.1

  • Fixed a bug that broke the ability to save when editing an existing snippet.

1.0

  • Released version 1.0