- Status
- Open
- Reported for
- WPML String Translation 3.2.8
- Topic tags
- Bug
Overview of the issue
Must-Use (MU) plugins are not available for string scanning under WPML > Theme and Plugins Localization page.
Workaround
Please, make sure of having a full backup of your site before proceeding.
- Open …/wp-content/plugins/wpml-string-translation/classes/menus/theme-plugin-localization-ui/class-st-plugin-localization-ui-utils.php file.
- Look for line 6.
- Replace:
/** @return array */ public function get_plugins() { $plugins = get_plugins(); $mu_plugins = wp_get_mu_plugins(); if ( $mu_plugins ) { foreach ( $mu_plugins as $p ) { $plugin_file = basename( $p ); $plugins[ $plugin_file ] = array( 'Name' => 'MU :: ' . $plugin_file ); } } return $plugins; } - With:
public function get_plugins() { $plugins = get_plugins(); $mu_plugins = wp_get_mu_plugins(); if ( $mu_plugins ) { foreach ( $mu_plugins as $p ) { $plugin_file = basename( $p ); $plugins[ $plugin_file ] = array( 'Name' => 'MU :: ' . $plugin_file ); } //Workaround $folders = scandir(WPMU_PLUGIN_DIR); $folders = array_diff($folders, array('.', '..')); foreach($folders as $folder) { if (is_dir(WPMU_PLUGIN_DIR.'/'.$folder)) { $plugin_file = basename( $folder ); $plugins[ $plugin_file ] = array( 'Name' => 'MU :: ' . $plugin_file ); } } } return $plugins; }