Giter VIP home page Giter VIP logo

radium-one-click-demo-install's Introduction

One Click Demo Install for Wordpress Developers

This library works by importing wordpress content, widgets and theme options with just one click.

Supported Wordpress Options Frameworks

Requirements:

  • WordPress Theme
  • Content.xml - generated using the Worpress Content Exporter plugin
  • Widget.json - generated using the Widget Importer Exporter plugin. Rename it from .wie to .json
  • theme_options.txt - generated using the theme options frameworks such as Redux Framework, NHP Options Framework or Radium Framework
  • Change the $theme_options_framework variable found in the init file to match your framework.

How to use:

Add require get_template_directory() .'/radium-one-click-demo-install/init.php'; to your theme's function.php

Copy the files generated above into demo-files/.

Modify what menus need to be loaded in the Radium_Theme_Demo_Data_Importer class located in init.php as well as the theme options name to be used.

A new menu should appear under

Appearance -> Import Demo Data

Click the import button

That's it.

Follow me on:

Contributors

  • Franklin Gitonga
  • Primoz Cigle
  • Webcreations907

Licence

GPL V2+

radium-one-click-demo-install's People

Contributors

bassemn avatar bryant1410 avatar frankm1 avatar josephgabito avatar joshuatf avatar primozcigler avatar saqibsarwar avatar vburlak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

radium-one-click-demo-install's Issues

Importing Revolution Slider

Hi,

Thank you so much for this awesome plugin!
Do you have any options to import revolution sliders demos with the xml content by the same one click!

Thanks!

Redux Framework Export

The exported file created from Redux is a json file. In the init.php file, the $theme_options_file_name is looking for a txt file. Is it possible to link to the json file? or is it necessary to convert the exported Redux options file to a text file?

Thanks!

I can't import widgets

Hi,
The import for content and theme options done without any problems but the widgets I can't import it.
Please advise

WooCommerce stock management work incorrectly with radium class included

This looks very strange but with this one click demo install class included woocommerce stock management for products start works incorrectly. I am using WP 4.2.1 and latest WooCommerce version.

How to represent issue:

  1. Add radium class to theme
  2. Install WooCommerce and add some test product with Quantity for example 10 and check Manage stock for this item and set item as In stock
  3. Add this item to cart in frontend (for example 1 item) and checkout with this product
  4. Check product quanitity - you will see that it changed to -1 and Out of stock status (but should be 9). If you check order log you will see message from woocommerce - product stock changed from 0 to -1 (but should be from 10 to 9).
    Now comment code line that include radium class and checkout with the same product again (but first set it In stock and change quantity back to 10 for example) - you will see that product stock goes to 9 correctly.

check_previous_meta function meta field conflict

The check_previous_meta function in radium-importer.php conflicts with meta field options. This can be replicated using the WP Job Manager plugin. When checking a checkbox on job posts the checkbox does not remaine checked once you save the post. As soon as this function is removed the checkbox stays checked when the post is saved.

For now I'm running a check to only use this function on themes.php using $pagenow:

        global $pagenow;
        if ( $pagenow === 'themes.php' ) {
            add_filter( 'add_post_metadata', array( $this, 'check_previous_meta' ), 10, 5 );
        }

Will this code still be run when importing demo data? Is there a better alternative to this?

Geeting extra characters in content import

Hi:

Thanks for this great plugin, I had modified it greatly to include content, options, widgets, and layouts (specific to Divi Themes), however, I had started seeing extra characters in the output. suspecting it was my issue, yet finding nothing in the code, or in the import files, I then restored all the code back to what is found here. The extra characters I find are "nn" found after DIV and P tags in the output, but I cannot find anything in my import files, or in your code.
You can view the issue here: http://dev.products-and-services.ca/home/ and look around, you'll see many of the "nn" issues.

Any help in isolating where these "nn" are being generated would be great.
FYI: I also separated all the imports to ensure it was not some other import I was doing that caused the extra characters and found it is specific to the import of my content-demo.xml file (attached)

Best Regards,
Dennis Hall
content-export.zip

Widgets import not working + menus does not set after import.

Hello,

