id() === $id) { return $plugin; } } return null; } /** * Raw descriptors. * * @return array[] */ private static function definitions(): array { return [ [ 'id' => 'chat-button', 'label' => 'Chat Button', // What the same plugin calls itself while its old system is // the one running: that menu entry is all these users have // ever seen of it. 'legacy_label' => 'Button contact', 'option_prefix' => 'bz_contact_button', 'page_slug' => 'bz_button_contact', 'text_domain' => 'button-contact-vr', // Development checkout first, wordpress.org build second 'base_name_candidates' => [ 'button-contact-for-wordpress/button-contact-vr.php', 'button-contact-vr/button-contact-vr.php', ], // The acquired plugin's own pre-Buttonizer system, copied in // verbatim under modules/. Loaded only for installs that still // run it, and only once the source plugin is out of the way. 'module_bootstrap' => 'chat-button/plugin.php', 'module_page_slug' => 'contact_vr', 'module_adapter' => \Buttonizer\Migration\Adapters\ChatButton::class, 'module_guard_class' => 'PZF', 'module_guard_constant' => 'PZF_FILE', // Pre-Buttonizer system of the acquired plugin ("Button contact VR") 'legacy_flag_option' => 'button_contact_legacy', 'legacy_flag_value' => 'yes', 'legacy_options' => [ 'pzf_phone', 'pzf_phone2', 'pzf_phone3', 'pzf_linkfanpage', 'pzf_linkmessenger', 'pzf_whatsapp', 'pzf_zalo', 'pzf_telegram', 'pzf_instagram', 'pzf_youtube', 'pzf_tiktok', 'pzf_viber', 'pzf_linkggmap', 'pzf_contact_link', ], // Settings the user configured in the source plugin that must // survive the move. The connection itself (finished_setup, // installed_at, last_synced_at, site_id) is always copied. 'settings_to_carry_over' => [ 'include_page_data', 'wait_until_consent', 'additional_permissions', 'admin_top_bar_show_button', 'can_send_errors', 'site_licensed', ], ], ]; } }