- Trạng thái
- Đang mở
- Được báo cáo cho
- WPML String Translation 3.2.8
- Thẻ chủ đề
- Bug
Tổng quan về lỗi
Các plugin Must-Use (MU) không khả dụng để quét chuỗi văn bản trên trang WPML > Bản địa hóa giao diện và plugin.
Giải pháp tạm thời
Vui lòng đảm bảo bạn có một bản sao lưu toàn bộ trang web của mình trước khi tiếp tục.
- Mở tệp …/wp-content/plugins/wpml-string-translation/classes/menus/theme-plugin-localization-ui/class-st-plugin-localization-ui-utils.php.
- Tìm dòng 6.
- Thay thế:
/** @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; } - Bằng:
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; }