Option content_control_known_blockTypes
-
I’m trying to reduce the time spent executing wp_load_alloptions. I noticed that option “content_control_known_blockTypes” is one of my largest options.
AFAIK this option is only used within the wp_admin screens (e.g. settings and post editors). If so, shouln’t it be set to autoload=no. Please can function “update_block_types” be amended accordingly.
When checking why the option was so large, I noticed that it contained some block types from plugins that I no longer use. Looking through the code, I can’t see anywhere that block types are ever removed from the option. Which means the settings screen still list block types I no longer have! Would the code be better getting block types direct from WordPress. e.g. something like:
$block_types = WP_Block_Type_Registry::get_instance()->get_all_registered()
- You must be logged in to reply to this topic.