定制 tombroucke/otomaties-events 二次开发

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

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

tombroucke/otomaties-events

最新稳定版本:1.11.1

Composer 安装命令:

composer require tombroucke/otomaties-events

包简介

Add event functionality to your WordPress website

README 文档

README

Add event functionality to your wordpress website

Prerequisites

  • PHP 8.x
  • ACF PRO

Installation

composer require tombroucke/otomaties-events

The plugin could be installed by cloning this repo and performing calling composer install from the root directory, but there will be no updates.

Layout

Templates

This plugin doesn't provide any templates. You should add archive-events.php and content-event.php yourself.

Bootstrap

The registration form uses default bootstrap classes. Following classes should be whitelisted from purgecss

  • alert
  • alert-danger
  • alert-success
  • btn
  • btn-primary
  • col-md-6
  • form-control
  • g-3
  • input-group
  • input-group-text
  • mb-3
  • mb-5
  • row

Layout filters

Some filters are provided to swap bootstrap for another css framework

  • otomaties_events_section_class
  • otomaties_events_input_container_class
  • otomaties_events_input_class
  • otomaties_events_submit_class

Archive

You can display an archive using a custom template or whatever. To be able to query events in the past, use 'event_scope' => 'past'. Example implementation (sage):

Event query

$args = [
	'post_type' => 'event',
	'posts_per_page' => get_option('posts_per_page'),
	'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1,
	'event_scope' => 'past',
];
$eventQuery = new \WP_Query($args);
@while($eventQuery->have_posts()) @php($eventQuery->the_post())
	@include('partials.content-event')
@endwhile
@include('partials.pagination', ['wpQuery' => $eventQuery]) // Pagination: https://github.com/tombroucke/otomaties-sage-helper/blob/master/publishes/app/View/Composers/Pagination.php, https://github.com/tombroucke/otomaties-sage-helper/blob/master/publishes/resources/views/partials/pagination.blade.php

Customization

Render registration form in content

The registration form will be appended to the page content by default.

  1. add_filter('otomaties_events_show_registration_form', '__return_false');
  2. Use shortcode [otomaties-events-registration-form] to display form in different section

Todo

WPML support

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-05-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固