danlapteacru/facetwp-local-json 问题修复 & 功能扩展

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

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

danlapteacru/facetwp-local-json

最新稳定版本:0.1.0

Composer 安装命令:

composer require danlapteacru/facetwp-local-json

包简介

Saves FacetWP facets, templates and settings as .json files within your theme.

README 文档

README

FacetWP Local JSON is a WordPress plugin that allows you to store FacetWP facets, templates and settings as .json file and keep them in your source code repository.

Packagist Version PHP from Packagist Packagist Downloads GitHub License Hire Me

Minimum Requirements

  • PHP v8.1
  • WordPress v6.1
  • FacetWP v4.0

Installation

Composer (Recommended)

composer require danlapteacru/facetwp-local-json

WP-CLI

wp plugin install facetwp-local-json --activate

wordpress.org plugins directory

Download from https://wordpress.org/plugins/facetwp-local-json and install it manually or via WordPress admin panel.

Hooks

facetwp_local_json_settings

Filter the settings that are stored in the .json file.

Example:

add_filter(
    'facetwp_local_json_settings', 
    fn (array $settings): array => [
        ...$settings,
        $settings['general']['auto_refresh'] = true,
    ],
);

facetwp_local_json_storage_path

Filter the path where the .json files are stored. Default is wp-content/themes/your-theme/plugins/facetwp/local-json/settings.json.

Example:

add_filter(
    'facetwp_local_json_storage_path', 
    fn (): string => get_theme_file_path('facetwp/settings.json'),
);

Constants

FACETWP_LOCAL_JSON_STORAGE_PATH

Define the path where the .json files are store in your wp-config.php file.

Example:

define('FACETWP_LOCAL_JSON_STORAGE_PATH', get_theme_file_path('facetwp/settings.json'));

FACETWP_LOCAL_JSON_FORCE_ENABLE

Force enable/disable the FacetWP Local JSON features.

Example:

define('FACETWP_LOCAL_JSON_FORCE_ENABLE', true);

TODO

  • Add support for WPML and Polylang.
  • Option to select which facets, templates and settings to store in the .json file.
  • Tests.
  • Documentation.

Credits

FacetWP Local JSON is created by Dan Lapteacru.

Full list of contributors can be found here.

License

FacetWP Local JSON is released under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固