cloudyne / cloudyne-extras
一个具有多项附加功能的wordpress插件
1.1.8
2023-06-07 11:18 UTC
Requires
- php: >=8.0
- enshrined/svg-sanitize: ^0.16
- oscarotero/env: ^2.1
- phpmailer/phpmailer: ^6.8
- squizlabs/php_codesniffer: ^3.3.1
Requires (Dev)
- wp-coding-standards/wpcs: 2.1.*
README
Cloudyne托管上Wordpress的附加功能
归属
bz-projects/Easy-SVG images-to-webp by KubiQ
功能
SVG支持
为WordPress添加SVG清理和支持。允许您上传SVG图像到媒体库并在您的帖子页面中使用它们。
WebP支持/转换
允许您将现有图像转换为WebP格式。 这需要在Web服务器端进行额外配置。 转换将保存图像为*.webp,例如image.png.webp为image.png。这允许您在HTML中使用相同的图像名称和路径,如果存在WebP版本,则Web服务器将自动提供。
以下是配置某些Web服务器的基本示例。
# Nginx Configuration
location ~* \.(?:ico|gif|jpe?g|png)$ {
expires 30d;
add_header Vary Accept;
try_files $uri.webp $uri =404;
}
# Nginx Unit Route Example
...
{
"match": {
"uri": [
"*.jpg",
"*.jpeg",
"*.gif",
"*.png"
]
},
"action": {
"share": [
"/app/web$uri.webp",
"/app/web$uri"
],
"fallback": {
"pass": "applications/...."
}
}
}
...
# Apache Configuration example
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1]
...
通过环境变量配置SMTP
此插件允许您根据环境配置SMTP设置。这对于您有客户应该限制从特定电子邮件地址发送电子邮件时非常有用。
# SMTP Host to send email SMTP_HOST='smtp.gmail.com' # The port to use SMTP_PORT=25 # Authentication settings SMTP_AUTH=True SMTP_USER='someuser@test.com' SMTP_PASS='abcdefgh' # Security Settings SMTP_SECURE=False SMTP_AUTOTLS=False SMTP_STARTTLS=False # Provide a default sender name and email SMTP_FROM='default@mail.com' SMTP_FROM_NAME='From Name' # Restrict the user changing email settings to only allow certain domains and/or emails to use as sender SMTP_ALLOWONLY_DOMAINS='domain.com,domain2.com,domain3.com' SMTP_ALLOWONLY_EMAILS='mail1@user.com,mail2@user.com' # Force the site to only use the specified email and sender name SMTP_FORCE_FROM='forced@mail.com' SMTP_FORCE_FROM_NAME='ForcedFromName'
标题、主体和页脚代码
将附加代码插入站点的头部标签中。这对于添加跟踪代码,例如Google分析非常有用。