芝麻web文件管理V1.00
编辑当前文件:/home/elegucvf/public_html/src/editors/framework/integrations/multilingual.php
wpml_conditional = $wpml_conditional; $this->polylang_conditional = $polylang_conditional; $this->translate_press_conditional = $translate_press_conditional; } /** * If the integration is activated. * * @return bool If the integration is activated. */ public function is_enabled(): bool { return $this->multilingual_plugin_active(); } /** * Return this object represented by a key value array. * * @return array
Returns the name and if the feature is enabled. */ public function to_array(): array { return [ 'isMultilingualActive' => $this->is_enabled() ]; } /** * Returns this object represented by a key value structure that is compliant with the script data array. * * @return array
Returns the legacy key and if the feature is enabled. */ public function to_legacy_array(): array { return [ 'multilingualPluginActive' => $this->is_enabled() ]; } /** * Checks whether a multilingual plugin is currently active. Currently, we only check the following plugins: * WPML, Polylang, and TranslatePress. * * @return bool Whether a multilingual plugin is currently active. */ private function multilingual_plugin_active() { $wpml_active = $this->wpml_conditional->is_met(); $polylang_active = $this->polylang_conditional->is_met(); $translatepress_active = $this->translate_press_conditional->is_met(); return ( $wpml_active || $polylang_active || $translatepress_active ); } }