Download Wordpress Files and Upload to New Blow

The best feature of this plugin is, that theme authors can ascertain import files in their themes and and then all y'all (the user of the theme) have to do is click on the "Import Demo Information" button.

Are yous a theme author?

Setup One Click Demo Imports for your theme and your users will thank you for information technology!

Follow this easy guide on how to setup this plugin for your themes!

Are you a theme user?

Contact the writer of your theme and allow them know about this plugin. Theme authors tin can make any theme compatible with this plugin in xv minutes and make it much more user-friendly.

"Where can I detect the theme author contact?"

Please take a look at our plugin documentation for more than information on how to import your demo content.

This plugin is using the modified version of the improved WP import 2.0 that is nevertheless in development and can exist found here: https://github.com/humanmade/WordPress-Importer.

NOTE: In that location is no setting to "connect" authors from the demo import file to the existing users in your WP site (like there is in the original WP Importer plugin). All demo content volition be imported under the current user.

Do you want to contribute?

Please refer to our official GitHub repository.

From your WordPress dashboard

  1. Visit 'Plugins > Add together New',
  2. Search for 'One Click Demo Import' and install the plugin,
  3. Activate 'I Click Demo Import' from your Plugins folio.

From WordPress.org

  1. Download 'I Click Demo Import'.
  2. Upload the 'one-click-demo-import' directory to your '/wp-content/plugins/' directory, using your favorite method (ftp, sftp, scp, etc…)
  3. Activate 'One Click Demo Import' from your Plugins page.

One time the plugin is activated you will find the bodily import folio in: Appearance -> Import Demo Data.

I have activated the plugin. Where is the "Import Demo Information" page?

You will find the import page in wp-admin -> Appearance -> Import Demo Data.

Where are the demo import files and the log files saved?

The files used in the demo import will exist saved to the default WordPress uploads directory. An instance of that directory would be: ../wp-content/uploads/2016/03/.

The log file volition also be registered in the wp-admin -> Media section, so y'all can admission information technology easily.

How to predefine demo imports?

This question is for theme authors. To predefine demo imports, you simply have to add the post-obit code structure, with your own values to your theme (using the ocdi/import_files filter):

                function ocdi_import_files() {     render array(         array(             'import_file_name'           => 'Demo Import 1',             'categories'                 => array( 'Category 1', 'Category ii' ),             'import_file_url'            => 'http://world wide web.your_domain.com/ocdi/demo-content.xml',             'import_widget_file_url'     => 'http://world wide web.your_domain.com/ocdi/widgets.json',             'import_customizer_file_url' => 'http://www.your_domain.com/ocdi/customizer.dat',             'import_redux'               => array(                 assortment(                     'file_url'    => 'http://world wide web.your_domain.com/ocdi/redux.json',                     'option_name' => 'redux_option_name',                 ),             ),             'import_preview_image_url'   => 'http://www.your_domain.com/ocdi/preview_import_image1.jpg',             'import_notice'              => __( 'After you import this demo, you will have to setup the slider separately.', 'your-textdomain' ),             'preview_url'                => 'http://www.your_domain.com/my-demo-one',         ),         assortment(             'import_file_name'           => 'Demo Import two',             'categories'                 => array( 'New category', 'Onetime category' ),             'import_file_url'            => 'http://world wide web.your_domain.com/ocdi/demo-content2.xml',             'import_widget_file_url'     => 'http://www.your_domain.com/ocdi/widgets2.json',             'import_customizer_file_url' => 'http://www.your_domain.com/ocdi/customizer2.dat',             'import_redux'               => array(                 array(                     'file_url'    => 'http://www.your_domain.com/ocdi/redux.json',                     'option_name' => 'redux_option_name',                 ),                 assortment(                     'file_url'    => 'http://www.your_domain.com/ocdi/redux2.json',                     'option_name' => 'redux_option_name_2',                 ),             ),             'import_preview_image_url'   => 'http://www.your_domain.com/ocdi/preview_import_image2.jpg',             'import_notice'              => __( 'A special note for this import.', 'your-textdomain' ),             'preview_url'                => 'http://www.your_domain.com/my-demo-2',         ),     ); } add_filter( 'ocdi/import_files', 'ocdi_import_files' );                              

You can set content import, widgets, customizer and Redux framework import files. You tin also define a preview image, which volition be used simply when multiple demo imports are divers, so that the user volition see the difference betwixt imports. Categories can be assigned to each demo import, and then that they can be filtered easily. The preview URL will display the "Preview" button in the predefined demo detail, which will open this URL in a new tab and user can view how the demo site looks like.

