wp-parsely
wp-parsely copied to clipboard
Improve detection of new PCI feature options
In #3324 we fixed a corrupt option issue, but as @alecgeatches pointed out, our detection code for new Content Intelligence options should rely on a better solution than just counting the number of options.
Quoting from there as a possible starting point:
I could see cases where an option is removed from defaults where it might fail, or an option is removed but another is added and the count stays the same. Would it be possible to use something like
array_replace_recursive()to auto-merge defaults? e.g.$pch_options_defaults = $this->option_defaults['content_helper']; $options = array_replace_recursive( $pch_options_defaults, $pch_options );