Allow custom directory to scan theme
-
/** * Find strings in themes. * * @return array */ public function run_theme_scanner() { $data = []; $themes = wp_get_themes(); $settings = Polylang_Theme_Translation_Settings::getInstance(); foreach ($themes as $name => $theme) { if (in_array($name, $settings['themes'])) { $data[$name] = $this->register_stings_from_dir($theme->theme_root . DIRECTORY_SEPARATOR . $name . '/templates', $name); // add filter here } } return $data; }
All my views are in templates directory. If I scan theme I have a lot of differences string not from my domain.
Or you can add input before settings to include or exclude director from root theme. Example (with common separations):
Include: templates, src
Thanks for develop your plugin.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Allow custom directory to scan theme’ is closed to new replies.