Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
dddd3e395f | |||
7eb011859a | |||
9e51823595 |
6 changed files with 41 additions and 11 deletions
20
CHANGELOG.md
20
CHANGELOG.md
|
@ -5,8 +5,24 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [0.1.0] - 2024-10-20
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Fixed that transformer hook function might also return `null`.
|
||||||
|
|
||||||
|
## [0.2.1] - 2024-11-16
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
* Initial version tag.
|
* Initial release on WordPress.org
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Applied some WordPress best practices
|
||||||
|
|
||||||
|
## [0.2.0] - 2024-10-20
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* Initial submission to WordPress.org
|
||||||
|
|
12
README.md
12
README.md
|
@ -100,6 +100,16 @@ We're always interested in your feedback. Feel free to reach out to us via [E-Ma
|
||||||
|
|
||||||
## Changelog ##
|
## Changelog ##
|
||||||
|
|
||||||
### [0.2.0] 2024-10-29 ###
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Fixed that transformer hook function might also return `null`.
|
||||||
|
|
||||||
|
### [0.2.1] 2024-11-16 ###
|
||||||
|
|
||||||
* Initial release on https://wordpress.org/
|
* Initial release on https://wordpress.org/
|
||||||
|
|
||||||
|
### [0.2.0] 2024-10-29 ###
|
||||||
|
|
||||||
|
* Initial submission to https://wordpress.org/
|
||||||
|
|
|
@ -180,7 +180,7 @@ In the pipeline we want to run each event plugins integration tests in a single
|
||||||
To activate/load your plugin add it to the switch statement within the function `_manually_load_plugin()` within `tests/bootstrap.php`.
|
To activate/load your plugin add it to the switch statement within the function `_manually_load_plugin()` within `tests/bootstrap.php`.
|
||||||
|
|
||||||
```php
|
```php
|
||||||
switch ( $activitypub_event_extension_integration_filter ) {
|
switch ( $activitypub_event_bridge_integration_filter ) {
|
||||||
...
|
...
|
||||||
case 'my_event_plugin':
|
case 'my_event_plugin':
|
||||||
$plugin_file = 'my-event-plugin/my-event-plugin.php';
|
$plugin_file = 'my-event-plugin/my-event-plugin.php';
|
||||||
|
|
|
@ -252,7 +252,7 @@ class Setup {
|
||||||
*
|
*
|
||||||
* @return \Activitypub\Transformer\Base|null
|
* @return \Activitypub\Transformer\Base|null
|
||||||
*/
|
*/
|
||||||
public function register_activitypub_event_transformer( $transformer, $wp_object, $object_class ): \Activitypub\Transformer\Base {
|
public function register_activitypub_event_transformer( $transformer, $wp_object, $object_class ): ?\Activitypub\Transformer\Base {
|
||||||
// If the current WordPress object is not a post (e.g., a WP_Comment), don't change the transformer.
|
// If the current WordPress object is not a post (e.g., a WP_Comment), don't change the transformer.
|
||||||
if ( 'WP_Post' !== $object_class ) {
|
if ( 'WP_Post' !== $object_class ) {
|
||||||
return $transformer;
|
return $transformer;
|
||||||
|
|
|
@ -94,6 +94,10 @@ We're always interested in your feedback. Feel free to reach out to us via [E-Ma
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
= [0.2.0] 2024-10-29 =
|
= [0.2.1] 2024-11-16 =
|
||||||
|
|
||||||
* Initial release on https://wordpress.org/
|
* Initial release on https://wordpress.org/
|
||||||
|
|
||||||
|
= [0.2.0] 2024-10-29 =
|
||||||
|
|
||||||
|
* Initial submission to https://wordpress.org/
|
||||||
|
|
|
@ -35,10 +35,10 @@ function _manually_load_plugin() {
|
||||||
require_once $plugin_dir . 'activitypub/activitypub.php';
|
require_once $plugin_dir . 'activitypub/activitypub.php';
|
||||||
|
|
||||||
// Capture the --filter argument.
|
// Capture the --filter argument.
|
||||||
$activitypub_event_extension_integration_filter = null;
|
$activitypub_event_bridge_integration_filter = null;
|
||||||
foreach ( $_SERVER['argv'] as $arg ) {
|
foreach ( $_SERVER['argv'] as $arg ) {
|
||||||
if ( strpos( $arg, '--filter=' ) === 0 ) {
|
if ( strpos( $arg, '--filter=' ) === 0 ) {
|
||||||
$activitypub_event_extension_integration_filter = substr( $arg, strlen( '--filter=' ) );
|
$activitypub_event_bridge_integration_filter = substr( $arg, strlen( '--filter=' ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ function _manually_load_plugin() {
|
||||||
|
|
||||||
$plugin_file = null;
|
$plugin_file = null;
|
||||||
// See if we want to run integration tests for a specific event-plugin.
|
// See if we want to run integration tests for a specific event-plugin.
|
||||||
switch ( $activitypub_event_extension_integration_filter ) {
|
switch ( $activitypub_event_bridge_integration_filter ) {
|
||||||
case 'the_events_calendar':
|
case 'the_events_calendar':
|
||||||
$plugin_file = 'the-events-calendar/the-events-calendar.php';
|
$plugin_file = 'the-events-calendar/the-events-calendar.php';
|
||||||
break;
|
break;
|
||||||
|
@ -84,14 +84,14 @@ function _manually_load_plugin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hot fix that allows using Events Manager within unit tests, because the em_init() is later not run as admin.
|
// Hot fix that allows using Events Manager within unit tests, because the em_init() is later not run as admin.
|
||||||
if ( 'events_manager' === $activitypub_event_extension_integration_filter ) {
|
if ( 'events_manager' === $activitypub_event_bridge_integration_filter ) {
|
||||||
require_once $plugin_dir . 'events-manager/em-install.php';
|
require_once $plugin_dir . 'events-manager/em-install.php';
|
||||||
em_create_events_table();
|
em_create_events_table();
|
||||||
em_create_events_meta_table();
|
em_create_events_meta_table();
|
||||||
em_create_locations_table();
|
em_create_locations_table();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'modern_events_calendar_lite' === $activitypub_event_extension_integration_filter ) {
|
if ( 'modern_events_calendar_lite' === $activitypub_event_bridge_integration_filter ) {
|
||||||
require_once $plugin_dir . 'modern-events-calendar-lite/app/libraries/factory.php';
|
require_once $plugin_dir . 'modern-events-calendar-lite/app/libraries/factory.php';
|
||||||
$mec_factory = new MEC_factory();
|
$mec_factory = new MEC_factory();
|
||||||
$mec_factory->install();
|
$mec_factory->install();
|
||||||
|
|
Loading…
Reference in a new issue