定制 fairpm/did-manager-wordpress 二次开发

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

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

fairpm/did-manager-wordpress

最新稳定版本:0.0.4

Composer 安装命令:

composer require fairpm/did-manager-wordpress

包简介

WordPress integration layer for FAIR DID management and metadata generation

README 文档

README

fairpm/did-manager-wordpress contains the WordPress-specific layer that was extracted from the core fairpm/did-manager package. It provides WordPress header parsing, readme.txt parsing, FAIR metadata generation, and a small adapter around the core DID manager for package-aware workflows.

Features

  • Parse WordPress plugin headers and discover the main plugin file
  • Parse WordPress.org-style readme.txt files outside of a WordPress runtime
  • Generate FAIR metadata arrays and metadata.json files for plugins and themes
  • Detect whether a package path is a plugin or theme
  • Inject Plugin ID or Theme ID values after a DID is created
  • Compose the core FAIR\\DID\\DIDManager instead of duplicating DID logic

Installation

composer require fairpm/did-manager-wordpress

For repository development:

git clone https://github.com/fairpm/did-manager-wordpress.git
cd did-manager-wordpress
composer install

Usage

<?php

require_once 'vendor/autoload.php';

use FAIR\DID\DIDManager;
use FAIR\DID\PLC\PlcClient;
use FAIR\DID\Storage\KeyStore;
use FAIR\WordPress\DID\Parsers\MetadataGenerator;
use FAIR\WordPress\DID\WordPressDIDManager;

$core = new DIDManager(
	new KeyStore(__DIR__ . '/keys.json'),
	new PlcClient(),
);

$wordpress = new WordPressDIDManager($core);
$result = $wordpress->create_package_did(__DIR__ . '/my-plugin', 'my-plugin.example.com', null, true);
$metadata = $wordpress->generate_metadata(__DIR__ . '/my-plugin', did: $result['did']);

Namespaces

  • FAIR\\WordPress\\DID\\Parsers for header, readme, and metadata helpers
  • FAIR\\WordPress\\DID for package-aware orchestration around the core DID manager

Examples

See examples:

  • 01-parse-plugin-headers.php
  • 02-generate-metadata.php

Testing

composer tests
composer lint
composer analyze

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-03-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固