Plugin Directory

Changeset 2456068


Ignore:
Timestamp:
01/14/2021 06:13:30 AM (5 years ago)
Author:
slidesigma
Message:

Fixed a bug and tagged 1.0.2

Location:
sigma-importer
Files:
4 edited
3 copied

Legend:

Unmodified
Added
Removed
  • sigma-importer/tags/1.0.2/includes/wp-importer/class-wp-import.php

    r2455605 r2456068  
    3737    var $url_remap = array();
    3838    var $featured_images = array();
     39    var $menu_items = array();
    3940
    4041    var $logger;
     
    5859            'processed_menu_items' => $this->processed_menu_items,
    5960            'menu_item_orphans' => $this->menu_item_orphans,
    60             'missing_menu_items' => $this->missing_menu_items
     61            'missing_menu_items' => $this->missing_menu_items,
     62            'menu_items'    => $this->menu_items
    6163        ];
    6264
     
    134136                    $this->$key();
    135137                }
     138            }
     139        }
     140
     141        // Process menu items
     142        if( !empty($this->menu_items) ){
     143            foreach($this->menu_items as $item){
     144                $this->process_menu_item($item);
    136145            }
    137146        }
     
    203212        $this->menu_item_orphans = isset($data['menu_item_orphans']) && !empty($data['menu_item_orphans']) ? $data['menu_item_orphans'] : array();
    204213        $this->missing_menu_items = isset($data['missing_menu_items']) && !empty($data['missing_menu_items']) ? $data['missing_menu_items'] : array();
     214        $this->menu_items = isset($data['menu_items']) && !empty($data['menu_items']) ? $data['menu_items'] : array();
    205215
    206216        wp_defer_term_counting( true );
     
    575585                continue;
    576586
     587            // Save the menu items to be imported at the very end
    577588            if ( 'nav_menu_item' == $post['post_type'] ) {
    578                 $this->process_menu_item( $post );
     589                if( !isset($this->menu_items[ $post['post_id'] ]) ){
     590                    $this->menu_items[ $post['post_id'] ] = $post;
     591                }
    579592                continue;
    580593            }
  • sigma-importer/tags/1.0.2/readme.txt

    r2455654 r2456068  
    55Tested up to: 5.6
    66Requires PHP: 5.3.2
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv3 or later
    99
     
    3838      'blog_page'              => 'Blog',
    3939      'menus'                  => array(
    40         'main_menu'        => 'Main Menu',
     40        'main_menu'        => 'Main Menu',
    4141        'secondary_menu'   => 'Secondary Menu',
    4242        'mobile_menu'      => 'Mobile Menu',
    43     'top_menu'     => 'Top Menu',
    44     'bottom_menu'      => 'Bottom Menu'
     43        'top_menu'     => 'Top Menu',
     44        'bottom_menu'      => 'Bottom Menu'
    4545      ),
    4646      'import_file'            => YOUR_XML_FILE_PATH,
     
    6262`
    6363
    64 As for now, the importer only supports local files. If you tried to add remote URL links for your content files, the importer will just ignore them.
     64*As for now, the importer only supports local files. If you tried to add remote URL links for your content files, the importer will just ignore them.*
     65
     66**Wanna help us make Sigma Importer better?**
     67
     68Get access to the Sigma Importer [GitHub repository](https://github.com/slidethemes/sigma-importer).
     69
     70= 1.0.2 =
     71
     72*Release Date - January 13, 2021*
     73
     74* Fixed a bug where menu items would import twice if the importer took a lot of time.
     75* Updated the readme.txt file to include some helpful actions and filters for developers
     76
     77= 1.0.1 =
     78
     79*Release Date - January 13, 2021*
     80
     81* Updated readme.txt
    6582
    6683= 1.0.0 =
     84
     85* Release Date - January 13, 2021*
     86
    6787* Initial release!
  • sigma-importer/tags/1.0.2/sigma-importer.php

    r2455654 r2456068  
    44Plugin URI: https://wordpress.org/plugins/sigma-importer/
    55Description: Import demo content with ease. Whether you are a developer adding one click demo import functionality to your theme, or you just want a quick import solution. This is the plugin for you.
    6 Version: 1.0.1
     6Version: 1.0.2
    77Author: Slidesigma
    88Author URI: http://www.slidesigma.com
  • sigma-importer/trunk/includes/wp-importer/class-wp-import.php

    r2455605 r2456068  
    3737    var $url_remap = array();
    3838    var $featured_images = array();
     39    var $menu_items = array();
    3940
    4041    var $logger;
     
    5859            'processed_menu_items' => $this->processed_menu_items,
    5960            'menu_item_orphans' => $this->menu_item_orphans,
    60             'missing_menu_items' => $this->missing_menu_items
     61            'missing_menu_items' => $this->missing_menu_items,
     62            'menu_items'    => $this->menu_items
    6163        ];
    6264
     
    134136                    $this->$key();
    135137                }
     138            }
     139        }
     140
     141        // Process menu items
     142        if( !empty($this->menu_items) ){
     143            foreach($this->menu_items as $item){
     144                $this->process_menu_item($item);
    136145            }
    137146        }
     
    203212        $this->menu_item_orphans = isset($data['menu_item_orphans']) && !empty($data['menu_item_orphans']) ? $data['menu_item_orphans'] : array();
    204213        $this->missing_menu_items = isset($data['missing_menu_items']) && !empty($data['missing_menu_items']) ? $data['missing_menu_items'] : array();
     214        $this->menu_items = isset($data['menu_items']) && !empty($data['menu_items']) ? $data['menu_items'] : array();
    205215
    206216        wp_defer_term_counting( true );
     
    575585                continue;
    576586
     587            // Save the menu items to be imported at the very end
    577588            if ( 'nav_menu_item' == $post['post_type'] ) {
    578                 $this->process_menu_item( $post );
     589                if( !isset($this->menu_items[ $post['post_id'] ]) ){
     590                    $this->menu_items[ $post['post_id'] ] = $post;
     591                }
    579592                continue;
    580593            }
  • sigma-importer/trunk/readme.txt

    r2455654 r2456068  
    55Tested up to: 5.6
    66Requires PHP: 5.3.2
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv3 or later
    99
     
    3838      'blog_page'              => 'Blog',
    3939      'menus'                  => array(
    40         'main_menu'        => 'Main Menu',
     40        'main_menu'        => 'Main Menu',
    4141        'secondary_menu'   => 'Secondary Menu',
    4242        'mobile_menu'      => 'Mobile Menu',
    43     'top_menu'     => 'Top Menu',
    44     'bottom_menu'      => 'Bottom Menu'
     43        'top_menu'     => 'Top Menu',
     44        'bottom_menu'      => 'Bottom Menu'
    4545      ),
    4646      'import_file'            => YOUR_XML_FILE_PATH,
     
    6262`
    6363
    64 As for now, the importer only supports local files. If you tried to add remote URL links for your content files, the importer will just ignore them.
     64*As for now, the importer only supports local files. If you tried to add remote URL links for your content files, the importer will just ignore them.*
     65
     66**Wanna help us make Sigma Importer better?**
     67
     68Get access to the Sigma Importer [GitHub repository](https://github.com/slidethemes/sigma-importer).
     69
     70= 1.0.2 =
     71
     72*Release Date - January 13, 2021*
     73
     74* Fixed a bug where menu items would import twice if the importer took a lot of time.
     75* Updated the readme.txt file to include some helpful actions and filters for developers
     76
     77= 1.0.1 =
     78
     79*Release Date - January 13, 2021*
     80
     81* Updated readme.txt
    6582
    6683= 1.0.0 =
     84
     85* Release Date - January 13, 2021*
     86
    6787* Initial release!
  • sigma-importer/trunk/sigma-importer.php

    r2455654 r2456068  
    44Plugin URI: https://wordpress.org/plugins/sigma-importer/
    55Description: Import demo content with ease. Whether you are a developer adding one click demo import functionality to your theme, or you just want a quick import solution. This is the plugin for you.
    6 Version: 1.0.1
     6Version: 1.0.2
    77Author: Slidesigma
    88Author URI: http://www.slidesigma.com
Note: See TracChangeset for help on using the changeset viewer.