定制 nabeghe/wp-shortcodes 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nabeghe/wp-shortcodes

最新稳定版本:v1.0.2

Composer 安装命令:

composer require nabeghe/wp-shortcodes

包简介

A standalone version of WordPress shortcodes system for use outside WordPress.

README 文档

README

The standalone version of WordPress shortcodes system for use outside of WordPress.

Notice: The kses-related parts have been removed from the shortcode system and are currently not supported.

🫡 Usage

🚀 Installation

You can install the package via composer:

composer require nabeghe/wp-shortcodes

Example

use Nabeghe\WPShortcodes\Shortcodes;

$shortcodes = new Shortcodes();
$shortcodes->add('hash', function ($atts, $content = null) {
    $atts['algo'] ??= 'md5';
    return hash($atts['algo'], $content);
});

$result = $shortcodes->do('
MD5 = [hash algo="md5"]https://github.com/nabeghe/wp-shortcodes[/hash]
SJA256 = [hash algo="sha256"]https://github.com/nabeghe/wp-shortcodes[/hash]
');
echo $result;

📖 License

Copyright (c) 2024 Hadi Akbarzadeh

Licensed under the GPL-2.0+ license, see LICENSE.md for details.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2024-09-22