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

SVG Enabler

描述

This plugin gives you the ability to allow SVG uploads whilst making sure that they’re sanitized to stop SVG/XML vulnerabilities affecting your site.

安裝

INSTALL “SVG Enabler” FROM WITHIN WORDPRESS

  1. Visit the plugins page within your dashboard and select ‘Add New’;
  2. Search for ‘SVG Enabler’;
  3. Activate SVG Enabler from your Plugins page;
  4. Go to ‘after activation’ below.

INSTALL “SVG Enabler” MANUALLY

  1. Upload the ‘svg-enabler’ folder to the /wp-content/plugins/ directory;
  2. Activate the SVG Enabler through the ‘Plugins’ menu in WordPress;
  3. Go to ‘after activation’ below.

AFTER ACTIVATION

  1. SVG Enabler is a ‘set and forget’ plugin. There are no settings fields as your site’s scheduled posts will be automatically checked when the plugin is installed and activated.
  2. You’re done!

常見問題

Can we change the allowed attributes and tags?

Yes, this can be done using the svg_allowed_attributes and svg_allowed_tags filters. They take one argument that must be returned.

    add_filter( 'optimisthub_svg_enabler_allowed_attributes', function ( $attributes ) 
    {
        $attributes[] = 'target'; // This would allow the target="" attribute.
        return $attributes;

    } );


    add_filter( 'optimisthub_svg_enabler_allowed_tags', function ( $tags ) 
    {

        $tags[] = 'use'; // This would allow the <use> element.

        return $tags;
    } );

評價

There are no reviews for this plugin.

貢獻者及開發者

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

貢獻者

將 SVG Enabler 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

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

修改日誌

1.0.3

  • Author name issue.

1.0.2 – 1.0.1

  • Github Action

1.0.0

  • Stable version released