PageRenderTime 27ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/Avada/framework/avada-admin/screens/install-demos.php

https://gitlab.com/woxiprogrammers/infinia-wordpress
PHP | 72 lines | 67 code | 4 blank | 1 comment | 6 complexity | facbe2006f8c101f3978baba458b6395 MD5 | raw file
  1. <?php
  2. $avada_theme = wp_get_theme();
  3. if($avada_theme->parent_theme) {
  4. $template_dir = basename(get_template_directory());
  5. $avada_theme = wp_get_theme($template_dir);
  6. }
  7. $avada_version = $avada_theme->get( 'Version' );
  8. $theme_fusion_url = 'https://theme-fusion.com/';
  9. $avada_url = $theme_fusion_url . 'avada/';
  10. $demos = array( 'classic', 'agency', 'app', 'architecture', 'cafe', 'fashion', 'hosting', 'hotel', 'law', 'lifestyle', 'travel' );
  11. ?>
  12. <div class="wrap about-wrap avada-wrap">
  13. <h1><?php echo __( "Welcome to Avada!", "Avada" ); ?></h1>
  14. <div class="updated error importer-notice importer-notice-1" style="display: none;">
  15. <p><strong><?php echo __( "We're sorry but the demo data could not import. It is most likely due to low PHP configurations on your server. There are two possible solutions.", 'Avada' ); ?></strong></p>
  16. <p><strong><?php _e( 'Solution 1:', 'Avada' ); ?></strong> <?php _e( 'Import the demo using alternate method.', 'Avada' ); ?><a href="https://theme-fusion.com/avada-doc/demo-content-info/alternate-demo-method/" class="button-primary" target="_blank" style="margin-left: 10px;"><?php _e( 'Alternate Method', 'Avada' ); ?></a></p>
  17. <p><strong><?php _e( 'Solution 2:', 'Avada' ); ?></strong> <?php echo sprintf( __( 'Fix the PHP configurations in the System Status that are reported in <strong style="color: red;">RED</strong>, then use %s, then reimport.', 'Avada' ), '<a href="' . admin_url() . 'plugin-install.php?tab=plugin-information&amp;plugin=wordpress-reset&amp;TB_iframe=true&amp;width=830&amp;height=472' . '">Reset WordPress Plugin</a>' ); ?><a href="<?php echo admin_url( 'admin.php?page=avada-system-status' ); ?>" class="button-primary" target="_blank" style="margin-left: 10px;"><?php _e( 'System Status', 'Avada' ); ?></a></p>
  18. </div>
  19. <div class="updated importer-notice importer-notice-2" style="display: none;"><p><strong><?php echo __( "Demo data successfully imported. Now, please install and run", "Avada" ); ?> <a href="<?php echo admin_url();?>plugin-install.php?tab=plugin-information&amp;plugin=regenerate-thumbnails&amp;TB_iframe=true&amp;width=830&amp;height=472" class="thickbox" title="<?php echo __( "Regenerate Thumbnails", "Avada" ); ?>"><?php echo __( "Regenerate Thumbnails", "Avada" ); ?></a> <?php echo __( "plugin once", "Avada" ); ?>.</strong></p></div>
  20. <div class="updated error importer-notice importer-notice-3" style="display: none;">
  21. <p><strong><?php echo __( "We're sorry but the demo data could not import. It is most likely due to low PHP configurations on your server. There are two possible solutions.", 'Avada' ); ?></strong></p>
  22. <p><strong><?php _e( 'Solution 1:', 'Avada' ); ?></strong> <?php _e( 'Import the demo using alternate method.', 'Avada' ); ?><a href="https://theme-fusion.com/avada-doc/demo-content-info/alternate-demo-method/" class="button-primary" target="_blank" style="margin-left: 10px;"><?php _e( 'Alternate Method', 'Avada' ); ?></a></p>
  23. <p><strong><?php _e( 'Solution 2:', 'Avada' ); ?></strong> <?php echo sprintf( __( 'Fix the PHP configurations in the System Status that are reported in <strong style="color: red;">RED</strong>, then use %s, then reimport.', 'Avada' ), '<a href="' . admin_url() . 'plugin-install.php?tab=plugin-information&amp;plugin=wordpress-reset&amp;TB_iframe=true&amp;width=830&amp;height=472' . '">Reset WordPress Plugin</a>' ); ?><a href="<?php echo admin_url( 'admin.php?page=avada-system-status' ); ?>" class="button-primary" target="_blank" style="margin-left: 10px;"><?php _e( 'System Status', 'Avada' ); ?></a></p>
  24. </div>
  25. <div class="about-text"><?php echo __( "Avada is now installed and ready to use! Get ready to build something beautiful. Please register your purchase to get support and automatic theme updates. Read below for additional information. We hope you enjoy it! <a href='//www.youtube.com/embed/dn6g_gJDAIk?rel=0&TB_iframe=true&height=540&width=960' class='thickbox' title='Guided Tour of Avada'>Watch Our Quick Guided Tour!</a>", "Avada" ); ?></div>
  26. <div class="avada-logo"><span class="avada-version"><?php echo __( "Version", "Avada" ); ?> <?php echo $avada_version; ?></span></div>
  27. <h2 class="nav-tab-wrapper">
  28. <?php
  29. printf( '<a href="%s" class="nav-tab">%s</a>', admin_url( 'admin.php?page=avada' ), __( "Product Registration", "Avada" ) );
  30. printf( '<a href="%s" class="nav-tab">%s</a>', admin_url( 'admin.php?page=avada-support' ), __( "Support", "Avada" ) );
  31. printf( '<a href="#" class="nav-tab nav-tab-active">%s</a>', __( "Install Demos", "Avada" ) );
  32. printf( '<a href="%s" class="nav-tab">%s</a>', admin_url( 'admin.php?page=avada-plugins' ), __( "Fusion Plugins", "Avada" ) );
  33. printf( '<a href="%s" class="nav-tab">%s</a>', admin_url( 'admin.php?page=avada-system-status' ), __( "System Status", "Avada" ) );
  34. ?>
  35. </h2>
  36. <div class="avada-important-notice">
  37. <p class="about-description"><?php echo __( "Installing a demo provides pages, posts, images, theme options, widgets, sliders and more. IMPORTANT: The included plugins need to be installed and activated before you install a demo. Please check the 'System Status' tab to ensure your server meets all requirements for a successful import. Settings that need attention will be listed in red.", "Avada" ); ?> <?php printf( '<a href="%s" target="_blank">%s</a>', $theme_fusion_url . 'avada-doc/demo-content-info/import-xml-file/', __( "View more info here.", "Avada" ) ); ?></p>
  38. </div>
  39. <div class="avada-demo-themes">
  40. <div class="feature-section theme-browser rendered">
  41. <?php
  42. // Loop through all demos
  43. foreach ( $demos as $demo ) { ?>
  44. <div class="theme">
  45. <div class="theme-screenshot">
  46. <img src="<?php echo AVADA_ADMIN_DIR . '../assets/images/' . $demo . '_preview.jpg'; ?>" />
  47. </div>
  48. <h3 class="theme-name" id="<?php echo $demo; ?>"><?php echo 'Avada - ' . ucfirst( $demo ); ?></h3>
  49. <div class="theme-actions">
  50. <?php printf( '<a class="button button-primary button-install-demo" data-demo-id="%s" href="#">%s</a>', strtolower( $demo ), __( "Install", "Avada" ) ); ?>
  51. <?php printf( '<a class="button button-primary" target="_blank" href="%1s">%2s</a>', ( $demo != 'classic' ) ? $avada_url . $demo : $avada_url, __( "Preview", "Avada" ) ); ?>
  52. </div>
  53. <div id="demo-preview-classic" class="screenshot-hover fusion-animated fadeInUp">
  54. <a href="<?php echo ( $demo != 'classic' ) ? $avada_url . $demo : $avada_url; ?>" target="_blank"><img src="<?php echo AVADA_ADMIN_DIR . '../assets/images/' . $demo . '_popover.jpg'; ?>" /></a>
  55. </div>
  56. <div class="demo-import-loader preview-all"></div>
  57. <div class="demo-import-loader preview-<?php echo strtolower( $demo ); ?>"><i class="dashicons dashicons-admin-generic"></i></div>
  58. </div>
  59. <?php } ?>
  60. </div>
  61. </div>
  62. <div class="avada-thanks">
  63. <p class="description"><?php echo __( "Thank you for choosing Avada. We are honored and are fully dedicated to making your experience perfect.", "Avada" ); ?></p>
  64. </div>
  65. </div>