承接 schrittweiter/extended-acf 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

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

  1. Run composer require schrittweiter/extended-acf in your theme folder
  2. 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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-09-10