Deprecated Constant PLUGINDIR
-
Postie uses the deprecated constant PLUGINDIR. If that constant is missing, WordPress falls back to wp-content/plugins in wp-includes/default-constants.php:
if ( !defined('PLUGINDIR') ) define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat.
That causes problems in modern environments like Bedrock where wp-content is changed.
Here’s a usage in Postie’s config_form.php:
<?php $templateDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/templates'; ?>
Maybe change that using WP_PLUGIN_DIR which provides the full URL.
For example:
<?php $templateDir = esc_url( WP_PLUGIN_URL . '/postie/templates' ); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Deprecated Constant PLUGINDIR’ is closed to new replies.