Problem
The file vendor/class.settings-api.php at line 99 uses create_function():
$callback = create_function('', 'echo "' . str_replace( '"', '\"', $section['desc'] ) . '";');
create_function() was deprecated in PHP 7.2 and removed in PHP 8.0. On any site running PHP 8+, this causes a fatal error the moment the settings page tries to render a section description.
Why it is not crashing today
The current get_settings_sections() in includes/class-wsc-settings.php does not set desc on the section, so the bad branch is never reached. This is a latent bug — as soon as someone adds a section description, the plugin breaks on PHP 8.
Fix
Replace the call with an anonymous function and use wp_kses_post() for safe output:
$desc = $section['desc'];
$callback = function () use ( $desc ) {
echo wp_kses_post( $desc );
};
Acceptance
Scope
Small, stability-only fix. One file, a few lines. Should ship in the next patch release.
Problem
The file
vendor/class.settings-api.phpat line 99 usescreate_function():create_function()was deprecated in PHP 7.2 and removed in PHP 8.0. On any site running PHP 8+, this causes a fatal error the moment the settings page tries to render a section description.Why it is not crashing today
The current
get_settings_sections()inincludes/class-wsc-settings.phpdoes not setdescon the section, so the bad branch is never reached. This is a latent bug — as soon as someone adds a section description, the plugin breaks on PHP 8.Fix
Replace the call with an anonymous function and use
wp_kses_post()for safe output:Acceptance
grep -r create_functionreturns no hits in the plugin source'desc' => '<p>Hello "world"</p>'renders correctlyScope
Small, stability-only fix. One file, a few lines. Should ship in the next patch release.