yard/brave-components 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

yard/brave-components

最新稳定版本:v1.0.9

Composer 安装命令:

composer require yard/brave-components

包简介

Collection of logic-heavy components used in Brave projects.

README 文档

README

Code Style PHPStan Tests Code Coverage Badge Lines of Code Badge

Collection of logic-heavy components used in Brave projects.

Requirements

Installation

To install this package using Composer, follow these steps:

  1. Install this package with Composer:

    composer require yard/brave-components
  2. Run the Acorn WP-CLI command to discover this package:

    wp acorn package:discover

You can publish the config file with:

wp acorn vendor:publish --provider="Yard\Brave\ComponentsServiceProvider"

To only publish the views, run:

wp acorn vendor:publish --provider="Yard\Brave\ComponentsServiceProvider" --tag="views"

Components

Back Button

Shows a back button that determines its link and text by checking the parent page. If the post has no parent, it sets the link to a predefined parent page slug or defaults to "javascript:history.back();".

Usage:

<x-brave-back-button /> 
<x-brave-back-button text="Terug naar het vacature-overzicht" />
<x-brave-back-button className="custom-class" />

Pattern Content

Shows the content of a pattern by its slug. You can find the slug (post name) using the wp post get CLI command and providing the post ID.

Usage:

<x-brave-pattern-content slug="footer" />
<x-brave-pattern-content slug="single-vacancy-contact-information" />

Configure the admin behavior of each pattern in the components.php config file to automatically save them as drafts (thus hiding them from the pattern inserter), prevent their deletion, and add custom labels in the admin view.

About us

banner

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-05