Thanks for this plugin, i tried now and i changed files with my theme files (xml,json,txt) also i've set menus, but after clicking on import = just content.xml imported and nothing else.

also this is my menu codes:

$top_menu = get_term_by('onepage', 'One-page menu', 'nav_menu');
$main_menu = get_term_by('primary', 'Primary menu', 'nav_menu');
$footer_menu = get_term_by('footer', 'Footer menu', 'nav_menu');

set_theme_mod( 'nav_menu_locations', array(
'onepage' => $top_menu->term_id,
'primary' => $main_menu->term_id,
'footer' => $footer_menu->term_id
)
);

any help on this ?

Revolution Slider, Setting Home and Blog Page, Primary menu locations?

Hi,

I use this one click import, and OptionTree. I saw redux framework has an import option, from this repo :
https://github.com/Webcreations907/WBC-Importer-extension

In that repo, example-functions.php file - have all code of what i want. But since it's only compatable with redux framework i'm not able to use it :
Check line number from 205 : example-functions.php

Please anyone let me know those option to integrate within our radium one click install?

Change import js url from child theme functions.php

I have parent-child theme structure. I am using custom path format for my wordpress to make it secure.
So my path adds github directory structure and few more folders before theme folder.
So ABSPATH turns incorrect and I get wrong url to import.js file as follows.
srv/users/stagedev/apps/mydev/releases/20170829115438/content/themes/mango/inc/admin/ReduxCore/inc/extensions/wbc_importer/wbc_importer/field_wbc_importer.min.js

and so JS url becomes like this.
SITEURL/srv/users/stagedev/apps/mydev/releases/20170829115438/content/themes/mango/inc/admin/ReduxCore/inc/extensions/wbc_importer/wbc_importer/field_wbc_importer.min.js

As It does not have any filter or hook I can not change url path to proper path. Can you please let me know what changes I need to do in child theme so that I can make demo install working?

theme_options.txt example

Sorry, may I see an example of how Radium's "theme_options.txt" is made? What's its structure? I use a framework made by me and I'm not sure to understand how this file should be compiled to be rightly imported.

I haven't tested your script yet, but as a ThemeForest author I really appreciate the fact you shared it, thank you so much.

Manuel :-)

Incompatibility with PHP 7.0.5

Hello,

My theme use the Radium One Click Demo Install but it returns an error since I upgrade my hosting service with PHP 7.0.5, this is the error I have when trying to load page in the admin section

Fatal error: Redefinition of parameter $options in /htdocs/wp-content/themes/Fashion/radium-one-click-demo-install/importer/radium-importer.php on line 278

What could be the workaround to make it works ?

Thank you,

Line 278 define the public function

/**
         * Process all imports
         *
         * @params $content
         * @params $options
         * @params $options
         * @params $widgets
         *
         * @since 0.0.3
         *
         * @return null
         */
        public function process_imports( $content = true, $options = true, $options = true, $widgets = true) {

            if ( $content && !empty( $this->content_demo ) && is_file( $this->content_demo ) ) {
                $this->set_demo_data( $this->content_demo );
            }

            if ( $options && !empty( $this->theme_options_file ) && is_file( $this->theme_options_file ) ) {
                $this->set_demo_theme_options( $this->theme_options_file );
            }

            if ( $options ) {
                $this->set_demo_menus();
            }

            if ( $widgets && !empty( $this->widgets ) && is_file( $this->widgets ) ) {
                $this->process_widget_import_file( $this->widgets );
            }

            do_action( 'radium_import_end');

        }

Can the script be modified to run upon theme activation?

I would really like to run this script upon theme activation. This is for a WP multisite that will only have a single theme available to the sub sites so there will be no re-activating once the subsite is created. What would be the correct function? Please and thank you.

Theme Check Issue?

Hi guys.

I have uploaded to TF with One Click Demo and they rejected following.

http://envato.d.pr/DjIn/4yUoLmWP

Can someone tell me how to fix this? Or should i just tell the Reviewers it's open source plugin and we have included on our theme?

I have checked themeforest Submission requirements those problems are in allowed exception. but they still reject for this?
Anyone had similiar issues?

Thanks.

Need Three Time to Import Data, Can be Solved This ?

