tombroucke / otomaties-events
该软件包最新版本(1.9.2)没有可用的许可信息。
为您的WordPress网站添加事件功能
1.9.2
2024-01-30 14:40 UTC
Requires
- php: >=8
- composer/installers: ^1.0 || ^2.0
- johnbillion/extended-cpts: ^5.0
- phpoffice/phpspreadsheet: ^1.23
- stoutlogic/acf-builder: ^1.12
- tombroucke/acf-objects: ^3.0
- tombroucke/wp-models: ^2.1
Requires (Dev)
- php-stubs/acf-pro-stubs: ^6.0
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.7
- szepeviktor/phpstan-wordpress: ^1.1
- dev-master
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.0
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.1
- dev-snyk-upgrade-4c8e6e69198064602638f86f596e8c9b
This package is auto-updated.
Last update: 2024-09-30 01:50:09 UTC
README
为您的WordPress网站添加事件功能
先决条件
- PHP 8.x
- ACF PRO
安装
composer require tombroucke/otomaties-events
可以通过克隆此存储库并在根目录中调用composer install
来安装此插件,但不会有更新。
布局
模板
此插件不提供任何模板。您应自行添加archive-events.php
和content-event.php
。
Bootstrap
注册表单使用默认的Bootstrap类。以下类应从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
布局过滤器
提供了一些过滤器,用于将Bootstrap替换为另一个CSS框架
- otomaties_events_section_class
- otomaties_events_input_container_class
- otomaties_events_input_class
- otomaties_events_submit_class
存档
您可以使用自定义模板或其他方式显示存档。要能够查询过去的事件,请使用'event_scope' => 'past'。示例实现(sage)
事件查询
$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
定制
在内容中渲染注册表单
默认情况下,注册表单将附加到页面内容。
add_filter('otomaties_events_show_registration_form', '__return_false');
- 使用短代码
[otomaties-events-registration-form]
在不同部分显示表单
待办事项
WPML支持