Version Description
- Filter and search bar added to easily find a demo.
- Images size updated for large screens.
Download this release
Release Info
Developer | oceanwp |
Plugin | Ocean Demo Import |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1.1 to 1.0.2
- assets/css/admin.css +206 -35
- assets/css/admin.min.css +1 -0
- assets/css/admin.scss +156 -0
- assets/js/admin.js +94 -0
- assets/js/admin.min.js +1 -0
- includes/importer.php +59 -0
- includes/install-demos.php +23 -4
- ocean-demo-import.php +4 -4
- readme.txt +6 -1
assets/css/admin.css
CHANGED
@@ -1,44 +1,215 @@
|
|
1 |
-
#odi-demo-wrap {
|
2 |
-
|
3 |
-
#odi-demo-wrap .odi-important-notice
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
#odi-demo-wrap
|
8 |
-
|
9 |
-
|
10 |
-
#odi-demo-wrap .
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
.
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
#odi-demo-wrap .
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
/* RTL */
|
29 |
-
.rtl #odi-demo-wrap .theme-wrap
|
|
|
|
|
|
|
30 |
|
31 |
/* Responsive */
|
|
|
|
|
|
|
|
|
32 |
@media only screen and (max-width: 1080px) {
|
33 |
-
|
34 |
-
}
|
35 |
|
36 |
@media only screen and (max-width: 780px) {
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
@media only screen and (max-width: 580px) {
|
43 |
-
|
44 |
-
|
|
1 |
+
#odi-demo-wrap {
|
2 |
+
display: block; }
|
3 |
+
#odi-demo-wrap .odi-important-notice {
|
4 |
+
padding: 10px 15px;
|
5 |
+
background: #fff;
|
6 |
+
margin: 15px 0 0; }
|
7 |
+
#odi-demo-wrap .odi-important-notice p {
|
8 |
+
font-size: 14px;
|
9 |
+
margin: 0 0 5px; }
|
10 |
+
#odi-demo-wrap .odi-important-notice p:last-child {
|
11 |
+
margin: 0; }
|
12 |
+
#odi-demo-wrap .odi-about-description {
|
13 |
+
margin-top: 30px; }
|
14 |
+
#odi-demo-wrap .odi-about-description p {
|
15 |
+
font-size: 15px;
|
16 |
+
font-weight: 400;
|
17 |
+
line-height: 1.8;
|
18 |
+
margin: 0; }
|
19 |
+
#odi-demo-wrap hr {
|
20 |
+
margin: 32px 0 40px; }
|
21 |
+
#odi-demo-wrap .themes {
|
22 |
+
margin: 0 -15px; }
|
23 |
+
#odi-demo-wrap .odi-header-bar {
|
24 |
+
display: inline-block;
|
25 |
+
width: calc(100% - 40px);
|
26 |
+
background-color: #ffffff;
|
27 |
+
margin-bottom: 30px;
|
28 |
+
padding: 0 20px; }
|
29 |
+
#odi-demo-wrap .odi-navigation {
|
30 |
+
float: left;
|
31 |
+
font-size: 13px;
|
32 |
+
width: 100%; }
|
33 |
+
#odi-demo-wrap .odi-navigation ul {
|
34 |
+
list-style-type: none;
|
35 |
+
margin: 0;
|
36 |
+
padding: 0;
|
37 |
+
overflow: hidden; }
|
38 |
+
#odi-demo-wrap .odi-navigation li {
|
39 |
+
float: left;
|
40 |
+
margin: 0 15px; }
|
41 |
+
#odi-demo-wrap .odi-navigation li.active a,
|
42 |
+
#odi-demo-wrap .odi-navigation li.active a:hover {
|
43 |
+
border-bottom: 4px solid #666666; }
|
44 |
+
#odi-demo-wrap .odi-navigation li a {
|
45 |
+
display: block;
|
46 |
+
text-align: center;
|
47 |
+
text-decoration: none;
|
48 |
+
color: #444444;
|
49 |
+
border-bottom: 4px solid #ffffff;
|
50 |
+
padding: 15px 0;
|
51 |
+
outline: 0;
|
52 |
+
-webkit-box-shadow: none;
|
53 |
+
box-shadow: none; }
|
54 |
+
#odi-demo-wrap .odi-navigation li a:hover {
|
55 |
+
color: #00a0d2;
|
56 |
+
border-bottom: 4px solid #ffffff;
|
57 |
+
cursor: pointer; }
|
58 |
+
#odi-demo-wrap .odi-search-input {
|
59 |
+
width: 100%;
|
60 |
+
margin: 10px 0;
|
61 |
+
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
62 |
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
63 |
+
outline: 0;
|
64 |
+
-webkit-transition: 50ms border-color ease-in-out;
|
65 |
+
transition: 50ms border-color ease-in-out; }
|
66 |
+
#odi-demo-wrap .theme-wrap {
|
67 |
+
float: left;
|
68 |
+
width: 33.33%;
|
69 |
+
padding: 0 15px 30px 15px;
|
70 |
+
-webkit-box-sizing: border-box;
|
71 |
+
-moz-box-sizing: border-box;
|
72 |
+
box-sizing: border-box; }
|
73 |
+
#odi-demo-wrap .theme {
|
74 |
+
float: none;
|
75 |
+
width: 100%;
|
76 |
+
margin: 0; }
|
77 |
+
|
78 |
+
.odi-is-fadeout {
|
79 |
+
animation: odi-fade linear 200ms 1 forwards; }
|
80 |
+
|
81 |
+
.odi-is-fadein {
|
82 |
+
animation: odi-fade linear 200ms 1 reverse forwards; }
|
83 |
+
|
84 |
+
@keyframes odi-fade {
|
85 |
+
from {
|
86 |
+
opacity: 1; }
|
87 |
+
to {
|
88 |
+
opacity: 0; } }
|
89 |
+
|
90 |
+
.demo-import-loader {
|
91 |
+
display: none;
|
92 |
+
position: absolute;
|
93 |
+
top: 0;
|
94 |
+
width: 100%;
|
95 |
+
height: 100%;
|
96 |
+
text-align: center; }
|
97 |
+
.demo-import-loader.preview-all {
|
98 |
+
background: rgba(255, 255, 255, 0.7); }
|
99 |
+
.demo-import-loader i {
|
100 |
+
display: inline-block;
|
101 |
+
margin: -16px auto 0 auto;
|
102 |
+
height: 32px;
|
103 |
+
width: 32px;
|
104 |
+
top: 50%;
|
105 |
+
position: relative;
|
106 |
+
font-size: 32px;
|
107 |
+
line-height: 32px;
|
108 |
+
text-align: center;
|
109 |
+
-moz-animation: spin 2s infinite linear;
|
110 |
+
-o-animation: spin 2s infinite linear;
|
111 |
+
-webkit-animation: spin 2s infinite linear;
|
112 |
+
animation: spin 2s infinite linear; }
|
113 |
+
|
114 |
+
.preview-icon i {
|
115 |
+
color: #333; }
|
116 |
+
|
117 |
+
.success-icon i {
|
118 |
+
color: #329e6d;
|
119 |
+
margin: -20px auto 0 auto;
|
120 |
+
height: 40px;
|
121 |
+
width: 40px;
|
122 |
+
font-size: 40px; }
|
123 |
+
|
124 |
+
.warning-icon i {
|
125 |
+
color: #ff6c6c; }
|
126 |
+
|
127 |
+
.success-icon i, .warning-icon i {
|
128 |
+
-moz-animation: none;
|
129 |
+
-o-animation: none;
|
130 |
+
-webkit-animation: none;
|
131 |
+
animation: none; }
|
132 |
+
|
133 |
+
@-webkit-keyframes spin {
|
134 |
+
0% {
|
135 |
+
-webkit-transform: rotate(0deg); }
|
136 |
+
100% {
|
137 |
+
-webkit-transform: rotate(359deg); } }
|
138 |
+
|
139 |
+
@-moz-keyframes spin {
|
140 |
+
0% {
|
141 |
+
-moz-transform: rotate(0deg); }
|
142 |
+
100% {
|
143 |
+
-moz-transform: rotate(359deg); } }
|
144 |
+
|
145 |
+
@-o-keyframes spin {
|
146 |
+
0% {
|
147 |
+
-o-transform: rotate(0deg); }
|
148 |
+
100% {
|
149 |
+
-o-transform: rotate(359deg); } }
|
150 |
+
|
151 |
+
@-ms-keyframes spin {
|
152 |
+
0% {
|
153 |
+
-ms-transform: rotate(0deg); }
|
154 |
+
100% {
|
155 |
+
-ms-transform: rotate(359deg); } }
|
156 |
+
|
157 |
+
@keyframes spin {
|
158 |
+
0% {
|
159 |
+
transform: rotate(0deg); }
|
160 |
+
100% {
|
161 |
+
transform: rotate(359deg); } }
|
162 |
+
|
163 |
+
#odi-demo-wrap .theme-browser .theme:focus, #odi-demo-wrap .theme-browser .theme:hover {
|
164 |
+
cursor: default; }
|
165 |
+
|
166 |
+
#odi-demo-wrap .theme-browser .theme .theme-screenshot {
|
167 |
+
cursor: pointer; }
|
168 |
+
|
169 |
+
#odi-demo-wrap .theme-browser .theme .theme-name span {
|
170 |
+
cursor: text; }
|
171 |
|
172 |
/* RTL */
|
173 |
+
.rtl #odi-demo-wrap .theme-wrap,
|
174 |
+
.rtl #odi-demo-wrap .odi-navigation,
|
175 |
+
.rtl #odi-demo-wrap .odi-navigation li {
|
176 |
+
float: right; }
|
177 |
|
178 |
/* Responsive */
|
179 |
+
@media only screen and (min-width: 1640px) {
|
180 |
+
#odi-demo-wrap .theme-wrap {
|
181 |
+
width: 25%; } }
|
182 |
+
|
183 |
@media only screen and (max-width: 1080px) {
|
184 |
+
#odi-demo-wrap .theme-wrap {
|
185 |
+
width: 50%; } }
|
186 |
|
187 |
@media only screen and (max-width: 780px) {
|
188 |
+
#odi-demo-wrap .theme {
|
189 |
+
text-align: center; }
|
190 |
+
#odi-demo-wrap .theme-actions {
|
191 |
+
display: block;
|
192 |
+
position: relative;
|
193 |
+
opacity: 1; }
|
194 |
+
#odi-demo-wrap .theme-browser .theme .theme-actions .button-primary {
|
195 |
+
margin-right: 0 !important;
|
196 |
+
margin-left: 0 !important; } }
|
197 |
+
|
198 |
+
@media only screen and (min-width: 640px) {
|
199 |
+
#odi-demo-wrap .odi-navigation {
|
200 |
+
width: calc(100% - 180px); }
|
201 |
+
#odi-demo-wrap .odi-navigation li {
|
202 |
+
margin: 0; }
|
203 |
+
#odi-demo-wrap .odi-navigation li a {
|
204 |
+
padding: 15px; }
|
205 |
+
#odi-demo-wrap .odi-search-input {
|
206 |
+
display: inline-block;
|
207 |
+
width: 180px;
|
208 |
+
height: 30px;
|
209 |
+
margin: 0;
|
210 |
+
margin-top: 11px; } }
|
211 |
|
212 |
@media only screen and (max-width: 580px) {
|
213 |
+
#odi-demo-wrap .theme-wrap {
|
214 |
+
float: none;
|
215 |
+
width: 100%; } }
|
assets/css/admin.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#odi-demo-wrap{display:block}#odi-demo-wrap .odi-important-notice{padding:10px 15px;background:#fff;margin:15px 0 0}#odi-demo-wrap .odi-important-notice p{font-size:14px;margin:0 0 5px}#odi-demo-wrap .odi-important-notice p:last-child{margin:0}#odi-demo-wrap .odi-about-description{margin-top:30px}#odi-demo-wrap .odi-about-description p{font-size:15px;font-weight:400;line-height:1.8;margin:0}#odi-demo-wrap hr{margin:32px 0 40px}#odi-demo-wrap .themes{margin:0 -15px}#odi-demo-wrap .odi-header-bar{display:inline-block;width:calc(100% - 40px);background-color:#ffffff;margin-bottom:30px;padding:0 20px}#odi-demo-wrap .odi-navigation{float:left;font-size:13px;width:100%}#odi-demo-wrap .odi-navigation ul{list-style-type:none;margin:0;padding:0;overflow:hidden}#odi-demo-wrap .odi-navigation li{float:left;margin:0 15px}#odi-demo-wrap .odi-navigation li.active a,#odi-demo-wrap .odi-navigation li.active a:hover{border-bottom:4px solid #666666}#odi-demo-wrap .odi-navigation li a{display:block;text-align:center;text-decoration:none;color:#444444;border-bottom:4px solid #ffffff;padding:15px 0;outline:0;-webkit-box-shadow:none;box-shadow:none}#odi-demo-wrap .odi-navigation li a:hover{color:#00a0d2;border-bottom:4px solid #ffffff;cursor:pointer}#odi-demo-wrap .odi-search-input{width:100%;margin:10px 0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);outline:0;-webkit-transition:50ms border-color ease-in-out;transition:50ms border-color ease-in-out}#odi-demo-wrap .theme-wrap{float:left;width:33.33%;padding:0 15px 30px 15px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#odi-demo-wrap .theme{float:none;width:100%;margin:0}.odi-is-fadeout{animation:odi-fade linear 200ms 1 forwards}.odi-is-fadein{animation:odi-fade linear 200ms 1 reverse forwards}@keyframes odi-fade{from{opacity:1}to{opacity:0}}.demo-import-loader{display:none;position:absolute;top:0;width:100%;height:100%;text-align:center}.demo-import-loader.preview-all{background:rgba(255,255,255,0.7)}.demo-import-loader i{display:inline-block;margin:-16px auto 0 auto;height:32px;width:32px;top:50%;position:relative;font-size:32px;line-height:32px;text-align:center;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}.preview-icon i{color:#333}.success-icon i{color:#329e6d;margin:-20px auto 0 auto;height:40px;width:40px;font-size:40px}.warning-icon i{color:#ff6c6c}.success-icon i,.warning-icon i{-moz-animation:none;-o-animation:none;-webkit-animation:none;animation:none}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}#odi-demo-wrap .theme-browser .theme:focus,#odi-demo-wrap .theme-browser .theme:hover{cursor:default}#odi-demo-wrap .theme-browser .theme .theme-screenshot{cursor:pointer}#odi-demo-wrap .theme-browser .theme .theme-name span{cursor:text}.rtl #odi-demo-wrap .theme-wrap,.rtl #odi-demo-wrap .odi-navigation,.rtl #odi-demo-wrap .odi-navigation li{float:right}@media only screen and (min-width: 1640px){#odi-demo-wrap .theme-wrap{width:25%}}@media only screen and (max-width: 1080px){#odi-demo-wrap .theme-wrap{width:50%}}@media only screen and (max-width: 780px){#odi-demo-wrap .theme{text-align:center}#odi-demo-wrap .theme-actions{display:block;position:relative;opacity:1}#odi-demo-wrap .theme-browser .theme .theme-actions .button-primary{margin-right:0 !important;margin-left:0 !important}}@media only screen and (min-width: 640px){#odi-demo-wrap .odi-navigation{width:calc(100% - 180px)}#odi-demo-wrap .odi-navigation li{margin:0}#odi-demo-wrap .odi-navigation li a{padding:15px}#odi-demo-wrap .odi-search-input{display:inline-block;width:180px;height:30px;margin:0;margin-top:11px}}@media only screen and (max-width: 580px){#odi-demo-wrap .theme-wrap{float:none;width:100%}}
|
assets/css/admin.scss
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#odi-demo-wrap {
|
2 |
+
display: block;
|
3 |
+
|
4 |
+
.odi-important-notice {
|
5 |
+
padding: 10px 15px;
|
6 |
+
background: #fff;
|
7 |
+
margin: 15px 0 0;
|
8 |
+
|
9 |
+
p {
|
10 |
+
font-size: 14px;
|
11 |
+
margin: 0 0 5px;
|
12 |
+
|
13 |
+
&:last-child { margin: 0; }
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
.odi-about-description {
|
18 |
+
margin-top: 30px;
|
19 |
+
|
20 |
+
p { font-size: 15px; font-weight: 400; line-height: 1.8; margin: 0; }
|
21 |
+
}
|
22 |
+
|
23 |
+
hr { margin: 32px 0 40px; }
|
24 |
+
|
25 |
+
.themes { margin: 0 -15px; }
|
26 |
+
|
27 |
+
.odi-header-bar { display: inline-block; width: calc(100% - 40px); background-color: #ffffff; margin-bottom: 30px; padding: 0 20px; }
|
28 |
+
|
29 |
+
.odi-navigation {
|
30 |
+
float: left;
|
31 |
+
font-size: 13px;
|
32 |
+
width: 100%;
|
33 |
+
|
34 |
+
ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; }
|
35 |
+
|
36 |
+
li {
|
37 |
+
float: left;
|
38 |
+
margin: 0 15px;
|
39 |
+
|
40 |
+
&.active a,
|
41 |
+
&.active a:hover { border-bottom: 4px solid #666666; }
|
42 |
+
a {
|
43 |
+
display: block;
|
44 |
+
text-align: center;
|
45 |
+
text-decoration: none;
|
46 |
+
color: #444444;
|
47 |
+
border-bottom: 4px solid #ffffff;
|
48 |
+
padding: 15px 0;
|
49 |
+
outline: 0;
|
50 |
+
-webkit-box-shadow: none;
|
51 |
+
box-shadow: none;
|
52 |
+
|
53 |
+
&:hover { color: #00a0d2; border-bottom: 4px solid #ffffff; cursor:pointer; }
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
.odi-search-input {
|
59 |
+
width: 100%;
|
60 |
+
margin: 10px 0;
|
61 |
+
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
|
62 |
+
box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
|
63 |
+
outline: 0;
|
64 |
+
-webkit-transition: 50ms border-color ease-in-out;
|
65 |
+
transition: 50ms border-color ease-in-out;
|
66 |
+
}
|
67 |
+
|
68 |
+
.theme-wrap { float: left; width: 33.33%; padding: 0 15px 30px 15px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
69 |
+
|
70 |
+
.theme { float: none; width: 100%; margin: 0; }
|
71 |
+
}
|
72 |
+
|
73 |
+
.odi-is-fadeout { animation: odi-fade linear 200ms 1 forwards; }
|
74 |
+
.odi-is-fadein { animation: odi-fade linear 200ms 1 reverse forwards; }
|
75 |
+
|
76 |
+
@keyframes odi-fade {
|
77 |
+
from {
|
78 |
+
opacity: 1;
|
79 |
+
}
|
80 |
+
|
81 |
+
to {
|
82 |
+
opacity: 0;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
.demo-import-loader {
|
87 |
+
display: none;
|
88 |
+
position: absolute;
|
89 |
+
top: 0;
|
90 |
+
width: 100%;
|
91 |
+
height: 100%;
|
92 |
+
text-align: center;
|
93 |
+
|
94 |
+
&.preview-all { background: rgba( 255, 255, 255, 0.7 ); }
|
95 |
+
i { display: inline-block; margin: -16px auto 0 auto; height: 32px; width: 32px; top: 50%; position: relative; font-size: 32px; line-height: 32px; text-align: center; -moz-animation: spin 2s infinite linear; -o-animation: spin 2s infinite linear; -webkit-animation: spin 2s infinite linear; animation: spin 2s infinite linear; }
|
96 |
+
}
|
97 |
+
|
98 |
+
.preview-icon i { color: #333; }
|
99 |
+
.success-icon i { color: #329e6d; margin: -20px auto 0 auto; height: 40px; width: 40px; font-size: 40px; }
|
100 |
+
.warning-icon i { color: #ff6c6c; }
|
101 |
+
.success-icon i, .warning-icon i { -moz-animation: none; -o-animation: none; -webkit-animation: none; animation: none; }
|
102 |
+
|
103 |
+
@-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); } }
|
104 |
+
@-moz-keyframes spin { 0% { -moz-transform: rotate(0deg); } 100% { -moz-transform: rotate(359deg); } }
|
105 |
+
@-o-keyframes spin { 0% { -o-transform: rotate(0deg); } 100% { -o-transform: rotate(359deg); } }
|
106 |
+
@-ms-keyframes spin { 0% { -ms-transform: rotate(0deg); } 100% { -ms-transform: rotate(359deg); } }
|
107 |
+
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(359deg); } }
|
108 |
+
|
109 |
+
#odi-demo-wrap .theme-browser .theme {
|
110 |
+
&:focus, &:hover { cursor: default; }
|
111 |
+
.theme-screenshot { cursor: pointer; }
|
112 |
+
.theme-name span { cursor: text; }
|
113 |
+
}
|
114 |
+
|
115 |
+
/* RTL */
|
116 |
+
.rtl #odi-demo-wrap {
|
117 |
+
.theme-wrap,
|
118 |
+
.odi-navigation,
|
119 |
+
.odi-navigation li { float: right; }
|
120 |
+
}
|
121 |
+
|
122 |
+
/* Responsive */
|
123 |
+
@media only screen and (min-width: 1640px) {
|
124 |
+
#odi-demo-wrap .theme-wrap { width: 25%; }
|
125 |
+
}
|
126 |
+
|
127 |
+
@media only screen and (max-width: 1080px) {
|
128 |
+
#odi-demo-wrap .theme-wrap { width: 50%; }
|
129 |
+
}
|
130 |
+
|
131 |
+
@media only screen and (max-width: 780px) {
|
132 |
+
#odi-demo-wrap {
|
133 |
+
.theme { text-align: center; }
|
134 |
+
.theme-actions { display: block; position: relative; opacity: 1; }
|
135 |
+
.theme-browser .theme .theme-actions .button-primary { margin-right: 0 !important; margin-left: 0 !important; }
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
@media only screen and (min-width: 640px) {
|
140 |
+
#odi-demo-wrap {
|
141 |
+
.odi-navigation {
|
142 |
+
width: calc(100% - 180px);
|
143 |
+
|
144 |
+
li {
|
145 |
+
margin: 0;
|
146 |
+
|
147 |
+
a { padding: 15px; }
|
148 |
+
}
|
149 |
+
}
|
150 |
+
.odi-search-input { display: inline-block; width: 180px; height: 30px; margin: 0; margin-top: 11px; }
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
@media only screen and (max-width: 580px) {
|
155 |
+
#odi-demo-wrap .theme-wrap { float: none; width: 100%; }
|
156 |
+
}
|
assets/js/admin.js
CHANGED
@@ -2,6 +2,100 @@ var $j = jQuery.noConflict();
|
|
2 |
|
3 |
$j(document).ready(function(e) {
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
// if clicked on import data button
|
6 |
$j( '.odi-install' ).live( 'click', function(e) {
|
7 |
|
2 |
|
3 |
$j(document).ready(function(e) {
|
4 |
|
5 |
+
// Categories navigation
|
6 |
+
(function () {
|
7 |
+
// Cache selector to all items
|
8 |
+
var $items = $j( '#odi-demo-wrap .themes' ).find( '.theme-wrap' ),
|
9 |
+
fadeoutClass = 'odi-is-fadeout',
|
10 |
+
fadeinClass = 'odi-is-fadein',
|
11 |
+
animationDuration = 200;
|
12 |
+
|
13 |
+
// Hide all items.
|
14 |
+
var fadeOut = function () {
|
15 |
+
var dfd = jQuery.Deferred();
|
16 |
+
|
17 |
+
$items
|
18 |
+
.addClass( fadeoutClass );
|
19 |
+
|
20 |
+
setTimeout( function() {
|
21 |
+
$items
|
22 |
+
.removeClass( fadeoutClass )
|
23 |
+
.hide();
|
24 |
+
|
25 |
+
dfd.resolve();
|
26 |
+
}, animationDuration );
|
27 |
+
|
28 |
+
return dfd.promise();
|
29 |
+
};
|
30 |
+
|
31 |
+
var fadeIn = function ( category, dfd ) {
|
32 |
+
var filter = category ? '[data-categories*="' + category + '"]' : 'div';
|
33 |
+
|
34 |
+
if ( 'all' === category ) {
|
35 |
+
filter = 'div';
|
36 |
+
}
|
37 |
+
|
38 |
+
$items
|
39 |
+
.filter( filter )
|
40 |
+
.show()
|
41 |
+
.addClass( 'odi-is-fadein' );
|
42 |
+
|
43 |
+
setTimeout( function() {
|
44 |
+
$items
|
45 |
+
.removeClass( fadeinClass );
|
46 |
+
|
47 |
+
dfd.resolve();
|
48 |
+
}, animationDuration );
|
49 |
+
};
|
50 |
+
|
51 |
+
var animate = function ( category ) {
|
52 |
+
var dfd = jQuery.Deferred();
|
53 |
+
|
54 |
+
var promise = fadeOut();
|
55 |
+
|
56 |
+
promise.done( function () {
|
57 |
+
fadeIn( category, dfd );
|
58 |
+
} );
|
59 |
+
|
60 |
+
return dfd;
|
61 |
+
};
|
62 |
+
|
63 |
+
$j( '.odi-navigation-link' ).on( 'click', function( event ) {
|
64 |
+
event.preventDefault();
|
65 |
+
|
66 |
+
// Remove 'active' class from the previous nav list items.
|
67 |
+
$j( this ).parent().siblings().removeClass( 'active' );
|
68 |
+
|
69 |
+
// Add the 'active' class to this nav list item.
|
70 |
+
$j( this ).parent().addClass( 'active' );
|
71 |
+
|
72 |
+
var category = this.hash.slice(1);
|
73 |
+
|
74 |
+
// show/hide the right items, based on category selected
|
75 |
+
var $container = $j( '#odi-demo-wrap .themes' );
|
76 |
+
$container.css( 'min-width', $container.outerHeight() );
|
77 |
+
|
78 |
+
var promise = animate( category );
|
79 |
+
|
80 |
+
promise.done( function () {
|
81 |
+
$container.removeAttr( 'style' );
|
82 |
+
} );
|
83 |
+
} );
|
84 |
+
}());
|
85 |
+
|
86 |
+
// Search functionality.
|
87 |
+
$j( '.odi-search-input' ).on( 'keyup', function( event ) {
|
88 |
+
if ( 0 < $j( this ).val().length ) {
|
89 |
+
// Hide all items.
|
90 |
+
$j( '#odi-demo-wrap .themes' ).find( '.theme-wrap' ).hide();
|
91 |
+
|
92 |
+
// Show just the ones that have a match on the import name.
|
93 |
+
$j( '#odi-demo-wrap .themes' ).find( '.theme-wrap[data-name*="' + $j( this ).val().toLowerCase() + '"]' ).show();
|
94 |
+
} else {
|
95 |
+
$j( '#odi-demo-wrap .themes' ).find( '.theme-wrap' ).show();
|
96 |
+
}
|
97 |
+
} );
|
98 |
+
|
99 |
// if clicked on import data button
|
100 |
$j( '.odi-install' ).live( 'click', function(e) {
|
101 |
|
assets/js/admin.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var $j=jQuery.noConflict();$j(document).ready(function(a){!function(){var a=$j("#odi-demo-wrap .themes").find(".theme-wrap"),b="odi-is-fadeout",c="odi-is-fadein",d=200,e=function(){var c=jQuery.Deferred();return a.addClass(b),setTimeout(function(){a.removeClass(b).hide(),c.resolve()},d),c.promise()},f=function(b,e){var f=b?'[data-categories*="'+b+'"]':"div";"all"===b&&(f="div"),a.filter(f).show().addClass("odi-is-fadein"),setTimeout(function(){a.removeClass(c),e.resolve()},d)},g=function(a){var b=jQuery.Deferred(),c=e();return c.done(function(){f(a,b)}),b};$j(".odi-navigation-link").on("click",function(a){a.preventDefault(),$j(this).parent().siblings().removeClass("active"),$j(this).parent().addClass("active");var b=this.hash.slice(1),c=$j("#odi-demo-wrap .themes");c.css("min-width",c.outerHeight());var d=g(b);d.done(function(){c.removeAttr("style")})})}(),$j(".odi-search-input").on("keyup",function(a){0<$j(this).val().length?($j("#odi-demo-wrap .themes").find(".theme-wrap").hide(),$j("#odi-demo-wrap .themes").find('.theme-wrap[data-name*="'+$j(this).val().toLowerCase()+'"]').show()):$j("#odi-demo-wrap .themes").find(".theme-wrap").show()}),$j(".odi-install").live("click",function(a){var b=$j(this).data("demo-id"),c=$j(".preview-"+b),d=$j(".success-"+b),e=$j(".warning-"+b),f=$j(".preview-all-"+b);c.show(),f.show();var g={action:"ocean_import_demo_data",demo_type:b};$j(".importer-notice").hide(),$j.post(ajaxurl,g,function(a){a&&-1==a.indexOf("imported")?($j(".importer-notice-1").attr("style","display:block !important"),e.show(),setTimeout(function(){e.hide(),f.hide()},4e3)):($j(".importer-notice-2").attr("style","display:block !important"),d.show(),setTimeout(function(){d.hide(),f.hide()},4e3)),c.hide()}).fail(function(){$j(".importer-notice-3").attr("style","display:block !important"),e.show(),setTimeout(function(){e.hide(),f.hide()},4e3),c.hide()}),a.preventDefault()})});
|
includes/importer.php
CHANGED
@@ -45,6 +45,7 @@ class ODI_Importer {
|
|
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',
|
@@ -56,6 +57,7 @@ class ODI_Importer {
|
|
56 |
),
|
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',
|
@@ -66,6 +68,7 @@ class ODI_Importer {
|
|
66 |
),
|
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',
|
@@ -76,6 +79,7 @@ class ODI_Importer {
|
|
76 |
),
|
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',
|
@@ -87,6 +91,7 @@ class ODI_Importer {
|
|
87 |
),
|
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',
|
@@ -98,6 +103,7 @@ class ODI_Importer {
|
|
98 |
),
|
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',
|
@@ -108,6 +114,7 @@ class ODI_Importer {
|
|
108 |
),
|
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',
|
@@ -118,6 +125,7 @@ class ODI_Importer {
|
|
118 |
),
|
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',
|
@@ -141,6 +149,7 @@ class ODI_Importer {
|
|
141 |
),
|
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',
|
@@ -152,6 +161,7 @@ class ODI_Importer {
|
|
152 |
),
|
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',
|
@@ -163,6 +173,7 @@ class ODI_Importer {
|
|
163 |
),
|
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',
|
@@ -186,6 +197,7 @@ class ODI_Importer {
|
|
186 |
),
|
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',
|
@@ -202,6 +214,51 @@ class ODI_Importer {
|
|
202 |
|
203 |
}
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
/**
|
206 |
* Allows xml uploads so we can import from github
|
207 |
*
|
@@ -368,6 +425,8 @@ class ODI_Importer {
|
|
368 |
$locations['topbar_menu'] = $menu->term_id;
|
369 |
} else if ( $menu->name == 'Footer Menu' ) {
|
370 |
$locations['footer_menu'] = $menu->term_id;
|
|
|
|
|
371 |
}
|
372 |
|
373 |
}
|
45 |
$data = array(
|
46 |
|
47 |
'architect' => array(
|
48 |
+
'categories' => array( 'Business' ),
|
49 |
'xml_file' => $url . 'architect/sample-data.xml',
|
50 |
'theme_settings' => $url . 'architect/oceanwp-export.json',
|
51 |
'widgets_file' => $url . 'architect/widgets.wie',
|
57 |
),
|
58 |
|
59 |
'blogger' => array(
|
60 |
+
'categories' => array( 'Blog' ),
|
61 |
'xml_file' => $url . 'blogger/sample-data.xml',
|
62 |
'theme_settings' => $url . 'blogger/oceanwp-export.json',
|
63 |
'widgets_file' => $url . 'blogger/widgets.wie',
|
68 |
),
|
69 |
|
70 |
'coach' => array(
|
71 |
+
'categories' => array( 'Business', 'Sport', 'One Page' ),
|
72 |
'xml_file' => $url . 'coach/sample-data.xml',
|
73 |
'theme_settings' => $url . 'coach/oceanwp-export.json',
|
74 |
'widgets_file' => $url . 'coach/widgets.wie',
|
79 |
),
|
80 |
|
81 |
'gym' => array(
|
82 |
+
'categories' => array( 'Business', 'Sport' ),
|
83 |
'xml_file' => $url . 'gym/sample-data.xml',
|
84 |
'theme_settings' => $url . 'gym/oceanwp-export.json',
|
85 |
'widgets_file' => $url . 'gym/widgets.wie',
|
91 |
),
|
92 |
|
93 |
'lawyer' => array(
|
94 |
+
'categories' => array( 'Business' ),
|
95 |
'xml_file' => $url . 'lawyer/sample-data.xml',
|
96 |
'theme_settings' => $url . 'lawyer/oceanwp-export.json',
|
97 |
'widgets_file' => $url . 'lawyer/widgets.wie',
|
103 |
),
|
104 |
|
105 |
'megagym' => array(
|
106 |
+
'categories' => array( 'Business', 'Sport', 'One Page' ),
|
107 |
'xml_file' => $url . 'megagym/sample-data.xml',
|
108 |
'theme_settings' => $url . 'megagym/oceanwp-export.json',
|
109 |
'widgets_file' => $url . 'megagym/widgets.wie',
|
114 |
),
|
115 |
|
116 |
'personal' => array(
|
117 |
+
'categories' => array( 'Blog' ),
|
118 |
'xml_file' => $url . 'personal/sample-data.xml',
|
119 |
'theme_settings' => $url . 'personal/oceanwp-export.json',
|
120 |
'widgets_file' => $url . 'personal/widgets.wie',
|
125 |
),
|
126 |
|
127 |
'store' => array(
|
128 |
+
'categories' => array( 'eCommerce' ),
|
129 |
'xml_file' => $url . 'store/sample-data.xml',
|
130 |
'theme_settings' => $url . 'store/oceanwp-export.json',
|
131 |
'widgets_file' => $url . 'store/widgets.wie',
|
149 |
),
|
150 |
|
151 |
'stylish' => array(
|
152 |
+
'categories' => array( 'Business' ),
|
153 |
'xml_file' => $url . 'stylish/sample-data.xml',
|
154 |
'theme_settings' => $url . 'stylish/oceanwp-export.json',
|
155 |
'widgets_file' => $url . 'stylish/widgets.wie',
|
161 |
),
|
162 |
|
163 |
'travel' => array(
|
164 |
+
'categories' => array( 'Blog' ),
|
165 |
'xml_file' => $url . 'travel/sample-data.xml',
|
166 |
'theme_settings' => $url . 'travel/oceanwp-export.json',
|
167 |
'widgets_file' => $url . 'travel/widgets.wie',
|
173 |
),
|
174 |
|
175 |
'underwear' => array(
|
176 |
+
'categories' => array( 'eCommerce' ),
|
177 |
'xml_file' => $url . 'underwear/sample-data.xml',
|
178 |
'theme_settings' => $url . 'underwear/oceanwp-export.json',
|
179 |
'widgets_file' => $url . 'underwear/widgets.wie',
|
197 |
),
|
198 |
|
199 |
'yoga' => array(
|
200 |
+
'categories' => array( 'Business', 'Sport' ),
|
201 |
'xml_file' => $url . 'yoga/sample-data.xml',
|
202 |
'theme_settings' => $url . 'yoga/oceanwp-export.json',
|
203 |
'widgets_file' => $url . 'yoga/widgets.wie',
|
214 |
|
215 |
}
|
216 |
|
217 |
+
/**
|
218 |
+
* Get the category list of all categories used in the predefined demo imports array.
|
219 |
+
*
|
220 |
+
* @since 1.0.2
|
221 |
+
*/
|
222 |
+
public static function get_all_categories( $demo_imports ) {
|
223 |
+
$categories = array();
|
224 |
+
|
225 |
+
foreach ( $demo_imports as $item ) {
|
226 |
+
if ( ! empty( $item['categories'] ) && is_array( $item['categories'] ) ) {
|
227 |
+
foreach ( $item['categories'] as $category ) {
|
228 |
+
$categories[ sanitize_key( $category ) ] = $category;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
if ( empty( $categories ) ) {
|
234 |
+
return false;
|
235 |
+
}
|
236 |
+
|
237 |
+
return $categories;
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Return the concatenated string of demo import item categories.
|
242 |
+
* These should be separated by comma and sanitized properly.
|
243 |
+
*
|
244 |
+
* @since 1.0.2
|
245 |
+
*/
|
246 |
+
public static function get_item_categories( $item ) {
|
247 |
+
$sanitized_categories = array();
|
248 |
+
|
249 |
+
if ( isset( $item['categories'] ) ) {
|
250 |
+
foreach ( $item['categories'] as $category ) {
|
251 |
+
$sanitized_categories[] = sanitize_key( $category );
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
if ( ! empty( $sanitized_categories ) ) {
|
256 |
+
return implode( ',', $sanitized_categories );
|
257 |
+
}
|
258 |
+
|
259 |
+
return false;
|
260 |
+
}
|
261 |
+
|
262 |
/**
|
263 |
* Allows xml uploads so we can import from github
|
264 |
*
|
425 |
$locations['topbar_menu'] = $menu->term_id;
|
426 |
} else if ( $menu->name == 'Footer Menu' ) {
|
427 |
$locations['footer_menu'] = $menu->term_id;
|
428 |
+
} else if ( $menu->name == 'Sticky Footer' ) {
|
429 |
+
$locations['sticky_footer_menu'] = $menu->term_id;
|
430 |
}
|
431 |
|
432 |
}
|
includes/install-demos.php
CHANGED
@@ -57,7 +57,7 @@ class ODI_Install_Demos {
|
|
57 |
|
58 |
<div class="updated importer-notice importer-notice-2" style="display: none;">
|
59 |
|
60 |
-
<p><?php
|
61 |
|
62 |
</div>
|
63 |
|
@@ -82,8 +82,7 @@ class ODI_Install_Demos {
|
|
82 |
$plugin_link = admin_url( 'plugin-install.php?s=Wordpress+Database+Reset&tab=search' );
|
83 |
} ?>
|
84 |
|
85 |
-
<p><?php echo sprintf(
|
86 |
-
</p>
|
87 |
|
88 |
</div>
|
89 |
|
@@ -91,6 +90,26 @@ class ODI_Install_Demos {
|
|
91 |
|
92 |
<div class="theme-browser rendered">
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
<div class="themes wp-clearfix">
|
95 |
|
96 |
<?php
|
@@ -100,7 +119,7 @@ class ODI_Install_Demos {
|
|
100 |
// Preview url
|
101 |
$preview = $ocean_url . $demo; ?>
|
102 |
|
103 |
-
<div class="theme-wrap">
|
104 |
|
105 |
<div class="theme">
|
106 |
|
57 |
|
58 |
<div class="updated importer-notice importer-notice-2" style="display: none;">
|
59 |
|
60 |
+
<p><?php echo sprintf( esc_html__( 'Demo data successfully imported. Please check your page and make sure that everything has imported correctly. If it did, you can deactivate the %1$sOcean Demo Import%2$s plugin, because it has done its job.', 'ocean-demo-import' ), '<strong>', '</strong>' ); ?></p>
|
61 |
|
62 |
</div>
|
63 |
|
82 |
$plugin_link = admin_url( 'plugin-install.php?s=Wordpress+Database+Reset&tab=search' );
|
83 |
} ?>
|
84 |
|
85 |
+
<p><?php echo sprintf( esc_html__( 'Importing demo data ( post, pages, images, customizer settings, ... ) is the easiest way to setup your theme. It will allow you to quickly edit everything instead of creating content from scratch. We recommend uploading sample data on a clean installation to prevent conflicts with your current content. You can use this plugin to reset your site if needed: %1$sWordpress Database Reset%2$s.', 'ocean-demo-import' ), '<a href="'. $plugin_link .'" target="_blank">', '</a>' ); ?></p>
|
|
|
86 |
|
87 |
</div>
|
88 |
|
90 |
|
91 |
<div class="theme-browser rendered">
|
92 |
|
93 |
+
<?php
|
94 |
+
// Categories
|
95 |
+
$categories = ODI_Importer::get_all_categories( $demos ); ?>
|
96 |
+
|
97 |
+
<?php if ( ! empty( $categories ) ) : ?>
|
98 |
+
<div class="odi-header-bar">
|
99 |
+
<nav class="odi-navigation">
|
100 |
+
<ul>
|
101 |
+
<li class="active"><a href="#all" class="odi-navigation-link"><?php esc_html_e( 'All', 'ocean-demo-import' ); ?></a></li>
|
102 |
+
<?php foreach ( $categories as $key => $name ) : ?>
|
103 |
+
<li><a href="#<?php echo esc_attr( $key ); ?>" class="odi-navigation-link"><?php echo esc_html( $name ); ?></a></li>
|
104 |
+
<?php endforeach; ?>
|
105 |
+
</ul>
|
106 |
+
</nav>
|
107 |
+
<div clas="odi-search">
|
108 |
+
<input type="text" class="odi-search-input" name="odi-search" value="" placeholder="<?php esc_html_e( 'Search demos...', 'ocean-demo-import' ); ?>">
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
<?php endif; ?>
|
112 |
+
|
113 |
<div class="themes wp-clearfix">
|
114 |
|
115 |
<?php
|
119 |
// Preview url
|
120 |
$preview = $ocean_url . $demo; ?>
|
121 |
|
122 |
+
<div class="theme-wrap" data-categories="<?php echo esc_attr( ODI_Importer::get_item_categories( $key ) ); ?>" data-name="<?php echo esc_attr( strtolower( $demo ) ); ?>">
|
123 |
|
124 |
<div class="theme">
|
125 |
|
ocean-demo-import.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.
|
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.
|
91 |
|
92 |
define( 'ODI_PATH', $this->plugin_path );
|
93 |
define( 'ODI_URL', $this->plugin_url );
|
@@ -207,10 +207,10 @@ final class Ocean_Demo_Import {
|
|
207 |
if ( 'theme-panel_page_oceanwp-panel-install-demos' == $hook_suffix ) {
|
208 |
|
209 |
// CSS
|
210 |
-
wp_enqueue_style( 'odi-style', plugins_url( '/assets/css/admin.css', __FILE__ ) );
|
211 |
|
212 |
// JS
|
213 |
-
wp_enqueue_script( 'odi-js', plugins_url( '/assets/js/admin.js', __FILE__ ) );
|
214 |
|
215 |
}
|
216 |
|
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.2
|
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.2';
|
91 |
|
92 |
define( 'ODI_PATH', $this->plugin_path );
|
93 |
define( 'ODI_URL', $this->plugin_url );
|
207 |
if ( 'theme-panel_page_oceanwp-panel-install-demos' == $hook_suffix ) {
|
208 |
|
209 |
// CSS
|
210 |
+
wp_enqueue_style( 'odi-style', plugins_url( '/assets/css/admin.min.css', __FILE__ ) );
|
211 |
|
212 |
// JS
|
213 |
+
wp_enqueue_script( 'odi-js', plugins_url( '/assets/js/admin.min.js', __FILE__ ) );
|
214 |
|
215 |
}
|
216 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: oceanwp
|
|
3 |
Tags: import, content, demo, data, widgets, settings, oceanwp
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.7.2
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -11,6 +11,7 @@ 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 ==
|
@@ -31,6 +32,10 @@ This plugin will only work with the [OceanWP](https://oceanwp.org/) theme.
|
|
31 |
|
32 |
== Changelog ==
|
33 |
|
|
|
|
|
|
|
|
|
34 |
= 1.0.1.1 =
|
35 |
- Problem ith images fixed.
|
36 |
|
3 |
Tags: import, content, demo, data, widgets, settings, oceanwp
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.7.2
|
6 |
+
Stable tag: 1.0.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Import the OceanWP demo content, widgets and customizer settings with one click.
|
15 |
This plugin requires the [OceanWP](https://oceanwp.org/) theme to be installed.
|
16 |
|
17 |
== Installation ==
|
32 |
|
33 |
== Changelog ==
|
34 |
|
35 |
+
= 1.0.2 =
|
36 |
+
- Filter and search bar added to easily find a demo.
|
37 |
+
- Images size updated for large screens.
|
38 |
+
|
39 |
= 1.0.1.1 =
|
40 |
- Problem ith images fixed.
|
41 |
|