options = $options; $this->languages = $languages; } /** * {@inheritdoc} */ public function register() { if ( ! $this->is_enabled() ) { return; } $this->options->register( CoreStringCatalog::declarations() ); } /** * Reports whether the catalog should be claimed on this request. * * @return bool */ private function is_enabled() { if ( ! $this->languages->has_languages() ) { return false; } /** * Filters whether ShapeTranslate registers its own catalog of options. * * Turning this off leaves the site title, tagline, date and time * patterns, and widget values untranslated, and removes them from the * string translation screen. * * @param bool $enabled Whether the catalog is registered. */ return (bool) apply_filters( 'shapetranslate_register_core_strings', true ); } }