Plugin Directory

Changeset 2847130


Ignore:
Timestamp:
01/12/2023 04:27:19 AM (3 years ago)
Author:
kraftplugins
Message:

committed with grunt-push-svn

Location:
demo-importer-plus
Files:
75 added
5 edited

Legend:

Unmodified
Added
Removed
  • demo-importer-plus/trunk/demo-importer-plus.php

    r2845840 r2847130  
    88 * Text Domain:     demo-importer-plus
    99 * Domain Path:     /languages
    10  * Version:         1.1.6
     10 * Version:         1.1.7
    1111 * Tested up to:    6.1
    1212 *
     
    2222
    2323if ( ! defined( 'DEMO_IMPORTER_PLUS_VER' ) ) {
    24     define( 'DEMO_IMPORTER_PLUS_VER', '1.1.6' );
     24    define( 'DEMO_IMPORTER_PLUS_VER', '1.1.7' );
    2525}
    2626
  • demo-importer-plus/trunk/inc/importers/class-demo-importer-plus-site-options-import.php

    r2826843 r2847130  
    4444     */
    4545    private static function site_options() {
    46         return array(
     46        $default_options = array(
    4747            'custom_logo',
    4848            'nav_menu_locations',
     
    103103            'wptravelengine_since',
    104104        );
     105
     106        return apply_filters( 'demo-importer-plus:importable-site-options', $default_options );
    105107    }
    106108
  • demo-importer-plus/trunk/inc/importers/wxr-importer/class-wxr-importer.php

    r2826843 r2847130  
    13491349                    }
    13501350
    1351                     add_post_meta( $post_id, $key, $value );
     1351                    update_post_meta( $post_id, $key, $value );
    13521352                    do_action( 'import_post_meta', $post_id, $key, $value );
    13531353
     
    18161816            );
    18171817
    1818             $taxonomy         = null;
     1818            $taxonomy = null;
    18191819
    18201820            // Special casing!
     
    19841984            $term_id = $result['term_id'];
    19851985
    1986             $this->mapping['term'][ $mapping_key ]    = $term_id;
    1987             $this->mapping['term_id'][ $original_id ] = $term_id;
     1986            $this->mapping['term'][ $mapping_key ]                         = $term_id;
     1987            $this->mapping['term_id'][ $original_id ]                      = $term_id;
    19881988            $this->mapping['term_parent'][ $data['taxonomy'] ][ $term_id ] = $parent_id;
    19891989
     
    21032103            }
    21042104            if ( ! empty( $this->mapping['term_parent'] ) ) {
    2105                 $this->update_term_parent(  $this->mapping['term_parent'] );
     2105                $this->update_term_parent( $this->mapping['term_parent'] );
    21062106            }
    21072107        }
    21082108
    21092109        protected function update_term_parent( $todo ) {
    2110             foreach( $todo as $taxonomy => $term_by_parent ) {
    2111                 $terms = get_terms( ['taxonomy' => $taxonomy, 'hide_empty' => false, 'fields' => 'id=>slug'] );
     2110            foreach ( $todo as $taxonomy => $term_by_parent ) {
     2111                $terms         = get_terms(
     2112                    array(
     2113                        'taxonomy'   => $taxonomy,
     2114                        'hide_empty' => false,
     2115                        'fields'     => 'id=>slug',
     2116                    )
     2117                );
    21122118                $terms_by_slug = array_flip( $terms );
    21132119                if ( is_array( $term_by_parent ) ) {
    21142120                    foreach ( $term_by_parent as $term_id => $parent_id ) {
    21152121                        if ( isset( $terms_by_slug[ $parent_id ] ) ) {
    2116                             wp_update_term( $term_id, $taxonomy, ['parent' => $terms_by_slug[ $parent_id ]] );
     2122                            wp_update_term( $term_id, $taxonomy, array( 'parent' => $terms_by_slug[ $parent_id ] ) );
    21172123                        }
    21182124                    }
  • demo-importer-plus/trunk/languages/demo-importer-plus.pot

    r2845840 r2847130  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Demo Importer Plus 1.1.6\n"
     5"Project-Id-Version: Demo Importer Plus 1.1.7\n"
    66"Report-Msgid-Bugs-To: "
    77"https://wordpress.org/support/plugin/demo-importer-plus\n"
    8 "POT-Creation-Date: 2023-01-10 05:51:10+00:00\n"
     8"POT-Creation-Date: 2023-01-12 04:26:04+00:00\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=utf-8\n"
     
    722722msgstr ""
    723723
    724 #: inc/importers/wxr-importer/class-wxr-importer.php:2137
     724#: inc/importers/wxr-importer/class-wxr-importer.php:2143
    725725#. translators: %d is post id.
    726726msgid "Running post-processing for post %d"
    727727msgstr ""
    728728
    729 #: inc/importers/wxr-importer/class-wxr-importer.php:2153
     729#: inc/importers/wxr-importer/class-wxr-importer.php:2159
    730730#. translators: %1$s is post title, %2$s is post id.
    731731msgid "Could not find the post parent for \"%1$s\" (post #%2$d)"
    732732msgstr ""
    733733
    734 #: inc/importers/wxr-importer/class-wxr-importer.php:2161
     734#: inc/importers/wxr-importer/class-wxr-importer.php:2167
    735735#. translators: %1$d is post id, %2$d is parent post id.
    736736msgid "Post %1$d was imported with parent %2$d, but could not be found"
    737737msgstr ""
    738738
    739 #: inc/importers/wxr-importer/class-wxr-importer.php:2178
     739#: inc/importers/wxr-importer/class-wxr-importer.php:2184
    740740#. translators: %1$s is the post title, %2$s is post id.
    741741msgid "Could not find the author for \"%1$s\" (post #%2$d)"
    742742msgstr ""
    743743
    744 #: inc/importers/wxr-importer/class-wxr-importer.php:2186
     744#: inc/importers/wxr-importer/class-wxr-importer.php:2192
    745745#. translators: %1$d is post id, %2$s is author slug.
    746746msgid "Post %1$d was imported with author \"%2$s\", but could not be found"
    747747msgstr ""
    748748
    749 #: inc/importers/wxr-importer/class-wxr-importer.php:2215
     749#: inc/importers/wxr-importer/class-wxr-importer.php:2221
    750750#. translators: %d is post id.
    751751msgid "Post %d was marked for post-processing, but none was required."
    752752msgstr ""
    753753
    754 #: inc/importers/wxr-importer/class-wxr-importer.php:2229
     754#: inc/importers/wxr-importer/class-wxr-importer.php:2235
    755755#. translators: %1$s is the post title, %2$s is post id.
    756756msgid "Could not update \"%1$s\" (post #%2$d) with mapped data"
    757757msgstr ""
    758758
    759 #: inc/importers/wxr-importer/class-wxr-importer.php:2283
     759#: inc/importers/wxr-importer/class-wxr-importer.php:2289
    760760#. translators: %1$s is the post title, %2$s is post id.
    761761msgid "Could not find the menu object for \"%1$s\" (post #%2$d)"
    762762msgstr ""
    763763
    764 #: inc/importers/wxr-importer/class-wxr-importer.php:2291
     764#: inc/importers/wxr-importer/class-wxr-importer.php:2297
    765765#. translators: %1$s is post id, %2$s is post object id, %3$s is menu type.
    766766msgid ""
     
    769769msgstr ""
    770770
    771 #: inc/importers/wxr-importer/class-wxr-importer.php:2322
     771#: inc/importers/wxr-importer/class-wxr-importer.php:2328
    772772#. translators: %d is comment id.
    773773msgid "Could not find the comment parent for comment #%d"
    774774msgstr ""
    775775
    776 #: inc/importers/wxr-importer/class-wxr-importer.php:2329
     776#: inc/importers/wxr-importer/class-wxr-importer.php:2335
    777777#. translators: %1$s is comment id, %2$s is parent comment id.
    778778msgid "Comment %1$d was imported with parent %2$d, but could not be found"
    779779msgstr ""
    780780
    781 #: inc/importers/wxr-importer/class-wxr-importer.php:2346
     781#: inc/importers/wxr-importer/class-wxr-importer.php:2352
    782782#. translators: %d is comment id.
    783783msgid "Could not find the author for comment #%d"
    784784msgstr ""
    785785
    786 #: inc/importers/wxr-importer/class-wxr-importer.php:2353
     786#: inc/importers/wxr-importer/class-wxr-importer.php:2359
    787787#. translators: %1$d is comment id, %2$d is author id.
    788788msgid "Comment %1$d was imported with author %2$d, but could not be found"
    789789msgstr ""
    790790
    791 #: inc/importers/wxr-importer/class-wxr-importer.php:2373
     791#: inc/importers/wxr-importer/class-wxr-importer.php:2379
    792792#. translators: %d is comment id.
    793793msgid "Could not update comment #%d with mapped data"
  • demo-importer-plus/trunk/readme.txt

    r2845840 r2847130  
    66Tested up to: 6.1
    77Requires PHP: 5.6
    8 Stable tag: 1.1.6
     8Stable tag: 1.1.7
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    2121
    2222== Changelog ==
     23
     24== 1.1.7 ==
     25* Minor Bug Fixes
    2326
    2427== 1.1.6 ==
Note: See TracChangeset for help on using the changeset viewer.