I run WP cron with a Linux crontab cron job:
/usr/bin/php /var/www/redacted.site.com/public/wordpress/wp-cron.php
Since this doesn’t run within the context of a HTTP request, some of the PHP $_SERVER
variables will not be set, resulting in a warning in syslog
PHP Warning: Undefined array key "HTTP_HOST" in /var/www/redacted.site.com/public/wordpress/wp-content/plugins/embed-soundcloud-block/index.php on line 17
It looks as though this check is used for checking localhost to set version of the plugin in the dev/testing environment. Could this be adapted from:
16 │ // Constant
17 │ if ('localhost' === $_SERVER['HTTP_HOST']) {
18 │ $plugin_version = time();
19 │ } else {
20 │ $plugin_version = '1.0.5';
21 │
22 │ }
23 │ define('SCB_PLUGIN_VERSION', $plugin_version);
To something like:
16 │ // Constant
17 │ if (isset($_SERVER['HTTP_HOST']) && 'localhost' === $_SERVER['HTTP_HOST']) {
18 │ $plugin_version = time();
19 │ } else {
20 │ $plugin_version = '1.0.5';
21 │
22 │ }
23 │ define('SCB_PLUGIN_VERSION', $plugin_version);
]]>
Hi Friends – We got Fatal Error on install:
Plugin could not be activated because it triggered a fatal error
=====
Warning: Undefined variable $scb_bs in /var/web/site/public_html/wp-content/plugins/embed-soundcloud-block/index.php on line 37
First seen: 2024-06-14 22:17:56 America/New_York
Last seen: 2024-06-14 22:18:59 America/New_York
Total events: 2 Stack Trace
Context
URL : /wp-admin/plugins.php?_wpnonce=1258c08da0&action=activate&plugin=embed-soundcloud-block/index.php
HTTP Method : GET
HTTP Host : softart.io
HTTP Status : 302
isSSL : Yes
Current Filter : –
Execution Time : 5.482 s
Memory Usage : 28.79 MiB
PHP SAPI : fpm-fcgi
Is it possible to use the embed code as snippet or code block rather than a gutenberg block?
I use Divi theme & builder to create my sites, so do not use Gutenberg. Is there an appropriate shortcode or HMTL code block that can be used instead of the gutenberg block?
]]>