Ocean Demo Import - Version 1.0.1

Version Description

  • Support OceanWP 1.1.
Download this release

Release Info

Developer oceanwp
Plugin Icon 128x128 Ocean Demo Import
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0.0 to 1.0.1

includes/importer.php CHANGED
@@ -40,13 +40,13 @@ class ODI_Importer {
40
  public static function get_data() {
41
 
42
  // Demos url
43
- $url = 'https://raw.githubusercontent.com/oceanwp/ocean-sample-data/master/';
44
 
45
  $data = array(
46
 
47
  'architect' => array(
48
  'xml_file' => $url . 'architect/sample-data.xml',
49
- 'theme_settings' => $url . 'architect/ocean-export.json',
50
  'widgets_file' => $url . 'architect/widgets.wie',
51
  'home_title' => 'Home',
52
  'blog_title' => 'Blog',
@@ -57,7 +57,7 @@ class ODI_Importer {
57
 
58
  'blogger' => array(
59
  'xml_file' => $url . 'blogger/sample-data.xml',
60
- 'theme_settings' => $url . 'blogger/ocean-export.json',
61
  'widgets_file' => $url . 'blogger/widgets.wie',
62
  'home_title' => '',
63
  'blog_title' => 'Home',
@@ -67,7 +67,7 @@ class ODI_Importer {
67
 
68
  'coach' => array(
69
  'xml_file' => $url . 'coach/sample-data.xml',
70
- 'theme_settings' => $url . 'coach/ocean-export.json',
71
  'widgets_file' => $url . 'coach/widgets.wie',
72
  'home_title' => 'Home',
73
  'blog_title' => 'Blog',
@@ -77,7 +77,7 @@ class ODI_Importer {
77
 
78
  'gym' => array(
79
  'xml_file' => $url . 'gym/sample-data.xml',
80
- 'theme_settings' => $url . 'gym/ocean-export.json',
81
  'widgets_file' => $url . 'gym/widgets.wie',
82
  'home_title' => 'Home',
83
  'blog_title' => 'News',
@@ -88,7 +88,7 @@ class ODI_Importer {
88
 
89
  'lawyer' => array(
90
  'xml_file' => $url . 'lawyer/sample-data.xml',
91
- 'theme_settings' => $url . 'lawyer/ocean-export.json',
92
  'widgets_file' => $url . 'lawyer/widgets.wie',
93
  'home_title' => 'Home',
94
  'blog_title' => 'Blog',
@@ -99,7 +99,7 @@ class ODI_Importer {
99
 
100
  'megagym' => array(
101
  'xml_file' => $url . 'megagym/sample-data.xml',
102
- 'theme_settings' => $url . 'megagym/ocean-export.json',
103
  'widgets_file' => $url . 'megagym/widgets.wie',
104
  'home_title' => 'Home',
105
  'blog_title' => 'Blog',
@@ -109,7 +109,7 @@ class ODI_Importer {
109
 
110
  'personal' => array(
111
  'xml_file' => $url . 'personal/sample-data.xml',
112
- 'theme_settings' => $url . 'personal/ocean-export.json',
113
  'widgets_file' => $url . 'personal/widgets.wie',
114
  'home_title' => '',
115
  'blog_title' => 'Home',
@@ -119,7 +119,7 @@ class ODI_Importer {
119
 
120
  'store' => array(
121
  'xml_file' => $url . 'store/sample-data.xml',
122
- 'theme_settings' => $url . 'store/ocean-export.json',
123
  'widgets_file' => $url . 'store/widgets.wie',
124
  'home_title' => 'Home',
125
  'blog_title' => 'Blog',
@@ -142,7 +142,7 @@ class ODI_Importer {
142
 
143
  'stylish' => array(
144
  'xml_file' => $url . 'stylish/sample-data.xml',
145
- 'theme_settings' => $url . 'stylish/ocean-export.json',
146
  'widgets_file' => $url . 'stylish/widgets.wie',
147
  'home_title' => 'Home',
148
  'blog_title' => 'Blog',
@@ -153,7 +153,7 @@ class ODI_Importer {
153
 
154
  'travel' => array(
155
  'xml_file' => $url . 'travel/sample-data.xml',
156
- 'theme_settings' => $url . 'travel/ocean-export.json',
157
  'widgets_file' => $url . 'travel/widgets.wie',
158
  'home_title' => 'Home',
159
  'blog_title' => 'Blog',
@@ -164,7 +164,7 @@ class ODI_Importer {
164
 
165
  'underwear' => array(
166
  'xml_file' => $url . 'underwear/sample-data.xml',
167
- 'theme_settings' => $url . 'underwear/ocean-export.json',
168
  'widgets_file' => $url . 'underwear/widgets.wie',
169
  'home_title' => 'Home',
170
  'blog_title' => 'Blog',
@@ -187,7 +187,7 @@ class ODI_Importer {
187
 
188
  'yoga' => array(
189
  'xml_file' => $url . 'yoga/sample-data.xml',
190
- 'theme_settings' => $url . 'yoga/ocean-export.json',
191
  'widgets_file' => $url . 'yoga/widgets.wie',
192
  'home_title' => 'Home',
193
  'blog_title' => 'Blog',
40
  public static function get_data() {
41
 
42
  // Demos url
43
+ $url = 'https://raw.githubusercontent.com/oceanwp/oceanwp-sample-data/master/';
44
 
45
  $data = array(
46
 
47
  'architect' => array(
48
  'xml_file' => $url . 'architect/sample-data.xml',
49
+ 'theme_settings' => $url . 'architect/oceanwp-export.json',
50
  'widgets_file' => $url . 'architect/widgets.wie',
51
  'home_title' => 'Home',
52
  'blog_title' => 'Blog',
57
 
58
  'blogger' => array(
59
  'xml_file' => $url . 'blogger/sample-data.xml',
60
+ 'theme_settings' => $url . 'blogger/oceanwp-export.json',
61
  'widgets_file' => $url . 'blogger/widgets.wie',
62
  'home_title' => '',
63
  'blog_title' => 'Home',
67
 
68
  'coach' => array(
69
  'xml_file' => $url . 'coach/sample-data.xml',
70
+ 'theme_settings' => $url . 'coach/oceanwp-export.json',
71
  'widgets_file' => $url . 'coach/widgets.wie',
72
  'home_title' => 'Home',
73
  'blog_title' => 'Blog',
77
 
78
  'gym' => array(
79
  'xml_file' => $url . 'gym/sample-data.xml',
80
+ 'theme_settings' => $url . 'gym/oceanwp-export.json',
81
  'widgets_file' => $url . 'gym/widgets.wie',
82
  'home_title' => 'Home',
83
  'blog_title' => 'News',
88
 
89
  'lawyer' => array(
90
  'xml_file' => $url . 'lawyer/sample-data.xml',
91
+ 'theme_settings' => $url . 'lawyer/oceanwp-export.json',
92
  'widgets_file' => $url . 'lawyer/widgets.wie',
93
  'home_title' => 'Home',
94
  'blog_title' => 'Blog',
99
 
100
  'megagym' => array(
101
  'xml_file' => $url . 'megagym/sample-data.xml',
102
+ 'theme_settings' => $url . 'megagym/oceanwp-export.json',
103
  'widgets_file' => $url . 'megagym/widgets.wie',
104
  'home_title' => 'Home',
105
  'blog_title' => 'Blog',
109
 
110
  'personal' => array(
111
  'xml_file' => $url . 'personal/sample-data.xml',
112
+ 'theme_settings' => $url . 'personal/oceanwp-export.json',
113
  'widgets_file' => $url . 'personal/widgets.wie',
114
  'home_title' => '',
115
  'blog_title' => 'Home',
119
 
120
  'store' => array(
121
  'xml_file' => $url . 'store/sample-data.xml',
122
+ 'theme_settings' => $url . 'store/oceanwp-export.json',
123
  'widgets_file' => $url . 'store/widgets.wie',
124
  'home_title' => 'Home',
125
  'blog_title' => 'Blog',
142
 
143
  'stylish' => array(
144
  'xml_file' => $url . 'stylish/sample-data.xml',
145
+ 'theme_settings' => $url . 'stylish/oceanwp-export.json',
146
  'widgets_file' => $url . 'stylish/widgets.wie',
147
  'home_title' => 'Home',
148
  'blog_title' => 'Blog',
153
 
154
  'travel' => array(
155
  'xml_file' => $url . 'travel/sample-data.xml',
156
+ 'theme_settings' => $url . 'travel/oceanwp-export.json',
157
  'widgets_file' => $url . 'travel/widgets.wie',
158
  'home_title' => 'Home',
159
  'blog_title' => 'Blog',
164
 
165
  'underwear' => array(
166
  'xml_file' => $url . 'underwear/sample-data.xml',
167
+ 'theme_settings' => $url . 'underwear/oceanwp-export.json',
168
  'widgets_file' => $url . 'underwear/widgets.wie',
169
  'home_title' => 'Home',
170
  'blog_title' => 'Blog',
187
 
188
  'yoga' => array(
189
  'xml_file' => $url . 'yoga/sample-data.xml',
190
+ 'theme_settings' => $url . 'yoga/oceanwp-export.json',
191
  'widgets_file' => $url . 'yoga/widgets.wie',
192
  'home_title' => 'Home',
193
  'blog_title' => 'Blog',
includes/install-demos.php CHANGED
@@ -25,11 +25,11 @@ class ODI_Install_Demos {
25
  */
26
  public function add_page() {
27
  add_submenu_page(
28
- 'ocean-panel',
29
  esc_html__( 'Install Demos', 'ocean-demo-import' ),
30
  esc_html__( 'Install Demos', 'ocean-demo-import' ),
31
  'manage_options',
32
- 'ocean-panel-install-demos',
33
  array( $this, 'create_admin_page' )
34
  );
35
  }
25
  */
26
  public function add_page() {
27
  add_submenu_page(
28
+ 'oceanwp-panel',
29
  esc_html__( 'Install Demos', 'ocean-demo-import' ),
30
  esc_html__( 'Install Demos', 'ocean-demo-import' ),
31
  'manage_options',
32
+ 'oceanwp-panel-install-demos',
33
  array( $this, 'create_admin_page' )
34
  );
35
  }
ocean-demo-import.php CHANGED
@@ -2,8 +2,8 @@
2
  /**
3
  * Plugin Name: Ocean Demo Import
4
  * Plugin URI: https://oceanwp.org/extension/ocean-demo-import/
5
- * Description: Import the Ocean demo content, widgets and customizer settings with one click.
6
- * Version: 1.0.0
7
  * Author: OceanWP
8
  * Author URI: https://oceanwp.org/
9
  * Requires at least: 4.0.0
@@ -87,7 +87,7 @@ final class Ocean_Demo_Import {
87
  $this->token = 'ocean-demo-import';
88
  $this->plugin_url = plugin_dir_url( __FILE__ );
89
  $this->plugin_path = plugin_dir_path( __FILE__ );
90
- $this->version = '1.0.0';
91
 
92
  define( 'ODI_ROOT', dirname( __FILE__ ) );
93
  define( 'ODI_PATH', $this->plugin_path );
@@ -168,13 +168,13 @@ final class Ocean_Demo_Import {
168
 
169
  /**
170
  * Setup all the things.
171
- * Only executes if Ocean or a child theme using Ocean as a parent is active and the extension specific filter returns true.
172
  * @return void
173
  */
174
  public function odi_setup() {
175
  $theme = wp_get_theme();
176
 
177
- if ( 'Ocean' == $theme->name || 'ocean' == $theme->template ) {
178
  if ( is_admin() ) {
179
  require_once( ODI_ROOT .'/includes/class/class-helpers.php' );
180
  require_once( ODI_ROOT .'/includes/importer.php' );
@@ -187,14 +187,14 @@ final class Ocean_Demo_Import {
187
  }
188
 
189
  /**
190
- * Ocean install
191
- * If the user activates the plugin while having a different parent theme active, prompt them to install Ocean.
192
  * @since 1.0.0
193
  * @return void
194
  */
195
  public function odi_install_ocean_notice() {
196
  echo '<div class="notice is-dismissible updated">
197
- <p>' . esc_html__( 'Ocean Extra requires that you use ocean as your parent theme.', 'ocean-demo-import' ) . ' <a href="https://oceanwp.com/">' . esc_html__( 'Install Ocean Now', 'ocean-demo-import' ) . '</a></p>
198
  </div>';
199
  }
200
 
@@ -205,7 +205,7 @@ final class Ocean_Demo_Import {
205
  */
206
  public static function odi_scripts( $hook_suffix ) {
207
 
208
- if ( 'theme-panel_page_ocean-panel-install-demos' == $hook_suffix ) {
209
 
210
  // CSS
211
  wp_enqueue_style( 'odi-style', plugins_url( '/assets/css/admin.css', __FILE__ ) );
2
  /**
3
  * Plugin Name: Ocean Demo Import
4
  * Plugin URI: https://oceanwp.org/extension/ocean-demo-import/
5
+ * Description: Import the OceanWP demo content, widgets and customizer settings with one click.
6
+ * Version: 1.0.1
7
  * Author: OceanWP
8
  * Author URI: https://oceanwp.org/
9
  * Requires at least: 4.0.0
87
  $this->token = 'ocean-demo-import';
88
  $this->plugin_url = plugin_dir_url( __FILE__ );
89
  $this->plugin_path = plugin_dir_path( __FILE__ );
90
+ $this->version = '1.0.1';
91
 
92
  define( 'ODI_ROOT', dirname( __FILE__ ) );
93
  define( 'ODI_PATH', $this->plugin_path );
168
 
169
  /**
170
  * Setup all the things.
171
+ * Only executes if OceanWP or a child theme using OceanWP as a parent is active and the extension specific filter returns true.
172
  * @return void
173
  */
174
  public function odi_setup() {
175
  $theme = wp_get_theme();
176
 
177
+ if ( 'OceanWP' == $theme->name || 'oceanwp' == $theme->template || 'ocean' == $theme->template ) {
178
  if ( is_admin() ) {
179
  require_once( ODI_ROOT .'/includes/class/class-helpers.php' );
180
  require_once( ODI_ROOT .'/includes/importer.php' );
187
  }
188
 
189
  /**
190
+ * OceanWP install
191
+ * If the user activates the plugin while having a different parent theme active, prompt them to install OceanWP.
192
  * @since 1.0.0
193
  * @return void
194
  */
195
  public function odi_install_ocean_notice() {
196
  echo '<div class="notice is-dismissible updated">
197
+ <p>' . esc_html__( 'Ocean Demo Import requires that you use OceanWP as your parent theme.', 'ocean-demo-import' ) . ' <a href="https://oceanwp.com/">' . esc_html__( 'Install OceanWP Now', 'ocean-demo-import' ) . '</a></p>
198
  </div>';
199
  }
200
 
205
  */
206
  public static function odi_scripts( $hook_suffix ) {
207
 
208
+ if ( 'theme-panel_page_oceanwp-panel-install-demos' == $hook_suffix ) {
209
 
210
  // CSS
211
  wp_enqueue_style( 'odi-style', plugins_url( '/assets/css/admin.css', __FILE__ ) );
readme.txt CHANGED
@@ -1,17 +1,17 @@
1
  === Ocean Demo Import ===
2
  Contributors: oceanwp
3
- Tags: import, content, demo, data, widgets, settings, ocean
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
- Stable tag: 1.0.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Import the Ocean demo content, widgets and customizer settings with one click.
11
 
12
  == Description ==
13
 
14
- This plugin requires the [Ocean](https://oceanwp.org/) theme to be installed.
15
 
16
  == Installation ==
17
 
@@ -23,7 +23,7 @@ This plugin requires the [Ocean](https://oceanwp.org/) theme to be installed.
23
 
24
  = I installed the plugin but the panel do not appear =
25
 
26
- This plugin will only work with the [Ocean](https://oceanwp.org/) theme.
27
 
28
  == Screenshots ==
29
 
@@ -31,5 +31,8 @@ This plugin will only work with the [Ocean](https://oceanwp.org/) theme.
31
 
32
  == Changelog ==
33
 
 
 
 
34
  = 1.0.0 =
35
  - Initial release.
1
  === Ocean Demo Import ===
2
  Contributors: oceanwp
3
+ Tags: import, content, demo, data, widgets, settings, oceanwp
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 1.0.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ Import the OceanWP demo content, widgets and customizer settings with one click.
11
 
12
  == Description ==
13
 
14
+ This plugin requires the [OceanWP](https://oceanwp.org/) theme to be installed.
15
 
16
  == Installation ==
17
 
23
 
24
  = I installed the plugin but the panel do not appear =
25
 
26
+ This plugin will only work with the [OceanWP](https://oceanwp.org/) theme.
27
 
28
  == Screenshots ==
29
 
31
 
32
  == Changelog ==
33
 
34
+ = 1.0.1 =
35
+ - Support OceanWP 1.1.
36
+
37
  = 1.0.0 =
38
  - Initial release.