Skip to content

cachobong/every-demo-importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DT Demo Importer for WordPress themes

A One Click Demo Installer Class for WordPress Themes. This class developed for creating a quick installer for wordpress.

Quick Usage

Place this code in functions.php

/**
 * Initialize DT Importer
 */
$settings      = array(
  'menu_parent' => 'tools.php',
  'menu_title'  => __('Demo Importer', 'dt-importer'),
  'menu_type'   => 'menu',
  'menu_slug'   => 'dt_demo_importer',
);
$options        = array(
    'demo-1' => array(
      'title'         => __('Demo 1', 'dt-importer'),
      'preview_url'   => 'https://www.google.com/',
      'front_page'    => 'Home',
      'blog_page'     => 'Blog',
      'menus'         => array(
            'primary'   => 'Primary', // Menu Location and Title
            'secondary' => 'Secondary',
        )
    ),
    'demo-2' => array(
      'title'         => __('Demo 2', 'dt-importer'),
      'preview_url'   => 'https://www.yahoo.com/',
      'front_page'    => 'Home',
      'blog_page'     => 'Blog',
      'menus'         => array(
            'primary'   => 'Primary',
            'secondary' => 'Secondary',
        )
    ),
    'demo-3' => array(
      'title'         => __('Demo 3', 'dt-importer'),
      'preview_url'   => 'https://www.google.com/',
      'front_page'    => 'Home',
      'blog_page'     => 'Blog',
      'menus'         => array(
            'primary'   => 'Primary',
            'secondary' => 'Secondary',
        )
    ),
);
DT_Demo_Importer::instance( $settings, $options );

Create Folder by id in dt_importer/demos/ by same id

demos
  - demo-1
    - content.xml // WP Exported Data
    - options.txt // Codestar Exported Options data
    - screenshot.php // Preview Image
  - demo-2
    - content.xml // WP Exported Data
    - options.txt // Codestart Exported Options data
    - screenshot.php // Preview Image
  - demo-3
    - content.xml // WP Exported Data
    - options.txt // Codestar Exported Options data
    - screenshot.php // Preview Image

Now go to the Tools >> Demo Importer :)

Few screenshots

Dashboard

Under Development

  • This class only import codestar settings only and planned to support others framework (Like: redux, option tree)
  • Planned to support widget import.

create content.xml and options.txt file

You can create content.xml by exporting your content from the WordPress dashboard (Dashboard > Tools > Export) and you can options string from backup field on the codestar option panel.

Credits

Licence

GPL V2+

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published