How to automatically assign "Front folio", "Posts page" and card locations after the importer is washed?

You can practice that, with the ocdi/after_import activeness hook. The code would wait something like this:

                office ocdi_after_import_setup() {     // Assign menus to their locations.     $main_menu = get_term_by( 'name', 'Primary Bill of fare', 'nav_menu' );      set_theme_mod( 'nav_menu_locations', array(             'primary-menu' => $main_menu->term_id, // supervene upon 'primary-carte du jour' here with the menu location identifier from register_nav_menu() function         )     );      // Assign front page and posts folio (weblog page).     $front_page_id = get_page_by_title( 'Home' );     $blog_page_id  = get_page_by_title( 'Web log' );      update_option( 'show_on_front', 'page' );     update_option( 'page_on_front', $front_page_id->ID );     update_option( 'page_for_posts', $blog_page_id->ID );  } add_action( 'ocdi/after_import', 'ocdi_after_import_setup' );                              

What about using local import files (from theme folder)?

Yous have to use the same filter as in above example, just with a slightly different array keys: local_*. The values take to be absolute paths (not URLs) to your import files. To use local import files, that reside in your theme folder, delight use the below code. Note: make sure your import files are readable!

                part ocdi_import_files() {     return assortment(         assortment(             'import_file_name'             => 'Demo Import 1',             'categories'                   => array( 'Category one', 'Category 2' ),             'local_import_file'            => trailingslashit( get_template_directory() ) . 'ocdi/demo-content.xml',             'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'ocdi/widgets.json',             'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer.dat',             'local_import_redux'           => assortment(                 assortment(                     'file_path'   => trailingslashit( get_template_directory() ) . 'ocdi/redux.json',                     'option_name' => 'redux_option_name',                 ),             ),             'import_preview_image_url'     => 'http://www.your_domain.com/ocdi/preview_import_image1.jpg',             'import_notice'                => __( 'After yous import this demo, you will accept to setup the slider separately.', 'your-textdomain' ),             'preview_url'                  => 'http://www.your_domain.com/my-demo-1',         ),         assortment(             'import_file_name'             => 'Demo Import two',             'categories'                   => array( 'New category', 'Old category' ),             'local_import_file'            => trailingslashit( get_template_directory() ) . 'ocdi/demo-content2.xml',             'local_import_widget_file'     => trailingslashit( get_template_directory() ) . 'ocdi/widgets2.json',             'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'ocdi/customizer2.dat',             'local_import_redux'           => array(                 array(                     'file_path'   => trailingslashit( get_template_directory() ) . 'ocdi/redux.json',                     'option_name' => 'redux_option_name',                 ),                 array(                     'file_path'   => trailingslashit( get_template_directory() ) . 'ocdi/redux2.json',                     'option_name' => 'redux_option_name_2',                 ),             ),             'import_preview_image_url'     => 'http://www.your_domain.com/ocdi/preview_import_image2.jpg',             'import_notice'                => __( 'A special note for this import.', 'your-textdomain' ),             'preview_url'                  => 'http://www.your_domain.com/my-demo-2',         ),     ); } add_filter( 'ocdi/import_files', 'ocdi_import_files' );                              

How to handle different "after import setups" depending on which predefined import was selected?

This question might exist asked by a theme author wanting to implement different afterward import setups for multiple predefined demo imports. Lets say we have predefined two demo imports with the following names: 'Demo Import one' and 'Demo Import 2', the lawmaking for subsequently import setup would be (using the ocdi/after_import filter):

                function ocdi_after_import( $selected_import ) {     repeat "This volition exist displayed on all later imports!";      if ( 'Demo Import 1' === $selected_import['import_file_name'] ) {         echo "This will be displayed only on later on import if user selects Demo Import 1";          // Set logo in customizer         set_theme_mod( 'logo_img', get_template_directory_uri() . '/assets/images/logo1.png' );     }     elseif ( 'Demo Import 2' === $selected_import['import_file_name'] ) {         repeat "This will be displayed just on after import if user selects Demo Import 2";          // Set logo in customizer         set_theme_mod( 'logo_img', get_template_directory_uri() . '/assets/images/logo2.png' );     } } add_action( 'ocdi/after_import', 'ocdi_after_import' );                              

Tin can I add some code before the widgets become imported?

Of course you can, use the ocdi/before_widgets_import action. You lot can also target different predefined demo imports like in the example to a higher place. Here is a unproblematic example lawmaking of the ocdi/before_widgets_import action:

                function ocdi_before_widgets_import( $selected_import ) {     repeat "Add your code here that will be executed earlier the widgets get imported!"; } add_action( 'ocdi/before_widgets_import', 'ocdi_before_widgets_import' );                              

How can I import via the WP-CLI?

In the 2.four.0 version of this plugin nosotros added two WP-CLI commands:

  • wp ocdi list – Which will listing whatsoever predefined demo imports currently active theme might accept,
  • wp ocdi import – which has a few options that you can utilise to import the things yous want (content/widgets/customizer/predefined demos). Let's look at these options below.

    wp ocdi import options:

    wp ocdi import [–content=] [–widgets=] [–customizer=] [–predefined=]

  • --content=<file> – will run the content import with the WP import file specified in the <file> parameter,

  • --widgets=<file> – will run the widgets import with the widgets import file specified in the <file> parameter,
  • --customizer=<file> – will run the customizer settings import with the customizer import file specified in the <file> parameter,
  • --predefined=<index> – will run the theme predefined import with the alphabetize of the predefined import in the <index> parameter (yous can use the wp ocdi listing command to cheque which index is used for each predefined demo import)

The content, widgets and customizer options can be mixed and used at the aforementioned time. If the predefined option is set, and so it will ignore all other options and import the predefined demo data.

Y'all can change the plugin intro text by using the ocdi/plugin_intro_text filter:

                role ocdi_plugin_intro_text( $default_text ) {     $default_text .= '<div class="ocdi__intro-text">This is a custom text added to this plugin intro text.</div>';      render $default_text; } add_filter( 'ocdi/plugin_intro_text', 'ocdi_plugin_intro_text' );                              

To add some text in a separate "box", you should wrap your text in a div with a course of 'ocdi__intro-text', like in the code case above.

How to disable generation of smaller images (thumbnails) during the content import

This will profoundly improve the time needed to import the content (images), merely just the original sized images will exist imported. You can disable it with a filter, so merely add this code to your theme office.php file:

                add_filter( 'ocdi/regenerate_thumbnails_in_content_import', '__return_false' );                              

How to change the location, championship and other parameters of the plugin page?

As a theme writer you do not like the location of the "Import Demo Data" plugin folio in Appearance -> Import Demo Data? You can modify that with the filter below. Apart from the location, yous tin too change the championship or the page/menu and another parameters also.

                function ocdi_plugin_page_setup( $default_settings ) {     $default_settings['parent_slug'] = 'themes.php';     $default_settings['page_title']  = esc_html__( 'One Click Demo Import' , 'one-click-demo-import' );     $default_settings['menu_title']  = esc_html__( 'Import Demo Data' , 'one-click-demo-import' );     $default_settings['capability']  = 'import';     $default_settings['menu_slug']   = '1-click-demo-import';      return $default_settings; } add_filter( 'ocdi/plugin_page_setup', 'ocdi_plugin_page_setup' );                              

How to do something before the content import executes?

In version 2.0.0 in that location is a new action claw: ocdi/before_content_import, which will let you hook before the content import starts. An case of the code would look similar this:

                function ocdi_before_content_import( $selected_import ) {     if ( 'Demo Import 1' === $selected_import['import_file_name'] ) {         // Here you can exercise stuff for the "Demo Import 1" earlier the content import starts.         echo "before import 1";     }     else {         // Hither you lot can practice stuff for all other imports earlier the content import starts.         echo "before import 2";     } } add_action( 'ocdi/before_content_import', 'ocdi_before_content_import' );                              

How can I enable the `customize_save*` wp action hooks in the customizer import?

It's piece of cake, just add this to your theme:

                add_action( 'ocdi/enable_wp_customize_save_hooks', '__return_true' );                              

This will enable the following WP hooks when importing the customizer information: customize_save, customize_save_*, customize_save_after.

How can I pass Amazon S3 presigned URL'southward (temporary links) equally external files ?

If y'all desire to host your import content files on Amazon S3, but you want them to be publicly available, rather through an ain API as presigned URL'due south (which expires) you lot can use the filter ocdi/pre_download_import_files in which you can pass your own URL'due south, for example:

                add_filter( 'ocdi/pre_download_import_files', function( $import_file_info ){      // In this example get_my_custom_urls` is supposedly making a `wp_remote_get` request, getting the urls from an API server where you're creating the presigned urls, [example here](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/s3-presigned-url.html). // This request should return an assortment containing all the 3 links - `import_file_url`, `import_widget_file_url`, `import_customizer_file_url` $asking = get_my_custom_urls( $import_file_info );  if ( !is_wp_error( $request ) ) {     if ( isset($request['data']) && is_array($request['data']) )     {         if( isset($request['data']['import_file_url']) && $import_file_url = $request['data']['import_file_url'] ){             $import_file_info['import_file_url'] = $import_file_url;         }         if( isset($asking['data']['import_widget_file_url']) && $import_widget_file_url = $request['information']['import_widget_file_url'] ){             $import_file_info['import_widget_file_url'] = $import_widget_file_url;         }         if( isset($request['data']['import_customizer_file_url']) && $import_customizer_file_url = $request['data']['import_customizer_file_url'] ){             $import_file_info['import_customizer_file_url'] = $import_customizer_file_url;         }     } }  return $import_file_info;                              

} );
`

I can't activate the plugin, because of a fatal mistake, what can I do?

Update: since version 1.2.0, in that location is now a admin error find, stating that the minimal PHP version required for this plugin is 5.3.2.

Yous want to activate the plugin, simply this fault shows upwardly:

Plugin could not be activated because it triggered a fatal error

This happens, because your hosting server is using a very former version of PHP. This plugin requires PHP version of at least 5.3.10, but we recommend version v.6.x or ameliorate withal 7.10. Please contact your hosting company and ask them to update the PHP version for your site.

Bug with the import, that nosotros can't ready in the plugin

Please visit this docs folio, for more answers to issues with importing data.

Does it import elementor pages?

Hey guys, just wanted to say thank you for the amazing plugin and recent update. I couldn't believe the features that you've added at first when I read change log. Few months ago I paid to a developer to add recommended plugins feature, and now I come across it in your new update. For me equally a theme developer this is a game-changer and the most important addon and information technology's but mind-blowing. P.S Haven't tested everything yet, going try it later 🙂

today i have install the updated plugin... and so demo import is not working... merely when i attempt to previous and then version working fine.

This plugin is similar the democracy. It is not perfect but there is nothing better created so far!

Baca semua 71 ulasan

"1 Click Demo Import" adalah perangkat lunak open source. Berikut ini mereka yang sudah berkontribusi pada plugin ini.

Kontributor

three.one.1

Release Date – 22nd March 2022

  • Stock-still missing sanitization for the redux option name.

3.1.0

Release Date – 18th March 2022

  • Changed the minimal WordPress version to 5.two.
  • Stock-still upload file types. Allow just whitelisted import file types.

3.0.2

Release Date – 2 Apr 2021

  • Stock-still missing old default settings folio (breaking existing links to the OCDI settings page).
  • Stock-still PHP notices in network admin area for WP Multisite.
  • Fixed theme card paradigm mode in the sidebar.

3.0.1

Release Date – 31 March 2021

  • Added more than details about recommended plugins.
  • Changed recommended plugins to opt-in.

3.0.0

Release Date – 31 March 2021

  • Of import: Support for PHP 5.v or lower has been discontinued. If you are running ane of those versions, you MUST upgrade PHP before installing or upgrading to One Click Demo Import v3.0. Failure to do that will disable One Click Demo Import functionality.
  • Of import: Support for WordPress core v4.9 or lower has been discontinued. If you are running one of those versions, you MUST upgrade WordPress core before installing or upgrading to One Click Demo Import v3.0. Failure to exercise that could crusade issues with the 1 Click Demo Import functionality.
  • Added back up for recommended theme plugins.
  • Added useful unmarried folio demo content imports.
  • Added recommended plugins installer.
  • Updated the UI/UX of the plugin.
  • Fixed PHP8 alert.
  • Fixed deprecated WP function wp_slash_strings_only.

2.6.ane

Release Date – 21 July 2020

  • Fixed Elementor import issues.

2.vi.0

Release Date – 21 July 2020

  • Improved code execution: not loading plugin code on frontend.
  • Stock-still wrong post and mail service meta import (unicode and other special characters were not escaped properly).
  • Stock-still error (500 – internal mistake) for Widgets import on PHP 7.x.
  • Fixed PHP notices for manual demo import.
  • Fixed PHP warning if set_time_limit part is disabled.
  • Fixed links for switching manual and predefined import modes.

2.five.2

Release Date – 29 July 2019

  • Improved documentation and lawmaking sample
  • Added pt-ocdi/pre_download_import_files filter
  • Added two action hooks to plugin-page.php
  • Bumped Tested up to tag

2.5.1

Release Date – 25 Oct 2018

  • Fix missing translation strings

2.v.0

Release Date – 8 January 2018

  • Add OCDI as a WordPress import tool in Tools -> Import,
  • Add together switching to the manual import, if the theme has predefined demo imports,
  • Set up text domain loading

2.4.0

Release Date – 23 Baronial 2017

  • Add WP-CLI commands for importing with this plugin,
  • Perbaiki konflik dengan pengimpor WooCommerce

two.3.0

Release Date – 28 May 2017

  • Add preview button selection to the predefined demo import items,
  • Add custom JS upshot trigger when the import process is completed,
  • Add custom filter for plugin page championship,
  • Remove content import as a required import. Now you can make separate imports for customizer, widgets or redux options.
  • Fix custom card widgets imports, the menus volition now exist prepare correctly.

2.2.1

Release Date – iii April 2017

  • Fix prototype importing error for server compressed files,
  • Set up remapping of featured images,
  • Set custom mail type existing posts cheque (no more multiple imports for custom post types).

2.2.0

Release Engagement – 5 February 2017

  • Add ProteusThemes branding discover after successful import,
  • Fix after import error reporting (duplicate errors were shown),
  • Set some undefined variables in the plugin, causing PHP notices.

2.i.0

Release Date – viii January 2017

  • Add filigree layout import confirmation popup options filter,
  • Fix term meta information double import,
  • Fix WooCommerce product attributes import.

2.0.2

Release Engagement – 13 Dec 2016

  • Fix issue with customizer options import

2.0.one

Release Date – 12 Dec 2016

  • Fix upshot with some browsers (Safari and IE) non supporting some FormData methods.

2.0.0

Release Engagement – 10 December 2016

  • Add new layout for multiple predefined demo imports (a grid layout instead of the dropdown selector),
  • Add support for Redux framework import,
  • Alter the code structure of the plugin (plugin rewrite, namespaces, autoloading),
  • Now the whole import (content, widgets, customizer, redux) goes through even if something goes wrong in the content import (before content import errors blocked farther import),
  • Add pt-ocdi/before_content_import activity claw, that theme authors can utilize to hook into before the content import starts,
  • Gear up frontend error reporting through multiple AJAX calls,
  • Fix post formats (video/quote/gallery,…) not importing,
  • Fix customizer import does not save some options (because of the missing WP deportment – these can be enabled via a filter, more than in the FAQ department).

1.4.0

Release Date – 29 October 2016

  • Add together support for WP term meta data in content importer,
  • Fix the event of having both plugins (OCDI and the new WP importer v2) activated at the same time.

i.3.0

Release Engagement – 1 October 2016

  • Import/plugin page re-pattern. Updated the plugin folio styles to match WordPress (cheers to Oliver Juhas).

1.2.0

Release Date – 9 July 2016

  • Now as well accepts predefined local import files (from theme folder),
  • Fixes PHP fatal error on plugin activation, for sites using PHP versions older then 5.3.two (added admin error detect),
  • Register log file in wp-admin -> Media, then that it's easier to access,
  • No more "[WARNING] Could not notice the author for …" letters in the log file.

1.i.3

Release Date – 17 June 2016

  • Updated plugin design,
  • Changed the plugin page setup filter name from pt-ocdi/plugin-page-setup to pt-ocdi/plugin_page_setup (listen the underscore characters instead of dashes).

i.1.ii

Release Date – 12 June 2016

  • An 'import notice' field has been added to the predefined demo import settings. This notice is displayed above the import push button (it also accepts HTML),
  • Now displays proper fault message, if the file-system method is not prepare to "directly",
  • This plugin is now compatible with the new Humanmade content importer plugin,
  • Added a filter to the plugin page cosmos, then that theme authors can now alter the location of the plugin page (Demo information import) and some other parameters as well.

1.1.1

Release Appointment – 22 May 2016

  • Preview import images tin can now be defined for multiple predefined import files (check FAQ "How to predefine demo imports?" for more info),
  • You can now also import customizer settings.

ane.1.0

Release Date – xiv May 2016

  • Content import now imports in multiple AJAX calls, so in that location should exist no more than server timeout errors,
  • The setting for generation of multiple epitome sizes in the content import is again enabled by default,
  • Plugin textdomain was loaded, and so that translations can be fabricated.

1.0.three

Release Date – 27 Apr 2016

  • Added filter to enable epitome regeneration,
  • Added filter to change the plugin intro text,
  • Added action to execute custom code before widget import,
  • Disabled author imports.

ane.0.2

Release Date – 15 April 2016

  • Monkey fix for WP version 4.five. – disabled generation of multiple paradigm sizes in the content import.

one.0.1

Release Appointment – ii April 2016

Small code fixes:

  • Fixed undefined variable bug,
  • Fixed naming of downloaded files and their filters.

i.0.0

Release Date – 25 March 2016

  • Initial release!

winkfieldsuchatedly.blogspot.com

Source: https://id.wordpress.org/plugins/one-click-demo-import/

0 Response to "Download Wordpress Files and Upload to New Blow"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel