Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ -167,7 +167,7 @@
- if ( isset( $file[ 'file' ] ) && !is_wp_error( $file ) ) {
- require_once ( ABSPATH . 'wp-admin/includes/class-pclzip.php' );
- $zip = new PclZip( $file[ 'file' ] );
- - $unzipped = $zip->extract( $p_path = WP_CONTENT_DIR . '/wpseo-import/' );
- + $unzipped = $zip->extract( PCLZIP_OPT_PATH, $p_path = WP_CONTENT_DIR . '/wpseo-import/' );
- if ( $unzipped[ 0 ][ 'stored_filename' ] == 'settings.ini' ) {
- $options = parse_ini_file( WP_CONTENT_DIR . '/wpseo-import/settings.ini', true );
- foreach ( $options as $name => $optgroup ) {
- @@ -177,7 +177,8 @@
- update_option( $name, json_decode( urldecode( $optgroup[ 'wpseo_taxonomy_meta' ] ), true ) );
- }
- }
- - @unlink( WP_CONTENT_DIR . '/wpseo-import/' );
- + @unlink( $unzipped[ 0 ][ 'filename' ] );
- + rmdir( $p_path );
- $content .= '<p><strong>' . __( 'Settings successfully imported.', 'wordpress-seo' ) . '</strong></p>';
- } else {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement