schrittweiter/extended-acf
Composer 安装命令:
composer require schrittweiter/extended-acf
包简介
README 文档
README
Creating custom fields programmatically with the help of Vinkla/Extended ACF makes it easy to maintain and extend a clean setup for your Wordpress custom fields.
The aim of this repository is to create a pool of custom field types to spare you coding time. Feel free to extend this library.
Installation
- Run
composer require schrittweiter/extended-acfin your theme folder - Make sure you are autoloading your composer vendors e.g.
require_once __DIR__.'/vendor/autoload.php';
Usage
Now you can make use of the fields like this (Please refer to the docs of wordplate in order to understand how to setup)
<?php use Extended\ACF\Location; use Extended\ACF\Image; use Extended\ACF\Text; use Schrittweiter\Acf\Fields\Button; // Our new Field type add_action('acf/init', function() { register_extended_field_group([ 'title' => 'About', 'fields' => [ Image::make('Image'), Text::make('Title'), Button::make('My Button', 'button') // gets registered here ], 'location' => [ Location::where('post_type', 'page') ], ]); });
and thats it! Happy creating
Supported third-party plugins
Advanced Custom Fields: Extended Pro
We have currently implemented some custom fields from ACF Extended Pro. All custom fields listed here are based on version 0.8.8.6 of the plugin.
Advanced Link
Display a modern Link Selector in a modal which allow customization. Posts, Post Types Archives & terms selection can be filtered in the field administration.
For more details visit: (https://www.acf-extended.com/features/fields/advanced-link)
Usage example:
<?php use Schrittweiter\Acf\Fields\AdvancedLink; AdvancedLink::make('LINK LABEL','link_fieldname') ->postType(['post']) // array, Filter which Post Types are allowed ->taxonomy(['category']) // array, Filter which Taxonomies are allowed
ACF: FocusPoint
Adds a new field type to ACF allowing users to select a focal point on image.
The plugin developer is looking for sponsors, if you like this plugin, buy him a beer by clicking the Sponsor button at his repo https://github.com/ooksanen/acf-focuspoint
Usage example:
<?php use Schrittweiter\Acf\Fields\FocusPoint; FocusPoint::make('FOCUS POINT LABEL','focuspoint_fieldname') ->instructions('Select Image.') ->required() ->mimeTypes(['jpg', 'jpeg', 'png']) ->previewSize('medium') // thumbnail, medium or large ->library('all') // all or uploadedTo
ACF OpenStreetMap Field
Adds a new field type to ACF for a hazzle free OpenStreetMap.
Usage example:
<?php use Schrittweiter\Acf\Fields\OpenStreetMap; OpenStreetMap::make('OPEN STREET MAP LABEL','openstreetmap_fieldname') ->required()
Todos
- Complete ACF-Extended integration
- Complete OpenStreetMap - documentation
- Add to wpackagist instead of packagist, since this is a WP only extension
schrittweiter/extended-acf 适用场景与选型建议
schrittweiter/extended-acf 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 31 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 09 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 schrittweiter/extended-acf 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 schrittweiter/extended-acf 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-09-10