Skip to content

Commit acee4c0

Browse files
committed
Include helper to allow scanning inside the container.
1 parent 4b54c19 commit acee4c0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docker-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ services:
1212
- 8081:80
1313
volumes:
1414
- ./:/var/www/html/wp-content/plugins/phpcompat
15+
- ./helpers/phpcompat_filters.php:/var/www/html/wp-content/mu-plugins/phpcompat_filters.php:ro
16+
1517
environment:
1618
WORDPRESS_DB_PASSWORD: password
1719
db:

helpers/phpcompat_filters.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
// Allow the plugin to fork the request in the container.
3+
add_filter( 'phpcompat_fork_url', function( $url ) {
4+
return str_replace( '8081', '80', $url );
5+
});
6+
7+
// Allow the cron to work in the container.
8+
add_filter( 'cron_request', function( $cron_request ) {
9+
$cron_request['url'] = str_replace( '8081', '80', $cron_request['url'] );
10+
return $cron_request;
11+
});

0 commit comments

Comments
 (0)