开发者 |
enshrined
10up jeffpaul |
---|---|
更新时间 | 2024年12月6日 00:58 |
PHP版本: | 6.5 及以上 |
WordPress版本: | 6.7 |
版权: | GPL-2.0-or-later |
版权网址: | 版权信息 |
add_filter( 'safe_svg_optimizer_enabled', '__return_true' );
/wp-content/plugins/
directoryYes, this can be done using the svg_allowed_attributes
and svg_allowed_tags
filters.
They take one argument that must be returned. See below for examples:
add_filter( 'svg_allowed_attributes', function ( $attributes ) {
// Do what you want here...
// This should return an array so add your attributes to
// to the $attributes array before returning it. E.G.
$attributes[] = 'target'; // This would allow the target="" attribute.
return $attributes;
} );
add_filter( 'svg_allowed_tags', function ( $tags ) {
// Do what you want here...
// This should return an array so add your tags to
// to the $tags array before returning it. E.G.
$tags[] = 'use'; // This would allow the element.
return $tags;
} );
get_svg_dimensions
function in order to reduce code duplication (props @gabriel-glo, @jeremymoore, @darylldoyle, @iamdharmesh, @dkotter via #216).enshrined/svg-sanitize
package from 0.16.0 to 0.19.0 to fix a PHP 8.3 compatibility issue (props @sksaju, @TylerB24890, @darylldoyle, @rolf-yoast, @faisal-alvi via #214).get_image_tag_override
and one_pixel_fix
methods (props @gabriel-glo, @jeremymoore, @darylldoyle, @iamdharmesh, @dkotter via #216).webpack
from 5.90.1 to 5.94.0 (props @dependabot, @peterwilsoncc via #222).ws
from 7.5.10 to 8.18.0, serve-static
from 1.15.0 to 1.16.2 and express
from 4.19.2 to 4.21.0 (props @dependabot, @Sidsector9, @faisal-alvi via #227, #230, #234).wp_handle_sideload_prefilter
filter (props @dkotter, @xknown, @iamdharmesh via GHSA-3vr7-86pg-hf4g).braces
from 3.0.2 to 3.0.3, pac-resolver
from 7.0.0 to 7.0.1, socks
from 2.7.1 to 2.8.3, ws
from 7.5.9 to 7.5.10 and remove ip
(props @dependabot, @Sidsector9 via #206).axios
from 1.6.7 to 1.7.4 (props @dependabot, @faisal-alvi via #218).safe_svg_current_user_can_upload
, allowing more control over who can upload SVG files (props @dkotter, @iamdharmesh via #193).admin_post_thumbnail_html
filter with just two arguments (props @kmgalanakis, @dkotter, @liz1kiweno via #196).$image_meta
is not an array (props @faisal-alvi, @dkotter, @drazenbebic, @kirtangajjar via #203).download-artifact
from v3 to v4 (props @iamdharmesh, @jeffpaul via #181).lee-dohm/no-response
with actions/stale
to help with closing no-response/stale issues (props @jeffpaul, @dkotter via #183).webpack-dev-middleware
from 5.3.3 to 5.3.4 (props @dependabot, @dkotter via #185).express
from 4.18.2 to 4.19.2 (props @dependabot, @dkotter via #188).svg_dimensions
function to be more performant (props @sksaju, @cjyabraham, @bmarshall511, @Hercilio1, @darylldoyle via #154, #174).axios
from 0.25.0 to 1.6.2 and @wordpress/scripts
from 26.0.0 to 26.18.0 (props @dependabot, @ravinderk via #166).follow-redirects
from 1.15.3 to 1.15.6 and ip
from 1.1.8 to 1.1.9 (props @dependabot, @dkotter via #169, #177).theme.json
(props @tobeycodes, @dkotter via #161).apiVersion
3 for our SVG Icon block (props @fabiankaegy, @ravinderk, @jeffpaul, @dkotter via #133).fill-rule
attribute (props @zamanq, @jeffpaul, @iamdharmesh via #152).postcss
from 8.4.20 to 8.4.31 (props @dependabot, @faisal-alvi via #155).@cypress/request
from 2.88.12 to 3.0.1 and cypress
from 10.11.0 to 13.3.0 (props @dependabot, @ravinderk via #156).@babel/traverse
from 7.20.12 to 7.23.2 (props @dependabot, @iamdharmesh via #158).safe_svg_optimizer_enabled
filter (props @gsarig, @peterwilsoncc, @Sidsector9, @darylldoyle, @faisal-alvi, @dkotter, @ravinderk via #79, #145).Active
to Stable
(props @Sidsector9, @iamdharmesh via #100).class_exists
check (props @szepeviktor, @iamdharmesh via #120).SimpleXML
exists before using it (props @sdmtt, @faisal-alvi via #140).semver
from 5.7.1 to 5.7.2 (props @dependabot via #134).word-wrap
from 1.2.3 to 1.2.5 (props @dependabot via #141).tough-cookie
from 4.1.2 to 4.1.3 and @cypress/request
from 2.88.10 to 2.88.12 (props @dependabot via #146).
View historical changelog details here.