芝麻web文件管理V1.00
编辑当前文件:/home/dcqnetm/intuns/wp-content/plugins/polylang/integrations/wp-importer/wordpress-importer.php
getFileName() ) ) . '/languages' ); $GLOBALS['wp_import'] = new PLL_WP_Import(); register_importer( 'wordpress', 'WordPress', __( 'Import
posts, pages, comments, custom fields, categories, and tags
from a WordPress export file.', 'polylang' ), array( $GLOBALS['wp_import'], 'dispatch' ) ); // phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled } /** * Sets the flag when importing a language and the file has been exported with Polylang < 1.8. * * @since 1.8 * * @param array $terms An array of arrays containing terms information form the WXR file. * @return array */ public function wp_import_terms( $terms ) { $languages = include POLYLANG_DIR . '/settings/languages.php'; foreach ( $terms as $key => $term ) { if ( 'language' === $term['term_taxonomy'] ) { $description = maybe_unserialize( $term['term_description'] ); if ( empty( $description['flag_code'] ) && isset( $languages[ $description['locale'] ] ) ) { $description['flag_code'] = $languages[ $description['locale'] ]['flag']; $terms[ $key ]['term_description'] = maybe_serialize( $description ); } } } return $terms; } }