First time show fatal error, execution time 30 second exceed
Second time Import One page, One post, and show two or three media file exit.
Third time get imported with all data with second time data override.

Can be this issue be solved?

What is the licence of this script?

Hi Frank,

I wonder how this script was licensed? I'd like to modify some code and change a repo structure a bit (with submodule to the original content import plugin etc.), but in order to do that, I need to know first how you decided to license your script, so I can give appropriate attribution.

Thank you for the answer!

ot_options_id doesn't exist on load

Hi, nice plugin

There is a little problem on installation with Option Tree:
function ot_options_id from Option Tree is located on ot-functions.php file, and this file is included by an action hoocked to wp 'after_setup_theme' hook on ot-loader.php file.
I fixed this by requiring your init at same hook like this:
function load_radium_one_click_demo_install(){
require get_template_directory() .'/radium-one-click-demo-install/init.php';
}
add_action( 'after_setup_theme', 'load_radium_one_click_demo_install', 2 );

Hope this helps

Thanks for your awesome work

OptionTree integration

Hey,

Thanks for this plugin, it works great. Is there any way to generate a compatible "theme_options.txt" for the OptionTree?

Spinner not working

After 4.2 update the spinner has stopped working. Which looks strange coz user doesn't wait for the demo to be imported and everything messes up. Any solution?

Json options import

Not an issue BUT i think it would be great if you can use the json options importer https://wordpress.org/plugins/json-options/ in place of the theme options. Since wordpress stores all options in the wp_options, it has the potential to import menu, widgets, wordpress general and reading settings, as well as framework options. I think it has the potential to be cross framework proof!

Could you try to see if you can make this work? I'd like to try but it's too advanced for my level.

Custom Post type not works

Hi
i use Radium one click demo importer in divi child theme everything works fine , but data not imported in custom posts type , even custom post is already registered in parent theme .

can you please help ?

Thanks

WordPress Customizer Options?

I am looking to have a one click demo install that also can setup Customizer Options. We recently changed our framework over to use Devin's Customizer Library and all our options are now in the the Customizer. https://github.com/devinsays/customizer-library

I also found a plugin that seems to allow for export of Customizer settings here: https://wordpress.org/plugins/customizer-export-import/

Is it possible to somehow get this into your One Click Demo install so that everything can be altogether?

Hide "Import Demo Data" button after importing

Hi, first of all i would to say big thanks to you for making our life much easier by providing this very useful function. It really works like charm, but I'm wandering if it can set to hide after importing content successfully?

Create Redux importer extension allowed?

Hello,

First off thanks for providing this for others ๐Ÿ˜„

I see in another post that you had said it was ok to modify/fork/etc, I was curious if it would be ok for me to create a extension(free) for Reduxframework with it?

I've started on the creation of it and all seems to be working so far, but wanted to double check with you that it would be ok before wrapping it up. It's grown a bit more then I was planning in terms of features, but is simple to use.

Happy to provide more info if you'd like.

Thanks again ๐Ÿ˜„

WP Customizer settings

Hey, thank you for this tool! However, is it possible to use it somehow with the WP Customizer settings instead of a .txt file from a framework?

TIA, Manuel :-)

how to import demo from more than one demo files ?

I want to achieve a new feature as per my clients saying. She wants to import demo from family-law and personal injury law projects. If she select family law only data from family law will import and vice versa. How can I do this with this library plz help me out ? While I want to add some quick yes, no check as will, process should proceed only if user selects ok else it should stop... hope any one can help me out plz ?

PHP Strict Standards

Hi,

Thanks for this really useful script.

I am getting following PHP notices

[24-Feb-2015 09:05:38 UTC] PHP Strict Standards: Redefining already defined constructor for class WXR_Parser_Regex in /my-theme-path/one-click-demo-install/importer/parsers.php on line 391

[24-Feb-2015 09:05:38 UTC] PHP Strict Standards: Declaration of WP_Import::bump_request_timeout() should be compatible with WP_Importer::bump_request_timeout($val) in /my-theme-path/one-click-demo-install/importer/wordpress-importer.php on line 38

@FrankM1 please look into these, it would be great if you can provide a fix for this.

Thanks & Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.