goblindegook / shorthand
一个WordPress短代码包,从我的网站到您的网站。
Requires
- php: >=5.3.0
- composer/installers: ~1.0
Requires (Dev)
- wp-coding-standards/wpcs: dev-master
This package is not auto-updated.
Last update: 2024-09-14 17:00:55 UTC
README
为我的网站开发的短代码集合,现在公开提供。支持 Shortcake,因为老实说,谁不喜欢蛋糕呢?
安装
此插件(尚未?)在存储库中不可用,建议使用 Composer 安装。
$ composer require goblindegook/shorthand
如果您想了解更多关于在WordPress中使用Composer的信息,请访问 Roots项目网站上的简介。
短代码
引用
使用 pull-quote
和 pull-quote--<center|left|right>
类渲染侧边引用块。与Shortcake集成。
用法: [pull-quote align="<center|left|right>"]内容[/pull-quote]
小写字母
使用 small-caps
类渲染内联元素。
用法: [small-caps]内容[/small-caps]
下划线
使用 underline
类渲染内联元素。
用法: [u]内容[/u]
钩子
过滤器: shorthand_scripts
允许插件和主题开发者过滤或关闭Shorthand捆绑的脚本。
最快速的方法是在 init
步骤调用 add_filter( 'shorthand_scripts', '__return_empty_array' );
来完全禁用它们。
开发者需要自己排队替换脚本,用于前端以及Shortcake的实时预览。
参数
$scripts
: (array) 脚本URL作为 (handle, URL) 对。
$tag
: (string) 短代码标签名。
过滤器: shorthand_styles
允许插件和主题开发者过滤或关闭Shorthand捆绑的样式表。
最快速的方法是在 init
步骤调用 add_filter( 'shorthand_styles', '__return_empty_array' );
来完全禁用它们。
开发者需要自己排队替换样式,用于前端以及Shortcake的实时预览。
参数
$styles
: (array) 样式表URL作为 (handle, URL) 对。
$tag
: (string) 短代码标签名。
过滤器: shorthand_shortcode
允许插件和主题开发者过滤短代码的输出。
参数
$output
: (string) 要过滤的短代码输出。
$atts
: (array) 短代码属性。
$content
: (string) 原始内部内容(用于关闭短代码)。
$tag
: (string) 短代码标签。