Version Description
Download this release
Release Info
Developer | codeinwp |
Plugin | WP Product Review Lite |
Version | 2.8.0 |
Comparing to | |
See all releases |
Code changes from version 2.7.2 to 2.8.0
- admin/inc/adminOptionsValidator.php +205 -205
- admin/inc/config.php +5 -5
- admin/inc/render.php +607 -607
- admin/layout/css/main_page.css +1023 -1023
- admin/layout/js/custom-bar-icon.js +47 -47
- css/cwppos-widget.css +72 -72
- css/dashboard_styles.css +12 -0
- css/frontpage.css +55 -18
- css/pro_dashboard_styles.css +7 -0
- inc/cwp-addons.php +1 -1
- inc/cwp_comment.php +6 -1
- inc/cwp_latest_products_widget.php +340 -340
- inc/cwp_metabox.php +89 -11
- inc/cwp_top_products_widget.php +1 -1
- inc/wppr-filters.php +86 -86
- inc/wppr-main.php +529 -453
- javascript/admin-review.js +7 -0
- javascript/main.js +6 -3
- readme.txt +286 -248
- wp-product-review.php +40 -40
admin/inc/adminOptionsValidator.php
CHANGED
@@ -1,206 +1,206 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class cwpposOptionsValidator {
|
4 |
-
public function __construct(){
|
5 |
-
|
6 |
-
$sanitizer = new cwpposSanitizer();
|
7 |
-
add_filter( 'cwppos_sanitize_color', array($sanitizer,'sanitize_hex'),10,2);
|
8 |
-
add_filter( 'cwppos_sanitize_textarea', array($sanitizer,'sanitize_textarea'),10,2);
|
9 |
-
add_filter( 'cwppos_sanitize_array', array($sanitizer,'sanitize_array'),10,3);
|
10 |
-
add_filter( 'cwppos_sanitize_enum', array($sanitizer,'sanitize_enum'),10,3);
|
11 |
-
add_filter( 'cwppos_sanitaze_typography', array($sanitizer,'sanitize_typography'),10,2);
|
12 |
-
add_filter( 'cwppos_sanitize_url', array($sanitizer,'sanitize_imageurl'),10,2);
|
13 |
-
add_filter( 'cwppos_sanitize_number', array($sanitizer,'sanitize_number'),10,2);
|
14 |
-
add_filter( 'cwppos_sanitize_background', array($sanitizer,'sanitize_background'),10,2);
|
15 |
-
add_filter( 'cwppos_sanitize_textarea_html', array($sanitizer,'sanitize_html'),10,2);
|
16 |
-
add_filter( 'cwppos_sanitize_change_icon', array($sanitizer, 'sanitize_change_icon'), 10, 2);
|
17 |
-
}
|
18 |
-
public function validate_defaults(){
|
19 |
-
$ninput = array();
|
20 |
-
$defaults = $this->get_default_options();
|
21 |
-
foreach($defaults as $k=>$i){
|
22 |
-
switch($i['type']){
|
23 |
-
case "textarea":
|
24 |
-
case "editor":
|
25 |
-
|
26 |
-
case "input_text":
|
27 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_textarea",$i['default']);
|
28 |
-
break;
|
29 |
-
case "textarea_html":
|
30 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_textarea_html",$i['default']);
|
31 |
-
break;
|
32 |
-
|
33 |
-
case "radio":
|
34 |
-
case "select":
|
35 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_enum",$i['default'],$k);
|
36 |
-
|
37 |
-
break;
|
38 |
-
case "color":
|
39 |
-
|
40 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_color",$i['default']);
|
41 |
-
break;
|
42 |
-
case "image":
|
43 |
-
|
44 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_url",$i['default']);
|
45 |
-
break;
|
46 |
-
case "background":
|
47 |
-
|
48 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_background",$i['default']);
|
49 |
-
break;
|
50 |
-
case "typography":
|
51 |
-
|
52 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_typography",$i['default']);
|
53 |
-
break;
|
54 |
-
case "input_number":
|
55 |
-
|
56 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_number",$i['default']);
|
57 |
-
break;
|
58 |
-
case "checkbox":
|
59 |
-
case "multiselect":
|
60 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_array",$i['default'],$k);
|
61 |
-
break;
|
62 |
-
|
63 |
-
case "change_icon":
|
64 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_change_icon",$i['default'],$k);
|
65 |
-
break;
|
66 |
-
|
67 |
-
}
|
68 |
-
}
|
69 |
-
return $ninput;
|
70 |
-
}
|
71 |
-
public function validate($input){
|
72 |
-
|
73 |
-
$ninput = array();
|
74 |
-
|
75 |
-
$options = $this->get_options_data();
|
76 |
-
|
77 |
-
|
78 |
-
foreach($input as $k=>$i){
|
79 |
-
switch($options[$k]['type']){
|
80 |
-
case "textarea":
|
81 |
-
case "editor":
|
82 |
-
|
83 |
-
case "input_text":
|
84 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_textarea",$i,$options[$k]['default']);
|
85 |
-
|
86 |
-
break;
|
87 |
-
case "textarea_html":
|
88 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_textarea_html",$i,$options[$k]['default']);
|
89 |
-
break;
|
90 |
-
case "radio":
|
91 |
-
case "select":
|
92 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_enum",$i,$k,$options[$k]['default']);
|
93 |
-
|
94 |
-
break;
|
95 |
-
case "color":
|
96 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_color",$i,$options[$k]['default']);
|
97 |
-
break;
|
98 |
-
case "image":
|
99 |
-
|
100 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_url",$i,$options[$k]['default']);
|
101 |
-
break;
|
102 |
-
case "background":
|
103 |
-
|
104 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_background",$i,$options[$k]['default']);
|
105 |
-
break;
|
106 |
-
case "typography":
|
107 |
-
|
108 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_typography",$i,$options[$k]['default']);
|
109 |
-
break;
|
110 |
-
case "input_number":
|
111 |
-
|
112 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_number",$i,$options[$k]['default']);
|
113 |
-
break;
|
114 |
-
case "checkbox":
|
115 |
-
case "multiselect":
|
116 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_array",$i,$k,$options[$k]['default']);
|
117 |
-
break;
|
118 |
-
|
119 |
-
case "change_icon":
|
120 |
-
$ninput[$k] = apply_filters("cwppos_sanitize_change_icon",$i,$k,$options[$k]['default']);
|
121 |
-
break;
|
122 |
-
|
123 |
-
}
|
124 |
-
}
|
125 |
-
return $ninput;
|
126 |
-
}
|
127 |
-
public function get_default_options(){
|
128 |
-
$structure = cwpposConfig::$structure;
|
129 |
-
$options = cwppos_get_config_defaults($structure);
|
130 |
-
$data = array();
|
131 |
-
foreach($structure as $k=>$fields){
|
132 |
-
|
133 |
-
if($fields['type'] == 'tab'){
|
134 |
-
|
135 |
-
|
136 |
-
foreach ($fields['options'] as $r=>$field){
|
137 |
-
|
138 |
-
if($field['type'] == 'group'){
|
139 |
-
|
140 |
-
foreach($field['options'] as $m=>$gfield){
|
141 |
-
if($gfield["type"]!='title')
|
142 |
-
$data[$gfield['id']] = array(
|
143 |
-
"default"=>$options[$gfield['id']],
|
144 |
-
"type"=>$gfield['type']
|
145 |
-
);
|
146 |
-
}
|
147 |
-
|
148 |
-
}else{
|
149 |
-
if($field["type"]!='title')
|
150 |
-
|
151 |
-
$data[$field['id']] = array(
|
152 |
-
"default"=>$options[$field['id']],
|
153 |
-
"type"=>$field['type']
|
154 |
-
);
|
155 |
-
}
|
156 |
-
|
157 |
-
}
|
158 |
-
|
159 |
-
}
|
160 |
-
|
161 |
-
}
|
162 |
-
return $data;
|
163 |
-
}
|
164 |
-
public function get_options_data($options = 0){
|
165 |
-
$structure = cwpposConfig::$structure;
|
166 |
-
$defaults = cwppos_get_config_defaults($structure);
|
167 |
-
$option = get_option(cwppos_config("menu_slug"));
|
168 |
-
$options = array_merge($defaults,is_array($option) ? $option : array() );
|
169 |
-
|
170 |
-
$data = array();
|
171 |
-
foreach($structure as $k=>$fields){
|
172 |
-
|
173 |
-
if($fields['type'] == 'tab'){
|
174 |
-
|
175 |
-
|
176 |
-
foreach ($fields['options'] as $r=>$field){
|
177 |
-
|
178 |
-
if($field['type'] == 'group'){
|
179 |
-
|
180 |
-
foreach($field['options'] as $m=>$gfield){
|
181 |
-
if($gfield["type"]!='title')
|
182 |
-
$data[$gfield['id']] = array(
|
183 |
-
"default"=>$options[$gfield['id']],
|
184 |
-
"type"=>$gfield['type']
|
185 |
-
);
|
186 |
-
}
|
187 |
-
|
188 |
-
}else{
|
189 |
-
if($field["type"]!='title')
|
190 |
-
|
191 |
-
$data[$field['id']] = array(
|
192 |
-
"default"=>$options[$field['id']],
|
193 |
-
"type"=>$field['type']
|
194 |
-
);
|
195 |
-
}
|
196 |
-
|
197 |
-
}
|
198 |
-
|
199 |
-
}
|
200 |
-
|
201 |
-
}
|
202 |
-
return $data;
|
203 |
-
}
|
204 |
-
//adauga aici noile functii pentru submeniu daca pagina este in meniul principal
|
205 |
-
|
206 |
Â
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class cwpposOptionsValidator {
|
4 |
+
public function __construct(){
|
5 |
+
|
6 |
+
$sanitizer = new cwpposSanitizer();
|
7 |
+
add_filter( 'cwppos_sanitize_color', array($sanitizer,'sanitize_hex'),10,2);
|
8 |
+
add_filter( 'cwppos_sanitize_textarea', array($sanitizer,'sanitize_textarea'),10,2);
|
9 |
+
add_filter( 'cwppos_sanitize_array', array($sanitizer,'sanitize_array'),10,3);
|
10 |
+
add_filter( 'cwppos_sanitize_enum', array($sanitizer,'sanitize_enum'),10,3);
|
11 |
+
add_filter( 'cwppos_sanitaze_typography', array($sanitizer,'sanitize_typography'),10,2);
|
12 |
+
add_filter( 'cwppos_sanitize_url', array($sanitizer,'sanitize_imageurl'),10,2);
|
13 |
+
add_filter( 'cwppos_sanitize_number', array($sanitizer,'sanitize_number'),10,2);
|
14 |
+
add_filter( 'cwppos_sanitize_background', array($sanitizer,'sanitize_background'),10,2);
|
15 |
+
add_filter( 'cwppos_sanitize_textarea_html', array($sanitizer,'sanitize_html'),10,2);
|
16 |
+
add_filter( 'cwppos_sanitize_change_icon', array($sanitizer, 'sanitize_change_icon'), 10, 2);
|
17 |
+
}
|
18 |
+
public function validate_defaults(){
|
19 |
+
$ninput = array();
|
20 |
+
$defaults = $this->get_default_options();
|
21 |
+
foreach($defaults as $k=>$i){
|
22 |
+
switch($i['type']){
|
23 |
+
case "textarea":
|
24 |
+
case "editor":
|
25 |
+
|
26 |
+
case "input_text":
|
27 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_textarea",$i['default']);
|
28 |
+
break;
|
29 |
+
case "textarea_html":
|
30 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_textarea_html",$i['default']);
|
31 |
+
break;
|
32 |
+
|
33 |
+
case "radio":
|
34 |
+
case "select":
|
35 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_enum",$i['default'],$k);
|
36 |
+
|
37 |
+
break;
|
38 |
+
case "color":
|
39 |
+
|
40 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_color",$i['default']);
|
41 |
+
break;
|
42 |
+
case "image":
|
43 |
+
|
44 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_url",$i['default']);
|
45 |
+
break;
|
46 |
+
case "background":
|
47 |
+
|
48 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_background",$i['default']);
|
49 |
+
break;
|
50 |
+
case "typography":
|
51 |
+
|
52 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_typography",$i['default']);
|
53 |
+
break;
|
54 |
+
case "input_number":
|
55 |
+
|
56 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_number",$i['default']);
|
57 |
+
break;
|
58 |
+
case "checkbox":
|
59 |
+
case "multiselect":
|
60 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_array",$i['default'],$k);
|
61 |
+
break;
|
62 |
+
|
63 |
+
case "change_icon":
|
64 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_change_icon",$i['default'],$k);
|
65 |
+
break;
|
66 |
+
|
67 |
+
}
|
68 |
+
}
|
69 |
+
return $ninput;
|
70 |
+
}
|
71 |
+
public function validate($input){
|
72 |
+
|
73 |
+
$ninput = array();
|
74 |
+
|
75 |
+
$options = $this->get_options_data();
|
76 |
+
|
77 |
+
|
78 |
+
foreach($input as $k=>$i){
|
79 |
+
switch($options[$k]['type']){
|
80 |
+
case "textarea":
|
81 |
+
case "editor":
|
82 |
+
|
83 |
+
case "input_text":
|
84 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_textarea",$i,$options[$k]['default']);
|
85 |
+
|
86 |
+
break;
|
87 |
+
case "textarea_html":
|
88 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_textarea_html",$i,$options[$k]['default']);
|
89 |
+
break;
|
90 |
+
case "radio":
|
91 |
+
case "select":
|
92 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_enum",$i,$k,$options[$k]['default']);
|
93 |
+
|
94 |
+
break;
|
95 |
+
case "color":
|
96 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_color",$i,$options[$k]['default']);
|
97 |
+
break;
|
98 |
+
case "image":
|
99 |
+
|
100 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_url",$i,$options[$k]['default']);
|
101 |
+
break;
|
102 |
+
case "background":
|
103 |
+
|
104 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_background",$i,$options[$k]['default']);
|
105 |
+
break;
|
106 |
+
case "typography":
|
107 |
+
|
108 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_typography",$i,$options[$k]['default']);
|
109 |
+
break;
|
110 |
+
case "input_number":
|
111 |
+
|
112 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_number",$i,$options[$k]['default']);
|
113 |
+
break;
|
114 |
+
case "checkbox":
|
115 |
+
case "multiselect":
|
116 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_array",$i,$k,$options[$k]['default']);
|
117 |
+
break;
|
118 |
+
|
119 |
+
case "change_icon":
|
120 |
+
$ninput[$k] = apply_filters("cwppos_sanitize_change_icon",$i,$k,$options[$k]['default']);
|
121 |
+
break;
|
122 |
+
|
123 |
+
}
|
124 |
+
}
|
125 |
+
return $ninput;
|
126 |
+
}
|
127 |
+
public function get_default_options(){
|
128 |
+
$structure = cwpposConfig::$structure;
|
129 |
+
$options = cwppos_get_config_defaults($structure);
|
130 |
+
$data = array();
|
131 |
+
foreach($structure as $k=>$fields){
|
132 |
+
|
133 |
+
if($fields['type'] == 'tab'){
|
134 |
+
|
135 |
+
|
136 |
+
foreach ($fields['options'] as $r=>$field){
|
137 |
+
|
138 |
+
if($field['type'] == 'group'){
|
139 |
+
|
140 |
+
foreach($field['options'] as $m=>$gfield){
|
141 |
+
if($gfield["type"]!='title')
|
142 |
+
$data[$gfield['id']] = array(
|
143 |
+
"default"=>$options[$gfield['id']],
|
144 |
+
"type"=>$gfield['type']
|
145 |
+
);
|
146 |
+
}
|
147 |
+
|
148 |
+
}else{
|
149 |
+
if($field["type"]!='title')
|
150 |
+
|
151 |
+
$data[$field['id']] = array(
|
152 |
+
"default"=>$options[$field['id']],
|
153 |
+
"type"=>$field['type']
|
154 |
+
);
|
155 |
+
}
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
}
|
162 |
+
return $data;
|
163 |
+
}
|
164 |
+
public function get_options_data($options = 0){
|
165 |
+
$structure = cwpposConfig::$structure;
|
166 |
+
$defaults = cwppos_get_config_defaults($structure);
|
167 |
+
$option = get_option(cwppos_config("menu_slug"));
|
168 |
+
$options = array_merge($defaults,is_array($option) ? $option : array() );
|
169 |
+
|
170 |
+
$data = array();
|
171 |
+
foreach($structure as $k=>$fields){
|
172 |
+
|
173 |
+
if($fields['type'] == 'tab'){
|
174 |
+
|
175 |
+
|
176 |
+
foreach ($fields['options'] as $r=>$field){
|
177 |
+
|
178 |
+
if($field['type'] == 'group'){
|
179 |
+
|
180 |
+
foreach($field['options'] as $m=>$gfield){
|
181 |
+
if($gfield["type"]!='title')
|
182 |
+
$data[$gfield['id']] = array(
|
183 |
+
"default"=>$options[$gfield['id']],
|
184 |
+
"type"=>$gfield['type']
|
185 |
+
);
|
186 |
+
}
|
187 |
+
|
188 |
+
}else{
|
189 |
+
if($field["type"]!='title')
|
190 |
+
|
191 |
+
$data[$field['id']] = array(
|
192 |
+
"default"=>$options[$field['id']],
|
193 |
+
"type"=>$field['type']
|
194 |
+
);
|
195 |
+
}
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
+
}
|
200 |
+
|
201 |
+
}
|
202 |
+
return $data;
|
203 |
+
}
|
204 |
+
//adauga aici noile functii pentru submeniu daca pagina este in meniul principal
|
205 |
+
|
206 |
Â
}
|
admin/inc/config.php
CHANGED
@@ -149,7 +149,7 @@
|
|
149 |
Â
|
150 |
Â
"name"=>"Content width",
|
151 |
Â
|
152 |
-
"description"=>"Write your content width in pixels in this format : 600 if you want to limit the review
|
153 |
Â
|
154 |
Â
"id"=>"cwppos_widget_size",
|
155 |
Â
|
@@ -160,9 +160,9 @@
|
|
160 |
Â
|
161 |
Â
"type"=>"select",
|
162 |
Â
|
163 |
-
"name"=>"Lighbox images",
|
164 |
Â
|
165 |
-
"description"=>"Disable lightbox effect on product images",
|
166 |
Â
|
167 |
Â
"id"=>"cwppos_lighbox",
|
168 |
Â
"options"=>array("yes"=>"Yes","no"=>"No"),
|
@@ -174,9 +174,9 @@
|
|
174 |
Â
|
175 |
Â
"type"=>"select",
|
176 |
Â
|
177 |
-
"name"=>"Font Awesome",
|
178 |
Â
|
179 |
-
"description"=>"Disable Font Awesome for websites that already are including it",
|
180 |
Â
|
181 |
Â
"id"=>"cwppos_fontawesome",
|
182 |
Â
"options"=>array("yes"=>"Yes","no"=>"No"),
|
149 |
Â
|
150 |
Â
"name"=>"Content width",
|
151 |
Â
|
152 |
+
"description"=>"Write your content width in pixels in this format : 600 if you want to limit the review box width.",
|
153 |
Â
|
154 |
Â
"id"=>"cwppos_widget_size",
|
155 |
Â
|
160 |
Â
|
161 |
Â
"type"=>"select",
|
162 |
Â
|
163 |
+
"name"=>"Disable Lighbox images",
|
164 |
Â
|
165 |
+
"description"=>"Disable lightbox effect on product images (increase loading speed)",
|
166 |
Â
|
167 |
Â
"id"=>"cwppos_lighbox",
|
168 |
Â
"options"=>array("yes"=>"Yes","no"=>"No"),
|
174 |
Â
|
175 |
Â
"type"=>"select",
|
176 |
Â
|
177 |
+
"name"=>"Disable Font Awesome",
|
178 |
Â
|
179 |
+
"description"=>"Disable Font Awesome for websites that already are including it (increase loading speed)",
|
180 |
Â
|
181 |
Â
"id"=>"cwppos_fontawesome",
|
182 |
Â
"options"=>array("yes"=>"Yes","no"=>"No"),
|
admin/inc/render.php
CHANGED
@@ -1,608 +1,608 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class cwpposRenderView {
|
4 |
-
public $data = array();
|
5 |
-
private $css = array();
|
6 |
-
private $js = array();
|
7 |
-
public $tabs = array();
|
8 |
-
public $options = array();
|
9 |
-
public function __construct(){
|
10 |
-
|
11 |
-
$css_path = cwppos_config("admin_template_directory_uri")."/css/";
|
12 |
-
$js_path = cwppos_config("admin_template_directory_uri")."/js/";
|
13 |
-
$this->add_css("main_page_css",$css_path."main_page.css");
|
14 |
-
$this->add_js("wp_product_review_main_page_js",$js_path."admin.js");
|
15 |
-
$this->add_js("typsy",$js_path."tipsy.js");
|
16 |
-
$this->add_js("jquery" );
|
17 |
-
//$this->add_js("media" );
|
18 |
-
|
19 |
-
$this->options = get_option(cwppos_config("menu_slug"));
|
20 |
-
|
21 |
-
$this->add_js('wp-color-picker' );
|
22 |
-
$this->add_css('wp-color-picker' );
|
23 |
-
|
24 |
-
|
25 |
-
}
|
26 |
-
|
27 |
-
public function add_element($tabid,$field ){
|
28 |
-
|
29 |
-
|
30 |
-
switch($field['type']){
|
31 |
-
case 'input_text':
|
32 |
-
|
33 |
-
$this->add_input_text($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
34 |
-
|
35 |
-
break;
|
36 |
-
case 'input_number':
|
37 |
-
|
38 |
-
$this->add_input_number($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
39 |
-
|
40 |
-
break;
|
41 |
-
case 'textarea':
|
42 |
-
|
43 |
-
$this->add_textarea($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
44 |
-
|
45 |
-
break;
|
46 |
-
case 'textarea_html':
|
47 |
-
if(current_user_can("unfiltered_html"))
|
48 |
-
$this->add_textarea($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
49 |
-
else
|
50 |
-
$this->add_restriction($tabid,esc_html($field['name']));
|
51 |
-
|
52 |
-
break;
|
53 |
-
case 'editor':
|
54 |
-
|
55 |
-
$this->add_editor($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
56 |
-
|
57 |
-
break;
|
58 |
-
case 'color':
|
59 |
-
|
60 |
-
$this->add_color($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
61 |
-
|
62 |
-
break;
|
63 |
-
case 'image':
|
64 |
-
|
65 |
-
$this->add_image($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
66 |
-
|
67 |
-
break;
|
68 |
-
case 'button':
|
69 |
-
|
70 |
-
$this->add_button($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
71 |
-
|
72 |
-
break;
|
73 |
-
case 'typography':
|
74 |
-
|
75 |
-
|
76 |
-
$this->add_typography($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
77 |
-
break;
|
78 |
-
case 'background':
|
79 |
-
|
80 |
-
|
81 |
-
$this->add_background($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
82 |
-
break;
|
83 |
-
case 'select':
|
84 |
-
|
85 |
-
$no = array();
|
86 |
-
foreach($field['options'] as $ov=>$op){
|
87 |
-
$no[esc_attr($ov)] = esc_html($op);
|
88 |
-
}
|
89 |
-
$this->add_select($tabid,esc_html($field['name']),esc_html($field['description']),esc_attr($field['id']),$no);
|
90 |
-
break;
|
91 |
-
case 'radio':
|
92 |
-
|
93 |
-
$no = array();
|
94 |
-
foreach($field['options'] as $ov=>$op){
|
95 |
-
$no[esc_attr($ov)] = esc_html($op);
|
96 |
-
}
|
97 |
-
$this->add_radio($tabid,esc_html($field['name']),esc_html($field['description']),esc_attr($field['id']),$no);
|
98 |
-
break;
|
99 |
-
case 'multiselect':
|
100 |
-
|
101 |
-
$no = array();
|
102 |
-
foreach($field['options'] as $ov=>$op){
|
103 |
-
$no[esc_attr($ov)] = esc_html($op);
|
104 |
-
}
|
105 |
-
|
106 |
-
$this->add_multiselect($tabid,esc_html($field['name']),esc_html($field['description']),esc_attr($field['id']),$no);
|
107 |
-
break;
|
108 |
-
case 'checkbox':
|
109 |
-
|
110 |
-
$no = array();
|
111 |
-
foreach($field['options'] as $ov=>$op){
|
112 |
-
$no[esc_attr($ov)] = esc_html($op);
|
113 |
-
}
|
114 |
-
|
115 |
-
$this->add_checkbox($tabid,esc_html($field['name']),esc_html($field['description']),esc_attr($field['id']),$no);
|
116 |
-
break;
|
117 |
-
case 'title':
|
118 |
-
$this->add_title($tabid,esc_html($field['name']));
|
119 |
-
break;
|
120 |
-
|
121 |
-
case 'change_icon':
|
122 |
-
$this->change_review_icon($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
123 |
-
break;
|
124 |
-
|
125 |
-
|
126 |
-
}
|
127 |
-
if(isset($errors)) { return $errors; }
|
128 |
-
}
|
129 |
-
public function show(){
|
130 |
-
$structure = cwpposConfig::$structure;
|
131 |
-
$errors = cwppos_check_config();
|
132 |
-
if(!empty($errors)) return false;
|
133 |
-
foreach($structure as $k=>$fields){
|
134 |
-
|
135 |
-
if($fields['type'] == 'tab'){
|
136 |
-
$tname = esc_html($fields['name']);
|
137 |
-
$tabid = $this->add_tab($tname);
|
138 |
-
|
139 |
-
|
140 |
-
foreach ($fields['options'] as $r=>$field){
|
141 |
-
|
142 |
-
if($field['type'] == 'group'){
|
143 |
-
|
144 |
-
$this->start_group($tabid,esc_html($field['name']));
|
145 |
-
foreach($field['options'] as $m=>$gfield){
|
146 |
-
|
147 |
-
$this->add_element($tabid,$gfield ) ;
|
148 |
-
}
|
149 |
-
|
150 |
-
$this->end_group($tabid);
|
151 |
-
}else{
|
152 |
-
$this->add_element($tabid,$field) ;
|
153 |
-
}
|
154 |
-
|
155 |
-
}
|
156 |
-
|
157 |
-
}
|
158 |
-
|
159 |
-
}
|
160 |
-
$this->render_view('main_page');
|
161 |
-
|
162 |
-
}
|
163 |
-
public function add_css($name,$location =''){
|
164 |
-
if($location!='')
|
165 |
-
wp_register_style($name, $location, array(), "201306" );
|
166 |
-
$this->css[] = $name;
|
167 |
-
}
|
168 |
-
public function add_js($name,$location = '',$deps = array()){
|
169 |
-
|
170 |
-
if($location!='')
|
171 |
-
wp_register_script($name, $location, $deps, "201306", true );
|
172 |
-
$this->js[] = $name;
|
173 |
-
|
174 |
-
}
|
175 |
-
|
176 |
-
public function render_view($name){
|
177 |
-
$this->data["tabs"] = $this->tabs;
|
178 |
-
foreach($this->data as $k=>$v){
|
179 |
-
$$k = $v;
|
180 |
-
}
|
181 |
-
foreach($this->css as $file){
|
182 |
-
wp_enqueue_style($file);
|
183 |
-
}
|
184 |
-
foreach($this->js as $file){
|
185 |
-
if($file == "media"){
|
186 |
-
|
187 |
-
wp_enqueue_media();
|
188 |
-
}
|
189 |
-
wp_enqueue_script($file) ;
|
190 |
-
}
|
191 |
-
include(plugin_dir_path(dirname(__FILE__))."layout/".$name.".php");
|
192 |
-
}
|
193 |
-
public function add_tab($name){
|
194 |
-
$id = strtolower(preg_replace("/[^a-zA-Z0-9]|\s/", "_",$name));
|
195 |
-
$this->tabs[] =
|
196 |
-
array(
|
197 |
-
"name"=>$name,
|
198 |
-
"id" =>$id,
|
199 |
-
"elements"=>array()
|
200 |
-
);
|
201 |
-
|
202 |
-
return count($this->tabs) - 1;
|
203 |
-
}
|
204 |
-
public function add_input_text($tabid,$name,$description,$id,$class=''){
|
205 |
-
$html = '
|
206 |
-
<div class="controls '.$class.'">
|
207 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <input class="cwp_input " placeholder="'.$name.'" name="'.cwppos_config("menu_slug").'['.$id.']" type="text" value="'.$this->options[$id].'"></div>';
|
208 |
-
|
209 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"input_text",
|
210 |
-
"html"=>$html
|
211 |
-
);
|
212 |
-
|
213 |
-
}
|
214 |
-
|
215 |
-
|
216 |
-
public function change_review_icon($tabid, $name, $description, $id, $class='') {
|
217 |
-
|
218 |
-
$html = "<div class='controls'>
|
219 |
-
<div class='explain'>$name</div>
|
220 |
-
<p class='field_description'>$description</p>";
|
221 |
-
|
222 |
-
$html .= "<li>";
|
223 |
-
|
224 |
-
if (cwppos('cwppos_show_poweredby') == 'yes' || function_exists('wppr_ci_custom_bar_icon')) {
|
225 |
-
|
226 |
-
wp_enqueue_script("cwp-custom-bar-icon", WPPR_URL."/admin/layout/js/custom-bar-icon.js", false, WPPR_LITE_VERSION, "all");
|
227 |
-
if( cwppos("cwppos_fontawesome") === 'no' )
|
228 |
-
{
|
229 |
-
wp_enqueue_style("font-awesome-cdn", "//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css");
|
230 |
-
}
|
231 |
-
|
232 |
-
$html .= "<button id='cwp_select_bar_icon'>Select Bar Icon</button>";
|
233 |
-
$html .= "<input type='hidden' id='cwp_bar_icon_field' name='".cwppos_config("menu_slug")."[".$id."][]' value='";
|
234 |
-
if(isset($this->options[$id])) { if (@$this->options[$id][0]=="#") { $html.=$this->options[$id]; } else $html .= @$this->options[$id][0]; }
|
235 |
-
|
236 |
-
$html .= "'/> <span class='current_bar_icon'>";
|
237 |
-
if(!empty($this->options[$id][0])) {
|
238 |
-
//var_dump($this->options[$id][0]);
|
239 |
-
if ($this->options[$id][0]==="#") {
|
240 |
-
|
241 |
-
$code = $this->options[$id];
|
242 |
-
}
|
243 |
-
else
|
244 |
-
$code = $this->options[$id][0];
|
245 |
-
|
246 |
-
$html .= "<i class='fa fa-fw'>&". $code . "</i> <a href='#' class='useDefault'>Use Default Styling</a>";
|
247 |
-
} else {
|
248 |
-
$html .= "* Currently set to the default styling</span>";
|
249 |
-
} } else {
|
250 |
-
$html .= '<span style="color:red;">'. __('You need the custom icon <a style="color:red;" href="http://themeisle.com/plugins/wppr-custom-icon/" target="_blank" >add-on</a> in order to change this.',"cwppos") . "</span>";
|
251 |
-
}
|
252 |
-
$html .= "</li>";
|
253 |
-
|
254 |
-
$html .= "</div>";
|
255 |
-
|
256 |
-
$this->tabs[$tabid]["elements"][] = array("type" => "change_icon", "html" => $html);
|
257 |
-
}
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
public function get_fonts(){
|
263 |
-
return array(
|
264 |
-
'arial' => 'Arial',
|
265 |
-
'verdana' => 'Verdana, Geneva',
|
266 |
-
'trebuchet' => 'Trebuchet',
|
267 |
-
'georgia' => 'Georgia',
|
268 |
-
'times' => 'Times New Roman',
|
269 |
-
'tahoma' => 'Tahoma, Geneva',
|
270 |
-
'palatino' => 'Palatino',
|
271 |
-
'helvetica' => 'Helvetica*'
|
272 |
-
);
|
273 |
-
}
|
274 |
-
public function get_font_styles(){
|
275 |
-
return array(
|
276 |
-
'normal' => __( 'Normal', 'cwppos' ),
|
277 |
-
'italic' => __( 'Italic', 'cwppos' ),
|
278 |
-
'bold' => __( 'Bold', 'cwppos' ),
|
279 |
-
'bold italic' => __( 'Bold Italic', 'cwppos' )
|
280 |
-
);
|
281 |
-
}
|
282 |
-
public function get_font_sizes(){
|
283 |
-
$sizes = range( 9, 71 );
|
284 |
-
$sizes = array_map( 'absint', $sizes );
|
285 |
-
return $sizes;
|
286 |
-
}
|
287 |
-
public function add_typography($tabid,$name,$description,$id,$class=''){
|
288 |
-
$fonts = $this->get_fonts();
|
289 |
-
$style = $this->get_font_styles();
|
290 |
-
$sizes = $this->get_font_sizes();
|
291 |
-
$html = '
|
292 |
-
<div class="controls '.$class.'">
|
293 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <div class="cwp_typo">
|
294 |
-
|
295 |
-
<input type="hidden" id="'.$id.'_color" name="'.cwppos_config("menu_slug").'['.$id.'][color]" value="'.$this->options[$id]['color'].'"/>
|
296 |
-
<input type="text" name="" class="subo-color-picker" id="'.$id.'_color_selector" value="'.$this->options[$id]['color'].'" />
|
297 |
-
|
298 |
-
<select class="cwp_select cwp_tipsy" original-title="Font family" name="'.cwppos_config("menu_slug").'['.$id.'][font]" > ';
|
299 |
-
foreach($fonts as $k=>$v){
|
300 |
-
|
301 |
-
$html.="<option value='".$k."' ".($this->options[$id]['font'] == $k ? 'selected' : '').">".$v."</option>";
|
302 |
-
}
|
303 |
-
|
304 |
-
$html .='</select>
|
305 |
-
<select class="cwp_select cwp_tipsy" original-title="Font style" name="'.cwppos_config("menu_slug").'['.$id.'][style]" > ';
|
306 |
-
foreach($style as $k=>$v){
|
307 |
-
|
308 |
-
$html.="<option value='".$k."' ".($this->options[$id]['style'] == $k ? 'selected' : '').">".$v."</option>";
|
309 |
-
}
|
310 |
-
|
311 |
-
$html .='</select>
|
312 |
-
<select class="cwp_select cwp_tipsy" original-title="Font size" " name="'.cwppos_config("menu_slug").'['.$id.'][size]" > ';
|
313 |
-
foreach($sizes as $v){
|
314 |
-
|
315 |
-
$html.="<option value='".$v."' ".($this->options[$id]['size'] == $v ? 'selected' : '').">".$v."px</option>";
|
316 |
-
}
|
317 |
-
|
318 |
-
$html .='</select>
|
319 |
-
|
320 |
-
</div></div>';
|
321 |
-
|
322 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"typography",
|
323 |
-
"html"=>$html
|
324 |
-
);
|
325 |
-
|
326 |
-
}
|
327 |
-
|
328 |
-
public function get_bg_repeat(){
|
329 |
-
|
330 |
-
return array(
|
331 |
-
'no-repeat' => __('No Repeat', 'cwppos'),
|
332 |
-
'repeat-x' => __('Repeat Horizontally', 'cwppos'),
|
333 |
-
'repeat-y' => __('Repeat Vertically', 'cwppos'),
|
334 |
-
'repeat' => __('Repeat All', 'cwppos'),
|
335 |
-
);
|
336 |
-
}
|
337 |
-
public function get_bg_position(){
|
338 |
-
return array(
|
339 |
-
'top left' => __('Top Left', 'cwppos'),
|
340 |
-
'top center' => __('Top Center', 'cwppos'),
|
341 |
-
'top right' => __('Top Right', 'cwppos'),
|
342 |
-
'center left' => __('Middle Left', 'cwppos'),
|
343 |
-
'center center' => __('Middle Center', 'cwppos'),
|
344 |
-
'center right' => __('Middle Right', 'cwppos'),
|
345 |
-
'bottom left' => __('Bottom Left', 'cwppos'),
|
346 |
-
'bottom center' => __('Bottom Center', 'cwppos'),
|
347 |
-
'bottom right' => __('Bottom Right', 'cwppos')
|
348 |
-
);
|
349 |
-
}
|
350 |
-
public function get_bg_attachment(){
|
351 |
-
return array(
|
352 |
-
'scroll' => __('Scroll Normally', 'optionsframework'),
|
353 |
-
'fixed' => __('Fixed in Place', 'optionsframework')
|
354 |
-
);
|
355 |
-
|
356 |
-
}
|
357 |
-
public function add_background($tabid,$name,$description,$id,$class=''){
|
358 |
-
$repeats = $this->get_bg_repeat();
|
359 |
-
$positions = $this->get_bg_position();
|
360 |
-
$attachments = $this->get_bg_attachment();
|
361 |
-
$html = '
|
362 |
-
<div class="controls '.$class.'">
|
363 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p><div class="cwp_background">
|
364 |
-
<div class="cwp_bgstyle">
|
365 |
-
<div class="cwp_bgimage">
|
366 |
-
<input type="hidden" id="'.$id.'" name="'.cwppos_config("menu_slug").'['.$id.'][bgimage]" value="'.$this->options[$id]['bgimage'].'"/>
|
367 |
-
<img src="'.$this->options[$id]['bgimage'].'" id="'.$id.'_image" class="image-preview-input"/><br/>
|
368 |
-
<a id="'.$id.'_button" class="selector-image button" >Select Image</a>
|
369 |
-
|
370 |
-
<a id="'.$id.'_buttonclear" class="clear-image button" >Clear image</a>
|
371 |
-
</div>
|
372 |
-
<div class="cwp_bgcolor">
|
373 |
-
<input type="hidden" id="'.$id.'_color" name="'.cwppos_config("menu_slug").'['.$id.'][bgcolor]" value="'.$this->options[$id]['bgcolor'].'"/> <br/>
|
374 |
-
<input type="text" name="" class="subo-color-picker" id="'.$id.'_color_selector" value="'.$this->options[$id]['bgcolor'].'" />
|
375 |
-
</div><div class="clear"></div>
|
376 |
-
</div>
|
377 |
-
<div class="cwp_bgformat">
|
378 |
-
|
379 |
-
<select class="cwp_select cwp_tipsy" original-title="Background repeat" name="'.cwppos_config("menu_slug").'['.$id.'][bgrepeat]" > ';
|
380 |
-
foreach($repeats as $k=>$v){
|
381 |
-
|
382 |
-
$html.="<option value='".$k."' ".($this->options[$id]['bgrepeat'] == $k ? 'selected' : '').">".$v."</option>";
|
383 |
-
}
|
384 |
-
|
385 |
-
$html .='</select>
|
386 |
-
<select class="cwp_select cwp_tipsy" original-title="Background position" name="'.cwppos_config("menu_slug").'['.$id.'][bgposition]" > ';
|
387 |
-
foreach($positions as $k=>$v){
|
388 |
-
|
389 |
-
$html.="<option value='".$k."' ".($this->options[$id]['bgposition'] == $k ? 'selected' : '').">".$v."</option>";
|
390 |
-
}
|
391 |
-
|
392 |
-
$html .='</select>
|
393 |
-
<select class="cwp_select cwp_tipsy" original-title="Background attachament" name="'.cwppos_config("menu_slug").'['.$id.'][bgattachment]" > ';
|
394 |
-
foreach($attachments as $k=>$v){
|
395 |
-
|
396 |
-
$html.="<option value='".$k."' ".($this->options[$id]['bgattachment'] == $k ? 'selected' : '').">".$v."</option>";
|
397 |
-
}
|
398 |
-
|
399 |
-
$html .='</select>
|
400 |
-
</div>
|
401 |
-
|
402 |
-
</div>
|
403 |
-
|
404 |
-
|
405 |
-
</div>';
|
406 |
-
|
407 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"textarea",
|
408 |
-
"html"=>$html
|
409 |
-
);
|
410 |
-
|
411 |
-
}
|
412 |
-
public function add_textarea($tabid,$name,$description,$id,$class=''){
|
413 |
-
|
414 |
-
$html = '
|
415 |
-
<div class="controls '.$class.'">
|
416 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <textarea class="cwp_textarea " placeholder="'.$name.'" name="'.cwppos_config("menu_slug").'['.$id.']" >'.$this->options[$id].'</textarea></div>';
|
417 |
-
|
418 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"textarea",
|
419 |
-
"html"=>$html
|
420 |
-
);
|
421 |
-
|
422 |
-
}
|
423 |
-
public function add_restriction($tabid,$name){
|
424 |
-
|
425 |
-
$html = '
|
426 |
-
<div class="controls '.$class.'">
|
427 |
-
<div class="explain">'.$name.'</div><p class="field_description">You need to have the capability to add HTML in order to use this feature !</p></div>';
|
428 |
-
|
429 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"textarea_html",
|
430 |
-
"html"=>$html
|
431 |
-
);
|
432 |
-
|
433 |
-
}
|
434 |
-
public function add_editor($tabid,$name,$description,$id,$class=''){
|
435 |
-
ob_start();
|
436 |
-
|
437 |
-
wp_editor($this->options[$id], cwppos_config("menu_slug").'['.$id.']');
|
438 |
-
|
439 |
-
$editor_contents = ob_get_clean();
|
440 |
-
|
441 |
-
$html = '
|
442 |
-
<div class="controls '.$class.'">
|
443 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>'.$editor_contents.'</div>';
|
444 |
-
|
445 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"editor",
|
446 |
-
"html"=>$html
|
447 |
-
);
|
448 |
-
|
449 |
-
}
|
450 |
-
public function add_input_number($tabid,$name, $description, $id, $min = false, $max = false, $step = false, $class = ""){
|
451 |
-
$html = '
|
452 |
-
<div class="controls '.$class.'">
|
453 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <input placeholder="'.$name.'" type="number" class="cwp_input" value="'.$this->options[$id].'" name="'.cwppos_config("menu_slug").'['.$id.']"
|
454 |
-
'.($min === false ? '' : ' min = "'.$min.'" ').'
|
455 |
-
'.($max === false ? '' : ' max = "'.$max.'" ').'
|
456 |
-
'.($step === false ? '' : ' step = "'.$step.'" ').'
|
457 |
-
> </div>';
|
458 |
-
|
459 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"input_number",
|
460 |
-
"html"=>$html
|
461 |
-
);
|
462 |
-
|
463 |
-
}
|
464 |
-
|
465 |
-
public function add_select($tabid,$name,$description,$id,$options,$class=""){
|
466 |
-
|
467 |
-
$html = '
|
468 |
-
<div class="controls '.$class.'">
|
469 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>';
|
470 |
-
|
471 |
-
$html .='<select class=" cwp_select" name="'.cwppos_config("menu_slug").'['.$id.']" > ';
|
472 |
-
|
473 |
-
foreach($options as $k=>$v){
|
474 |
-
|
475 |
-
$html.="<option value='".$k."' ".($this->options[$id] == $k ? 'selected' : '').">".$v."</option>";
|
476 |
-
}
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
$html .='</select></div>';
|
481 |
-
|
482 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"select",
|
483 |
-
"html"=>$html
|
484 |
-
);
|
485 |
-
}
|
486 |
-
public function add_multiselect($tabid,$name,$description,$id,$options,$class=""){
|
487 |
-
|
488 |
-
$html = '
|
489 |
-
<div class="controls '.$class.'">
|
490 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <select name="'.cwppos_config("menu_slug").'['.$id.'][]" class="cwp_multiselect" multiple > ';
|
491 |
-
foreach($options as $k=>$v){
|
492 |
-
|
493 |
-
$html.="<option value='".$k."' ".(in_array($k,$this->options[$id]) ? 'selected' : '').">".$v."</option>";
|
494 |
-
}
|
495 |
-
|
496 |
-
$html .='</select></div>';
|
497 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"multiselect",
|
498 |
-
"html"=>$html
|
499 |
-
);
|
500 |
-
}
|
501 |
-
public function add_checkbox($tabid,$name,$description,$id,$options,$class=""){
|
502 |
-
|
503 |
-
$html = '
|
504 |
-
<div class="controls '.$class.'">
|
505 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> ';
|
506 |
-
foreach($options as $k=>$v){
|
507 |
-
|
508 |
-
$html.="<label class='cwp_label'><input class='cwp_checkbox' type=\"checkbox\" name='".cwppos_config("menu_slug")."[".$id."][]' value='".$k."' ".(in_array($k,$this->options[$id]) ? 'checked' : '')." >".$v."</label>";
|
509 |
-
}
|
510 |
-
|
511 |
-
$html .='</div>';
|
512 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"checkbox",
|
513 |
-
"html"=>$html
|
514 |
-
);
|
515 |
-
}
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
public function add_radio($tabid,$name,$description,$id,$options,$class=""){
|
520 |
-
|
521 |
-
$html = '
|
522 |
-
<div class="controls '.$class.'">
|
523 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> ';
|
524 |
-
foreach($options as $k=>$v){
|
525 |
-
|
526 |
-
$html.="<label class='cwp_label'><input class='cwp_radio' type=\"radio\" name='".cwppos_config("menu_slug")."[".$id."]' value='".$k."' ".($this->options[$id] == $k ? 'checked' : '').">".$v."</label>";
|
527 |
-
}
|
528 |
-
|
529 |
-
$html .='</div>';
|
530 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"radio",
|
531 |
-
"html"=>$html
|
532 |
-
);
|
533 |
-
}
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
public function add_image($tabid,$name,$description,$id,$class = ''){
|
538 |
-
$html = '
|
539 |
-
<div class="controls '.$class.'">
|
540 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>
|
541 |
-
<input type="hidden" id="'.$id.'" name="'.cwppos_config("menu_slug").'['.$id.']" value="'.$this->options[$id].'"/>
|
542 |
-
<img src="'.$this->options[$id].'" id="'.$id.'_image" class="image-preview-input"/><br/>
|
543 |
-
<a id="'.$id.'_button" class="selector-image button" >Select Image</a>
|
544 |
-
<a id="'.$id.'_buttonclear" class="clear-image button" >Clear image</a>
|
545 |
-
|
546 |
-
</div>';
|
547 |
-
|
548 |
-
|
549 |
-
$this->tabs[$tabid]["elements"][] = array("type"=>"image",
|
550 |
-
"html"=>$html
|
551 |
-
);
|
552 |
-
}
|
553 |
-
|
554 |
-
public function add_button($tabid,$name,$description,$id,$class = ''){
|
555 |
-
$html = '
|
556 |
-
<div class="controls '.$class.' ">
|
557 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>
|
558 |
-
<a href="'.get_bloginfo('wpurl') . '/wp-admin/admin.php?page=wp-addons'.'" class="button" style="color:red; text-decoration: none; ">'.$name.'</a>
|
559 |
-
</div></div>';
|
560 |
-
$this->tabs[$tabid]["elements"][] = array(
|
561 |
-
"type"=>"button",
|
562 |
-
"html"=>$html
|
563 |
-
);
|
564 |
-
}
|
565 |
-
|
566 |
-
public function add_color($tabid,$name,$description,$id,$class = ''){
|
567 |
-
|
568 |
-
|
569 |
-
$html = '
|
570 |
-
<div class="controls '.$class.' ">
|
571 |
-
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>
|
572 |
-
<input type="hidden" id="'.$id.'_color" name="'.cwppos_config("menu_slug").'['.$id.']" value="'.$this->options[$id].'"/> </br>
|
573 |
-
<input type="text" name="" class="subo-color-picker" id="'.$id.'_color_selector" value="'.$this->options[$id].'" /> <br/>
|
574 |
-
</div>';
|
575 |
-
|
576 |
-
|
577 |
-
$this->tabs[$tabid]["elements"][] = array( "type"=>"color",
|
578 |
-
"html"=>$html
|
579 |
-
);
|
580 |
-
}
|
581 |
-
public function add_title($tabid,$name){
|
582 |
-
$html = '<h1 class="tab-title-area">'.$name.'</h1>';
|
583 |
-
$this->tabs[$tabid]["elements"][] = array(
|
584 |
-
"type"=>"title",
|
585 |
-
"html"=>$html
|
586 |
-
);
|
587 |
-
|
588 |
-
}
|
589 |
-
|
590 |
-
public function start_group($tabid, $name){
|
591 |
-
$html = '<div class="group-in-tab">
|
592 |
-
<p class="group-name">'.$name.'</p>
|
593 |
-
<div class="group-content">
|
594 |
-
';
|
595 |
-
$this->tabs[$tabid]["elements"][] = array(
|
596 |
-
"type"=>"group_start",
|
597 |
-
"html"=>$html
|
598 |
-
);
|
599 |
-
}
|
600 |
-
public function end_group($tabid){
|
601 |
-
$html = '</div></div>
|
602 |
-
';
|
603 |
-
$this->tabs[$tabid]["elements"][] = array(
|
604 |
-
"type"=>"end",
|
605 |
-
"html"=>$html
|
606 |
-
);
|
607 |
-
}
|
608 |
Â
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class cwpposRenderView {
|
4 |
+
public $data = array();
|
5 |
+
private $css = array();
|
6 |
+
private $js = array();
|
7 |
+
public $tabs = array();
|
8 |
+
public $options = array();
|
9 |
+
public function __construct(){
|
10 |
+
|
11 |
+
$css_path = cwppos_config("admin_template_directory_uri")."/css/";
|
12 |
+
$js_path = cwppos_config("admin_template_directory_uri")."/js/";
|
13 |
+
$this->add_css("main_page_css",$css_path."main_page.css");
|
14 |
+
$this->add_js("wp_product_review_main_page_js",$js_path."admin.js");
|
15 |
+
$this->add_js("typsy",$js_path."tipsy.js");
|
16 |
+
$this->add_js("jquery" );
|
17 |
+
//$this->add_js("media" );
|
18 |
+
|
19 |
+
$this->options = get_option(cwppos_config("menu_slug"));
|
20 |
+
|
21 |
+
$this->add_js('wp-color-picker' );
|
22 |
+
$this->add_css('wp-color-picker' );
|
23 |
+
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
public function add_element($tabid,$field ){
|
28 |
+
|
29 |
+
|
30 |
+
switch($field['type']){
|
31 |
+
case 'input_text':
|
32 |
+
|
33 |
+
$this->add_input_text($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
34 |
+
|
35 |
+
break;
|
36 |
+
case 'input_number':
|
37 |
+
|
38 |
+
$this->add_input_number($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
39 |
+
|
40 |
+
break;
|
41 |
+
case 'textarea':
|
42 |
+
|
43 |
+
$this->add_textarea($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
44 |
+
|
45 |
+
break;
|
46 |
+
case 'textarea_html':
|
47 |
+
if(current_user_can("unfiltered_html"))
|
48 |
+
$this->add_textarea($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
49 |
+
else
|
50 |
+
$this->add_restriction($tabid,esc_html($field['name']));
|
51 |
+
|
52 |
+
break;
|
53 |
+
case 'editor':
|
54 |
+
|
55 |
+
$this->add_editor($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
56 |
+
|
57 |
+
break;
|
58 |
+
case 'color':
|
59 |
+
|
60 |
+
$this->add_color($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
61 |
+
|
62 |
+
break;
|
63 |
+
case 'image':
|
64 |
+
|
65 |
+
$this->add_image($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
66 |
+
|
67 |
+
break;
|
68 |
+
case 'button':
|
69 |
+
|
70 |
+
$this->add_button($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
71 |
+
|
72 |
+
break;
|
73 |
+
case 'typography':
|
74 |
+
|
75 |
+
|
76 |
+
$this->add_typography($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
77 |
+
break;
|
78 |
+
case 'background':
|
79 |
+
|
80 |
+
|
81 |
+
$this->add_background($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
82 |
+
break;
|
83 |
+
case 'select':
|
84 |
+
|
85 |
+
$no = array();
|
86 |
+
foreach($field['options'] as $ov=>$op){
|
87 |
+
$no[esc_attr($ov)] = esc_html($op);
|
88 |
+
}
|
89 |
+
$this->add_select($tabid,esc_html($field['name']),esc_html($field['description']),esc_attr($field['id']),$no);
|
90 |
+
break;
|
91 |
+
case 'radio':
|
92 |
+
|
93 |
+
$no = array();
|
94 |
+
foreach($field['options'] as $ov=>$op){
|
95 |
+
$no[esc_attr($ov)] = esc_html($op);
|
96 |
+
}
|
97 |
+
$this->add_radio($tabid,esc_html($field['name']),esc_html($field['description']),esc_attr($field['id']),$no);
|
98 |
+
break;
|
99 |
+
case 'multiselect':
|
100 |
+
|
101 |
+
$no = array();
|
102 |
+
foreach($field['options'] as $ov=>$op){
|
103 |
+
$no[esc_attr($ov)] = esc_html($op);
|
104 |
+
}
|
105 |
+
|
106 |
+
$this->add_multiselect($tabid,esc_html($field['name']),esc_html($field['description']),esc_attr($field['id']),$no);
|
107 |
+
break;
|
108 |
+
case 'checkbox':
|
109 |
+
|
110 |
+
$no = array();
|
111 |
+
foreach($field['options'] as $ov=>$op){
|
112 |
+
$no[esc_attr($ov)] = esc_html($op);
|
113 |
+
}
|
114 |
+
|
115 |
+
$this->add_checkbox($tabid,esc_html($field['name']),esc_html($field['description']),esc_attr($field['id']),$no);
|
116 |
+
break;
|
117 |
+
case 'title':
|
118 |
+
$this->add_title($tabid,esc_html($field['name']));
|
119 |
+
break;
|
120 |
+
|
121 |
+
case 'change_icon':
|
122 |
+
$this->change_review_icon($tabid,esc_html($field['name']),esc_html($field["description"]),esc_attr($field['id']));
|
123 |
+
break;
|
124 |
+
|
125 |
+
|
126 |
+
}
|
127 |
+
if(isset($errors)) { return $errors; }
|
128 |
+
}
|
129 |
+
public function show(){
|
130 |
+
$structure = cwpposConfig::$structure;
|
131 |
+
$errors = cwppos_check_config();
|
132 |
+
if(!empty($errors)) return false;
|
133 |
+
foreach($structure as $k=>$fields){
|
134 |
+
|
135 |
+
if($fields['type'] == 'tab'){
|
136 |
+
$tname = esc_html($fields['name']);
|
137 |
+
$tabid = $this->add_tab($tname);
|
138 |
+
|
139 |
+
|
140 |
+
foreach ($fields['options'] as $r=>$field){
|
141 |
+
|
142 |
+
if($field['type'] == 'group'){
|
143 |
+
|
144 |
+
$this->start_group($tabid,esc_html($field['name']));
|
145 |
+
foreach($field['options'] as $m=>$gfield){
|
146 |
+
|
147 |
+
$this->add_element($tabid,$gfield ) ;
|
148 |
+
}
|
149 |
+
|
150 |
+
$this->end_group($tabid);
|
151 |
+
}else{
|
152 |
+
$this->add_element($tabid,$field) ;
|
153 |
+
}
|
154 |
+
|
155 |
+
}
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
}
|
160 |
+
$this->render_view('main_page');
|
161 |
+
|
162 |
+
}
|
163 |
+
public function add_css($name,$location =''){
|
164 |
+
if($location!='')
|
165 |
+
wp_register_style($name, $location, array(), "201306" );
|
166 |
+
$this->css[] = $name;
|
167 |
+
}
|
168 |
+
public function add_js($name,$location = '',$deps = array()){
|
169 |
+
|
170 |
+
if($location!='')
|
171 |
+
wp_register_script($name, $location, $deps, "201306", true );
|
172 |
+
$this->js[] = $name;
|
173 |
+
|
174 |
+
}
|
175 |
+
|
176 |
+
public function render_view($name){
|
177 |
+
$this->data["tabs"] = $this->tabs;
|
178 |
+
foreach($this->data as $k=>$v){
|
179 |
+
$$k = $v;
|
180 |
+
}
|
181 |
+
foreach($this->css as $file){
|
182 |
+
wp_enqueue_style($file);
|
183 |
+
}
|
184 |
+
foreach($this->js as $file){
|
185 |
+
if($file == "media"){
|
186 |
+
|
187 |
+
wp_enqueue_media();
|
188 |
+
}
|
189 |
+
wp_enqueue_script($file) ;
|
190 |
+
}
|
191 |
+
include(plugin_dir_path(dirname(__FILE__))."layout/".$name.".php");
|
192 |
+
}
|
193 |
+
public function add_tab($name){
|
194 |
+
$id = strtolower(preg_replace("/[^a-zA-Z0-9]|\s/", "_",$name));
|
195 |
+
$this->tabs[] =
|
196 |
+
array(
|
197 |
+
"name"=>$name,
|
198 |
+
"id" =>$id,
|
199 |
+
"elements"=>array()
|
200 |
+
);
|
201 |
+
|
202 |
+
return count($this->tabs) - 1;
|
203 |
+
}
|
204 |
+
public function add_input_text($tabid,$name,$description,$id,$class=''){
|
205 |
+
$html = '
|
206 |
+
<div class="controls '.$class.'">
|
207 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <input class="cwp_input " placeholder="'.$name.'" name="'.cwppos_config("menu_slug").'['.$id.']" type="text" value="'.$this->options[$id].'"></div>';
|
208 |
+
|
209 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"input_text",
|
210 |
+
"html"=>$html
|
211 |
+
);
|
212 |
+
|
213 |
+
}
|
214 |
+
|
215 |
+
|
216 |
+
public function change_review_icon($tabid, $name, $description, $id, $class='') {
|
217 |
+
|
218 |
+
$html = "<div class='controls'>
|
219 |
+
<div class='explain'>$name</div>
|
220 |
+
<p class='field_description'>$description</p>";
|
221 |
+
|
222 |
+
$html .= "<li>";
|
223 |
+
|
224 |
+
if (cwppos('cwppos_show_poweredby') == 'yes' || function_exists('wppr_ci_custom_bar_icon')) {
|
225 |
+
|
226 |
+
wp_enqueue_script("cwp-custom-bar-icon", WPPR_URL."/admin/layout/js/custom-bar-icon.js", false, WPPR_LITE_VERSION, "all");
|
227 |
+
if( cwppos("cwppos_fontawesome") === 'no' )
|
228 |
+
{
|
229 |
+
wp_enqueue_style("font-awesome-cdn", "//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css");
|
230 |
+
}
|
231 |
+
|
232 |
+
$html .= "<button id='cwp_select_bar_icon'>Select Bar Icon</button>";
|
233 |
+
$html .= "<input type='hidden' id='cwp_bar_icon_field' name='".cwppos_config("menu_slug")."[".$id."][]' value='";
|
234 |
+
if(isset($this->options[$id])) { if (@$this->options[$id][0]=="#") { $html.=$this->options[$id]; } else $html .= @$this->options[$id][0]; }
|
235 |
+
|
236 |
+
$html .= "'/> <span class='current_bar_icon'>";
|
237 |
+
if(!empty($this->options[$id][0])) {
|
238 |
+
//var_dump($this->options[$id][0]);
|
239 |
+
if ($this->options[$id][0]==="#") {
|
240 |
+
|
241 |
+
$code = $this->options[$id];
|
242 |
+
}
|
243 |
+
else
|
244 |
+
$code = $this->options[$id][0];
|
245 |
+
|
246 |
+
$html .= "<i class='fa fa-fw'>&". $code . "</i> <a href='#' class='useDefault'>Use Default Styling</a>";
|
247 |
+
} else {
|
248 |
+
$html .= "* Currently set to the default styling</span>";
|
249 |
+
} } else {
|
250 |
+
$html .= '<span style="color:red;">'. __('You need the custom icon <a style="color:red;" href="http://themeisle.com/plugins/wppr-custom-icon/" target="_blank" >add-on</a> in order to change this.',"cwppos") . "</span>";
|
251 |
+
}
|
252 |
+
$html .= "</li>";
|
253 |
+
|
254 |
+
$html .= "</div>";
|
255 |
+
|
256 |
+
$this->tabs[$tabid]["elements"][] = array("type" => "change_icon", "html" => $html);
|
257 |
+
}
|
258 |
+
|
259 |
+
|
260 |
+
|
261 |
+
|
262 |
+
public function get_fonts(){
|
263 |
+
return array(
|
264 |
+
'arial' => 'Arial',
|
265 |
+
'verdana' => 'Verdana, Geneva',
|
266 |
+
'trebuchet' => 'Trebuchet',
|
267 |
+
'georgia' => 'Georgia',
|
268 |
+
'times' => 'Times New Roman',
|
269 |
+
'tahoma' => 'Tahoma, Geneva',
|
270 |
+
'palatino' => 'Palatino',
|
271 |
+
'helvetica' => 'Helvetica*'
|
272 |
+
);
|
273 |
+
}
|
274 |
+
public function get_font_styles(){
|
275 |
+
return array(
|
276 |
+
'normal' => __( 'Normal', 'cwppos' ),
|
277 |
+
'italic' => __( 'Italic', 'cwppos' ),
|
278 |
+
'bold' => __( 'Bold', 'cwppos' ),
|
279 |
+
'bold italic' => __( 'Bold Italic', 'cwppos' )
|
280 |
+
);
|
281 |
+
}
|
282 |
+
public function get_font_sizes(){
|
283 |
+
$sizes = range( 9, 71 );
|
284 |
+
$sizes = array_map( 'absint', $sizes );
|
285 |
+
return $sizes;
|
286 |
+
}
|
287 |
+
public function add_typography($tabid,$name,$description,$id,$class=''){
|
288 |
+
$fonts = $this->get_fonts();
|
289 |
+
$style = $this->get_font_styles();
|
290 |
+
$sizes = $this->get_font_sizes();
|
291 |
+
$html = '
|
292 |
+
<div class="controls '.$class.'">
|
293 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <div class="cwp_typo">
|
294 |
+
|
295 |
+
<input type="hidden" id="'.$id.'_color" name="'.cwppos_config("menu_slug").'['.$id.'][color]" value="'.$this->options[$id]['color'].'"/>
|
296 |
+
<input type="text" name="" class="subo-color-picker" id="'.$id.'_color_selector" value="'.$this->options[$id]['color'].'" />
|
297 |
+
|
298 |
+
<select class="cwp_select cwp_tipsy" original-title="Font family" name="'.cwppos_config("menu_slug").'['.$id.'][font]" > ';
|
299 |
+
foreach($fonts as $k=>$v){
|
300 |
+
|
301 |
+
$html.="<option value='".$k."' ".($this->options[$id]['font'] == $k ? 'selected' : '').">".$v."</option>";
|
302 |
+
}
|
303 |
+
|
304 |
+
$html .='</select>
|
305 |
+
<select class="cwp_select cwp_tipsy" original-title="Font style" name="'.cwppos_config("menu_slug").'['.$id.'][style]" > ';
|
306 |
+
foreach($style as $k=>$v){
|
307 |
+
|
308 |
+
$html.="<option value='".$k."' ".($this->options[$id]['style'] == $k ? 'selected' : '').">".$v."</option>";
|
309 |
+
}
|
310 |
+
|
311 |
+
$html .='</select>
|
312 |
+
<select class="cwp_select cwp_tipsy" original-title="Font size" " name="'.cwppos_config("menu_slug").'['.$id.'][size]" > ';
|
313 |
+
foreach($sizes as $v){
|
314 |
+
|
315 |
+
$html.="<option value='".$v."' ".($this->options[$id]['size'] == $v ? 'selected' : '').">".$v."px</option>";
|
316 |
+
}
|
317 |
+
|
318 |
+
$html .='</select>
|
319 |
+
|
320 |
+
</div></div>';
|
321 |
+
|
322 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"typography",
|
323 |
+
"html"=>$html
|
324 |
+
);
|
325 |
+
|
326 |
+
}
|
327 |
+
|
328 |
+
public function get_bg_repeat(){
|
329 |
+
|
330 |
+
return array(
|
331 |
+
'no-repeat' => __('No Repeat', 'cwppos'),
|
332 |
+
'repeat-x' => __('Repeat Horizontally', 'cwppos'),
|
333 |
+
'repeat-y' => __('Repeat Vertically', 'cwppos'),
|
334 |
+
'repeat' => __('Repeat All', 'cwppos'),
|
335 |
+
);
|
336 |
+
}
|
337 |
+
public function get_bg_position(){
|
338 |
+
return array(
|
339 |
+
'top left' => __('Top Left', 'cwppos'),
|
340 |
+
'top center' => __('Top Center', 'cwppos'),
|
341 |
+
'top right' => __('Top Right', 'cwppos'),
|
342 |
+
'center left' => __('Middle Left', 'cwppos'),
|
343 |
+
'center center' => __('Middle Center', 'cwppos'),
|
344 |
+
'center right' => __('Middle Right', 'cwppos'),
|
345 |
+
'bottom left' => __('Bottom Left', 'cwppos'),
|
346 |
+
'bottom center' => __('Bottom Center', 'cwppos'),
|
347 |
+
'bottom right' => __('Bottom Right', 'cwppos')
|
348 |
+
);
|
349 |
+
}
|
350 |
+
public function get_bg_attachment(){
|
351 |
+
return array(
|
352 |
+
'scroll' => __('Scroll Normally', 'optionsframework'),
|
353 |
+
'fixed' => __('Fixed in Place', 'optionsframework')
|
354 |
+
);
|
355 |
+
|
356 |
+
}
|
357 |
+
public function add_background($tabid,$name,$description,$id,$class=''){
|
358 |
+
$repeats = $this->get_bg_repeat();
|
359 |
+
$positions = $this->get_bg_position();
|
360 |
+
$attachments = $this->get_bg_attachment();
|
361 |
+
$html = '
|
362 |
+
<div class="controls '.$class.'">
|
363 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p><div class="cwp_background">
|
364 |
+
<div class="cwp_bgstyle">
|
365 |
+
<div class="cwp_bgimage">
|
366 |
+
<input type="hidden" id="'.$id.'" name="'.cwppos_config("menu_slug").'['.$id.'][bgimage]" value="'.$this->options[$id]['bgimage'].'"/>
|
367 |
+
<img src="'.$this->options[$id]['bgimage'].'" id="'.$id.'_image" class="image-preview-input"/><br/>
|
368 |
+
<a id="'.$id.'_button" class="selector-image button" >Select Image</a>
|
369 |
+
|
370 |
+
<a id="'.$id.'_buttonclear" class="clear-image button" >Clear image</a>
|
371 |
+
</div>
|
372 |
+
<div class="cwp_bgcolor">
|
373 |
+
<input type="hidden" id="'.$id.'_color" name="'.cwppos_config("menu_slug").'['.$id.'][bgcolor]" value="'.$this->options[$id]['bgcolor'].'"/> <br/>
|
374 |
+
<input type="text" name="" class="subo-color-picker" id="'.$id.'_color_selector" value="'.$this->options[$id]['bgcolor'].'" />
|
375 |
+
</div><div class="clear"></div>
|
376 |
+
</div>
|
377 |
+
<div class="cwp_bgformat">
|
378 |
+
|
379 |
+
<select class="cwp_select cwp_tipsy" original-title="Background repeat" name="'.cwppos_config("menu_slug").'['.$id.'][bgrepeat]" > ';
|
380 |
+
foreach($repeats as $k=>$v){
|
381 |
+
|
382 |
+
$html.="<option value='".$k."' ".($this->options[$id]['bgrepeat'] == $k ? 'selected' : '').">".$v."</option>";
|
383 |
+
}
|
384 |
+
|
385 |
+
$html .='</select>
|
386 |
+
<select class="cwp_select cwp_tipsy" original-title="Background position" name="'.cwppos_config("menu_slug").'['.$id.'][bgposition]" > ';
|
387 |
+
foreach($positions as $k=>$v){
|
388 |
+
|
389 |
+
$html.="<option value='".$k."' ".($this->options[$id]['bgposition'] == $k ? 'selected' : '').">".$v."</option>";
|
390 |
+
}
|
391 |
+
|
392 |
+
$html .='</select>
|
393 |
+
<select class="cwp_select cwp_tipsy" original-title="Background attachament" name="'.cwppos_config("menu_slug").'['.$id.'][bgattachment]" > ';
|
394 |
+
foreach($attachments as $k=>$v){
|
395 |
+
|
396 |
+
$html.="<option value='".$k."' ".($this->options[$id]['bgattachment'] == $k ? 'selected' : '').">".$v."</option>";
|
397 |
+
}
|
398 |
+
|
399 |
+
$html .='</select>
|
400 |
+
</div>
|
401 |
+
|
402 |
+
</div>
|
403 |
+
|
404 |
+
|
405 |
+
</div>';
|
406 |
+
|
407 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"textarea",
|
408 |
+
"html"=>$html
|
409 |
+
);
|
410 |
+
|
411 |
+
}
|
412 |
+
public function add_textarea($tabid,$name,$description,$id,$class=''){
|
413 |
+
|
414 |
+
$html = '
|
415 |
+
<div class="controls '.$class.'">
|
416 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <textarea class="cwp_textarea " placeholder="'.$name.'" name="'.cwppos_config("menu_slug").'['.$id.']" >'.$this->options[$id].'</textarea></div>';
|
417 |
+
|
418 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"textarea",
|
419 |
+
"html"=>$html
|
420 |
+
);
|
421 |
+
|
422 |
+
}
|
423 |
+
public function add_restriction($tabid,$name){
|
424 |
+
|
425 |
+
$html = '
|
426 |
+
<div class="controls '.$class.'">
|
427 |
+
<div class="explain">'.$name.'</div><p class="field_description">You need to have the capability to add HTML in order to use this feature !</p></div>';
|
428 |
+
|
429 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"textarea_html",
|
430 |
+
"html"=>$html
|
431 |
+
);
|
432 |
+
|
433 |
+
}
|
434 |
+
public function add_editor($tabid,$name,$description,$id,$class=''){
|
435 |
+
ob_start();
|
436 |
+
|
437 |
+
wp_editor($this->options[$id], cwppos_config("menu_slug").'['.$id.']');
|
438 |
+
|
439 |
+
$editor_contents = ob_get_clean();
|
440 |
+
|
441 |
+
$html = '
|
442 |
+
<div class="controls '.$class.'">
|
443 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>'.$editor_contents.'</div>';
|
444 |
+
|
445 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"editor",
|
446 |
+
"html"=>$html
|
447 |
+
);
|
448 |
+
|
449 |
+
}
|
450 |
+
public function add_input_number($tabid,$name, $description, $id, $min = false, $max = false, $step = false, $class = ""){
|
451 |
+
$html = '
|
452 |
+
<div class="controls '.$class.'">
|
453 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <input placeholder="'.$name.'" type="number" class="cwp_input" value="'.$this->options[$id].'" name="'.cwppos_config("menu_slug").'['.$id.']"
|
454 |
+
'.($min === false ? '' : ' min = "'.$min.'" ').'
|
455 |
+
'.($max === false ? '' : ' max = "'.$max.'" ').'
|
456 |
+
'.($step === false ? '' : ' step = "'.$step.'" ').'
|
457 |
+
> </div>';
|
458 |
+
|
459 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"input_number",
|
460 |
+
"html"=>$html
|
461 |
+
);
|
462 |
+
|
463 |
+
}
|
464 |
+
|
465 |
+
public function add_select($tabid,$name,$description,$id,$options,$class=""){
|
466 |
+
|
467 |
+
$html = '
|
468 |
+
<div class="controls '.$class.'">
|
469 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>';
|
470 |
+
|
471 |
+
$html .='<select class=" cwp_select" name="'.cwppos_config("menu_slug").'['.$id.']" > ';
|
472 |
+
|
473 |
+
foreach($options as $k=>$v){
|
474 |
+
|
475 |
+
$html.="<option value='".$k."' ".($this->options[$id] == $k ? 'selected' : '').">".$v."</option>";
|
476 |
+
}
|
477 |
+
|
478 |
+
|
479 |
+
|
480 |
+
$html .='</select></div>';
|
481 |
+
|
482 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"select",
|
483 |
+
"html"=>$html
|
484 |
+
);
|
485 |
+
}
|
486 |
+
public function add_multiselect($tabid,$name,$description,$id,$options,$class=""){
|
487 |
+
|
488 |
+
$html = '
|
489 |
+
<div class="controls '.$class.'">
|
490 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> <select name="'.cwppos_config("menu_slug").'['.$id.'][]" class="cwp_multiselect" multiple > ';
|
491 |
+
foreach($options as $k=>$v){
|
492 |
+
|
493 |
+
$html.="<option value='".$k."' ".(in_array($k,$this->options[$id]) ? 'selected' : '').">".$v."</option>";
|
494 |
+
}
|
495 |
+
|
496 |
+
$html .='</select></div>';
|
497 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"multiselect",
|
498 |
+
"html"=>$html
|
499 |
+
);
|
500 |
+
}
|
501 |
+
public function add_checkbox($tabid,$name,$description,$id,$options,$class=""){
|
502 |
+
|
503 |
+
$html = '
|
504 |
+
<div class="controls '.$class.'">
|
505 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> ';
|
506 |
+
foreach($options as $k=>$v){
|
507 |
+
|
508 |
+
$html.="<label class='cwp_label'><input class='cwp_checkbox' type=\"checkbox\" name='".cwppos_config("menu_slug")."[".$id."][]' value='".$k."' ".(in_array($k,$this->options[$id]) ? 'checked' : '')." >".$v."</label>";
|
509 |
+
}
|
510 |
+
|
511 |
+
$html .='</div>';
|
512 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"checkbox",
|
513 |
+
"html"=>$html
|
514 |
+
);
|
515 |
+
}
|
516 |
+
|
517 |
+
|
518 |
+
|
519 |
+
public function add_radio($tabid,$name,$description,$id,$options,$class=""){
|
520 |
+
|
521 |
+
$html = '
|
522 |
+
<div class="controls '.$class.'">
|
523 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p> ';
|
524 |
+
foreach($options as $k=>$v){
|
525 |
+
|
526 |
+
$html.="<label class='cwp_label'><input class='cwp_radio' type=\"radio\" name='".cwppos_config("menu_slug")."[".$id."]' value='".$k."' ".($this->options[$id] == $k ? 'checked' : '').">".$v."</label>";
|
527 |
+
}
|
528 |
+
|
529 |
+
$html .='</div>';
|
530 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"radio",
|
531 |
+
"html"=>$html
|
532 |
+
);
|
533 |
+
}
|
534 |
+
|
535 |
+
|
536 |
+
|
537 |
+
public function add_image($tabid,$name,$description,$id,$class = ''){
|
538 |
+
$html = '
|
539 |
+
<div class="controls '.$class.'">
|
540 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>
|
541 |
+
<input type="hidden" id="'.$id.'" name="'.cwppos_config("menu_slug").'['.$id.']" value="'.$this->options[$id].'"/>
|
542 |
+
<img src="'.$this->options[$id].'" id="'.$id.'_image" class="image-preview-input"/><br/>
|
543 |
+
<a id="'.$id.'_button" class="selector-image button" >Select Image</a>
|
544 |
+
<a id="'.$id.'_buttonclear" class="clear-image button" >Clear image</a>
|
545 |
+
|
546 |
+
</div>';
|
547 |
+
|
548 |
+
|
549 |
+
$this->tabs[$tabid]["elements"][] = array("type"=>"image",
|
550 |
+
"html"=>$html
|
551 |
+
);
|
552 |
+
}
|
553 |
+
|
554 |
+
public function add_button($tabid,$name,$description,$id,$class = ''){
|
555 |
+
$html = '
|
556 |
+
<div class="controls '.$class.' ">
|
557 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>
|
558 |
+
<a href="'.get_bloginfo('wpurl') . '/wp-admin/admin.php?page=wp-addons'.'" class="button" style="color:red; text-decoration: none; ">'.$name.'</a>
|
559 |
+
</div></div>';
|
560 |
+
$this->tabs[$tabid]["elements"][] = array(
|
561 |
+
"type"=>"button",
|
562 |
+
"html"=>$html
|
563 |
+
);
|
564 |
+
}
|
565 |
+
|
566 |
+
public function add_color($tabid,$name,$description,$id,$class = ''){
|
567 |
+
|
568 |
+
|
569 |
+
$html = '
|
570 |
+
<div class="controls '.$class.' ">
|
571 |
+
<div class="explain">'.$name.'</div><p class="field_description">'.$description.'</p>
|
572 |
+
<input type="hidden" id="'.$id.'_color" name="'.cwppos_config("menu_slug").'['.$id.']" value="'.$this->options[$id].'"/> </br>
|
573 |
+
<input type="text" name="" class="subo-color-picker" id="'.$id.'_color_selector" value="'.$this->options[$id].'" /> <br/>
|
574 |
+
</div>';
|
575 |
+
|
576 |
+
|
577 |
+
$this->tabs[$tabid]["elements"][] = array( "type"=>"color",
|
578 |
+
"html"=>$html
|
579 |
+
);
|
580 |
+
}
|
581 |
+
public function add_title($tabid,$name){
|
582 |
+
$html = '<h1 class="tab-title-area">'.$name.'</h1>';
|
583 |
+
$this->tabs[$tabid]["elements"][] = array(
|
584 |
+
"type"=>"title",
|
585 |
+
"html"=>$html
|
586 |
+
);
|
587 |
+
|
588 |
+
}
|
589 |
+
|
590 |
+
public function start_group($tabid, $name){
|
591 |
+
$html = '<div class="group-in-tab">
|
592 |
+
<p class="group-name">'.$name.'</p>
|
593 |
+
<div class="group-content">
|
594 |
+
';
|
595 |
+
$this->tabs[$tabid]["elements"][] = array(
|
596 |
+
"type"=>"group_start",
|
597 |
+
"html"=>$html
|
598 |
+
);
|
599 |
+
}
|
600 |
+
public function end_group($tabid){
|
601 |
+
$html = '</div></div>
|
602 |
+
';
|
603 |
+
$this->tabs[$tabid]["elements"][] = array(
|
604 |
+
"type"=>"end",
|
605 |
+
"html"=>$html
|
606 |
+
);
|
607 |
+
}
|
608 |
Â
}
|
admin/layout/css/main_page.css
CHANGED
@@ -1,1024 +1,1024 @@
|
|
1 |
-
-----------------------------------------------------------------------------------
|
2 |
-
/* Admin styles
|
3 |
-
/*-----------------------------------------------------------------------------------*/
|
4 |
-
|
5 |
-
.updated, .error {
|
6 |
-
display:none!important
|
7 |
-
} /* disable the admin notices */
|
8 |
-
#cwp_container {
|
9 |
-
margin: 15px;
|
10 |
-
position:relative;
|
11 |
-
z-index: 0
|
12 |
-
}
|
13 |
-
#cwp_container #header {
|
14 |
-
height: 70px;
|
15 |
-
background:#f9f9f9;
|
16 |
-
border: 1px solid #ccc;
|
17 |
-
-webkit-border-radius: 6px 6px 0 0;
|
18 |
-
-moz-border-radius: 6px 6px 0 0;
|
19 |
-
border-radius: 6px 6px 0 0;
|
20 |
-
-moz-box-shadow: inset 0 1px 0 #fff;
|
21 |
-
-webkit-box-shadow: inset 0 1px 0 #fff;
|
22 |
-
box-shadow: inset 0 1px 0 #fff;
|
23 |
-
}
|
24 |
-
#cwp_container #header .logo {
|
25 |
-
float: left;
|
26 |
-
margin:10px 20px;
|
27 |
-
}
|
28 |
-
#cwp_container #js-warning {
|
29 |
-
color: red;
|
30 |
-
float: left;
|
31 |
-
margin: 20px 10px;
|
32 |
-
width: 330px;
|
33 |
-
}
|
34 |
-
#cwp_container ul,#cwp_container ol {margin: 0;}
|
35 |
-
.js #cwp_container #js-warning {
|
36 |
-
display: none;
|
37 |
-
}
|
38 |
-
|
39 |
-
#cwp_container #header .logo .cwp_h2 {
|
40 |
-
display:inline-block;
|
41 |
-
font-style:normal;
|
42 |
-
padding-right:5px;
|
43 |
-
}
|
44 |
-
#cwp_container #header .logo span {
|
45 |
-
color:#888888;
|
46 |
-
}
|
47 |
-
#cwp_container #header .icon-option {
|
48 |
-
float: right;
|
49 |
-
height: 32px;
|
50 |
-
width: 32px;
|
51 |
-
background: url(../images/icon_option.png) no-repeat;
|
52 |
-
margin:20px 30px 0;
|
53 |
-
}
|
54 |
-
|
55 |
-
#cwp_container #info_bar {
|
56 |
-
background: #f3f3f3;
|
57 |
-
border:solid #d8d8d8;
|
58 |
-
border-bottom:1px solid #D8D8D8;
|
59 |
-
border-width:0 1px 1px 1px;
|
60 |
-
padding: 6px 20px 0 6px;
|
61 |
-
height: 31px;
|
62 |
-
text-align: right;
|
63 |
-
-moz-box-shadow: inset 0 1px 0 #fcfcfc;
|
64 |
-
-webkit-box-shadow: inset 0 1px 0 #fcfcfc;
|
65 |
-
box-shadow: inset 0 1px 0 #fcfcfc;
|
66 |
-
}
|
67 |
-
|
68 |
-
#cwp_container #expand_options{
|
69 |
-
cursor: pointer;
|
70 |
-
display: block;
|
71 |
-
height: 22px;
|
72 |
-
width: 21px;
|
73 |
-
float: left;
|
74 |
-
font-size:0;
|
75 |
-
text-indent: -9999px;
|
76 |
-
margin: 0 0 0 10px;
|
77 |
-
border: 1px solid #bbb;
|
78 |
-
-webkit-border-radius: 2px;
|
79 |
-
-moz-border-radius: 2px;
|
80 |
-
border-radius: 2px;
|
81 |
-
}
|
82 |
-
#cwp_container #info_bar .expand { background: url(../images/toggle_tabs.png) no-repeat -2px -1px; }
|
83 |
-
#cwp_container #info_bar .close { background: url(../images/toggle_tabs.png) no-repeat -2px -26px; }
|
84 |
-
#cwp_container #expand_options:hover {
|
85 |
-
cursor: pointer;
|
86 |
-
border-color: #888;
|
87 |
-
}
|
88 |
-
#cwp_container #main {
|
89 |
-
background-color: #f1f1f1;
|
90 |
-
border-left: 1px solid #d8d8d8;
|
91 |
-
border-right: 1px solid #d8d8d8;
|
92 |
-
border-bottom: 1px solid #d8d8d8;
|
93 |
-
}
|
94 |
-
#cwp_container #cwp_nav {
|
95 |
-
float: left;
|
96 |
-
position: relative;
|
97 |
-
z-index: 9999;
|
98 |
-
width: 20%;
|
99 |
-
}
|
100 |
-
#cwp_container #cwp_nav ul {
|
101 |
-
margin:0;
|
102 |
-
}
|
103 |
-
#cwp_container #cwp_nav li {
|
104 |
-
margin-bottom:0;
|
105 |
-
-moz-box-shadow: inset 0 1px 0 #f9f9f9;
|
106 |
-
-webkit-box-shadow: inset 0 1px 0 #f9f9f9;
|
107 |
-
box-shadow: inset 0 1px 0 #f9f9f9;
|
108 |
-
margin-right: 1px;
|
109 |
-
border-bottom: 1px solid #d8d8d8;
|
110 |
-
}
|
111 |
-
|
112 |
-
#cwp_container #cwp_nav li:last-child {
|
113 |
-
-moz-box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
114 |
-
-webkit-box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
115 |
-
box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
116 |
-
}
|
117 |
-
|
118 |
-
#cwp_container #cwp_nav li.current {
|
119 |
-
margin-right: 0;
|
120 |
-
}
|
121 |
-
|
122 |
-
#cwp_container #cwp_nav li a, #cwp_container #cwp_nav ul li a:link, #cwp_nav ul li a:visited {
|
123 |
-
display: block;
|
124 |
-
padding: 10px 10px 10px 40px;
|
125 |
-
background: no-repeat 16px 10px;
|
126 |
-
font-weight:bold;
|
127 |
-
font-size: 12px;
|
128 |
-
text-decoration: none;
|
129 |
-
color: #555;
|
130 |
-
opacity: 0.5;
|
131 |
-
}
|
132 |
-
#cwp_container #cwp_nav ul li.current a {
|
133 |
-
background-color: #fcfcfc;
|
134 |
-
color: #797979;
|
135 |
-
opacity: 1;
|
136 |
-
}
|
137 |
-
|
138 |
-
#cwp_container #cwp_nav ul li a:hover {
|
139 |
-
color: #d54e21;
|
140 |
-
opacity: 1;
|
141 |
-
}
|
142 |
-
|
143 |
-
/*menu icons - customize to your liking*/
|
144 |
-
#cwp_container #cwp_nav li.logoandmenu a{ background-image:url(../images/icon-header.png);}
|
145 |
-
#cwp_container #cwp_nav li.footer a{ background-image:url(../images/icon-footer.png);}
|
146 |
-
#cwp_container #cwp_nav li.stylingoptions a{ background-image:url(../images/icon-paint.png);}
|
147 |
-
#cwp_container #cwp_nav li.portfolio a{ background-image:url(../images/icon-portfolio.png);}
|
148 |
-
#cwp_container #cwp_nav li.portfoliopost a{ background-image:url(../images/icon-portfolio_post.png);}
|
149 |
-
#cwp_container #cwp_nav li.portfoliosidebar a{ background-image:url(../images/icon-portfolio_sidebar.png);}
|
150 |
-
#cwp_container #cwp_nav li.topline a{ background-image:url(../images/icon-top_line.png);}
|
151 |
-
#cwp_container #cwp_nav li.backupoptions a {background: url(../images/icon-backup.png) no-repeat;}
|
152 |
-
#cwp_container #cwp_nav li.tagline a {background: url(../images/icon-tag_line.png) no-repeat;}
|
153 |
-
#cwp_container #cwp_nav li.generalsettings a{ background-image:url(../images/icon-general_settings.png);}
|
154 |
-
#cwp_container #cwp_nav li.bottomline a{ background-image:url(../images/icon-bottom_line.png);}
|
155 |
-
#cwp_container #cwp_nav li.blog a{ background-image:url(../images/icon-blog.png);}
|
156 |
-
#cwp_container #cwp_nav li.blogpost a{ background-image:url(../images/icon-blog_post.png);}
|
157 |
-
#cwp_container #cwp_nav li.blogsidebar a{ background-image:url(../images/icon-blog_sidebar.png);}
|
158 |
-
#cwp_container #cwp_nav li.themeupdate a{ background-image:url(../images/icon-update.png);}
|
159 |
-
#cwp_container #cwp_nav li.pagesidebar a{ background-image:url(../images/icon-sidebar.png);}
|
160 |
-
#cwp_container #cwp_nav li.pagination a{ background-image:url(../images/icon-pagination.png);}
|
161 |
-
#cwp_container #cwp_nav li.preparedstyles a{ background-image:url(../images/icon-preparedstyles.png);}
|
162 |
-
|
163 |
-
#cwp_container #content {
|
164 |
-
float: left;
|
165 |
-
min-height: 900px;
|
166 |
-
width: 75%;
|
167 |
-
margin-left: -1px;
|
168 |
-
padding: 0 14px;
|
169 |
-
font-family: "Lucida Grande", Sans-serif;
|
170 |
-
background-color: #FCFCFC;
|
171 |
-
border-left: 1px solid #d8d8d8;
|
172 |
-
-moz-box-shadow: inset 0 1px 0 #fff;
|
173 |
-
-webkit-box-shadow: inset 0 1px 0 #fff;
|
174 |
-
box-shadow: inset 0 1px 0 #fff;
|
175 |
-
}
|
176 |
-
#cwp_container #content .section {
|
177 |
-
margin-bottom: 10px;
|
178 |
-
overflow-y : hidden;
|
179 |
-
}
|
180 |
-
#cwp_container #content .section h3.heading {
|
181 |
-
font-family:;
|
182 |
-
margin: 9px 0 9px 0;
|
183 |
-
padding: 7px 0;
|
184 |
-
border-bottom: 1px solid #e7e7e7;
|
185 |
-
color:#EC5923
|
186 |
-
}
|
187 |
-
#cwp_container #content .section .controls {
|
188 |
-
float: left;
|
189 |
-
width: 345px;
|
190 |
-
margin: 0 15px 0 0;
|
191 |
-
}
|
192 |
-
#cwp_container #content .section .explain {
|
193 |
-
float: left;
|
194 |
-
width: 225px;
|
195 |
-
padding: 0 10px 0 0;
|
196 |
-
font-size: 11px;
|
197 |
-
color: #999999;
|
198 |
-
}
|
199 |
-
#cwp_container #content .section-checkbox .controls {
|
200 |
-
width:25px
|
201 |
-
}
|
202 |
-
|
203 |
-
#cwp_container #content .section-multicheck .controls input.checkbox {
|
204 |
-
margin-top:9px;
|
205 |
-
}
|
206 |
-
|
207 |
-
#cwp_container #content .section-checkbox .explain {
|
208 |
-
max-width:93%;
|
209 |
-
}
|
210 |
-
#cwp_container #content .section-color .controls {
|
211 |
-
width:105px
|
212 |
-
}
|
213 |
-
#cwp_container #content .section-color .explain {
|
214 |
-
width:440px
|
215 |
-
}
|
216 |
-
#cwp_container #content .section-info h3.heading {
|
217 |
-
display:none;
|
218 |
-
}
|
219 |
-
#cwp_container #content .section-info .controls {
|
220 |
-
margin: 20px 0 0;
|
221 |
-
float:none;
|
222 |
-
width: auto;
|
223 |
-
}
|
224 |
-
#cwp_container #content .section-info .controls .cwp_info{
|
225 |
-
padding: 15px 10px;
|
226 |
-
line-height: 1.5em;
|
227 |
-
font-size: 12px;
|
228 |
-
background-color: #EFF9FF;
|
229 |
-
border: 1px solid #D6F0FF;
|
230 |
-
color:#777;
|
231 |
-
}
|
232 |
-
|
233 |
-
#cwp_container #content .section-info .controls .cwp_info ._icon {
|
234 |
-
height:16px; width:16px;
|
235 |
-
margin: 0 10px 0 0;
|
236 |
-
float: left;
|
237 |
-
}
|
238 |
-
#cwp_container #content .section-info .controls small {
|
239 |
-
font-size: 12px
|
240 |
-
}
|
241 |
-
#cwp_container #content .section-info h3.heading {
|
242 |
-
-webkit-border-radius: 3px 3px 0 0;
|
243 |
-
-moz-border-radius: 3px 3px 0 0;
|
244 |
-
border-radius: 3px 3px 0 0;
|
245 |
-
}
|
246 |
-
#cwp_container #content .section-info .controls {
|
247 |
-
-webkit-border-radius: 0 0 3px 3px;
|
248 |
-
-moz-border-radius: 0 0 3px 3px;
|
249 |
-
border-radius: 0 0 3px 3px;
|
250 |
-
}
|
251 |
-
#cwp_container .sorter {margin-right: -20px;}
|
252 |
-
#cwp_container .sorter ul {
|
253 |
-
background: #F9F9F9;
|
254 |
-
border: 1px dashed #E3E3E3;
|
255 |
-
min-height: 40px;
|
256 |
-
padding: 10px 10px 0;
|
257 |
-
width: 145px;
|
258 |
-
float: left;
|
259 |
-
margin: 0 15px 0 0;
|
260 |
-
}
|
261 |
-
#cwp_container .sorter ul h3 {
|
262 |
-
margin: 0 0 10px;
|
263 |
-
text-align: center;
|
264 |
-
color: #777;
|
265 |
-
text-transform: capitalize;
|
266 |
-
}
|
267 |
-
#cwp_container .sorter ul li {
|
268 |
-
border: 1px solid #DFDFDF;
|
269 |
-
cursor: move;
|
270 |
-
font-weight: bold;
|
271 |
-
margin-bottom:10px;
|
272 |
-
padding:0 10px;
|
273 |
-
height: 40px;
|
274 |
-
line-height: 40px;
|
275 |
-
background-color: #F1F1F1;
|
276 |
-
background-image: -ms-linear-gradient(top,#f9f9f9,#ececec);
|
277 |
-
background-image: -moz-linear-gradient(top,#f9f9f9,#ececec);
|
278 |
-
background-image: -o-linear-gradient(top,#f9f9f9,#ececec);
|
279 |
-
background-image: -webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));
|
280 |
-
background-image: -webkit-linear-gradient(top,#f9f9f9,#ececec);
|
281 |
-
background-image: linear-gradient(top,#f9f9f9,#ececec);
|
282 |
-
overflow: hidden;
|
283 |
-
-webkit-border-radius: 3px;
|
284 |
-
-moz-border-radius: 3px;
|
285 |
-
border-radius: 3px;
|
286 |
-
-moz-box-shadow: inset 0 1px 0 #fff;
|
287 |
-
-webkit-box-shadow: inset 0 1px 0 #fff;
|
288 |
-
box-shadow: inset 0 1px 0 #fff;
|
289 |
-
text-align:center;
|
290 |
-
}
|
291 |
-
|
292 |
-
|
293 |
-
#cwp_container #content .section-sorter li.placeholder {
|
294 |
-
background:#f9f9f9;
|
295 |
-
border: 1px dashed;
|
296 |
-
height:40px;}
|
297 |
-
|
298 |
-
#cwp_container #content .section-slider li.placeholder {
|
299 |
-
background:#f9f9f9;
|
300 |
-
border: 1px dashed;
|
301 |
-
height:33px;}
|
302 |
-
|
303 |
-
|
304 |
-
#cwp_container .cwp_textarea, #cwp_container .cwp_input, #cwp_container .cwp_select, #cwp_container .cwp_button{
|
305 |
-
-webkit-border-radius: 3px;
|
306 |
-
-moz-border-radius: 3px;
|
307 |
-
border-radius: 3px;
|
308 |
-
border: 1px solid;
|
309 |
-
}
|
310 |
-
#cwp_container .controls .cwp_input, #cwp_container .controls .cwp_select, #cwp_container .controls .cwp_textarea {
|
311 |
-
|
312 |
-
background-color: #f1f1f1;
|
313 |
-
border: 1px solid;
|
314 |
-
border-color: #ccc #e6e6e6 #e6e6e6 #ccc;
|
315 |
-
width: 340px;
|
316 |
-
padding: 4px;
|
317 |
-
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
|
318 |
-
font-size: 12px;
|
319 |
-
}
|
320 |
-
#cwp_container .controls input:hover, #cwp_container .controls textarea:hover {
|
321 |
-
background-color: #f9f9f9;
|
322 |
-
}
|
323 |
-
|
324 |
-
#cwp_container .controls input:focus, #cwp_container .controls textarea:focus {
|
325 |
-
background-color: #fff;
|
326 |
-
border-color: #ccc #e6e6e6 #e6e6e6 #ccc;
|
327 |
-
outline:0;
|
328 |
-
}
|
329 |
-
|
330 |
-
#cwp_container .controls .upload {
|
331 |
-
width: 340px;
|
332 |
-
}
|
333 |
-
|
334 |
-
|
335 |
-
#cwp_container .controls select {
|
336 |
-
height: 28px;
|
337 |
-
padding: 4px 5px;
|
338 |
-
width: 340px
|
339 |
-
}
|
340 |
-
#cwp_container .controls .cwp_textarea {
|
341 |
-
width: 435px;
|
342 |
-
}
|
343 |
-
#cwp_container input[type=text] {
|
344 |
-
width: 340px;
|
345 |
-
}
|
346 |
-
#cwp_container input.checkbox {
|
347 |
-
width: 30px;
|
348 |
-
margin-top:3px;
|
349 |
-
}
|
350 |
-
#cwp_container input.cwp_radio {
|
351 |
-
width: 30px;
|
352 |
-
}
|
353 |
-
label.radio, label.multicheck {
|
354 |
-
position: relative;
|
355 |
-
bottom: 9px;
|
356 |
-
}
|
357 |
-
#cwp_container .controls .input-text-small {
|
358 |
-
width: 60px;
|
359 |
-
margin-right:10px
|
360 |
-
}
|
361 |
-
#cwp_container .meta-two {
|
362 |
-
margin-right:10px
|
363 |
-
}
|
364 |
-
#cwp_container .controls .cwp_color {
|
365 |
-
float:left;
|
366 |
-
width: 70px;
|
367 |
-
margin-left:5px; /* font-size:20px; height:34px;*/
|
368 |
-
}
|
369 |
-
#cwp_container #content .section-typography .controls {
|
370 |
-
width:440px
|
371 |
-
}
|
372 |
-
#cwp_container #content .section-typography .explain {
|
373 |
-
width:130px
|
374 |
-
}
|
375 |
-
#cwp_container .controls .cwp_typography-size {
|
376 |
-
width:70px;
|
377 |
-
float:left
|
378 |
-
}
|
379 |
-
#cwp_container .controls .cwp_typography-unit {
|
380 |
-
width:60px;
|
381 |
-
float:left
|
382 |
-
}
|
383 |
-
#cwp_container .controls .cwp_typography-face {
|
384 |
-
width:145px;
|
385 |
-
float:left
|
386 |
-
}
|
387 |
-
#cwp_container .controls .cwp_typography-style {
|
388 |
-
width:95px;
|
389 |
-
float:left
|
390 |
-
}
|
391 |
-
#cwp_container .controls .cwp_radio-img-img {
|
392 |
-
border:3px solid #fff;
|
393 |
-
margin:0 5px 10px 0;
|
394 |
-
display:none;
|
395 |
-
cursor:pointer;
|
396 |
-
float:left;
|
397 |
-
}
|
398 |
-
#cwp_container .controls .cwp_radio-img-selected {
|
399 |
-
border:3px solid #ccc
|
400 |
-
}
|
401 |
-
#cwp_container .controls .cwp_radio-img-img:hover {
|
402 |
-
opacity:.8;
|
403 |
-
}
|
404 |
-
|
405 |
-
#cwp_container .controls .cwp_radio-tile-img {
|
406 |
-
width:40px;
|
407 |
-
height:40px;
|
408 |
-
border:3px solid #f9f9f9;
|
409 |
-
margin:0 2px 4px 0;
|
410 |
-
display:none;
|
411 |
-
cursor:pointer;
|
412 |
-
float:left;
|
413 |
-
}
|
414 |
-
#cwp_container .controls .cwp_radio-tile-selected {
|
415 |
-
border:3px solid #ccc
|
416 |
-
}
|
417 |
-
#cwp_container .controls .cwp_radio-tile-img:hover {
|
418 |
-
opacity:.8;
|
419 |
-
}
|
420 |
-
|
421 |
-
#cwp_container .controls .cwp_border-width {
|
422 |
-
width:70px;
|
423 |
-
float:left
|
424 |
-
}
|
425 |
-
#cwp_container .controls .cwp_border-style {
|
426 |
-
width:95px;
|
427 |
-
float:left
|
428 |
-
}
|
429 |
-
#cwp_container .group {
|
430 |
-
display:none;
|
431 |
-
padding-bottom:20px;
|
432 |
-
}
|
433 |
-
#cwp_container .group h2 {
|
434 |
-
display:none;
|
435 |
-
border-bottom:3px solid #e7e7e7
|
436 |
-
}
|
437 |
-
#cwp_container .controls input:focus, #cwp_container select:focus, #cwp_container textarea:focus {
|
438 |
-
background:#fff;
|
439 |
-
}
|
440 |
-
|
441 |
-
#cwp_container .accept {
|
442 |
-
background: #DBF6BE no-repeat 10px center;
|
443 |
-
border: solid #9BBF65;
|
444 |
-
border-width: 0 1px 1px 1px;
|
445 |
-
color: #060;
|
446 |
-
font-weight: bold;
|
447 |
-
padding: 10px;
|
448 |
-
text-align: center;
|
449 |
-
}
|
450 |
-
#cwp_container .warning {
|
451 |
-
background: #ffeeee no-repeat 10px center;
|
452 |
-
;
|
453 |
-
border: solid #dfbfbf;
|
454 |
-
border-width: 0 1px 1px 1px;
|
455 |
-
color: #333;
|
456 |
-
font-weight: bold;
|
457 |
-
padding: 10px;
|
458 |
-
text-align: center;
|
459 |
-
}
|
460 |
-
#cwp_container .update_available {
|
461 |
-
background: #FFFEEB no-repeat 10px center;
|
462 |
-
border: solid #CCCCCC;
|
463 |
-
border-width: 0 1px 1px 1px;
|
464 |
-
color: #333;
|
465 |
-
font-weight: bold;
|
466 |
-
padding: 10px;
|
467 |
-
text-align: center;
|
468 |
-
}
|
469 |
-
#cwp_container .cwp_save-popup {
|
470 |
-
position:absolute;
|
471 |
-
background:rgba(0, 0, 0, 0.5);
|
472 |
-
color:#fff;
|
473 |
-
font-size:24px;
|
474 |
-
text-align:center;
|
475 |
-
display:none;
|
476 |
-
-webkit-border-radius: 12px;
|
477 |
-
-moz-border-radius: 12px;
|
478 |
-
border-radius: 12px;
|
479 |
-
}
|
480 |
-
|
481 |
-
#cwp_container .cwp_save-popup div{
|
482 |
-
background: no-repeat 20px 50%;
|
483 |
-
padding:30px 30px 30px 60px;
|
484 |
-
}
|
485 |
-
#cwp_container .cwp_save-save {
|
486 |
-
background-image: url(../images/button_check.png);
|
487 |
-
}
|
488 |
-
#cwp_container .cwp_save-reset {
|
489 |
-
background-image: url(../images/sign_warning.png);
|
490 |
-
}
|
491 |
-
#cwp_container .cwp_save-fail {
|
492 |
-
background-image:url(../images/stop.png);
|
493 |
-
}
|
494 |
-
|
495 |
-
#cwp_container .accept,
|
496 |
-
#cwp_container .warning,
|
497 |
-
#cwp_container .update_available,
|
498 |
-
#cwp_container .cwp_save-popup {
|
499 |
-
z-index: 9999;
|
500 |
-
}
|
501 |
-
|
502 |
-
#cwp_container .upload_button_div {
|
503 |
-
margin-top:7px;
|
504 |
-
margin-bottom: 15px;
|
505 |
-
}
|
506 |
-
|
507 |
-
#cwp_container .button {
|
508 |
-
-moz-border-radius: 3px;
|
509 |
-
-khtml-border-radius: 3px;
|
510 |
-
-webkit-border-radius: 3px;
|
511 |
-
border-radius: 3px;
|
512 |
-
border: 1px solid #dfdfdf;
|
513 |
-
background-color: #fff;
|
514 |
-
margin:4px 0 4px;
|
515 |
-
}
|
516 |
-
|
517 |
-
|
518 |
-
#cwp_container .button:hover,#cwp_container .button_hover {
|
519 |
-
border-color: #bbb;
|
520 |
-
color: #464646;
|
521 |
-
}
|
522 |
-
|
523 |
-
#cwp_container .button_active {
|
524 |
-
background:#eee url(../../images/white-grad-active.png) repeat-x scroll left top;
|
525 |
-
}
|
526 |
-
|
527 |
-
#cwp_container .upload_button_div .button {
|
528 |
-
padding:4px 7px;
|
529 |
-
}
|
530 |
-
#cwp_container .image_reset_button, #cwp_container .mlu_remove_button {
|
531 |
-
margin-left:10px;
|
532 |
-
color:#ef521d;
|
533 |
-
}
|
534 |
-
|
535 |
-
#cwp_container .image_reset_button:hover, #cwp_container .mlu_remove_button:hover {
|
536 |
-
color:red;
|
537 |
-
}
|
538 |
-
|
539 |
-
#cwp_container .upload-error {
|
540 |
-
float:left;
|
541 |
-
color:#666;
|
542 |
-
font-size:10px;
|
543 |
-
font-weight:bold;
|
544 |
-
text-decoration:none;
|
545 |
-
text-shadow:1px 1px 0 #FFFFFF;
|
546 |
-
margin: 0 10px 0 0;
|
547 |
-
padding:3px 10px;
|
548 |
-
background:#FFDFEC;
|
549 |
-
-webkit-border-radius: 4px;
|
550 |
-
-moz-border-radius: 4px;
|
551 |
-
border-radius: 4px;
|
552 |
-
}
|
553 |
-
#cwp_container .reset-button {
|
554 |
-
font-family:Arial,Verdana,sans-serif;
|
555 |
-
float:left;
|
556 |
-
padding: 0 7px;
|
557 |
-
height: 23px;
|
558 |
-
line-height: 23px;
|
559 |
-
margin:0 ;
|
560 |
-
color: #ef521d;
|
561 |
-
border-color: #bbb;
|
562 |
-
}
|
563 |
-
|
564 |
-
#cwp_container .reset-button:hover { color: #ef521d; border-color: #888}
|
565 |
-
|
566 |
-
#cwp_container .slide_add_button { float:right; margin-top:10px; }
|
567 |
-
|
568 |
-
|
569 |
-
#cwp_container .save_bar {
|
570 |
-
background: #f3f3f3;
|
571 |
-
border:solid #ccc;
|
572 |
-
border-width:0 1px 1px 1px;
|
573 |
-
padding: 10px 20px 0 20px;
|
574 |
-
height: 35px;
|
575 |
-
text-align: right;
|
576 |
-
-webkit-border-radius: 0 0 3px 3px;
|
577 |
-
-moz-border-radius: 0 0 3px 3px;
|
578 |
-
border-radius: 0 0 3px 3px;
|
579 |
-
-moz-box-shadow: inset 0 1px 0 #fff;
|
580 |
-
-webkit-box-shadow: inset 0 1px 0 #fff;
|
581 |
-
box-shadow: inset 0 1px 0 #fff;
|
582 |
-
}
|
583 |
-
|
584 |
-
#cwp_save {
|
585 |
-
font-family: Arial,Verdana,sans-serif;
|
586 |
-
padding: 0 7px;
|
587 |
-
height: 23px;
|
588 |
-
line-height: 23px;
|
589 |
-
border:1px solid #0a6d9b !important;
|
590 |
-
float:right;
|
591 |
-
}
|
592 |
-
|
593 |
-
#cwp_save:hover {
|
594 |
-
border:1px solid #111 !important;
|
595 |
-
}
|
596 |
-
|
597 |
-
#cwp_container .hide {
|
598 |
-
display:none
|
599 |
-
}
|
600 |
-
#cwp_container .ajax-loading-img-top {
|
601 |
-
margin: 5px 4px 0;
|
602 |
-
float:left
|
603 |
-
}
|
604 |
-
#cwp_container .ajax-loading-img-bottom {
|
605 |
-
margin: 5px 4px 0;
|
606 |
-
}
|
607 |
-
#cwp_container .ajax-reset-loading-img {
|
608 |
-
display: block;
|
609 |
-
margin-left: 100px;
|
610 |
-
}
|
611 |
-
|
612 |
-
#cwp_container .screenshot {
|
613 |
-
max-width:340px;
|
614 |
-
margin-bottom:9px;
|
615 |
-
}
|
616 |
-
|
617 |
-
#cwp_container .cwp_uploaded-image {
|
618 |
-
|
619 |
-
}
|
620 |
-
|
621 |
-
#cwp_container .cwp_option-image {
|
622 |
-
max-width:340px;
|
623 |
-
padding: 5px;
|
624 |
-
border:1px solid #e3e3e3;
|
625 |
-
background:#f7f7f7;
|
626 |
-
-moz-border-radius: 3px;
|
627 |
-
-khtml-border-radius: 3px;
|
628 |
-
-webkit-border-radius: 3px;
|
629 |
-
border-radius: 3px;
|
630 |
-
}
|
631 |
-
#cwp_container .select_wrapper {
|
632 |
-
-moz-border-radius: 4px;
|
633 |
-
-webkit-border-radius: 4px;
|
634 |
-
border-radius: 4px;
|
635 |
-
font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;
|
636 |
-
font-size: 12px;
|
637 |
-
background: #F1F1F1 url(../images/select.png) no-repeat right center;
|
638 |
-
border-color: #CCC #E6E6E6 #E6E6E6 #CCC;;
|
639 |
-
border-style: solid;
|
640 |
-
border-width: 1px;
|
641 |
-
float: left;
|
642 |
-
height: 26px;
|
643 |
-
width: 344px;
|
644 |
-
margin: 0;
|
645 |
-
margin-bottom: 9px !important;
|
646 |
-
width: 340px;
|
647 |
-
display: block;
|
648 |
-
color: #888;
|
649 |
-
position:relative;
|
650 |
-
}
|
651 |
-
|
652 |
-
#cwp_container .select_wrapper:hover {background-color:#f9f9f9;}
|
653 |
-
|
654 |
-
#cwp_container .mini .controls select, #cwp_container #content .section .mini .controls, #cwp_container .controls .typography-size, #cwp_container .controls .border-width,#cwp_container .controls .mini,#cwp_container .mini .controls input, #cwp_container #content .mini .controls {width: 70px;}
|
655 |
-
#cwp_container .controls .typography-face {width: 145px;}
|
656 |
-
#cwp_container .controls .typography-style, #cwp_container .controls .border-style {width: 95px;}
|
657 |
-
#cwp_container .controls .typography-size,#cwp_container .controls .typography-face,#cwp_container .controls .typography-style, #cwp_container .controls .border-width, #cwp_container .controls .border-style {margin-right:5px;}
|
658 |
-
|
659 |
-
#cwp_container #content .mini .explain {
|
660 |
-
width:500px;
|
661 |
-
}
|
662 |
-
#cwp_container .cwp_notice {
|
663 |
-
background: #ffd1d1;
|
664 |
-
border:1px solid #DFDFDF;
|
665 |
-
-moz-border-radius:8px;
|
666 |
-
text-align: center;
|
667 |
-
margin-bottom: 15px
|
668 |
-
}
|
669 |
-
|
670 |
-
#cwp_container .slider li {
|
671 |
-
width: 345px;
|
672 |
-
border: 1px solid #dfdfdf;
|
673 |
-
background:#f9f9f9;
|
674 |
-
overflow:hidden;
|
675 |
-
-webkit-border-radius: 3px;
|
676 |
-
-moz-border-radius: 3px;
|
677 |
-
border-radius: 3px;
|
678 |
-
-moz-box-shadow: inset 0 1px 0 #fff;
|
679 |
-
-webkit-box-shadow: inset 0 1px 0 #fff;
|
680 |
-
box-shadow: inset 0 1px 0 #fff;
|
681 |
-
}
|
682 |
-
|
683 |
-
#cwp_container .slide_header {
|
684 |
-
cursor:move;
|
685 |
-
height:32px;
|
686 |
-
padding-left:10px;
|
687 |
-
padding-right:20px;
|
688 |
-
line-height:32px;
|
689 |
-
background-color: #F1F1F1;
|
690 |
-
margin: 1px 0 -1px 0;
|
691 |
-
border-bottom: 1px solid #dfdfdf;
|
692 |
-
background-image: -ms-linear-gradient(top,#f9f9f9,#ececec);
|
693 |
-
background-image: -moz-linear-gradient(top,#f9f9f9,#ececec);
|
694 |
-
background-image: -o-linear-gradient(top,#f9f9f9,#ececec);
|
695 |
-
background-image: -webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));
|
696 |
-
background-image: -webkit-linear-gradient(top,#f9f9f9,#ececec);
|
697 |
-
background-image: linear-gradient(top,#f9f9f9,#ececec);
|
698 |
-
overflow:hidden;
|
699 |
-
position: relative;
|
700 |
-
}
|
701 |
-
|
702 |
-
#cwp_container .slide_body {
|
703 |
-
display:none;
|
704 |
-
padding:10px 10px 10px 11px;
|
705 |
-
}
|
706 |
-
|
707 |
-
|
708 |
-
#cwp_container .slider li input,#cwp_container .slider li textarea,#cwp_container .slider li .screenshot,#cwp_container .slider li .cwp_option-image {
|
709 |
-
width:311px;
|
710 |
-
}
|
711 |
-
|
712 |
-
#cwp_container a.slide_edit_button, #cwp_container a.slide_delete_button {
|
713 |
-
text-indent:-9999px;
|
714 |
-
font-size:0;
|
715 |
-
}
|
716 |
-
#cwp_container a.slide_edit_button {
|
717 |
-
position: absolute;
|
718 |
-
right: 0;
|
719 |
-
top: 0;
|
720 |
-
width:32px;
|
721 |
-
height:32px;
|
722 |
-
background: url(../images/dropdown-arrow.png) no-repeat 9px -28px;
|
723 |
-
}
|
724 |
-
#cwp_container a:hover.slide_edit_button {
|
725 |
-
background: url(../images/dropdown-arrow.png) no-repeat 9px 11px;}
|
726 |
-
|
727 |
-
#cwp_container a.slide_delete_button {
|
728 |
-
float: right;
|
729 |
-
margin: 0 0 0 7px;
|
730 |
-
width:16px;
|
731 |
-
height:16px;
|
732 |
-
background: url(../images/icon-delete.png) no-repeat
|
733 |
-
}
|
734 |
-
|
735 |
-
#cwp_container .select_wrapper span {
|
736 |
-
height: 26px;
|
737 |
-
line-height: 26px;
|
738 |
-
z-index: 2;
|
739 |
-
padding-left: 6px;
|
740 |
-
position:absolute;
|
741 |
-
left:0;
|
742 |
-
}
|
743 |
-
|
744 |
-
#cwp_container .select_wrapper .select {
|
745 |
-
cursor: pointer;
|
746 |
-
height: 28px;
|
747 |
-
margin: 0;
|
748 |
-
-moz-opacity: 0;
|
749 |
-
filter: alpha(opacity: 0);
|
750 |
-
opacity: 0;
|
751 |
-
padding: 0;
|
752 |
-
position: relative;
|
753 |
-
width: inherit;
|
754 |
-
z-index: 4;
|
755 |
-
}
|
756 |
-
|
757 |
-
#cwp_backup {
|
758 |
-
margin: 40px 20px;
|
759 |
-
width: 600px;
|
760 |
-
}
|
761 |
-
#cwp_backup textarea {
|
762 |
-
margin-bottom: 9px !important;
|
763 |
-
background-color: #F1F1F1;
|
764 |
-
border: 1px solid;
|
765 |
-
width: 100%;
|
766 |
-
padding: 4px;
|
767 |
-
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
|
768 |
-
font-size: 12px;
|
769 |
-
border-color: #CCC #E6E6E6 #E6E6E6 #CCC;
|
770 |
-
}
|
771 |
-
|
772 |
-
#cwp_container #content .section-backup .controls { width: 80%}
|
773 |
-
#cwp_container #content .section-backup .explain {
|
774 |
-
display:none
|
775 |
-
}
|
776 |
-
#cwp_container #content .section-backup .backup-box {
|
777 |
-
margin: 0 0 20px;
|
778 |
-
}
|
779 |
-
|
780 |
-
#cwp_container #content .section-backup .instructions {
|
781 |
-
margin: 0 0 10px;
|
782 |
-
color: #777;
|
783 |
-
}
|
784 |
-
#cwp_container #content .section-backup .button, #cwp_container #content .section-transfer .button {
|
785 |
-
padding: 5px;
|
786 |
-
margin: 0 25px 0 0;
|
787 |
-
line-height: 30px
|
788 |
-
}
|
789 |
-
|
790 |
-
.temphide {display:none;}
|
791 |
-
/*-------------------------------------------------------------------------------------------*/
|
792 |
-
/* GENERAL STYLES */
|
793 |
-
/*-------------------------------------------------------------------------------------------*/
|
794 |
-
|
795 |
-
/* http://sonspring.com/journal/clearing-floats */
|
796 |
-
|
797 |
-
html body * span.clear, html body * div.clear, html body * li.clear, html body * dd.clear {
|
798 |
-
background: none;
|
799 |
-
border: 0;
|
800 |
-
clear: both;
|
801 |
-
display: block;
|
802 |
-
float: none;
|
803 |
-
font-size: 0;
|
804 |
-
list-style: none;
|
805 |
-
margin: 0;
|
806 |
-
padding: 0;
|
807 |
-
overflow: hidden;
|
808 |
-
visibility: hidden;
|
809 |
-
width: 0;
|
810 |
-
height: 0;
|
811 |
-
}
|
812 |
-
|
813 |
-
|
814 |
-
/*-------------------------------------------------------------------------------------------*/
|
815 |
-
/* Tipsy
|
816 |
-
/*-------------------------------------------------------------------------------------------*/
|
817 |
-
.tipsy { font-size: 10px; position: absolute; padding: 5px; z-index: 100000; }
|
818 |
-
.tipsy-inner { background-color: #000; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; }
|
819 |
-
|
820 |
-
/* Rounded corners */
|
821 |
-
.tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
|
822 |
-
|
823 |
-
/* Uncomment for shadow */
|
824 |
-
/*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/
|
825 |
-
|
826 |
-
.tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }
|
827 |
-
|
828 |
-
/* Rules to colour arrows */
|
829 |
-
.tipsy-arrow-n { border-bottom-color: #000; }
|
830 |
-
.tipsy-arrow-s { border-top-color: #000; }
|
831 |
-
.tipsy-arrow-e { border-left-color: #000; }
|
832 |
-
.tipsy-arrow-w { border-right-color: #000; }
|
833 |
-
|
834 |
-
.tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
|
835 |
-
.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
|
836 |
-
.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
|
837 |
-
.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
838 |
-
.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
839 |
-
.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
840 |
-
.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
|
841 |
-
.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
|
842 |
-
|
843 |
-
.image-preview-input{
|
844 |
-
max-width: 270px;
|
845 |
-
padding: 5px;
|
846 |
-
border: 1px solid #E3E3E3;
|
847 |
-
background: #F7F7F7;
|
848 |
-
-moz-border-radius: 3px;
|
849 |
-
-khtml-border-radius: 3px;
|
850 |
-
-webkit-border-radius: 3px;
|
851 |
-
border-radius: 3px;
|
852 |
-
}
|
853 |
-
.tab-section{
|
854 |
-
display:none;
|
855 |
-
}
|
856 |
-
.image-selector-wrapper{
|
857 |
-
display:block;
|
858 |
-
}
|
859 |
-
.controls .explain {
|
860 |
-
font-size:14px;
|
861 |
-
font-weight:bold;
|
862 |
-
margin-bottom:10px;
|
863 |
-
}
|
864 |
-
.controls {
|
865 |
-
padding-bottom:10px;
|
866 |
-
}
|
867 |
-
.controls img[src = '']{
|
868 |
-
display:none;
|
869 |
-
}
|
870 |
-
.text-format-element p {
|
871 |
-
margin:2px;
|
872 |
-
}
|
873 |
-
.text-format-element {
|
874 |
-
display:block;
|
875 |
-
float:left;
|
876 |
-
margin-left:10px;
|
877 |
-
}
|
878 |
-
.text-format-element select.select_sizes{
|
879 |
-
width:80px !important;
|
880 |
-
}
|
881 |
-
.text-format-element select.select_fonts{
|
882 |
-
width:150px !important;
|
883 |
-
}
|
884 |
-
.text-format-element select.select_weights{
|
885 |
-
width:80px !important;
|
886 |
-
}
|
887 |
-
.color-select-format{
|
888 |
-
width : 135px;
|
889 |
-
}
|
890 |
-
.controls .explain{
|
891 |
-
display:block;
|
892 |
-
width:100%;
|
893 |
-
margin-top:10px;
|
894 |
-
padding: 7px 0;
|
895 |
-
border-bottom: 1px solid #E7E7E7;
|
896 |
-
color: #EC5923;
|
897 |
-
}
|
898 |
-
.grouped-controls .explain{
|
899 |
-
float:left;
|
900 |
-
|
901 |
-
}
|
902 |
-
.tab-title-area{
|
903 |
-
|
904 |
-
margin-top:10px;
|
905 |
-
padding: 7px 0;
|
906 |
-
color: #21759B;
|
907 |
-
font-size:24px;
|
908 |
-
}
|
909 |
-
.wp-color-picker{
|
910 |
-
|
911 |
-
margin-bottom:0 !important;
|
912 |
-
width:70px !important;
|
913 |
-
}
|
914 |
-
.wp-picker-clear{
|
915 |
-
margin: 0px 0px 0px 6px !important;
|
916 |
-
width:inherit!important;
|
917 |
-
padding: 0px 5px !important;
|
918 |
-
|
919 |
-
}
|
920 |
-
|
921 |
-
.group-in-tab .group-name:hover{
|
922 |
-
|
923 |
-
background:#21759B;
|
924 |
-
color:#ffffff;
|
925 |
-
}
|
926 |
-
.group-in-tab .group-content{
|
927 |
-
display:none;
|
928 |
-
}
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
.group-in-tab .group-name{
|
933 |
-
font-weight:bold;
|
934 |
-
width:90%;
|
935 |
-
background:#ffffff;
|
936 |
-
cursor:pointer;
|
937 |
-
padding:10px;
|
938 |
-
color:#21759B;
|
939 |
-
text-transform:uppercase;
|
940 |
-
font-size:17px;
|
941 |
-
}
|
942 |
-
|
943 |
-
.group-in-tab .group-name:after { }
|
944 |
-
|
945 |
-
.grouped-controls + .controls .explain{
|
946 |
-
float:left;
|
947 |
-
}
|
948 |
-
#cwp_container .field_description{
|
949 |
-
margin: 0px 0px 5px;
|
950 |
-
font-size:12px;
|
951 |
-
}
|
952 |
-
#cwp_container .cwp_textarea{
|
953 |
-
height:140px;
|
954 |
-
}
|
955 |
-
#cwp_container .controls .cwp_multiselect{
|
956 |
-
height:auto;
|
957 |
-
}
|
958 |
-
#cwp_container .controls .cwp_label{
|
959 |
-
width:100%;
|
960 |
-
display:block;
|
961 |
-
margin-top:5px;
|
962 |
-
margin-bottom:5px;
|
963 |
-
}
|
964 |
-
#cwp_container .controls .cwp_checkbox{
|
965 |
-
width:20px;
|
966 |
-
}
|
967 |
-
#cwp_container .controls .cwp_typo{
|
968 |
-
width:100%;
|
969 |
-
margin:10px;
|
970 |
-
}
|
971 |
-
#cwp_container .controls .cwp_typo .cwp_select{
|
972 |
-
width:100px;
|
973 |
-
}
|
974 |
-
#cwp_container .controls .cwp_bgformat{
|
975 |
-
margin-top:20px;
|
976 |
-
}
|
977 |
-
#cwp_container .controls .cwp_bgformat .cwp_select{
|
978 |
-
width:30%;
|
979 |
-
}
|
980 |
-
#cwp_container .controls .cwp_typo .wp-picker-container, #cwp_container .controls .cwp_bgcolor .wp-picker-container{
|
981 |
-
line-height:33px;
|
982 |
-
}
|
983 |
-
#cwp_container .controls .cwp_bgcolor .wp-picker-container{
|
984 |
-
line-height:35px;
|
985 |
-
|
986 |
-
}
|
987 |
-
#cwp_container .controls .cwp_background, #cwp_container .controls .cwp_bgstyle, #cwp_container .controls .cwp_bgformat{
|
988 |
-
width:100%;
|
989 |
-
|
990 |
-
}
|
991 |
-
#cwp_container .controls .cwp_bgcolor,#cwp_container .controls .cwp_bgimage{
|
992 |
-
width:50%;
|
993 |
-
float:left;
|
994 |
-
}
|
995 |
-
#cwp_container {
|
996 |
-
display:none;
|
997 |
-
}
|
998 |
-
.spinner-reset{
|
999 |
-
float:left;
|
1000 |
-
}
|
1001 |
-
|
1002 |
-
.adminLink {
|
1003 |
-
padding-top: 25px;
|
1004 |
-
float: left;
|
1005 |
-
margin-right: 15px;
|
1006 |
-
}
|
1007 |
-
|
1008 |
-
.cwpred {
|
1009 |
-
color:red;
|
1010 |
-
}
|
1011 |
-
#wpfooter {
|
1012 |
-
display:none;
|
1013 |
-
}
|
1014 |
-
@media screen and (max-width: 782px) {
|
1015 |
-
#cwp_form #header .button {
|
1016 |
-
|
1017 |
-
padding: 0 4px 1px !important;
|
1018 |
-
font-size: 11px !important;
|
1019 |
-
}
|
1020 |
-
}
|
1021 |
-
#cwp_form #header .logo h2{
|
1022 |
-
padding:0 !important;
|
1023 |
-
margin:0 !important;
|
1024 |
Â
}
|
1 |
+
-----------------------------------------------------------------------------------
|
2 |
+
/* Admin styles
|
3 |
+
/*-----------------------------------------------------------------------------------*/
|
4 |
+
|
5 |
+
.updated, .error {
|
6 |
+
display:none!important
|
7 |
+
} /* disable the admin notices */
|
8 |
+
#cwp_container {
|
9 |
+
margin: 15px;
|
10 |
+
position:relative;
|
11 |
+
z-index: 0
|
12 |
+
}
|
13 |
+
#cwp_container #header {
|
14 |
+
height: 70px;
|
15 |
+
background:#f9f9f9;
|
16 |
+
border: 1px solid #ccc;
|
17 |
+
-webkit-border-radius: 6px 6px 0 0;
|
18 |
+
-moz-border-radius: 6px 6px 0 0;
|
19 |
+
border-radius: 6px 6px 0 0;
|
20 |
+
-moz-box-shadow: inset 0 1px 0 #fff;
|
21 |
+
-webkit-box-shadow: inset 0 1px 0 #fff;
|
22 |
+
box-shadow: inset 0 1px 0 #fff;
|
23 |
+
}
|
24 |
+
#cwp_container #header .logo {
|
25 |
+
float: left;
|
26 |
+
margin:10px 20px;
|
27 |
+
}
|
28 |
+
#cwp_container #js-warning {
|
29 |
+
color: red;
|
30 |
+
float: left;
|
31 |
+
margin: 20px 10px;
|
32 |
+
width: 330px;
|
33 |
+
}
|
34 |
+
#cwp_container ul,#cwp_container ol {margin: 0;}
|
35 |
+
.js #cwp_container #js-warning {
|
36 |
+
display: none;
|
37 |
+
}
|
38 |
+
|
39 |
+
#cwp_container #header .logo .cwp_h2 {
|
40 |
+
display:inline-block;
|
41 |
+
font-style:normal;
|
42 |
+
padding-right:5px;
|
43 |
+
}
|
44 |
+
#cwp_container #header .logo span {
|
45 |
+
color:#888888;
|
46 |
+
}
|
47 |
+
#cwp_container #header .icon-option {
|
48 |
+
float: right;
|
49 |
+
height: 32px;
|
50 |
+
width: 32px;
|
51 |
+
background: url(../images/icon_option.png) no-repeat;
|
52 |
+
margin:20px 30px 0;
|
53 |
+
}
|
54 |
+
|
55 |
+
#cwp_container #info_bar {
|
56 |
+
background: #f3f3f3;
|
57 |
+
border:solid #d8d8d8;
|
58 |
+
border-bottom:1px solid #D8D8D8;
|
59 |
+
border-width:0 1px 1px 1px;
|
60 |
+
padding: 6px 20px 0 6px;
|
61 |
+
height: 31px;
|
62 |
+
text-align: right;
|
63 |
+
-moz-box-shadow: inset 0 1px 0 #fcfcfc;
|
64 |
+
-webkit-box-shadow: inset 0 1px 0 #fcfcfc;
|
65 |
+
box-shadow: inset 0 1px 0 #fcfcfc;
|
66 |
+
}
|
67 |
+
|
68 |
+
#cwp_container #expand_options{
|
69 |
+
cursor: pointer;
|
70 |
+
display: block;
|
71 |
+
height: 22px;
|
72 |
+
width: 21px;
|
73 |
+
float: left;
|
74 |
+
font-size:0;
|
75 |
+
text-indent: -9999px;
|
76 |
+
margin: 0 0 0 10px;
|
77 |
+
border: 1px solid #bbb;
|
78 |
+
-webkit-border-radius: 2px;
|
79 |
+
-moz-border-radius: 2px;
|
80 |
+
border-radius: 2px;
|
81 |
+
}
|
82 |
+
#cwp_container #info_bar .expand { background: url(../images/toggle_tabs.png) no-repeat -2px -1px; }
|
83 |
+
#cwp_container #info_bar .close { background: url(../images/toggle_tabs.png) no-repeat -2px -26px; }
|
84 |
+
#cwp_container #expand_options:hover {
|
85 |
+
cursor: pointer;
|
86 |
+
border-color: #888;
|
87 |
+
}
|
88 |
+
#cwp_container #main {
|
89 |
+
background-color: #f1f1f1;
|
90 |
+
border-left: 1px solid #d8d8d8;
|
91 |
+
border-right: 1px solid #d8d8d8;
|
92 |
+
border-bottom: 1px solid #d8d8d8;
|
93 |
+
}
|
94 |
+
#cwp_container #cwp_nav {
|
95 |
+
float: left;
|
96 |
+
position: relative;
|
97 |
+
z-index: 9999;
|
98 |
+
width: 20%;
|
99 |
+
}
|
100 |
+
#cwp_container #cwp_nav ul {
|
101 |
+
margin:0;
|
102 |
+
}
|
103 |
+
#cwp_container #cwp_nav li {
|
104 |
+
margin-bottom:0;
|
105 |
+
-moz-box-shadow: inset 0 1px 0 #f9f9f9;
|
106 |
+
-webkit-box-shadow: inset 0 1px 0 #f9f9f9;
|
107 |
+
box-shadow: inset 0 1px 0 #f9f9f9;
|
108 |
+
margin-right: 1px;
|
109 |
+
border-bottom: 1px solid #d8d8d8;
|
110 |
+
}
|
111 |
+
|
112 |
+
#cwp_container #cwp_nav li:last-child {
|
113 |
+
-moz-box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
114 |
+
-webkit-box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
115 |
+
box-shadow: inset 0 1px 0 #f9f9f9, 0 1px 0 #f9f9f9;
|
116 |
+
}
|
117 |
+
|
118 |
+
#cwp_container #cwp_nav li.current {
|
119 |
+
margin-right: 0;
|
120 |
+
}
|
121 |
+
|
122 |
+
#cwp_container #cwp_nav li a, #cwp_container #cwp_nav ul li a:link, #cwp_nav ul li a:visited {
|
123 |
+
display: block;
|
124 |
+
padding: 10px 10px 10px 40px;
|
125 |
+
background: no-repeat 16px 10px;
|
126 |
+
font-weight:bold;
|
127 |
+
font-size: 12px;
|
128 |
+
text-decoration: none;
|
129 |
+
color: #555;
|
130 |
+
opacity: 0.5;
|
131 |
+
}
|
132 |
+
#cwp_container #cwp_nav ul li.current a {
|
133 |
+
background-color: #fcfcfc;
|
134 |
+
color: #797979;
|
135 |
+
opacity: 1;
|
136 |
+
}
|
137 |
+
|
138 |
+
#cwp_container #cwp_nav ul li a:hover {
|
139 |
+
color: #d54e21;
|
140 |
+
opacity: 1;
|
141 |
+
}
|
142 |
+
|
143 |
+
/*menu icons - customize to your liking*/
|
144 |
+
#cwp_container #cwp_nav li.logoandmenu a{ background-image:url(../images/icon-header.png);}
|
145 |
+
#cwp_container #cwp_nav li.footer a{ background-image:url(../images/icon-footer.png);}
|
146 |
+
#cwp_container #cwp_nav li.stylingoptions a{ background-image:url(../images/icon-paint.png);}
|
147 |
+
#cwp_container #cwp_nav li.portfolio a{ background-image:url(../images/icon-portfolio.png);}
|
148 |
+
#cwp_container #cwp_nav li.portfoliopost a{ background-image:url(../images/icon-portfolio_post.png);}
|
149 |
+
#cwp_container #cwp_nav li.portfoliosidebar a{ background-image:url(../images/icon-portfolio_sidebar.png);}
|
150 |
+
#cwp_container #cwp_nav li.topline a{ background-image:url(../images/icon-top_line.png);}
|
151 |
+
#cwp_container #cwp_nav li.backupoptions a {background: url(../images/icon-backup.png) no-repeat;}
|
152 |
+
#cwp_container #cwp_nav li.tagline a {background: url(../images/icon-tag_line.png) no-repeat;}
|
153 |
+
#cwp_container #cwp_nav li.generalsettings a{ background-image:url(../images/icon-general_settings.png);}
|
154 |
+
#cwp_container #cwp_nav li.bottomline a{ background-image:url(../images/icon-bottom_line.png);}
|
155 |
+
#cwp_container #cwp_nav li.blog a{ background-image:url(../images/icon-blog.png);}
|
156 |
+
#cwp_container #cwp_nav li.blogpost a{ background-image:url(../images/icon-blog_post.png);}
|
157 |
+
#cwp_container #cwp_nav li.blogsidebar a{ background-image:url(../images/icon-blog_sidebar.png);}
|
158 |
+
#cwp_container #cwp_nav li.themeupdate a{ background-image:url(../images/icon-update.png);}
|
159 |
+
#cwp_container #cwp_nav li.pagesidebar a{ background-image:url(../images/icon-sidebar.png);}
|
160 |
+
#cwp_container #cwp_nav li.pagination a{ background-image:url(../images/icon-pagination.png);}
|
161 |
+
#cwp_container #cwp_nav li.preparedstyles a{ background-image:url(../images/icon-preparedstyles.png);}
|
162 |
+
|
163 |
+
#cwp_container #content {
|
164 |
+
float: left;
|
165 |
+
min-height: 900px;
|
166 |
+
width: 75%;
|
167 |
+
margin-left: -1px;
|
168 |
+
padding: 0 14px;
|
169 |
+
font-family: "Lucida Grande", Sans-serif;
|
170 |
+
background-color: #FCFCFC;
|
171 |
+
border-left: 1px solid #d8d8d8;
|
172 |
+
-moz-box-shadow: inset 0 1px 0 #fff;
|
173 |
+
-webkit-box-shadow: inset 0 1px 0 #fff;
|
174 |
+
box-shadow: inset 0 1px 0 #fff;
|
175 |
+
}
|
176 |
+
#cwp_container #content .section {
|
177 |
+
margin-bottom: 10px;
|
178 |
+
overflow-y : hidden;
|
179 |
+
}
|
180 |
+
#cwp_container #content .section h3.heading {
|
181 |
+
font-family:;
|
182 |
+
margin: 9px 0 9px 0;
|
183 |
+
padding: 7px 0;
|
184 |
+
border-bottom: 1px solid #e7e7e7;
|
185 |
+
color:#EC5923
|
186 |
+
}
|
187 |
+
#cwp_container #content .section .controls {
|
188 |
+
float: left;
|
189 |
+
width: 345px;
|
190 |
+
margin: 0 15px 0 0;
|
191 |
+
}
|
192 |
+
#cwp_container #content .section .explain {
|
193 |
+
float: left;
|
194 |
+
width: 225px;
|
195 |
+
padding: 0 10px 0 0;
|
196 |
+
font-size: 11px;
|
197 |
+
color: #999999;
|
198 |
+
}
|
199 |
+
#cwp_container #content .section-checkbox .controls {
|
200 |
+
width:25px
|
201 |
+
}
|
202 |
+
|
203 |
+
#cwp_container #content .section-multicheck .controls input.checkbox {
|
204 |
+
margin-top:9px;
|
205 |
+
}
|
206 |
+
|
207 |
+
#cwp_container #content .section-checkbox .explain {
|
208 |
+
max-width:93%;
|
209 |
+
}
|
210 |
+
#cwp_container #content .section-color .controls {
|
211 |
+
width:105px
|
212 |
+
}
|
213 |
+
#cwp_container #content .section-color .explain {
|
214 |
+
width:440px
|
215 |
+
}
|
216 |
+
#cwp_container #content .section-info h3.heading {
|
217 |
+
display:none;
|
218 |
+
}
|
219 |
+
#cwp_container #content .section-info .controls {
|
220 |
+
margin: 20px 0 0;
|
221 |
+
float:none;
|
222 |
+
width: auto;
|
223 |
+
}
|
224 |
+
#cwp_container #content .section-info .controls .cwp_info{
|
225 |
+
padding: 15px 10px;
|
226 |
+
line-height: 1.5em;
|
227 |
+
font-size: 12px;
|
228 |
+
background-color: #EFF9FF;
|
229 |
+
border: 1px solid #D6F0FF;
|
230 |
+
color:#777;
|
231 |
+
}
|
232 |
+
|
233 |
+
#cwp_container #content .section-info .controls .cwp_info ._icon {
|
234 |
+
height:16px; width:16px;
|
235 |
+
margin: 0 10px 0 0;
|
236 |
+
float: left;
|
237 |
+
}
|
238 |
+
#cwp_container #content .section-info .controls small {
|
239 |
+
font-size: 12px
|
240 |
+
}
|
241 |
+
#cwp_container #content .section-info h3.heading {
|
242 |
+
-webkit-border-radius: 3px 3px 0 0;
|
243 |
+
-moz-border-radius: 3px 3px 0 0;
|
244 |
+
border-radius: 3px 3px 0 0;
|
245 |
+
}
|
246 |
+
#cwp_container #content .section-info .controls {
|
247 |
+
-webkit-border-radius: 0 0 3px 3px;
|
248 |
+
-moz-border-radius: 0 0 3px 3px;
|
249 |
+
border-radius: 0 0 3px 3px;
|
250 |
+
}
|
251 |
+
#cwp_container .sorter {margin-right: -20px;}
|
252 |
+
#cwp_container .sorter ul {
|
253 |
+
background: #F9F9F9;
|
254 |
+
border: 1px dashed #E3E3E3;
|
255 |
+
min-height: 40px;
|
256 |
+
padding: 10px 10px 0;
|
257 |
+
width: 145px;
|
258 |
+
float: left;
|
259 |
+
margin: 0 15px 0 0;
|
260 |
+
}
|
261 |
+
#cwp_container .sorter ul h3 {
|
262 |
+
margin: 0 0 10px;
|
263 |
+
text-align: center;
|
264 |
+
color: #777;
|
265 |
+
text-transform: capitalize;
|
266 |
+
}
|
267 |
+
#cwp_container .sorter ul li {
|
268 |
+
border: 1px solid #DFDFDF;
|
269 |
+
cursor: move;
|
270 |
+
font-weight: bold;
|
271 |
+
margin-bottom:10px;
|
272 |
+
padding:0 10px;
|
273 |
+
height: 40px;
|
274 |
+
line-height: 40px;
|
275 |
+
background-color: #F1F1F1;
|
276 |
+
background-image: -ms-linear-gradient(top,#f9f9f9,#ececec);
|
277 |
+
background-image: -moz-linear-gradient(top,#f9f9f9,#ececec);
|
278 |
+
background-image: -o-linear-gradient(top,#f9f9f9,#ececec);
|
279 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));
|
280 |
+
background-image: -webkit-linear-gradient(top,#f9f9f9,#ececec);
|
281 |
+
background-image: linear-gradient(top,#f9f9f9,#ececec);
|
282 |
+
overflow: hidden;
|
283 |
+
-webkit-border-radius: 3px;
|
284 |
+
-moz-border-radius: 3px;
|
285 |
+
border-radius: 3px;
|
286 |
+
-moz-box-shadow: inset 0 1px 0 #fff;
|
287 |
+
-webkit-box-shadow: inset 0 1px 0 #fff;
|
288 |
+
box-shadow: inset 0 1px 0 #fff;
|
289 |
+
text-align:center;
|
290 |
+
}
|
291 |
+
|
292 |
+
|
293 |
+
#cwp_container #content .section-sorter li.placeholder {
|
294 |
+
background:#f9f9f9;
|
295 |
+
border: 1px dashed;
|
296 |
+
height:40px;}
|
297 |
+
|
298 |
+
#cwp_container #content .section-slider li.placeholder {
|
299 |
+
background:#f9f9f9;
|
300 |
+
border: 1px dashed;
|
301 |
+
height:33px;}
|
302 |
+
|
303 |
+
|
304 |
+
#cwp_container .cwp_textarea, #cwp_container .cwp_input, #cwp_container .cwp_select, #cwp_container .cwp_button{
|
305 |
+
-webkit-border-radius: 3px;
|
306 |
+
-moz-border-radius: 3px;
|
307 |
+
border-radius: 3px;
|
308 |
+
border: 1px solid;
|
309 |
+
}
|
310 |
+
#cwp_container .controls .cwp_input, #cwp_container .controls .cwp_select, #cwp_container .controls .cwp_textarea {
|
311 |
+
|
312 |
+
background-color: #f1f1f1;
|
313 |
+
border: 1px solid;
|
314 |
+
border-color: #ccc #e6e6e6 #e6e6e6 #ccc;
|
315 |
+
width: 340px;
|
316 |
+
padding: 4px;
|
317 |
+
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
|
318 |
+
font-size: 12px;
|
319 |
+
}
|
320 |
+
#cwp_container .controls input:hover, #cwp_container .controls textarea:hover {
|
321 |
+
background-color: #f9f9f9;
|
322 |
+
}
|
323 |
+
|
324 |
+
#cwp_container .controls input:focus, #cwp_container .controls textarea:focus {
|
325 |
+
background-color: #fff;
|
326 |
+
border-color: #ccc #e6e6e6 #e6e6e6 #ccc;
|
327 |
+
outline:0;
|
328 |
+
}
|
329 |
+
|
330 |
+
#cwp_container .controls .upload {
|
331 |
+
width: 340px;
|
332 |
+
}
|
333 |
+
|
334 |
+
|
335 |
+
#cwp_container .controls select {
|
336 |
+
height: 28px;
|
337 |
+
padding: 4px 5px;
|
338 |
+
width: 340px
|
339 |
+
}
|
340 |
+
#cwp_container .controls .cwp_textarea {
|
341 |
+
width: 435px;
|
342 |
+
}
|
343 |
+
#cwp_container input[type=text] {
|
344 |
+
width: 340px;
|
345 |
+
}
|
346 |
+
#cwp_container input.checkbox {
|
347 |
+
width: 30px;
|
348 |
+
margin-top:3px;
|
349 |
+
}
|
350 |
+
#cwp_container input.cwp_radio {
|
351 |
+
width: 30px;
|
352 |
+
}
|
353 |
+
label.radio, label.multicheck {
|
354 |
+
position: relative;
|
355 |
+
bottom: 9px;
|
356 |
+
}
|
357 |
+
#cwp_container .controls .input-text-small {
|
358 |
+
width: 60px;
|
359 |
+
margin-right:10px
|
360 |
+
}
|
361 |
+
#cwp_container .meta-two {
|
362 |
+
margin-right:10px
|
363 |
+
}
|
364 |
+
#cwp_container .controls .cwp_color {
|
365 |
+
float:left;
|
366 |
+
width: 70px;
|
367 |
+
margin-left:5px; /* font-size:20px; height:34px;*/
|
368 |
+
}
|
369 |
+
#cwp_container #content .section-typography .controls {
|
370 |
+
width:440px
|
371 |
+
}
|
372 |
+
#cwp_container #content .section-typography .explain {
|
373 |
+
width:130px
|
374 |
+
}
|
375 |
+
#cwp_container .controls .cwp_typography-size {
|
376 |
+
width:70px;
|
377 |
+
float:left
|
378 |
+
}
|
379 |
+
#cwp_container .controls .cwp_typography-unit {
|
380 |
+
width:60px;
|
381 |
+
float:left
|
382 |
+
}
|
383 |
+
#cwp_container .controls .cwp_typography-face {
|
384 |
+
width:145px;
|
385 |
+
float:left
|
386 |
+
}
|
387 |
+
#cwp_container .controls .cwp_typography-style {
|
388 |
+
width:95px;
|
389 |
+
float:left
|
390 |
+
}
|
391 |
+
#cwp_container .controls .cwp_radio-img-img {
|
392 |
+
border:3px solid #fff;
|
393 |
+
margin:0 5px 10px 0;
|
394 |
+
display:none;
|
395 |
+
cursor:pointer;
|
396 |
+
float:left;
|
397 |
+
}
|
398 |
+
#cwp_container .controls .cwp_radio-img-selected {
|
399 |
+
border:3px solid #ccc
|
400 |
+
}
|
401 |
+
#cwp_container .controls .cwp_radio-img-img:hover {
|
402 |
+
opacity:.8;
|
403 |
+
}
|
404 |
+
|
405 |
+
#cwp_container .controls .cwp_radio-tile-img {
|
406 |
+
width:40px;
|
407 |
+
height:40px;
|
408 |
+
border:3px solid #f9f9f9;
|
409 |
+
margin:0 2px 4px 0;
|
410 |
+
display:none;
|
411 |
+
cursor:pointer;
|
412 |
+
float:left;
|
413 |
+
}
|
414 |
+
#cwp_container .controls .cwp_radio-tile-selected {
|
415 |
+
border:3px solid #ccc
|
416 |
+
}
|
417 |
+
#cwp_container .controls .cwp_radio-tile-img:hover {
|
418 |
+
opacity:.8;
|
419 |
+
}
|
420 |
+
|
421 |
+
#cwp_container .controls .cwp_border-width {
|
422 |
+
width:70px;
|
423 |
+
float:left
|
424 |
+
}
|
425 |
+
#cwp_container .controls .cwp_border-style {
|
426 |
+
width:95px;
|
427 |
+
float:left
|
428 |
+
}
|
429 |
+
#cwp_container .group {
|
430 |
+
display:none;
|
431 |
+
padding-bottom:20px;
|
432 |
+
}
|
433 |
+
#cwp_container .group h2 {
|
434 |
+
display:none;
|
435 |
+
border-bottom:3px solid #e7e7e7
|
436 |
+
}
|
437 |
+
#cwp_container .controls input:focus, #cwp_container select:focus, #cwp_container textarea:focus {
|
438 |
+
background:#fff;
|
439 |
+
}
|
440 |
+
|
441 |
+
#cwp_container .accept {
|
442 |
+
background: #DBF6BE no-repeat 10px center;
|
443 |
+
border: solid #9BBF65;
|
444 |
+
border-width: 0 1px 1px 1px;
|
445 |
+
color: #060;
|
446 |
+
font-weight: bold;
|
447 |
+
padding: 10px;
|
448 |
+
text-align: center;
|
449 |
+
}
|
450 |
+
#cwp_container .warning {
|
451 |
+
background: #ffeeee no-repeat 10px center;
|
452 |
+
;
|
453 |
+
border: solid #dfbfbf;
|
454 |
+
border-width: 0 1px 1px 1px;
|
455 |
+
color: #333;
|
456 |
+
font-weight: bold;
|
457 |
+
padding: 10px;
|
458 |
+
text-align: center;
|
459 |
+
}
|
460 |
+
#cwp_container .update_available {
|
461 |
+
background: #FFFEEB no-repeat 10px center;
|
462 |
+
border: solid #CCCCCC;
|
463 |
+
border-width: 0 1px 1px 1px;
|
464 |
+
color: #333;
|
465 |
+
font-weight: bold;
|
466 |
+
padding: 10px;
|
467 |
+
text-align: center;
|
468 |
+
}
|
469 |
+
#cwp_container .cwp_save-popup {
|
470 |
+
position:absolute;
|
471 |
+
background:rgba(0, 0, 0, 0.5);
|
472 |
+
color:#fff;
|
473 |
+
font-size:24px;
|
474 |
+
text-align:center;
|
475 |
+
display:none;
|
476 |
+
-webkit-border-radius: 12px;
|
477 |
+
-moz-border-radius: 12px;
|
478 |
+
border-radius: 12px;
|
479 |
+
}
|
480 |
+
|
481 |
+
#cwp_container .cwp_save-popup div{
|
482 |
+
background: no-repeat 20px 50%;
|
483 |
+
padding:30px 30px 30px 60px;
|
484 |
+
}
|
485 |
+
#cwp_container .cwp_save-save {
|
486 |
+
background-image: url(../images/button_check.png);
|
487 |
+
}
|
488 |
+
#cwp_container .cwp_save-reset {
|
489 |
+
background-image: url(../images/sign_warning.png);
|
490 |
+
}
|
491 |
+
#cwp_container .cwp_save-fail {
|
492 |
+
background-image:url(../images/stop.png);
|
493 |
+
}
|
494 |
+
|
495 |
+
#cwp_container .accept,
|
496 |
+
#cwp_container .warning,
|
497 |
+
#cwp_container .update_available,
|
498 |
+
#cwp_container .cwp_save-popup {
|
499 |
+
z-index: 9999;
|
500 |
+
}
|
501 |
+
|
502 |
+
#cwp_container .upload_button_div {
|
503 |
+
margin-top:7px;
|
504 |
+
margin-bottom: 15px;
|
505 |
+
}
|
506 |
+
|
507 |
+
#cwp_container .button {
|
508 |
+
-moz-border-radius: 3px;
|
509 |
+
-khtml-border-radius: 3px;
|
510 |
+
-webkit-border-radius: 3px;
|
511 |
+
border-radius: 3px;
|
512 |
+
border: 1px solid #dfdfdf;
|
513 |
+
background-color: #fff;
|
514 |
+
margin:4px 0 4px;
|
515 |
+
}
|
516 |
+
|
517 |
+
|
518 |
+
#cwp_container .button:hover,#cwp_container .button_hover {
|
519 |
+
border-color: #bbb;
|
520 |
+
color: #464646;
|
521 |
+
}
|
522 |
+
|
523 |
+
#cwp_container .button_active {
|
524 |
+
background:#eee url(../../images/white-grad-active.png) repeat-x scroll left top;
|
525 |
+
}
|
526 |
+
|
527 |
+
#cwp_container .upload_button_div .button {
|
528 |
+
padding:4px 7px;
|
529 |
+
}
|
530 |
+
#cwp_container .image_reset_button, #cwp_container .mlu_remove_button {
|
531 |
+
margin-left:10px;
|
532 |
+
color:#ef521d;
|
533 |
+
}
|
534 |
+
|
535 |
+
#cwp_container .image_reset_button:hover, #cwp_container .mlu_remove_button:hover {
|
536 |
+
color:red;
|
537 |
+
}
|
538 |
+
|
539 |
+
#cwp_container .upload-error {
|
540 |
+
float:left;
|
541 |
+
color:#666;
|
542 |
+
font-size:10px;
|
543 |
+
font-weight:bold;
|
544 |
+
text-decoration:none;
|
545 |
+
text-shadow:1px 1px 0 #FFFFFF;
|
546 |
+
margin: 0 10px 0 0;
|
547 |
+
padding:3px 10px;
|
548 |
+
background:#FFDFEC;
|
549 |
+
-webkit-border-radius: 4px;
|
550 |
+
-moz-border-radius: 4px;
|
551 |
+
border-radius: 4px;
|
552 |
+
}
|
553 |
+
#cwp_container .reset-button {
|
554 |
+
font-family:Arial,Verdana,sans-serif;
|
555 |
+
float:left;
|
556 |
+
padding: 0 7px;
|
557 |
+
height: 23px;
|
558 |
+
line-height: 23px;
|
559 |
+
margin:0 ;
|
560 |
+
color: #ef521d;
|
561 |
+
border-color: #bbb;
|
562 |
+
}
|
563 |
+
|
564 |
+
#cwp_container .reset-button:hover { color: #ef521d; border-color: #888}
|
565 |
+
|
566 |
+
#cwp_container .slide_add_button { float:right; margin-top:10px; }
|
567 |
+
|
568 |
+
|
569 |
+
#cwp_container .save_bar {
|
570 |
+
background: #f3f3f3;
|
571 |
+
border:solid #ccc;
|
572 |
+
border-width:0 1px 1px 1px;
|
573 |
+
padding: 10px 20px 0 20px;
|
574 |
+
height: 35px;
|
575 |
+
text-align: right;
|
576 |
+
-webkit-border-radius: 0 0 3px 3px;
|
577 |
+
-moz-border-radius: 0 0 3px 3px;
|
578 |
+
border-radius: 0 0 3px 3px;
|
579 |
+
-moz-box-shadow: inset 0 1px 0 #fff;
|
580 |
+
-webkit-box-shadow: inset 0 1px 0 #fff;
|
581 |
+
box-shadow: inset 0 1px 0 #fff;
|
582 |
+
}
|
583 |
+
|
584 |
+
#cwp_save {
|
585 |
+
font-family: Arial,Verdana,sans-serif;
|
586 |
+
padding: 0 7px;
|
587 |
+
height: 23px;
|
588 |
+
line-height: 23px;
|
589 |
+
border:1px solid #0a6d9b !important;
|
590 |
+
float:right;
|
591 |
+
}
|
592 |
+
|
593 |
+
#cwp_save:hover {
|
594 |
+
border:1px solid #111 !important;
|
595 |
+
}
|
596 |
+
|
597 |
+
#cwp_container .hide {
|
598 |
+
display:none
|
599 |
+
}
|
600 |
+
#cwp_container .ajax-loading-img-top {
|
601 |
+
margin: 5px 4px 0;
|
602 |
+
float:left
|
603 |
+
}
|
604 |
+
#cwp_container .ajax-loading-img-bottom {
|
605 |
+
margin: 5px 4px 0;
|
606 |
+
}
|
607 |
+
#cwp_container .ajax-reset-loading-img {
|
608 |
+
display: block;
|
609 |
+
margin-left: 100px;
|
610 |
+
}
|
611 |
+
|
612 |
+
#cwp_container .screenshot {
|
613 |
+
max-width:340px;
|
614 |
+
margin-bottom:9px;
|
615 |
+
}
|
616 |
+
|
617 |
+
#cwp_container .cwp_uploaded-image {
|
618 |
+
|
619 |
+
}
|
620 |
+
|
621 |
+
#cwp_container .cwp_option-image {
|
622 |
+
max-width:340px;
|
623 |
+
padding: 5px;
|
624 |
+
border:1px solid #e3e3e3;
|
625 |
+
background:#f7f7f7;
|
626 |
+
-moz-border-radius: 3px;
|
627 |
+
-khtml-border-radius: 3px;
|
628 |
+
-webkit-border-radius: 3px;
|
629 |
+
border-radius: 3px;
|
630 |
+
}
|
631 |
+
#cwp_container .select_wrapper {
|
632 |
+
-moz-border-radius: 4px;
|
633 |
+
-webkit-border-radius: 4px;
|
634 |
+
border-radius: 4px;
|
635 |
+
font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;
|
636 |
+
font-size: 12px;
|
637 |
+
background: #F1F1F1 url(../images/select.png) no-repeat right center;
|
638 |
+
border-color: #CCC #E6E6E6 #E6E6E6 #CCC;;
|
639 |
+
border-style: solid;
|
640 |
+
border-width: 1px;
|
641 |
+
float: left;
|
642 |
+
height: 26px;
|
643 |
+
width: 344px;
|
644 |
+
margin: 0;
|
645 |
+
margin-bottom: 9px !important;
|
646 |
+
width: 340px;
|
647 |
+
display: block;
|
648 |
+
color: #888;
|
649 |
+
position:relative;
|
650 |
+
}
|
651 |
+
|
652 |
+
#cwp_container .select_wrapper:hover {background-color:#f9f9f9;}
|
653 |
+
|
654 |
+
#cwp_container .mini .controls select, #cwp_container #content .section .mini .controls, #cwp_container .controls .typography-size, #cwp_container .controls .border-width,#cwp_container .controls .mini,#cwp_container .mini .controls input, #cwp_container #content .mini .controls {width: 70px;}
|
655 |
+
#cwp_container .controls .typography-face {width: 145px;}
|
656 |
+
#cwp_container .controls .typography-style, #cwp_container .controls .border-style {width: 95px;}
|
657 |
+
#cwp_container .controls .typography-size,#cwp_container .controls .typography-face,#cwp_container .controls .typography-style, #cwp_container .controls .border-width, #cwp_container .controls .border-style {margin-right:5px;}
|
658 |
+
|
659 |
+
#cwp_container #content .mini .explain {
|
660 |
+
width:500px;
|
661 |
+
}
|
662 |
+
#cwp_container .cwp_notice {
|
663 |
+
background: #ffd1d1;
|
664 |
+
border:1px solid #DFDFDF;
|
665 |
+
-moz-border-radius:8px;
|
666 |
+
text-align: center;
|
667 |
+
margin-bottom: 15px
|
668 |
+
}
|
669 |
+
|
670 |
+
#cwp_container .slider li {
|
671 |
+
width: 345px;
|
672 |
+
border: 1px solid #dfdfdf;
|
673 |
+
background:#f9f9f9;
|
674 |
+
overflow:hidden;
|
675 |
+
-webkit-border-radius: 3px;
|
676 |
+
-moz-border-radius: 3px;
|
677 |
+
border-radius: 3px;
|
678 |
+
-moz-box-shadow: inset 0 1px 0 #fff;
|
679 |
+
-webkit-box-shadow: inset 0 1px 0 #fff;
|
680 |
+
box-shadow: inset 0 1px 0 #fff;
|
681 |
+
}
|
682 |
+
|
683 |
+
#cwp_container .slide_header {
|
684 |
+
cursor:move;
|
685 |
+
height:32px;
|
686 |
+
padding-left:10px;
|
687 |
+
padding-right:20px;
|
688 |
+
line-height:32px;
|
689 |
+
background-color: #F1F1F1;
|
690 |
+
margin: 1px 0 -1px 0;
|
691 |
+
border-bottom: 1px solid #dfdfdf;
|
692 |
+
background-image: -ms-linear-gradient(top,#f9f9f9,#ececec);
|
693 |
+
background-image: -moz-linear-gradient(top,#f9f9f9,#ececec);
|
694 |
+
background-image: -o-linear-gradient(top,#f9f9f9,#ececec);
|
695 |
+
background-image: -webkit-gradient(linear,left top,left bottom,from(#f9f9f9),to(#ececec));
|
696 |
+
background-image: -webkit-linear-gradient(top,#f9f9f9,#ececec);
|
697 |
+
background-image: linear-gradient(top,#f9f9f9,#ececec);
|
698 |
+
overflow:hidden;
|
699 |
+
position: relative;
|
700 |
+
}
|
701 |
+
|
702 |
+
#cwp_container .slide_body {
|
703 |
+
display:none;
|
704 |
+
padding:10px 10px 10px 11px;
|
705 |
+
}
|
706 |
+
|
707 |
+
|
708 |
+
#cwp_container .slider li input,#cwp_container .slider li textarea,#cwp_container .slider li .screenshot,#cwp_container .slider li .cwp_option-image {
|
709 |
+
width:311px;
|
710 |
+
}
|
711 |
+
|
712 |
+
#cwp_container a.slide_edit_button, #cwp_container a.slide_delete_button {
|
713 |
+
text-indent:-9999px;
|
714 |
+
font-size:0;
|
715 |
+
}
|
716 |
+
#cwp_container a.slide_edit_button {
|
717 |
+
position: absolute;
|
718 |
+
right: 0;
|
719 |
+
top: 0;
|
720 |
+
width:32px;
|
721 |
+
height:32px;
|
722 |
+
background: url(../images/dropdown-arrow.png) no-repeat 9px -28px;
|
723 |
+
}
|
724 |
+
#cwp_container a:hover.slide_edit_button {
|
725 |
+
background: url(../images/dropdown-arrow.png) no-repeat 9px 11px;}
|
726 |
+
|
727 |
+
#cwp_container a.slide_delete_button {
|
728 |
+
float: right;
|
729 |
+
margin: 0 0 0 7px;
|
730 |
+
width:16px;
|
731 |
+
height:16px;
|
732 |
+
background: url(../images/icon-delete.png) no-repeat
|
733 |
+
}
|
734 |
+
|
735 |
+
#cwp_container .select_wrapper span {
|
736 |
+
height: 26px;
|
737 |
+
line-height: 26px;
|
738 |
+
z-index: 2;
|
739 |
+
padding-left: 6px;
|
740 |
+
position:absolute;
|
741 |
+
left:0;
|
742 |
+
}
|
743 |
+
|
744 |
+
#cwp_container .select_wrapper .select {
|
745 |
+
cursor: pointer;
|
746 |
+
height: 28px;
|
747 |
+
margin: 0;
|
748 |
+
-moz-opacity: 0;
|
749 |
+
filter: alpha(opacity: 0);
|
750 |
+
opacity: 0;
|
751 |
+
padding: 0;
|
752 |
+
position: relative;
|
753 |
+
width: inherit;
|
754 |
+
z-index: 4;
|
755 |
+
}
|
756 |
+
|
757 |
+
#cwp_backup {
|
758 |
+
margin: 40px 20px;
|
759 |
+
width: 600px;
|
760 |
+
}
|
761 |
+
#cwp_backup textarea {
|
762 |
+
margin-bottom: 9px !important;
|
763 |
+
background-color: #F1F1F1;
|
764 |
+
border: 1px solid;
|
765 |
+
width: 100%;
|
766 |
+
padding: 4px;
|
767 |
+
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
|
768 |
+
font-size: 12px;
|
769 |
+
border-color: #CCC #E6E6E6 #E6E6E6 #CCC;
|
770 |
+
}
|
771 |
+
|
772 |
+
#cwp_container #content .section-backup .controls { width: 80%}
|
773 |
+
#cwp_container #content .section-backup .explain {
|
774 |
+
display:none
|
775 |
+
}
|
776 |
+
#cwp_container #content .section-backup .backup-box {
|
777 |
+
margin: 0 0 20px;
|
778 |
+
}
|
779 |
+
|
780 |
+
#cwp_container #content .section-backup .instructions {
|
781 |
+
margin: 0 0 10px;
|
782 |
+
color: #777;
|
783 |
+
}
|
784 |
+
#cwp_container #content .section-backup .button, #cwp_container #content .section-transfer .button {
|
785 |
+
padding: 5px;
|
786 |
+
margin: 0 25px 0 0;
|
787 |
+
line-height: 30px
|
788 |
+
}
|
789 |
+
|
790 |
+
.temphide {display:none;}
|
791 |
+
/*-------------------------------------------------------------------------------------------*/
|
792 |
+
/* GENERAL STYLES */
|
793 |
+
/*-------------------------------------------------------------------------------------------*/
|
794 |
+
|
795 |
+
/* http://sonspring.com/journal/clearing-floats */
|
796 |
+
|
797 |
+
html body * span.clear, html body * div.clear, html body * li.clear, html body * dd.clear {
|
798 |
+
background: none;
|
799 |
+
border: 0;
|
800 |
+
clear: both;
|
801 |
+
display: block;
|
802 |
+
float: none;
|
803 |
+
font-size: 0;
|
804 |
+
list-style: none;
|
805 |
+
margin: 0;
|
806 |
+
padding: 0;
|
807 |
+
overflow: hidden;
|
808 |
+
visibility: hidden;
|
809 |
+
width: 0;
|
810 |
+
height: 0;
|
811 |
+
}
|
812 |
+
|
813 |
+
|
814 |
+
/*-------------------------------------------------------------------------------------------*/
|
815 |
+
/* Tipsy
|
816 |
+
/*-------------------------------------------------------------------------------------------*/
|
817 |
+
.tipsy { font-size: 10px; position: absolute; padding: 5px; z-index: 100000; }
|
818 |
+
.tipsy-inner { background-color: #000; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; }
|
819 |
+
|
820 |
+
/* Rounded corners */
|
821 |
+
.tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
|
822 |
+
|
823 |
+
/* Uncomment for shadow */
|
824 |
+
/*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/
|
825 |
+
|
826 |
+
.tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed #000; }
|
827 |
+
|
828 |
+
/* Rules to colour arrows */
|
829 |
+
.tipsy-arrow-n { border-bottom-color: #000; }
|
830 |
+
.tipsy-arrow-s { border-top-color: #000; }
|
831 |
+
.tipsy-arrow-e { border-left-color: #000; }
|
832 |
+
.tipsy-arrow-w { border-right-color: #000; }
|
833 |
+
|
834 |
+
.tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
|
835 |
+
.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
|
836 |
+
.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
|
837 |
+
.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
838 |
+
.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
839 |
+
.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
|
840 |
+
.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
|
841 |
+
.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
|
842 |
+
|
843 |
+
.image-preview-input{
|
844 |
+
max-width: 270px;
|
845 |
+
padding: 5px;
|
846 |
+
border: 1px solid #E3E3E3;
|
847 |
+
background: #F7F7F7;
|
848 |
+
-moz-border-radius: 3px;
|
849 |
+
-khtml-border-radius: 3px;
|
850 |
+
-webkit-border-radius: 3px;
|
851 |
+
border-radius: 3px;
|
852 |
+
}
|
853 |
+
.tab-section{
|
854 |
+
display:none;
|
855 |
+
}
|
856 |
+
.image-selector-wrapper{
|
857 |
+
display:block;
|
858 |
+
}
|
859 |
+
.controls .explain {
|
860 |
+
font-size:14px;
|
861 |
+
font-weight:bold;
|
862 |
+
margin-bottom:10px;
|
863 |
+
}
|
864 |
+
.controls {
|
865 |
+
padding-bottom:10px;
|
866 |
+
}
|
867 |
+
.controls img[src = '']{
|
868 |
+
display:none;
|
869 |
+
}
|
870 |
+
.text-format-element p {
|
871 |
+
margin:2px;
|
872 |
+
}
|
873 |
+
.text-format-element {
|
874 |
+
display:block;
|
875 |
+
float:left;
|
876 |
+
margin-left:10px;
|
877 |
+
}
|
878 |
+
.text-format-element select.select_sizes{
|
879 |
+
width:80px !important;
|
880 |
+
}
|
881 |
+
.text-format-element select.select_fonts{
|
882 |
+
width:150px !important;
|
883 |
+
}
|
884 |
+
.text-format-element select.select_weights{
|
885 |
+
width:80px !important;
|
886 |
+
}
|
887 |
+
.color-select-format{
|
888 |
+
width : 135px;
|
889 |
+
}
|
890 |
+
.controls .explain{
|
891 |
+
display:block;
|
892 |
+
width:100%;
|
893 |
+
margin-top:10px;
|
894 |
+
padding: 7px 0;
|
895 |
+
border-bottom: 1px solid #E7E7E7;
|
896 |
+
color: #EC5923;
|
897 |
+
}
|
898 |
+
.grouped-controls .explain{
|
899 |
+
float:left;
|
900 |
+
|
901 |
+
}
|
902 |
+
.tab-title-area{
|
903 |
+
|
904 |
+
margin-top:10px;
|
905 |
+
padding: 7px 0;
|
906 |
+
color: #21759B;
|
907 |
+
font-size:24px;
|
908 |
+
}
|
909 |
+
.wp-color-picker{
|
910 |
+
|
911 |
+
margin-bottom:0 !important;
|
912 |
+
width:70px !important;
|
913 |
+
}
|
914 |
+
.wp-picker-clear{
|
915 |
+
margin: 0px 0px 0px 6px !important;
|
916 |
+
width:inherit!important;
|
917 |
+
padding: 0px 5px !important;
|
918 |
+
|
919 |
+
}
|
920 |
+
|
921 |
+
.group-in-tab .group-name:hover{
|
922 |
+
|
923 |
+
background:#21759B;
|
924 |
+
color:#ffffff;
|
925 |
+
}
|
926 |
+
.group-in-tab .group-content{
|
927 |
+
display:none;
|
928 |
+
}
|
929 |
+
|
930 |
+
|
931 |
+
|
932 |
+
.group-in-tab .group-name{
|
933 |
+
font-weight:bold;
|
934 |
+
width:90%;
|
935 |
+
background:#ffffff;
|
936 |
+
cursor:pointer;
|
937 |
+
padding:10px;
|
938 |
+
color:#21759B;
|
939 |
+
text-transform:uppercase;
|
940 |
+
font-size:17px;
|
941 |
+
}
|
942 |
+
|
943 |
+
.group-in-tab .group-name:after { }
|
944 |
+
|
945 |
+
.grouped-controls + .controls .explain{
|
946 |
+
float:left;
|
947 |
+
}
|
948 |
+
#cwp_container .field_description{
|
949 |
+
margin: 0px 0px 5px;
|
950 |
+
font-size:12px;
|
951 |
+
}
|
952 |
+
#cwp_container .cwp_textarea{
|
953 |
+
height:140px;
|
954 |
+
}
|
955 |
+
#cwp_container .controls .cwp_multiselect{
|
956 |
+
height:auto;
|
957 |
+
}
|
958 |
+
#cwp_container .controls .cwp_label{
|
959 |
+
width:100%;
|
960 |
+
display:block;
|
961 |
+
margin-top:5px;
|
962 |
+
margin-bottom:5px;
|
963 |
+
}
|
964 |
+
#cwp_container .controls .cwp_checkbox{
|
965 |
+
width:20px;
|
966 |
+
}
|
967 |
+
#cwp_container .controls .cwp_typo{
|
968 |
+
width:100%;
|
969 |
+
margin:10px;
|
970 |
+
}
|
971 |
+
#cwp_container .controls .cwp_typo .cwp_select{
|
972 |
+
width:100px;
|
973 |
+
}
|
974 |
+
#cwp_container .controls .cwp_bgformat{
|
975 |
+
margin-top:20px;
|
976 |
+
}
|
977 |
+
#cwp_container .controls .cwp_bgformat .cwp_select{
|
978 |
+
width:30%;
|
979 |
+
}
|
980 |
+
#cwp_container .controls .cwp_typo .wp-picker-container, #cwp_container .controls .cwp_bgcolor .wp-picker-container{
|
981 |
+
line-height:33px;
|
982 |
+
}
|
983 |
+
#cwp_container .controls .cwp_bgcolor .wp-picker-container{
|
984 |
+
line-height:35px;
|
985 |
+
|
986 |
+
}
|
987 |
+
#cwp_container .controls .cwp_background, #cwp_container .controls .cwp_bgstyle, #cwp_container .controls .cwp_bgformat{
|
988 |
+
width:100%;
|
989 |
+
|
990 |
+
}
|
991 |
+
#cwp_container .controls .cwp_bgcolor,#cwp_container .controls .cwp_bgimage{
|
992 |
+
width:50%;
|
993 |
+
float:left;
|
994 |
+
}
|
995 |
+
#cwp_container {
|
996 |
+
display:none;
|
997 |
+
}
|
998 |
+
.spinner-reset{
|
999 |
+
float:left;
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
.adminLink {
|
1003 |
+
padding-top: 25px;
|
1004 |
+
float: left;
|
1005 |
+
margin-right: 15px;
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
.cwpred {
|
1009 |
+
color:red;
|
1010 |
+
}
|
1011 |
+
#wpfooter {
|
1012 |
+
display:none;
|
1013 |
+
}
|
1014 |
+
@media screen and (max-width: 782px) {
|
1015 |
+
#cwp_form #header .button {
|
1016 |
+
|
1017 |
+
padding: 0 4px 1px !important;
|
1018 |
+
font-size: 11px !important;
|
1019 |
+
}
|
1020 |
+
}
|
1021 |
+
#cwp_form #header .logo h2{
|
1022 |
+
padding:0 !important;
|
1023 |
+
margin:0 !important;
|
1024 |
Â
}
|
admin/layout/js/custom-bar-icon.js
CHANGED
@@ -1,48 +1,48 @@
|
|
1 |
-
jQuery("#cwp_select_bar_icon").click(function(a) {
|
2 |
-
a.preventDefault();
|
3 |
-
a.stopPropagation();
|
4 |
-
var b = ["","","","","","","","","","","","","","",];
|
5 |
-
if (0 != jQuery("#bar-icon-elements").length){
|
6 |
-
jQuery("#bar-icon-elements").addClass("active").show(); } else { insertIconContainer(b); }
|
7 |
-
});
|
8 |
-
|
9 |
-
function insertIconContainer(a) {
|
10 |
-
jQuery("#cwp_form").append("<div id='bar-icon-elements' class='active'></div>");
|
11 |
-
a.forEach(function(a) {
|
12 |
-
iC = a.substring(1);
|
13 |
-
var b = "<i id='" + iC + "' class='fa icon fa-fw'>" + a + "</i>";
|
14 |
-
jQuery("#bar-icon-elements").append(b);
|
15 |
-
});
|
16 |
-
jQuery("#bar-icon-elements").append("<span class='closeModal'><i class='fa fa-times'></i></span>");
|
17 |
-
jQuery("#bar-icon-elements .closeModal").click(function(x) {
|
18 |
-
jQuery("#bar-icon-elements").removeClass("active").hide();
|
19 |
-
return;
|
20 |
-
});
|
21 |
-
}
|
22 |
-
|
23 |
-
function r() {
|
24 |
-
jQuery(".current_bar_icon").html("").text("* Currently set to the default styling.");
|
25 |
-
jQuery("input[type='hidden']#cwp_bar_icon_field").val("");
|
26 |
-
}
|
27 |
-
|
28 |
-
jQuery(".useDefault").click(function(a) {
|
29 |
-
a.preventDefault();
|
30 |
-
a.stopPropagation();
|
31 |
-
r();
|
32 |
-
});
|
33 |
-
|
34 |
-
function d() {
|
35 |
-
jQuery("#bar-icon-elements").removeClass("active").hide();
|
36 |
-
return;
|
37 |
-
}
|
38 |
-
|
39 |
-
jQuery("#cwp_form").on("click", "#bar-icon-elements i.icon", function(a) {
|
40 |
-
a.preventDefault();
|
41 |
-
var b = jQuery(this).attr("id");
|
42 |
-
var uD = "<a href='#' class='useDefault'>Use Default Styling</a>";
|
43 |
-
jQuery("#bar-icon-elements i.active").removeClass("active");
|
44 |
-
jQuery(this).addClass("active");
|
45 |
-
jQuery(".current_bar_icon").text("").append("<i class='fa icon fa-fw'>&" + b + "</i>" + uD);
|
46 |
-
jQuery("input[type='hidden']#cwp_bar_icon_field").val(b);
|
47 |
-
d();
|
48 |
Â
});
|
1 |
+
jQuery("#cwp_select_bar_icon").click(function(a) {
|
2 |
+
a.preventDefault();
|
3 |
+
a.stopPropagation();
|
4 |
+
var b = ["","","","","","","","","","","","","","",];
|
5 |
+
if (0 != jQuery("#bar-icon-elements").length){
|
6 |
+
jQuery("#bar-icon-elements").addClass("active").show(); } else { insertIconContainer(b); }
|
7 |
+
});
|
8 |
+
|
9 |
+
function insertIconContainer(a) {
|
10 |
+
jQuery("#cwp_form").append("<div id='bar-icon-elements' class='active'></div>");
|
11 |
+
a.forEach(function(a) {
|
12 |
+
iC = a.substring(1);
|
13 |
+
var b = "<i id='" + iC + "' class='fa icon fa-fw'>" + a + "</i>";
|
14 |
+
jQuery("#bar-icon-elements").append(b);
|
15 |
+
});
|
16 |
+
jQuery("#bar-icon-elements").append("<span class='closeModal'><i class='fa fa-times'></i></span>");
|
17 |
+
jQuery("#bar-icon-elements .closeModal").click(function(x) {
|
18 |
+
jQuery("#bar-icon-elements").removeClass("active").hide();
|
19 |
+
return;
|
20 |
+
});
|
21 |
+
}
|
22 |
+
|
23 |
+
function r() {
|
24 |
+
jQuery(".current_bar_icon").html("").text("* Currently set to the default styling.");
|
25 |
+
jQuery("input[type='hidden']#cwp_bar_icon_field").val("");
|
26 |
+
}
|
27 |
+
|
28 |
+
jQuery(".useDefault").click(function(a) {
|
29 |
+
a.preventDefault();
|
30 |
+
a.stopPropagation();
|
31 |
+
r();
|
32 |
+
});
|
33 |
+
|
34 |
+
function d() {
|
35 |
+
jQuery("#bar-icon-elements").removeClass("active").hide();
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
|
39 |
+
jQuery("#cwp_form").on("click", "#bar-icon-elements i.icon", function(a) {
|
40 |
+
a.preventDefault();
|
41 |
+
var b = jQuery(this).attr("id");
|
42 |
+
var uD = "<a href='#' class='useDefault'>Use Default Styling</a>";
|
43 |
+
jQuery("#bar-icon-elements i.active").removeClass("active");
|
44 |
+
jQuery(this).addClass("active");
|
45 |
+
jQuery(".current_bar_icon").text("").append("<i class='fa icon fa-fw'>&" + b + "</i>" + uD);
|
46 |
+
jQuery("input[type='hidden']#cwp_bar_icon_field").val(b);
|
47 |
+
d();
|
48 |
Â
});
|
css/cwppos-widget.css
CHANGED
@@ -1,73 +1,73 @@
|
|
1 |
-
/* Sidebar Popular Reviews Widget */
|
2 |
-
|
3 |
-
.cwp-popular-review { position: relative; border-bottom: 1px solid #ddd; margin: 0; padding: 15px 0 !important;}
|
4 |
-
|
5 |
-
.cwp-popular-review .cwp-review-chart canvas, .cwp-popular-review .cwp-review-chart span { width: 40px!important; height: 40px!important; line-height: 2.3; }
|
6 |
-
.cwp-popular-review .cwp-review-chart .cwp-review-percentage { top: -1px; left: -1px; width:40px!important;height: 40px !important; }
|
7 |
-
.cwp-popular-review .cwp-review-chart { border: 0 solid #fff; width: 40px; height: 40px; top: 56%; margin-top: -22px; }
|
8 |
-
/* Review Pie Chart Styles */
|
9 |
-
.cwp-review-chart { float: left;
|
10 |
-
margin: 10px 0 10px 10px;
|
11 |
-
position: absolute;top: 0;right: 0; border: 3px solid #fff; border-radius: 50%;}
|
12 |
-
.cwp-review-percentage span { font-family: "Lato"; font-size: 17px; font-weight: 900; background: #fff; display: block;border-radius: 50%; }
|
13 |
-
.cwp_easyPieChart { position: relative; text-align: center; }
|
14 |
-
.cwp_easyPieChart canvas { position: absolute; top: 0; left: 0; }
|
15 |
-
.cwp-popular-review .cwp_easyPieChart span { text-align:center; }
|
16 |
-
.cwp-popular-review:before {
|
17 |
-
content:""!important;
|
18 |
-
}
|
19 |
-
|
20 |
-
.cwp-popular-review .cwp_rev_image {
|
21 |
-
margin-right:10px;
|
22 |
-
border-radius: 3px;
|
23 |
-
max-width: 50px!important;
|
24 |
-
max-height: 50px!important;
|
25 |
-
vertical-align: middle;
|
26 |
-
}
|
27 |
-
|
28 |
-
.widget_cwp_top_products_widget ul, .widget_cwp_latest_products_widget ul {
|
29 |
-
margin-left:0 !important;
|
30 |
-
padding-left:0 !important;
|
31 |
-
}
|
32 |
-
|
33 |
-
.widget_cwp_top_products_widget li, .widget_cwp_latest_products_widget li {
|
34 |
-
margin-left:0 !important;
|
35 |
-
list-style:none!important;
|
36 |
-
background-image:none;
|
37 |
-
}
|
38 |
-
|
39 |
-
.widget_cwp_top_products_widget li a, .widget_cwp_latest_products_widget li a{
|
40 |
-
border:none!important;
|
41 |
-
padding:0 !important;
|
42 |
-
}
|
43 |
-
.wppr-cols-2 > div.wppr-col,
|
44 |
-
.wppr-cols-3 > div.wppr-col{
|
45 |
-
width:15%;
|
46 |
-
}
|
47 |
-
.wppr-cols-2 > a.wppr-col,
|
48 |
-
.wppr-cols-3 > a.wppr-col{
|
49 |
-
width:66%;
|
50 |
-
text-overflow: ellipsis;
|
51 |
-
overflow: hidden;
|
52 |
-
white-space: nowrap;;
|
53 |
-
}
|
54 |
-
.wppr-cols-3 a.wppr-col{
|
55 |
-
position: relative;
|
56 |
-
top: 40%;
|
57 |
-
transform: translateY(40%);
|
58 |
-
margin-right:-60px;
|
59 |
-
}
|
60 |
-
.wppr-cols-2 .wppr-col,
|
61 |
-
.wppr-cols-3 .wppr-col{
|
62 |
-
float:left;
|
63 |
-
}
|
64 |
-
.wppr-cols-3:after,
|
65 |
-
.wppr-cols-2:after {
|
66 |
-
content: "";
|
67 |
-
display: table;
|
68 |
-
clear: both;
|
69 |
-
position: relative !important;
|
70 |
-
}
|
71 |
-
.widget_cwp_top_products_widget{
|
72 |
-
overflow:hidden;
|
73 |
Â
}
|
1 |
+
/* Sidebar Popular Reviews Widget */
|
2 |
+
|
3 |
+
.cwp-popular-review { position: relative; border-bottom: 1px solid #ddd; margin: 0; padding: 15px 0 !important;}
|
4 |
+
|
5 |
+
.cwp-popular-review .cwp-review-chart canvas, .cwp-popular-review .cwp-review-chart span { width: 40px!important; height: 40px!important; line-height: 2.3; }
|
6 |
+
.cwp-popular-review .cwp-review-chart .cwp-review-percentage { top: -1px; left: -1px; width:40px!important;height: 40px !important; }
|
7 |
+
.cwp-popular-review .cwp-review-chart { border: 0 solid #fff; width: 40px; height: 40px; top: 56%; margin-top: -22px; }
|
8 |
+
/* Review Pie Chart Styles */
|
9 |
+
.cwp-review-chart { float: left;
|
10 |
+
margin: 10px 0 10px 10px;
|
11 |
+
position: absolute;top: 0;right: 0; border: 3px solid #fff; border-radius: 50%;}
|
12 |
+
.cwp-review-percentage span { font-family: "Lato"; font-size: 17px; font-weight: 900; background: #fff; display: block;border-radius: 50%; }
|
13 |
+
.cwp_easyPieChart { position: relative; text-align: center; }
|
14 |
+
.cwp_easyPieChart canvas { position: absolute; top: 0; left: 0; }
|
15 |
+
.cwp-popular-review .cwp_easyPieChart span { text-align:center; }
|
16 |
+
.cwp-popular-review:before {
|
17 |
+
content:""!important;
|
18 |
+
}
|
19 |
+
|
20 |
+
.cwp-popular-review .cwp_rev_image {
|
21 |
+
margin-right:10px;
|
22 |
+
border-radius: 3px;
|
23 |
+
max-width: 50px!important;
|
24 |
+
max-height: 50px!important;
|
25 |
+
vertical-align: middle;
|
26 |
+
}
|
27 |
+
|
28 |
+
.widget_cwp_top_products_widget ul, .widget_cwp_latest_products_widget ul {
|
29 |
+
margin-left:0 !important;
|
30 |
+
padding-left:0 !important;
|
31 |
+
}
|
32 |
+
|
33 |
+
.widget_cwp_top_products_widget li, .widget_cwp_latest_products_widget li {
|
34 |
+
margin-left:0 !important;
|
35 |
+
list-style:none!important;
|
36 |
+
background-image:none;
|
37 |
+
}
|
38 |
+
|
39 |
+
.widget_cwp_top_products_widget li a, .widget_cwp_latest_products_widget li a{
|
40 |
+
border:none!important;
|
41 |
+
padding:0 !important;
|
42 |
+
}
|
43 |
+
.wppr-cols-2 > div.wppr-col,
|
44 |
+
.wppr-cols-3 > div.wppr-col{
|
45 |
+
width:15%;
|
46 |
+
}
|
47 |
+
.wppr-cols-2 > a.wppr-col,
|
48 |
+
.wppr-cols-3 > a.wppr-col{
|
49 |
+
width:66%;
|
50 |
+
text-overflow: ellipsis;
|
51 |
+
overflow: hidden;
|
52 |
+
white-space: nowrap;;
|
53 |
+
}
|
54 |
+
.wppr-cols-3 a.wppr-col{
|
55 |
+
position: relative;
|
56 |
+
top: 40%;
|
57 |
+
transform: translateY(40%);
|
58 |
+
margin-right:-60px;
|
59 |
+
}
|
60 |
+
.wppr-cols-2 .wppr-col,
|
61 |
+
.wppr-cols-3 .wppr-col{
|
62 |
+
float:left;
|
63 |
+
}
|
64 |
+
.wppr-cols-3:after,
|
65 |
+
.wppr-cols-2:after {
|
66 |
+
content: "";
|
67 |
+
display: table;
|
68 |
+
clear: both;
|
69 |
+
position: relative !important;
|
70 |
+
}
|
71 |
+
.widget_cwp_top_products_widget{
|
72 |
+
overflow:hidden;
|
73 |
Â
}
|
css/dashboard_styles.css
CHANGED
@@ -489,4 +489,16 @@ a.preload_info:hover, a.preload_info_upsell:hover {
|
|
489 |
Â
-webkit-box-sizing: border-box;
|
490 |
Â
-moz-box-sizing: border-box;
|
491 |
Â
box-sizing: border-box;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
492 |
Â
}
|
489 |
Â
-webkit-box-sizing: border-box;
|
490 |
Â
-moz-box-sizing: border-box;
|
491 |
Â
box-sizing: border-box;
|
492 |
+
}
|
493 |
+
#cwp_add_button{
|
494 |
+
font-size:20px;
|
495 |
+
text-decoration: none;
|
496 |
+
margin-left:5px;
|
497 |
+
}
|
498 |
+
.cwp_hide_button2 {
|
499 |
+
display:none;
|
500 |
+
}
|
501 |
+
.cwp_proscons {
|
502 |
+
display:inline-block;
|
503 |
+
width:49.8%;
|
504 |
Â
}
|
css/frontpage.css
CHANGED
@@ -120,7 +120,7 @@
|
|
120 |
Â
|
121 |
Â
#review-statistics .review-wrap-up { margin-top: 20px; border:1px solid #e6e6e6; border-top: none;}
|
122 |
Â
|
123 |
-
#review-statistics .review-wu-bars h3, .review-wu-bars span { font-family: "Open Sans"; font-size: 13px !important; text-transform: uppercase; font-style: italic; line-height:
|
124 |
Â
|
125 |
Â
#review-statistics .review-wu-bars h3 {float:left;}
|
126 |
Â
|
@@ -169,32 +169,30 @@
|
|
169 |
Â
|
170 |
Â
#review-statistics .review-wrap-up .cwpr-review-top .cwp-item-category i { color:#e3e3e3; margin-right: 5px;}
|
171 |
Â
|
172 |
-
#review-statistics .review-wrap-up .review-wu-left {width:
|
173 |
Â
|
174 |
-
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image {text-align:center; float: left; width: 40%;
|
175 |
Â
|
176 |
-
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image img { height: auto;width:
|
177 |
Â
|
178 |
Â
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade {width: 50%;
|
179 |
Â
box-sizing: border-box; text-align:center;
|
180 |
-
|
181 |
Â
|
182 |
Â
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart { position: relative; margin:0px;float:none;display:inline-block;}
|
183 |
Â
|
184 |
-
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart span { font-size: 30px; }
|
185 |
-
|
186 |
Â
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart .cwp-review-percentage { width: 150px; }
|
187 |
Â
|
188 |
-
#review-statistics .review-wrap-up .review-wu-right { float: left; width:
|
189 |
Â
|
190 |
Â
|
191 |
Â
|
192 |
Â
#review-statistics .review-wrap-up .review-wu-right h2 { font-family: "Lato"; font-size: 15px; text-transform: uppercase; font-weight: 800; margin-bottom: 0;}
|
193 |
Â
|
194 |
Â
#review-statistics .review-wrap-up .review-wu-right ul li {
|
195 |
-
font-size:
|
196 |
Â
margin: 0 0 2%;
|
197 |
-
font-family: "
|
198 |
Â
|
199 |
Â
#review-statistics .review-wrap-up .review-wu-right ul li {
|
200 |
Â
|
@@ -280,13 +278,13 @@
|
|
280 |
Â
|
281 |
Â
#cwp-slider-comment .comment-form-default label { }
|
282 |
Â
|
283 |
-
#cwp-slider-comment .comment-form-meta-option { width: 100%; float: right; margin-bottom:
|
284 |
Â
|
285 |
-
#cwp-slider-comment .comment-form-meta-option label { float: left; width: 80%; }
|
286 |
Â
|
287 |
-
#cwp-slider-comment .comment-form-meta-option .meta_option_input { float: right; width: 12%; text-align: center; border: none; padding:
|
288 |
Â
|
289 |
-
#cwp-slider-comment .comment-form-meta-option .comment_meta_slider { margin-top: 5px; background:#f3f3f3; border: none; height: 7px; box-shadow: inset 0 0 2px rgba(0,0,0,0.3); float:left;width:100%;}
|
290 |
Â
|
291 |
Â
#cwp-slider-comment .comment-form-meta-option .comment_meta_slider .ui-slider-handle { background: #3baeda; border:none; border-radius: 50%; width: 13px; height: 13px; top: -4px; left: 5px; }
|
292 |
Â
|
@@ -324,10 +322,12 @@
|
|
324 |
Â
|
325 |
Â
width:230px;
|
326 |
Â
|
327 |
-
|
328 |
-
|
329 |
Â
display:block;
|
330 |
Â
|
Â
|
|
Â
|
|
Â
|
|
331 |
Â
}
|
332 |
Â
|
333 |
Â
.comment-form-meta-option {
|
@@ -354,7 +354,7 @@
|
|
354 |
Â
}
|
355 |
Â
|
356 |
Â
|
357 |
-
@media (max-width:
|
358 |
Â
#review-statistics .review-wrap-up .review-wu-left {
|
359 |
Â
width:100%;
|
360 |
Â
}
|
@@ -362,7 +362,44 @@
|
|
362 |
Â
width:95%;
|
363 |
Â
padding-left:5%;
|
364 |
Â
}
|
Â
|
|
365 |
Â
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade{
|
366 |
Â
border-right:none;
|
367 |
Â
}
|
368 |
-
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
120 |
Â
|
121 |
Â
#review-statistics .review-wrap-up { margin-top: 20px; border:1px solid #e6e6e6; border-top: none;}
|
122 |
Â
|
123 |
+
#review-statistics .review-wu-bars h3, .review-wu-bars span { font-family: "Open Sans"; font-size: 13px !important; text-transform: uppercase; font-style: italic; line-height: 2; margin: 0; padding: 0; }
|
124 |
Â
|
125 |
Â
#review-statistics .review-wu-bars h3 {float:left;}
|
126 |
Â
|
169 |
Â
|
170 |
Â
#review-statistics .review-wrap-up .cwpr-review-top .cwp-item-category i { color:#e3e3e3; margin-right: 5px;}
|
171 |
Â
|
172 |
+
#review-statistics .review-wrap-up .review-wu-left {width: 51%; float: left;margin-top:10px; }
|
173 |
Â
|
174 |
+
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image {text-align:center; float: left; width: 40%; overflow: hidden; border-top: none;padding:0;margin-left: 5%;margin-right: 5%;}
|
175 |
Â
|
176 |
+
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image img { height: auto;width:100%; box-shadow:none;}
|
177 |
Â
|
178 |
Â
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade {width: 50%;
|
179 |
Â
box-sizing: border-box; text-align:center;
|
180 |
+
display:block; float: left; border:1px solid #e6e6e6; border-top:none;position: relative; border-bottom:none;}
|
181 |
Â
|
182 |
Â
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart { position: relative; margin:0px;float:none;display:inline-block;}
|
183 |
Â
|
Â
|
|
Â
|
|
184 |
Â
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart .cwp-review-percentage { width: 150px; }
|
185 |
Â
|
186 |
+
#review-statistics .review-wrap-up .review-wu-right { float: left; width: 44%; padding: 2% 2% 2% 3%; border-top: none; }
|
187 |
Â
|
188 |
Â
|
189 |
Â
|
190 |
Â
#review-statistics .review-wrap-up .review-wu-right h2 { font-family: "Lato"; font-size: 15px; text-transform: uppercase; font-weight: 800; margin-bottom: 0;}
|
191 |
Â
|
192 |
Â
#review-statistics .review-wrap-up .review-wu-right ul li {
|
193 |
+
font-size: 16px;padding-left: 0;
|
194 |
Â
margin: 0 0 2%;
|
195 |
+
font-family: "Lato"; }
|
196 |
Â
|
197 |
Â
#review-statistics .review-wrap-up .review-wu-right ul li {
|
198 |
Â
|
278 |
Â
|
279 |
Â
#cwp-slider-comment .comment-form-default label { }
|
280 |
Â
|
281 |
+
#cwp-slider-comment .comment-form-meta-option { width: 100%; float: right; margin-bottom: 12px;position:relative; }
|
282 |
Â
|
283 |
+
#cwp-slider-comment .comment-form-meta-option label { float: left; width: 80%; display:block;font-size:14px;line-height: 2;padding:0px;margin:0px;}
|
284 |
Â
|
285 |
+
#cwp-slider-comment .comment-form-meta-option .meta_option_input { float: right; width: 12%; text-align: center; border: none; padding: 5px 0px 0px 0px; font-weight: bold;line-height: 1.5;font-size:14px; height:26px;margin:0px;min-width:0%;}
|
286 |
Â
|
287 |
+
#cwp-slider-comment .comment-form-meta-option .comment_meta_slider { margin-top: 5px!important; background:#f3f3f3; border: none; height: 7px; box-shadow: inset 0 0 2px rgba(0,0,0,0.3); float:left;width:100%;}
|
288 |
Â
|
289 |
Â
#cwp-slider-comment .comment-form-meta-option .comment_meta_slider .ui-slider-handle { background: #3baeda; border:none; border-radius: 50%; width: 13px; height: 13px; top: -4px; left: 5px; }
|
290 |
Â
|
322 |
Â
|
323 |
Â
width:230px;
|
324 |
Â
|
325 |
+
|
Â
|
|
326 |
Â
display:block;
|
327 |
Â
|
328 |
+
margin-bottom:10px;
|
329 |
+
margin-top:10px;
|
330 |
+
|
331 |
Â
}
|
332 |
Â
|
333 |
Â
.comment-form-meta-option {
|
354 |
Â
}
|
355 |
Â
|
356 |
Â
|
357 |
+
@media (max-width: 440px) {
|
358 |
Â
#review-statistics .review-wrap-up .review-wu-left {
|
359 |
Â
width:100%;
|
360 |
Â
}
|
362 |
Â
width:95%;
|
363 |
Â
padding-left:5%;
|
364 |
Â
}
|
365 |
+
|
366 |
Â
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade{
|
367 |
Â
border-right:none;
|
368 |
Â
}
|
369 |
+
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image, #review-statistics .review-wrap-up .review-wu-left .review-wu-grade { height:130px;}
|
370 |
+
|
371 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart .cwp-review-percentage {
|
372 |
+
|
373 |
+
margin-top: 10%;
|
374 |
+
}
|
375 |
+
|
376 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart span {
|
377 |
+
font-size: 30px;
|
378 |
+
}
|
379 |
+
}
|
380 |
+
|
381 |
+
@media (min-width:440px) and (max-width: 700px) {
|
382 |
+
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image, #review-statistics .review-wrap-up .review-wu-left .review-wu-grade { height:100px;}
|
383 |
+
|
384 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart .cwp-review-percentage {
|
385 |
+
|
386 |
+
margin-top: 10%;
|
387 |
+
}
|
388 |
+
|
389 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart span {
|
390 |
+
font-size: 30px;
|
391 |
+
}
|
392 |
+
}
|
393 |
+
|
394 |
+
@media (min-width:700px) and (max-width: 820px) {
|
395 |
+
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image, #review-statistics .review-wrap-up .review-wu-left .review-wu-grade { height:130px;}
|
396 |
+
|
397 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart .cwp-review-percentage {
|
398 |
+
|
399 |
+
margin-top: 10%;
|
400 |
+
}
|
401 |
+
|
402 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart span {
|
403 |
+
font-size: 30px;
|
404 |
+
}
|
405 |
+
}
|
css/pro_dashboard_styles.css
ADDED
@@ -0,0 +1,7 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
.cwp-cta {
|
2 |
+
display:none!important;
|
3 |
+
}
|
4 |
+
|
5 |
+
.cwp_addons_wrap .announcement {
|
6 |
+
display:none;
|
7 |
+
}
|
inc/cwp-addons.php
CHANGED
@@ -20,7 +20,7 @@ function cwp_addons() {
|
|
20 |
Â
width: 75%;
|
21 |
Â
float: left; font-family: "Helvetica Neue", HelveticaNeue, sans-serif; color: #fff; font-weight: 100; font-size: 17px; line-height: 1;
|
22 |
Â
padding-left: 20px;
|
23 |
-
">Get the PRO addons bundle (including all existing add-on and future ones ) starting from $
|
24 |
Â
<a class="show-me" href="https://themeisle.com/plugins/wp-product-review-pro-add-on/?utm_source=addonsadmin&utm_medium=announce&utm_campaign=top" style="
|
25 |
Â
float: right; background: #fff; border-radius: 5px; font-family: "Helvetica Neue", HelveticaNeue, sans-serif; color: #5c5c5c; text-decoration: none; text-transform: uppercase; padding: 7px 15px; margin-top: 9px; margin-right: 20px; -webkit-transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -o-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; line-height: 1;
|
26 |
Â
">Show Me</a>
|
20 |
Â
width: 75%;
|
21 |
Â
float: left; font-family: "Helvetica Neue", HelveticaNeue, sans-serif; color: #fff; font-weight: 100; font-size: 17px; line-height: 1;
|
22 |
Â
padding-left: 20px;
|
23 |
+
">Get the PRO addons bundle (including all existing add-on and future ones ) starting from $75!</h2>
|
24 |
Â
<a class="show-me" href="https://themeisle.com/plugins/wp-product-review-pro-add-on/?utm_source=addonsadmin&utm_medium=announce&utm_campaign=top" style="
|
25 |
Â
float: right; background: #fff; border-radius: 5px; font-family: "Helvetica Neue", HelveticaNeue, sans-serif; color: #5c5c5c; text-decoration: none; text-transform: uppercase; padding: 7px 15px; margin-top: 9px; margin-right: 20px; -webkit-transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; -o-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; line-height: 1;
|
26 |
Â
">Show Me</a>
|
inc/cwp_comment.php
CHANGED
@@ -117,11 +117,15 @@ function cwp_pac_comment_single($text){
|
|
117 |
Â
}
|
118 |
Â
|
119 |
Â
function cwp_additional_fields () {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
120 |
Â
|
121 |
Â
|
122 |
Â
wp_enqueue_style( 'jqueryui', WPPR_URL.'/css/jquery-ui.css',array(),WPPR_LITE_VERSION );
|
123 |
Â
wp_enqueue_script("jquery-ui-slider");
|
124 |
-
|
125 |
Â
|
126 |
Â
$meta_options = array();
|
127 |
Â
|
@@ -164,6 +168,7 @@ function cwp_additional_fields () {
|
|
164 |
Â
}
|
165 |
Â
|
166 |
Â
echo "<div id='cwp-slider-comment'>".implode("",$sliders)."<div class='cwpr_clearfix'></div></div>";
|
Â
|
|
167 |
Â
|
168 |
Â
}
|
169 |
Â
|
117 |
Â
}
|
118 |
Â
|
119 |
Â
function cwp_additional_fields () {
|
120 |
+
global $post;
|
121 |
+
$is_review = get_post_meta($post->ID, "cwp_meta_box_check", true);
|
122 |
+
|
123 |
+
if ($is_review=="Yes") {
|
124 |
Â
|
125 |
Â
|
126 |
Â
wp_enqueue_style( 'jqueryui', WPPR_URL.'/css/jquery-ui.css',array(),WPPR_LITE_VERSION );
|
127 |
Â
wp_enqueue_script("jquery-ui-slider");
|
128 |
+
|
129 |
Â
|
130 |
Â
$meta_options = array();
|
131 |
Â
|
168 |
Â
}
|
169 |
Â
|
170 |
Â
echo "<div id='cwp-slider-comment'>".implode("",$sliders)."<div class='cwpr_clearfix'></div></div>";
|
171 |
+
}
|
172 |
Â
|
173 |
Â
}
|
174 |
Â
|
inc/cwp_latest_products_widget.php
CHANGED
@@ -1,340 +1,340 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* CWP - Latest Producs Widget
|
4 |
-
*/
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
class cwp_latest_products_widget extends WP_Widget {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
function __construct() {
|
13 |
-
|
14 |
-
parent::__construct(
|
15 |
-
|
16 |
-
'cwp_latest_products_widget',
|
17 |
-
|
18 |
-
__('CWP Latest Products Widget', 'cwppos'),
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
// Widget description
|
23 |
-
|
24 |
-
array( 'description' => __( 'This widget displays the latest products based on their rating.', 'cwppos' ), )
|
25 |
-
|
26 |
-
);
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
}
|
31 |
-
|
32 |
-
public function assets(){
|
33 |
-
|
34 |
-
|
35 |
-
wp_enqueue_style( 'cwp-pac-widget-stylesheet', WPPR_URL.'/css/cwppos-widget.css' );
|
36 |
-
wp_enqueue_script( 'cwp-pac-main-script', WPPR_URL.'/javascript/main.js',array("jquery",'pie-chart'),WPPR_LITE_VERSION,true );
|
37 |
-
wp_enqueue_script( 'pie-chart', WPPR_URL.'/javascript/pie-chart.js',array("jquery"), WPPR_LITE_VERSION,true );
|
38 |
-
}
|
39 |
-
|
40 |
-
public function widget( $args, $instance ) {
|
41 |
-
$this->assets();
|
42 |
-
if ( isset( $instance[ 'title' ]) )
|
43 |
-
|
44 |
-
$title = apply_filters( 'widget_title', $instance['title'] );
|
45 |
-
|
46 |
-
if ( isset( $instance[ 'no_items' ]) )
|
47 |
-
|
48 |
-
$no_items = apply_filters( 'widget_content', $instance['no_items'] );
|
49 |
-
|
50 |
-
if ( isset( $instance[ 'cwp_tp_category' ]) )
|
51 |
-
|
52 |
-
$cwp_tp_category = apply_filters( 'widget_content', $instance['cwp_tp_category'] );
|
53 |
-
|
54 |
-
if ( isset( $instance[ 'title_type' ]) )
|
55 |
-
|
56 |
-
$post_type = apply_filters( 'widget_content', $instance['title_type'] );
|
57 |
-
|
58 |
-
if ( isset( $instance[ 'show_image' ]) )
|
59 |
-
|
60 |
-
$show_image = apply_filters( 'widget_content', $instance['show_image'] );
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
// before and after widget arguments are defined by themes
|
65 |
-
|
66 |
-
//echo "<div id='cwp_latest_products_widget'>";
|
67 |
-
|
68 |
-
echo $args['before_widget'];
|
69 |
-
|
70 |
-
if ( ! empty( $title ) )
|
71 |
-
|
72 |
-
echo $args['before_title'] . $title . $args['after_title'];
|
73 |
-
|
74 |
-
|
75 |
-
if ( $cwp_tp_category=="All") $cwp_tp_category="";
|
76 |
-
// Loop to get the most popular posts, ordered by the author's final grade.
|
77 |
-
|
78 |
-
$query_args = array(
|
79 |
-
|
80 |
-
'posts_per_page'=> $no_items, // limit it to the specified no of posts
|
81 |
-
'post_type' => "any",
|
82 |
-
'post__not_in' => get_option('sticky_posts'),
|
83 |
-
'category_name' => $cwp_tp_category, // limit it to the specified category
|
84 |
-
'meta_key' => 'option_overall_score',
|
85 |
-
|
86 |
-
'meta_query' => array(
|
87 |
-
|
88 |
-
array(
|
89 |
-
|
90 |
-
'key' => 'cwp_meta_box_check',
|
91 |
-
|
92 |
-
'value' => 'Yes',
|
93 |
-
|
94 |
-
|
95 |
-
),
|
96 |
-
|
97 |
-
),
|
98 |
-
'orderby' => 'date',
|
99 |
-
'order' => 'DESC'
|
100 |
-
|
101 |
-
);
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
$cwp_latest_products_loop = new WP_Query( $query_args );
|
106 |
-
|
107 |
-
echo "<ul>";
|
108 |
-
|
109 |
-
while($cwp_latest_products_loop->have_posts()) : $cwp_latest_products_loop->the_post();
|
110 |
-
|
111 |
-
$product_image = wppr_get_image_id(get_the_ID(),get_post_meta(get_the_ID(), "cwp_rev_product_image", true),'wppr_widget_image');
|
112 |
-
$product_title = ($post_type==true) ? get_post_meta(get_the_ID(), "cwp_rev_product_name", true) : get_the_title();
|
113 |
-
?>
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
<li class="cwp-popular-review cwp_top_posts_widget_<?php the_ID(); if ($show_image==true&&!empty($product_image)) echo ' wppr-cols-3'; else echo ' wppr-cols-2' ?>">
|
118 |
-
<?php
|
119 |
-
|
120 |
-
if ($show_image==true&&!empty($product_image)) {
|
121 |
-
?>
|
122 |
-
|
123 |
-
<img class="cwp_rev_image wppr-col" src="<?php echo $product_image;?>" alt="<?php echo $product_title; ?>"\>
|
124 |
-
<?php } ?>
|
125 |
-
<a class="wppr-col" href="<?php the_permalink(); ?>">
|
126 |
-
|
127 |
-
<?php echo $product_title; ?>
|
128 |
-
|
129 |
-
</a>
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
<?php
|
136 |
-
|
137 |
-
for($i=1; $i<6; $i++) {
|
138 |
-
${"option".$i."_content"} = get_post_meta($cwp_latest_products_loop->post->ID, "option_".$i."_content", true);
|
139 |
-
//if(empty(${"option".$i."_content"})) { ${"option".$i."_content"} = __("Default Feature ".$i, "cwppos"); }
|
140 |
-
}
|
141 |
-
$review_score = cwppos_calc_overall_rating($cwp_latest_products_loop->post->ID);
|
142 |
-
$review_score = $review_score['overall'];
|
143 |
-
|
144 |
-
if(!empty($review_score)) { ?>
|
145 |
-
|
146 |
-
<div class="review-grade-widget wppr-col">
|
147 |
-
|
148 |
-
<div class="cwp-review-chart">
|
149 |
-
|
150 |
-
<div class="cwp-review-percentage" data-percent="<?php echo $review_score; ?>"><span></span></div>
|
151 |
-
|
152 |
-
</div><!-- end .chart -->
|
153 |
-
|
154 |
-
</div>
|
155 |
-
|
156 |
-
<?php } ?>
|
157 |
-
|
158 |
-
</li><!-- end .popular-review -->
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
<?php endwhile; ?>
|
163 |
-
|
164 |
-
<?php wp_reset_postdata(); // reset the query
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
echo "</ul>";
|
169 |
-
|
170 |
-
echo $args['after_widget'];
|
171 |
-
|
172 |
-
//echo "</div>"; // end #cwp_latest_products_widget
|
173 |
-
|
174 |
-
}
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
// Widget Backend
|
179 |
-
|
180 |
-
public function form( $instance ) {
|
181 |
-
|
182 |
-
if ( isset( $instance[ 'title' ] ) ) {
|
183 |
-
|
184 |
-
$title = $instance[ 'title' ];
|
185 |
-
}
|
186 |
-
else {
|
187 |
-
$title = __( 'Latest Products', 'cwppos' );
|
188 |
-
}
|
189 |
-
if ( isset( $instance[ 'no_items' ]) ) {
|
190 |
-
$no_items = $instance[ 'no_items' ];
|
191 |
-
}
|
192 |
-
else {
|
193 |
-
$no_items = __( '10', 'cwppos');
|
194 |
-
}
|
195 |
-
if ( isset( $instance[ 'cwp_tp_category' ]) ) {
|
196 |
-
$cwp_tp_category = $instance[ 'cwp_tp_category' ];}
|
197 |
-
else {
|
198 |
-
$cwp_tp_category = "Select Category";
|
199 |
-
}
|
200 |
-
if ( isset( $instance[ 'title_type' ]) ) {
|
201 |
-
$title_type = $instance[ 'title_type' ];
|
202 |
-
|
203 |
-
}
|
204 |
-
else {
|
205 |
-
$title_type = false;
|
206 |
-
}
|
207 |
-
|
208 |
-
if ( isset( $instance[ 'show_image' ]) ) {
|
209 |
-
$show_image = $instance[ 'show_image' ];
|
210 |
-
|
211 |
-
}
|
212 |
-
else {
|
213 |
-
$show_image = false;
|
214 |
-
}
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
$cwp_tp_categ_array = get_categories('hide_empty=0');
|
220 |
-
|
221 |
-
foreach ($cwp_tp_categ_array as $categs) {
|
222 |
-
|
223 |
-
$cwp_tp_all_categories[$categs->slug] = $categs->name;
|
224 |
-
|
225 |
-
}
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
// Widget admin form
|
230 |
-
|
231 |
-
?>
|
232 |
-
|
233 |
-
<p>
|
234 |
-
|
235 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', "cwppos" ); ?></label>
|
236 |
-
|
237 |
-
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
238 |
-
|
239 |
-
</p>
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
<p>
|
244 |
-
|
245 |
-
<label for="<?php echo $this->get_field_id( 'no_items' ); ?>"><?php _e( 'Number of posts to show:', "cwppos" ); ?></label>
|
246 |
-
|
247 |
-
<input id="<?php echo $this->get_field_id( 'no_items' ); ?>" name="<?php echo $this->get_field_name( 'no_items' ); ?>" size="3" type="text" value="<?php echo esc_attr( $no_items ); ?>" />
|
248 |
-
|
249 |
-
</p>
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
<p>
|
254 |
-
|
255 |
-
<?php $cwp_tp_selected_categ = esc_attr( $cwp_tp_category ); ?>
|
256 |
-
|
257 |
-
<label for="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>"><?php _e( 'Category:', "cwppos" ); ?></label>
|
258 |
-
|
259 |
-
<select id="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>" name="<?php echo $this->get_field_name( 'cwp_tp_category' ); ?>">
|
260 |
-
<?php echo "<option>All</option>"; ?>
|
261 |
-
|
262 |
-
<?php foreach ($cwp_tp_all_categories as $categ_slug => $categ_name): ?>
|
263 |
-
|
264 |
-
<?php if($categ_slug == $cwp_tp_selected_categ) {
|
265 |
-
|
266 |
-
echo "<option selected>".$categ_slug."</option>";
|
267 |
-
|
268 |
-
} elseif($categ_slug == "") {
|
269 |
-
|
270 |
-
echo "<option>There are no categs</select>";
|
271 |
-
|
272 |
-
} else {
|
273 |
-
|
274 |
-
echo "<option>".$categ_slug."</option>";
|
275 |
-
|
276 |
-
} ?>
|
277 |
-
|
278 |
-
<?php endforeach; ?>
|
279 |
-
|
280 |
-
</select>
|
281 |
-
|
282 |
-
</p>
|
283 |
-
<p>
|
284 |
-
|
285 |
-
<label for="<?php echo $this->get_field_id( 'title_type' ); ?>"><?php _e( 'Display Product Titles :', "cwppos" ); ?></label>
|
286 |
-
|
287 |
-
<input id="<?php echo $this->get_field_id( 'title_type' ); ?>" name="<?php echo $this->get_field_name( 'title_type' ); ?>" type="checkbox" <?php checked( $title_type ); ?> />
|
288 |
-
</p>
|
289 |
-
|
290 |
-
<p>
|
291 |
-
|
292 |
-
<label for="<?php echo $this->get_field_id( 'show_image' ); ?>"><?php _e( 'Display Product Image :', "cwppos" ); ?></label>
|
293 |
-
|
294 |
-
<input id="<?php echo $this->get_field_id( 'show_image' ); ?>" name="<?php echo $this->get_field_name( 'show_image' ); ?>" type="checkbox" <?php checked( $show_image ); ?> />
|
295 |
-
</p>
|
296 |
-
|
297 |
-
|
298 |
-
<?php }
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
// Updating widget replacing old instances with new
|
303 |
-
|
304 |
-
public function update( $new_instance, $old_instance ) {
|
305 |
-
|
306 |
-
$instance = $old_instance;
|
307 |
-
|
308 |
-
$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
|
309 |
-
|
310 |
-
$instance['no_items'] = ( ! empty( $new_instance['no_items'] ) ) ? strip_tags( $new_instance['no_items'] ) : '';
|
311 |
-
|
312 |
-
$instance['cwp_tp_category'] = ( ! empty( $new_instance['cwp_tp_category'] ) ) ? strip_tags( $new_instance['cwp_tp_category'] ) : '';
|
313 |
-
|
314 |
-
$instance['title_type'] = (bool) $new_instance['title_type'] ;
|
315 |
-
$instance['show_image'] = (bool) $new_instance['show_image'] ;
|
316 |
-
|
317 |
-
return $instance;
|
318 |
-
|
319 |
-
}
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
} // end Class cwp_latest_products_widget
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
// Register and load the widget
|
330 |
-
|
331 |
-
/**
|
332 |
-
*
|
333 |
-
*/
|
334 |
-
function cwp_load_latest_products_widget() {
|
335 |
-
|
336 |
-
register_widget( 'cwp_latest_products_widget' );
|
337 |
-
|
338 |
-
}
|
339 |
-
|
340 |
-
add_action( 'widgets_init', 'cwp_load_latest_products_widget' );
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* CWP - Latest Producs Widget
|
4 |
+
*/
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
class cwp_latest_products_widget extends WP_Widget {
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
function __construct() {
|
13 |
+
|
14 |
+
parent::__construct(
|
15 |
+
|
16 |
+
'cwp_latest_products_widget',
|
17 |
+
|
18 |
+
__('CWP Latest Products Widget', 'cwppos'),
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
// Widget description
|
23 |
+
|
24 |
+
array( 'description' => __( 'This widget displays the latest products based on their rating.', 'cwppos' ), )
|
25 |
+
|
26 |
+
);
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
public function assets(){
|
33 |
+
|
34 |
+
|
35 |
+
wp_enqueue_style( 'cwp-pac-widget-stylesheet', WPPR_URL.'/css/cwppos-widget.css' );
|
36 |
+
wp_enqueue_script( 'cwp-pac-main-script', WPPR_URL.'/javascript/main.js',array("jquery",'pie-chart'),WPPR_LITE_VERSION,true );
|
37 |
+
wp_enqueue_script( 'pie-chart', WPPR_URL.'/javascript/pie-chart.js',array("jquery"), WPPR_LITE_VERSION,true );
|
38 |
+
}
|
39 |
+
|
40 |
+
public function widget( $args, $instance ) {
|
41 |
+
$this->assets();
|
42 |
+
if ( isset( $instance[ 'title' ]) )
|
43 |
+
|
44 |
+
$title = apply_filters( 'widget_title', $instance['title'] );
|
45 |
+
|
46 |
+
if ( isset( $instance[ 'no_items' ]) )
|
47 |
+
|
48 |
+
$no_items = apply_filters( 'widget_content', $instance['no_items'] );
|
49 |
+
|
50 |
+
if ( isset( $instance[ 'cwp_tp_category' ]) )
|
51 |
+
|
52 |
+
$cwp_tp_category = apply_filters( 'widget_content', $instance['cwp_tp_category'] );
|
53 |
+
|
54 |
+
if ( isset( $instance[ 'title_type' ]) )
|
55 |
+
|
56 |
+
$post_type = apply_filters( 'widget_content', $instance['title_type'] );
|
57 |
+
|
58 |
+
if ( isset( $instance[ 'show_image' ]) )
|
59 |
+
|
60 |
+
$show_image = apply_filters( 'widget_content', $instance['show_image'] );
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
// before and after widget arguments are defined by themes
|
65 |
+
|
66 |
+
//echo "<div id='cwp_latest_products_widget'>";
|
67 |
+
|
68 |
+
echo $args['before_widget'];
|
69 |
+
|
70 |
+
if ( ! empty( $title ) )
|
71 |
+
|
72 |
+
echo $args['before_title'] . $title . $args['after_title'];
|
73 |
+
|
74 |
+
|
75 |
+
if ( $cwp_tp_category=="All") $cwp_tp_category="";
|
76 |
+
// Loop to get the most popular posts, ordered by the author's final grade.
|
77 |
+
|
78 |
+
$query_args = array(
|
79 |
+
|
80 |
+
'posts_per_page'=> $no_items, // limit it to the specified no of posts
|
81 |
+
'post_type' => "any",
|
82 |
+
'post__not_in' => get_option('sticky_posts'),
|
83 |
+
'category_name' => $cwp_tp_category, // limit it to the specified category
|
84 |
+
'meta_key' => 'option_overall_score',
|
85 |
+
|
86 |
+
'meta_query' => array(
|
87 |
+
|
88 |
+
array(
|
89 |
+
|
90 |
+
'key' => 'cwp_meta_box_check',
|
91 |
+
|
92 |
+
'value' => 'Yes',
|
93 |
+
|
94 |
+
|
95 |
+
),
|
96 |
+
|
97 |
+
),
|
98 |
+
'orderby' => 'date',
|
99 |
+
'order' => 'DESC'
|
100 |
+
|
101 |
+
);
|
102 |
+
|
103 |
+
|
104 |
+
|
105 |
+
$cwp_latest_products_loop = new WP_Query( $query_args );
|
106 |
+
|
107 |
+
echo "<ul>";
|
108 |
+
|
109 |
+
while($cwp_latest_products_loop->have_posts()) : $cwp_latest_products_loop->the_post();
|
110 |
+
|
111 |
+
$product_image = wppr_get_image_id(get_the_ID(),get_post_meta(get_the_ID(), "cwp_rev_product_image", true),'wppr_widget_image');
|
112 |
+
$product_title = ($post_type==true) ? get_post_meta(get_the_ID(), "cwp_rev_product_name", true) : get_the_title();
|
113 |
+
?>
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
<li class="cwp-popular-review cwp_top_posts_widget_<?php the_ID(); if ($show_image==true&&!empty($product_image)) echo ' wppr-cols-3'; else echo ' wppr-cols-2' ?>">
|
118 |
+
<?php
|
119 |
+
|
120 |
+
if ($show_image==true&&!empty($product_image)) {
|
121 |
+
?>
|
122 |
+
|
123 |
+
<img class="cwp_rev_image wppr-col" src="<?php echo $product_image;?>" alt="<?php echo $product_title; ?>"\>
|
124 |
+
<?php } ?>
|
125 |
+
<a class="wppr-col" href="<?php the_permalink(); ?>" title="<?php echo $product_title; ?>">
|
126 |
+
|
127 |
+
<?php echo $product_title; ?>
|
128 |
+
|
129 |
+
</a>
|
130 |
+
|
131 |
+
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
<?php
|
136 |
+
|
137 |
+
for($i=1; $i<6; $i++) {
|
138 |
+
${"option".$i."_content"} = get_post_meta($cwp_latest_products_loop->post->ID, "option_".$i."_content", true);
|
139 |
+
//if(empty(${"option".$i."_content"})) { ${"option".$i."_content"} = __("Default Feature ".$i, "cwppos"); }
|
140 |
+
}
|
141 |
+
$review_score = cwppos_calc_overall_rating($cwp_latest_products_loop->post->ID);
|
142 |
+
$review_score = $review_score['overall'];
|
143 |
+
|
144 |
+
if(!empty($review_score)) { ?>
|
145 |
+
|
146 |
+
<div class="review-grade-widget wppr-col">
|
147 |
+
|
148 |
+
<div class="cwp-review-chart">
|
149 |
+
|
150 |
+
<div class="cwp-review-percentage" data-percent="<?php echo $review_score; ?>"><span></span></div>
|
151 |
+
|
152 |
+
</div><!-- end .chart -->
|
153 |
+
|
154 |
+
</div>
|
155 |
+
|
156 |
+
<?php } ?>
|
157 |
+
|
158 |
+
</li><!-- end .popular-review -->
|
159 |
+
|
160 |
+
|
161 |
+
|
162 |
+
<?php endwhile; ?>
|
163 |
+
|
164 |
+
<?php wp_reset_postdata(); // reset the query
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
echo "</ul>";
|
169 |
+
|
170 |
+
echo $args['after_widget'];
|
171 |
+
|
172 |
+
//echo "</div>"; // end #cwp_latest_products_widget
|
173 |
+
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
|
178 |
+
// Widget Backend
|
179 |
+
|
180 |
+
public function form( $instance ) {
|
181 |
+
|
182 |
+
if ( isset( $instance[ 'title' ] ) ) {
|
183 |
+
|
184 |
+
$title = $instance[ 'title' ];
|
185 |
+
}
|
186 |
+
else {
|
187 |
+
$title = __( 'Latest Products', 'cwppos' );
|
188 |
+
}
|
189 |
+
if ( isset( $instance[ 'no_items' ]) ) {
|
190 |
+
$no_items = $instance[ 'no_items' ];
|
191 |
+
}
|
192 |
+
else {
|
193 |
+
$no_items = __( '10', 'cwppos');
|
194 |
+
}
|
195 |
+
if ( isset( $instance[ 'cwp_tp_category' ]) ) {
|
196 |
+
$cwp_tp_category = $instance[ 'cwp_tp_category' ];}
|
197 |
+
else {
|
198 |
+
$cwp_tp_category = "Select Category";
|
199 |
+
}
|
200 |
+
if ( isset( $instance[ 'title_type' ]) ) {
|
201 |
+
$title_type = $instance[ 'title_type' ];
|
202 |
+
|
203 |
+
}
|
204 |
+
else {
|
205 |
+
$title_type = false;
|
206 |
+
}
|
207 |
+
|
208 |
+
if ( isset( $instance[ 'show_image' ]) ) {
|
209 |
+
$show_image = $instance[ 'show_image' ];
|
210 |
+
|
211 |
+
}
|
212 |
+
else {
|
213 |
+
$show_image = false;
|
214 |
+
}
|
215 |
+
|
216 |
+
|
217 |
+
|
218 |
+
|
219 |
+
$cwp_tp_categ_array = get_categories('hide_empty=0');
|
220 |
+
|
221 |
+
foreach ($cwp_tp_categ_array as $categs) {
|
222 |
+
|
223 |
+
$cwp_tp_all_categories[$categs->slug] = $categs->name;
|
224 |
+
|
225 |
+
}
|
226 |
+
|
227 |
+
|
228 |
+
|
229 |
+
// Widget admin form
|
230 |
+
|
231 |
+
?>
|
232 |
+
|
233 |
+
<p>
|
234 |
+
|
235 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', "cwppos" ); ?></label>
|
236 |
+
|
237 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
238 |
+
|
239 |
+
</p>
|
240 |
+
|
241 |
+
|
242 |
+
|
243 |
+
<p>
|
244 |
+
|
245 |
+
<label for="<?php echo $this->get_field_id( 'no_items' ); ?>"><?php _e( 'Number of posts to show:', "cwppos" ); ?></label>
|
246 |
+
|
247 |
+
<input id="<?php echo $this->get_field_id( 'no_items' ); ?>" name="<?php echo $this->get_field_name( 'no_items' ); ?>" size="3" type="text" value="<?php echo esc_attr( $no_items ); ?>" />
|
248 |
+
|
249 |
+
</p>
|
250 |
+
|
251 |
+
|
252 |
+
|
253 |
+
<p>
|
254 |
+
|
255 |
+
<?php $cwp_tp_selected_categ = esc_attr( $cwp_tp_category ); ?>
|
256 |
+
|
257 |
+
<label for="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>"><?php _e( 'Category:', "cwppos" ); ?></label>
|
258 |
+
|
259 |
+
<select id="<?php echo $this->get_field_id( 'cwp_tp_category' ); ?>" name="<?php echo $this->get_field_name( 'cwp_tp_category' ); ?>">
|
260 |
+
<?php echo "<option>All</option>"; ?>
|
261 |
+
|
262 |
+
<?php foreach ($cwp_tp_all_categories as $categ_slug => $categ_name): ?>
|
263 |
+
|
264 |
+
<?php if($categ_slug == $cwp_tp_selected_categ) {
|
265 |
+
|
266 |
+
echo "<option selected>".$categ_slug."</option>";
|
267 |
+
|
268 |
+
} elseif($categ_slug == "") {
|
269 |
+
|
270 |
+
echo "<option>There are no categs</select>";
|
271 |
+
|
272 |
+
} else {
|
273 |
+
|
274 |
+
echo "<option>".$categ_slug."</option>";
|
275 |
+
|
276 |
+
} ?>
|
277 |
+
|
278 |
+
<?php endforeach; ?>
|
279 |
+
|
280 |
+
</select>
|
281 |
+
|
282 |
+
</p>
|
283 |
+
<p>
|
284 |
+
|
285 |
+
<label for="<?php echo $this->get_field_id( 'title_type' ); ?>"><?php _e( 'Display Product Titles :', "cwppos" ); ?></label>
|
286 |
+
|
287 |
+
<input id="<?php echo $this->get_field_id( 'title_type' ); ?>" name="<?php echo $this->get_field_name( 'title_type' ); ?>" type="checkbox" <?php checked( $title_type ); ?> />
|
288 |
+
</p>
|
289 |
+
|
290 |
+
<p>
|
291 |
+
|
292 |
+
<label for="<?php echo $this->get_field_id( 'show_image' ); ?>"><?php _e( 'Display Product Image :', "cwppos" ); ?></label>
|
293 |
+
|
294 |
+
<input id="<?php echo $this->get_field_id( 'show_image' ); ?>" name="<?php echo $this->get_field_name( 'show_image' ); ?>" type="checkbox" <?php checked( $show_image ); ?> />
|
295 |
+
</p>
|
296 |
+
|
297 |
+
|
298 |
+
<?php }
|
299 |
+
|
300 |
+
|
301 |
+
|
302 |
+
// Updating widget replacing old instances with new
|
303 |
+
|
304 |
+
public function update( $new_instance, $old_instance ) {
|
305 |
+
|
306 |
+
$instance = $old_instance;
|
307 |
+
|
308 |
+
$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
|
309 |
+
|
310 |
+
$instance['no_items'] = ( ! empty( $new_instance['no_items'] ) ) ? strip_tags( $new_instance['no_items'] ) : '';
|
311 |
+
|
312 |
+
$instance['cwp_tp_category'] = ( ! empty( $new_instance['cwp_tp_category'] ) ) ? strip_tags( $new_instance['cwp_tp_category'] ) : '';
|
313 |
+
|
314 |
+
$instance['title_type'] = (bool) $new_instance['title_type'] ;
|
315 |
+
$instance['show_image'] = (bool) $new_instance['show_image'] ;
|
316 |
+
|
317 |
+
return $instance;
|
318 |
+
|
319 |
+
}
|
320 |
+
|
321 |
+
|
322 |
+
|
323 |
+
} // end Class cwp_latest_products_widget
|
324 |
+
|
325 |
+
|
326 |
+
|
327 |
+
|
328 |
+
|
329 |
+
// Register and load the widget
|
330 |
+
|
331 |
+
/**
|
332 |
+
*
|
333 |
+
*/
|
334 |
+
function cwp_load_latest_products_widget() {
|
335 |
+
|
336 |
+
register_widget( 'cwp_latest_products_widget' );
|
337 |
+
|
338 |
+
}
|
339 |
+
|
340 |
+
add_action( 'widgets_init', 'cwp_load_latest_products_widget' );
|
inc/cwp_metabox.php
CHANGED
@@ -9,7 +9,51 @@ function cwp_review_meta_boxes(){
|
|
9 |
Â
wp_nonce_field( 'cwp_product_review_meta_box_nonce', 'cwp_meta_box_nonce' );
|
10 |
Â
$cwp_review_stored_meta = get_post_meta( $post->ID );
|
11 |
Â
$check = isset( $cwp_review_stored_meta['cwp_meta_box_check'][0] ) ? esc_attr( $cwp_review_stored_meta['cwp_meta_box_check'][0] ) : "No";
|
12 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
13 |
Â
?>
|
14 |
Â
<p class="isReview<?php echo $check; ?>">
|
15 |
Â
<label for="my_meta_box_check">Is this a review post ? </label>
|
@@ -17,11 +61,10 @@ function cwp_review_meta_boxes(){
|
|
17 |
Â
<label for="my_meta_box_check">Yes</label>
|
18 |
Â
<input type="radio" id="cwp_meta_box_check_no" name="cwp_meta_box_check" value="No" <?php checked( $check, 'No' ); ?> />
|
19 |
Â
<label for="my_meta_box_check" style="margin-right:30px;">No</label>
|
20 |
-
|
21 |
-
<br/><br/> <label > You can use the shortcode <b>[P_REVIEW]</b> to show a review you already made or <b>[wpr_landing]</b> to display a comparision table of them. The shortcodes are available on the <a target="_blank" href="http://themeisle.com/plugins/wp-product-review-pro-add-on/">Pro Bundle</a></label>
|
22 |
-
<?php endif; ?>
|
23 |
Â
</p>
|
24 |
Â
<div class="product-review-meta-<?php echo $check; ?>">
|
Â
|
|
25 |
Â
<div class="review-settings-notice">
|
26 |
Â
<h4><?php _e("Product Details", "cwppos"); ?></h4>
|
27 |
Â
<p style="margin:0;"><?php _e("Specify the general details for the reviewed product.", "cwppos"); ?></p>
|
@@ -29,6 +72,12 @@ function cwp_review_meta_boxes(){
|
|
29 |
Â
<div class="review-settings-group">
|
30 |
Â
<div class="review-settings-group-option">
|
31 |
Â
<ul>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
32 |
Â
<li>
|
33 |
Â
<label for="cwp_rev_product_name"><?php _e("Product Name", "cwppos"); ?></label>
|
34 |
Â
<input type="text" name="cwp_rev_product_name" id="cwp_rev_product_name" value="<?php
|
@@ -46,11 +95,11 @@ function cwp_review_meta_boxes(){
|
|
46 |
Â
<p><?php _e("*If no image is provided, featured image is used"); ?>
|
47 |
Â
</li>
|
48 |
Â
<li class="cwp_image_link">
|
49 |
-
<label for="cwp_image_link_aff">Product Image
|
50 |
Â
<input type="radio" id="cwp_image_link_aff" name="cwp_image_link" value="image" <?php checked( $checkset, 'image' ); ?> />
|
51 |
-
<label for="cwp_image_link_image">
|
52 |
Â
<input type="radio" id="cwp_image_link_image" name="cwp_image_link" value="link" <?php checked( $checkset, 'link' ); ?> />
|
53 |
-
<label for="my_meta_box_check">Affiliate link</label>
|
54 |
Â
</li>
|
55 |
Â
<li>
|
56 |
Â
<label for="cwp_product_affiliate_text"><?php _e("Affiliate Button Text", "cwppos"); ?></label>
|
@@ -58,6 +107,9 @@ function cwp_review_meta_boxes(){
|
|
58 |
Â
|
59 |
Â
if(isset($cwp_review_stored_meta['cwp_product_affiliate_text'][0])) {
|
60 |
Â
echo $cwp_review_stored_meta['cwp_product_affiliate_text'][0];
|
Â
|
|
Â
|
|
Â
|
|
61 |
Â
}
|
62 |
Â
|
63 |
Â
?>"/>
|
@@ -71,9 +123,16 @@ function cwp_review_meta_boxes(){
|
|
71 |
Â
}
|
72 |
Â
|
73 |
Â
?>"/>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
74 |
Â
</li>
|
75 |
Â
|
76 |
-
|
77 |
Â
<label for="cwp_product_affiliate_text2"><?php _e("Affiliate Button Text 2", "cwppos"); ?></label>
|
78 |
Â
<input type="text" name="cwp_product_affiliate_text2" id="cwp_product_affiliate_text2" value="<?php
|
79 |
Â
|
@@ -83,7 +142,7 @@ function cwp_review_meta_boxes(){
|
|
83 |
Â
|
84 |
Â
?>"/>
|
85 |
Â
</li>
|
86 |
-
<li>
|
87 |
Â
<label for="cwp_product_affiliate_link2"><?php _e("Affiliate Link 2", "cwppos"); ?></label>
|
88 |
Â
<input type="text" name="cwp_product_affiliate_link2" id="cwp_product_affiliate_link2" value="<?php
|
89 |
Â
|
@@ -134,6 +193,11 @@ function cwp_review_meta_boxes(){
|
|
134 |
Â
if(isset($cwp_review_stored_meta['option_'.$i.'_content'][0])) {
|
135 |
Â
echo $cwp_review_stored_meta['option_'.$i.'_content'][0];
|
136 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
137 |
Â
|
138 |
Â
?>"/>
|
139 |
Â
<input type="text" name="option_<?php echo $i;?>_grade" class="option_grade" placeholder="Grade" value="<?php
|
@@ -147,6 +211,7 @@ function cwp_review_meta_boxes(){
|
|
147 |
Â
<?php } ?>
|
148 |
Â
|
149 |
Â
</div><!-- end .review-settings group -->
|
Â
|
|
150 |
Â
<div class="review-settings-notice">
|
151 |
Â
<h4><?php _e("Pro Features", "cwppos"); ?></h4>
|
152 |
Â
<p style="margin:0;"><?php _e("Insert product's pro features below.", "cwppos"); ?></p>
|
@@ -167,6 +232,8 @@ function cwp_review_meta_boxes(){
|
|
167 |
Â
<?php } ?>
|
168 |
Â
|
169 |
Â
</div><!-- end .review-settings group -->
|
Â
|
|
Â
|
|
170 |
Â
<div class="review-settings-notice">
|
171 |
Â
<h4><?php _e("Cons Features", "cwppos"); ?></h4>
|
172 |
Â
<p style="margin:0;"><?php _e("Insert product's cons features below.", "cwppos"); ?></p>
|
@@ -185,8 +252,13 @@ function cwp_review_meta_boxes(){
|
|
185 |
Â
?>"/>
|
186 |
Â
</div><!-- end .review-settings-group option -->
|
187 |
Â
<?php } ?>
|
Â
|
|
188 |
Â
|
189 |
Â
</div><!-- end .review-settings group -->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
190 |
Â
</div>
|
191 |
Â
<?php
|
192 |
Â
}
|
@@ -204,6 +276,11 @@ function cwp_review_meta_boxes_save($post_id){
|
|
204 |
Â
return;
|
205 |
Â
}
|
206 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
207 |
Â
|
208 |
Â
if( isset( $_POST[ 'cwp_rev_product_name' ] ) ) {
|
209 |
Â
update_post_meta( $post_id, 'cwp_rev_product_name', sanitize_text_field( $_POST[ 'cwp_rev_product_name' ] ) );
|
@@ -252,12 +329,12 @@ function cwp_review_meta_boxes_save($post_id){
|
|
252 |
Â
|
253 |
Â
for ($i=1;$i<=cwppos("cwppos_option_nr");$i++) {
|
254 |
Â
|
255 |
-
if( isset( $_POST[ 'option_'.$i.'_content' ] )
|
256 |
Â
update_post_meta( $post_id, 'option_'.$i.'_content', sanitize_text_field( $_POST[ 'option_'.$i.'_content' ] ) );
|
257 |
Â
}
|
258 |
Â
|
259 |
Â
|
260 |
-
if( isset( $_POST[ 'option_'.$i.'_grade' ]
|
261 |
Â
update_post_meta( $post_id, 'option_'.$i.'_grade', sanitize_text_field( $_POST[ 'option_'.$i.'_grade' ] ) );
|
262 |
Â
}
|
263 |
Â
}
|
@@ -317,6 +394,7 @@ function cwp_review_meta_boxes_save($post_id){
|
|
317 |
Â
|
318 |
Â
update_post_meta($post_id, 'option_overall_score', $overall_score/10);
|
319 |
Â
}
|
Â
|
|
320 |
Â
function cwp_review_plugin_activation() {
|
321 |
Â
|
322 |
Â
|
9 |
Â
wp_nonce_field( 'cwp_product_review_meta_box_nonce', 'cwp_meta_box_nonce' );
|
10 |
Â
$cwp_review_stored_meta = get_post_meta( $post->ID );
|
11 |
Â
$check = isset( $cwp_review_stored_meta['cwp_meta_box_check'][0] ) ? esc_attr( $cwp_review_stored_meta['cwp_meta_box_check'][0] ) : "No";
|
12 |
+
|
13 |
+
$query_args = array(
|
14 |
+
|
15 |
+
'posts_per_page'=> '1', // limit it to the specified no of posts
|
16 |
+
'post_type' => "any",
|
17 |
+
'post__not_in' => get_option('sticky_posts'),
|
18 |
+
'meta_key' => 'option_overall_score',
|
19 |
+
|
20 |
+
'meta_query' => array(
|
21 |
+
|
22 |
+
array(
|
23 |
+
|
24 |
+
'key' => 'cwp_meta_box_check',
|
25 |
+
|
26 |
+
'value' => 'Yes',
|
27 |
+
|
28 |
+
|
29 |
+
),
|
30 |
+
|
31 |
+
),
|
32 |
+
'orderby' => 'date',
|
33 |
+
'order' => 'DESC'
|
34 |
+
|
35 |
+
);
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
$cwp_latest_products_loop = get_posts( $query_args );
|
40 |
+
foreach ( $cwp_latest_products_loop as $w_post ) : setup_postdata( $w_post );
|
41 |
+
$wppr_id= $w_post->ID;
|
42 |
+
|
43 |
+
endforeach;
|
44 |
+
wp_reset_postdata();
|
45 |
+
|
46 |
+
$p_meta = isset($wppr_id ) ? get_post_meta ($wppr_id) : array();
|
47 |
+
|
48 |
+
if (isset( $cwp_review_stored_meta['cwp_image_link'][0])) {
|
49 |
+
$checkset = esc_attr( $cwp_review_stored_meta['cwp_image_link'][0]);
|
50 |
+
}
|
51 |
+
else {
|
52 |
+
$checkset = isset( $p_meta['cwp_image_link'][0] ) ? esc_attr( $p_meta['cwp_image_link'][0] ) : "image";
|
53 |
+
|
54 |
+
}
|
55 |
+
//$checkset = isset( $cwp_review_stored_meta['cwp_image_link'][0] ) ? ) : "image";
|
56 |
+
|
57 |
Â
?>
|
58 |
Â
<p class="isReview<?php echo $check; ?>">
|
59 |
Â
<label for="my_meta_box_check">Is this a review post ? </label>
|
61 |
Â
<label for="my_meta_box_check">Yes</label>
|
62 |
Â
<input type="radio" id="cwp_meta_box_check_no" name="cwp_meta_box_check" value="No" <?php checked( $check, 'No' ); ?> />
|
63 |
Â
<label for="my_meta_box_check" style="margin-right:30px;">No</label>
|
64 |
+
|
Â
|
|
Â
|
|
65 |
Â
</p>
|
66 |
Â
<div class="product-review-meta-<?php echo $check; ?>">
|
67 |
+
|
68 |
Â
<div class="review-settings-notice">
|
69 |
Â
<h4><?php _e("Product Details", "cwppos"); ?></h4>
|
70 |
Â
<p style="margin:0;"><?php _e("Specify the general details for the reviewed product.", "cwppos"); ?></p>
|
72 |
Â
<div class="review-settings-group">
|
73 |
Â
<div class="review-settings-group-option">
|
74 |
Â
<ul>
|
75 |
+
<?php
|
76 |
+
// Added by Ash/Upwork
|
77 |
+
do_action("wppr-amazon-addfields", $cwp_review_stored_meta);
|
78 |
+
// Added by Ash/Upwork
|
79 |
+
?>
|
80 |
+
|
81 |
Â
<li>
|
82 |
Â
<label for="cwp_rev_product_name"><?php _e("Product Name", "cwppos"); ?></label>
|
83 |
Â
<input type="text" name="cwp_rev_product_name" id="cwp_rev_product_name" value="<?php
|
95 |
Â
<p><?php _e("*If no image is provided, featured image is used"); ?>
|
96 |
Â
</li>
|
97 |
Â
<li class="cwp_image_link">
|
98 |
+
<label for="cwp_image_link_aff">Product Image Click : </label>
|
99 |
Â
<input type="radio" id="cwp_image_link_aff" name="cwp_image_link" value="image" <?php checked( $checkset, 'image' ); ?> />
|
100 |
+
<label for="cwp_image_link_image">Show Whole Image</label>
|
101 |
Â
<input type="radio" id="cwp_image_link_image" name="cwp_image_link" value="link" <?php checked( $checkset, 'link' ); ?> />
|
102 |
+
<label for="my_meta_box_check">Open Affiliate link</label>
|
103 |
Â
</li>
|
104 |
Â
<li>
|
105 |
Â
<label for="cwp_product_affiliate_text"><?php _e("Affiliate Button Text", "cwppos"); ?></label>
|
107 |
Â
|
108 |
Â
if(isset($cwp_review_stored_meta['cwp_product_affiliate_text'][0])) {
|
109 |
Â
echo $cwp_review_stored_meta['cwp_product_affiliate_text'][0];
|
110 |
+
} else {
|
111 |
+
if(isset($p_meta['cwp_product_affiliate_text'][0]))
|
112 |
+
echo $p_meta['cwp_product_affiliate_text'][0];
|
113 |
Â
}
|
114 |
Â
|
115 |
Â
?>"/>
|
123 |
Â
}
|
124 |
Â
|
125 |
Â
?>"/>
|
126 |
+
<?php
|
127 |
+
$hide_button2 = false;
|
128 |
+
if (!isset($cwp_review_stored_meta['cwp_product_affiliate_text2'][0])) {
|
129 |
+
$hide_button2 = true;
|
130 |
+
?>
|
131 |
+
<a href="#" id="cwp_add_button" title="Add new button">+</a>
|
132 |
+
<?php } ?>
|
133 |
Â
</li>
|
134 |
Â
|
135 |
+
<li class="<?php if ($hide_button2) echo 'cwp_hide_button2';?>" >
|
136 |
Â
<label for="cwp_product_affiliate_text2"><?php _e("Affiliate Button Text 2", "cwppos"); ?></label>
|
137 |
Â
<input type="text" name="cwp_product_affiliate_text2" id="cwp_product_affiliate_text2" value="<?php
|
138 |
Â
|
142 |
Â
|
143 |
Â
?>"/>
|
144 |
Â
</li>
|
145 |
+
<li class="<?php if ($hide_button2) echo 'cwp_hide_button2';?>" >
|
146 |
Â
<label for="cwp_product_affiliate_link2"><?php _e("Affiliate Link 2", "cwppos"); ?></label>
|
147 |
Â
<input type="text" name="cwp_product_affiliate_link2" id="cwp_product_affiliate_link2" value="<?php
|
148 |
Â
|
193 |
Â
if(isset($cwp_review_stored_meta['option_'.$i.'_content'][0])) {
|
194 |
Â
echo $cwp_review_stored_meta['option_'.$i.'_content'][0];
|
195 |
Â
}
|
196 |
+
else {
|
197 |
+
//Get latest modified post from the same category id
|
198 |
+
if (isset($p_meta['option_'.$i.'_content'][0]))
|
199 |
+
echo $p_meta['option_'.$i.'_content'][0];
|
200 |
+
}
|
201 |
Â
|
202 |
Â
?>"/>
|
203 |
Â
<input type="text" name="option_<?php echo $i;?>_grade" class="option_grade" placeholder="Grade" value="<?php
|
211 |
Â
<?php } ?>
|
212 |
Â
|
213 |
Â
</div><!-- end .review-settings group -->
|
214 |
+
<div class="cwp_proscons">
|
215 |
Â
<div class="review-settings-notice">
|
216 |
Â
<h4><?php _e("Pro Features", "cwppos"); ?></h4>
|
217 |
Â
<p style="margin:0;"><?php _e("Insert product's pro features below.", "cwppos"); ?></p>
|
232 |
Â
<?php } ?>
|
233 |
Â
|
234 |
Â
</div><!-- end .review-settings group -->
|
235 |
+
</div>
|
236 |
+
<div class="cwp_proscons">
|
237 |
Â
<div class="review-settings-notice">
|
238 |
Â
<h4><?php _e("Cons Features", "cwppos"); ?></h4>
|
239 |
Â
<p style="margin:0;"><?php _e("Insert product's cons features below.", "cwppos"); ?></p>
|
252 |
Â
?>"/>
|
253 |
Â
</div><!-- end .review-settings-group option -->
|
254 |
Â
<?php } ?>
|
255 |
+
|
256 |
Â
|
257 |
Â
</div><!-- end .review-settings group -->
|
258 |
+
</div>
|
259 |
+
<?php if(!shortcode_exists("P_REVIEW")): ?>
|
260 |
+
<label > You can use the shortcode <b>[P_REVIEW]</b> to show a review you already made or <b>[wpr_landing]</b> to display a comparision table of them. The shortcodes are available on the <a target="_blank" href="http://themeisle.com/plugins/wp-product-review-pro-add-on/">Pro Bundle</a><br/><br/></label>
|
261 |
+
<?php endif; ?>
|
262 |
Â
</div>
|
263 |
Â
<?php
|
264 |
Â
}
|
276 |
Â
return;
|
277 |
Â
}
|
278 |
Â
|
279 |
+
// Added by Ash/Upwork
|
280 |
+
do_action("wppr-amazon-savefields", $post_id);
|
281 |
+
// Added by Ash/Upwork
|
282 |
+
|
283 |
+
if( isset( $_POST[ 'cwp_meta_box_check' ] ) && $_POST[ 'cwp_meta_box_check' ]=="Yes") {
|
284 |
Â
|
285 |
Â
if( isset( $_POST[ 'cwp_rev_product_name' ] ) ) {
|
286 |
Â
update_post_meta( $post_id, 'cwp_rev_product_name', sanitize_text_field( $_POST[ 'cwp_rev_product_name' ] ) );
|
329 |
Â
|
330 |
Â
for ($i=1;$i<=cwppos("cwppos_option_nr");$i++) {
|
331 |
Â
|
332 |
+
if( isset( $_POST[ 'option_'.$i.'_content' ] )) {
|
333 |
Â
update_post_meta( $post_id, 'option_'.$i.'_content', sanitize_text_field( $_POST[ 'option_'.$i.'_content' ] ) );
|
334 |
Â
}
|
335 |
Â
|
336 |
Â
|
337 |
+
if( isset( $_POST[ 'option_'.$i.'_grade' ])) {
|
338 |
Â
update_post_meta( $post_id, 'option_'.$i.'_grade', sanitize_text_field( $_POST[ 'option_'.$i.'_grade' ] ) );
|
339 |
Â
}
|
340 |
Â
}
|
394 |
Â
|
395 |
Â
update_post_meta($post_id, 'option_overall_score', $overall_score/10);
|
396 |
Â
}
|
397 |
+
}
|
398 |
Â
function cwp_review_plugin_activation() {
|
399 |
Â
|
400 |
Â
|
inc/cwp_top_products_widget.php
CHANGED
@@ -119,7 +119,7 @@ array( 'description' => __( 'This widget displays the top products based on thei
|
|
119 |
Â
|
120 |
Â
<img class="cwp_rev_image wppr-col" src="<?php echo $product_image;?>" alt="<?php echo $product_title; ?>"\>
|
121 |
Â
<?php } ?>
|
122 |
-
<a href="<?php the_permalink(); ?>" class="wppr-col">
|
123 |
Â
|
124 |
Â
<?php echo $product_title; ?>
|
125 |
Â
|
119 |
Â
|
120 |
Â
<img class="cwp_rev_image wppr-col" src="<?php echo $product_image;?>" alt="<?php echo $product_title; ?>"\>
|
121 |
Â
<?php } ?>
|
122 |
+
<a href="<?php the_permalink(); ?>" class="wppr-col" title="<?php echo $product_title; ?>">
|
123 |
Â
|
124 |
Â
<?php echo $product_title; ?>
|
125 |
Â
|
inc/wppr-filters.php
CHANGED
@@ -1,86 +1,86 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Filters of WPPR
|
4 |
-
* @package WPPR
|
5 |
-
* @author ThemeIsle
|
6 |
-
* @since 2.6.9
|
7 |
-
*/
|
8 |
-
|
9 |
-
add_filter( 'wppr_review_product_name','wppr_review_product_name_filter' );
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Filter name of the review
|
13 |
-
*
|
14 |
-
* @param int $id Id of the review.
|
15 |
-
* @return string $name Name of the review
|
16 |
-
* @since 2.6.9
|
17 |
-
*/
|
18 |
-
function wppr_review_product_name_filter( $id = '' ) {
|
19 |
-
|
20 |
-
$name = get_post_meta( $id, 'cwp_rev_product_name', true );
|
21 |
-
$name = ( empty( $name ) ) ? get_the_title( $id ) : $name;
|
22 |
-
return apply_filters( 'wppr_review_product_name_html' , $name );
|
23 |
-
}
|
24 |
-
|
25 |
-
add_filter( 'wppr_review_product_name_html','wppr_review_product_name_html_filter' );
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Filter html tag for the review name
|
29 |
-
*
|
30 |
-
* @param string $name name of the review.
|
31 |
-
* @return string $html tag for the title
|
32 |
-
* @since 2.6.9
|
33 |
-
*/
|
34 |
-
function wppr_review_product_name_html_filter( $name = '' ) {
|
35 |
-
|
36 |
-
return '<h2 class="cwp-item" itemprop="name" >'.$name.'</h2>';
|
37 |
-
|
38 |
-
}
|
39 |
-
|
40 |
-
add_filter( 'wppr_option_name_html','wppr_option_name_html_filter',10,2 );
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Filter html tag for the options name
|
44 |
-
*
|
45 |
-
* @param int $id Id of the review.
|
46 |
-
* @param string $name Name of the option.
|
47 |
-
* @return string $html tag for the option name
|
48 |
-
* @since 2.6.9
|
49 |
-
*/
|
50 |
-
function wppr_option_name_html_filter( $id = 0, $name = '' ) {
|
51 |
-
|
52 |
-
return ( ! empty( $name ) ) ? '<h3 >'.$name.'</h3>' : '';
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
add_filter( 'wppr_review_pros_text','wppr_review_pros_text_filter',10,2 );
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Filter html tag for the pros text heading
|
60 |
-
*
|
61 |
-
* @param int $id Id of the review.
|
62 |
-
* @param string $name The pros heading text.
|
63 |
-
* @return string $html tag for the pros text
|
64 |
-
* @since 2.6.9
|
65 |
-
*/
|
66 |
-
function wppr_review_pros_text_filter( $id = 0, $name = '' ) {
|
67 |
-
|
68 |
-
return ( ! empty( $name ) ) ? '<h2>'.$name.'</h2>' : '';
|
69 |
-
|
70 |
-
}
|
71 |
-
|
72 |
-
add_filter( 'wppr_review_cons_text','wppr_review_cons_text_filter',10,2 );
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Filter html tag for the cons text heading
|
76 |
-
*
|
77 |
-
* @param int $id Id of the review.
|
78 |
-
* @param string $name The cons heading text.
|
79 |
-
* @return string $html tag for the cons text
|
80 |
-
* @since 2.6.9
|
81 |
-
*/
|
82 |
-
function wppr_review_cons_text_filter( $id = 0, $name = '' ) {
|
83 |
-
|
84 |
-
return ( ! empty( $name ) ) ? '<h2>'.$name.'</h2>' : '';
|
85 |
-
|
86 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Filters of WPPR
|
4 |
+
* @package WPPR
|
5 |
+
* @author ThemeIsle
|
6 |
+
* @since 2.6.9
|
7 |
+
*/
|
8 |
+
|
9 |
+
add_filter( 'wppr_review_product_name','wppr_review_product_name_filter' );
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Filter name of the review
|
13 |
+
*
|
14 |
+
* @param int $id Id of the review.
|
15 |
+
* @return string $name Name of the review
|
16 |
+
* @since 2.6.9
|
17 |
+
*/
|
18 |
+
function wppr_review_product_name_filter( $id = '' ) {
|
19 |
+
|
20 |
+
$name = get_post_meta( $id, 'cwp_rev_product_name', true );
|
21 |
+
$name = ( empty( $name ) ) ? get_the_title( $id ) : $name;
|
22 |
+
return apply_filters( 'wppr_review_product_name_html' , $name );
|
23 |
+
}
|
24 |
+
|
25 |
+
add_filter( 'wppr_review_product_name_html','wppr_review_product_name_html_filter' );
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Filter html tag for the review name
|
29 |
+
*
|
30 |
+
* @param string $name name of the review.
|
31 |
+
* @return string $html tag for the title
|
32 |
+
* @since 2.6.9
|
33 |
+
*/
|
34 |
+
function wppr_review_product_name_html_filter( $name = '' ) {
|
35 |
+
|
36 |
+
return '<h2 class="cwp-item" itemprop="name" >'.$name.'</h2>';
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
add_filter( 'wppr_option_name_html','wppr_option_name_html_filter',10,2 );
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Filter html tag for the options name
|
44 |
+
*
|
45 |
+
* @param int $id Id of the review.
|
46 |
+
* @param string $name Name of the option.
|
47 |
+
* @return string $html tag for the option name
|
48 |
+
* @since 2.6.9
|
49 |
+
*/
|
50 |
+
function wppr_option_name_html_filter( $id = 0, $name = '' ) {
|
51 |
+
|
52 |
+
return ( ! empty( $name ) ) ? '<h3 >'.$name.'</h3>' : '';
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
add_filter( 'wppr_review_pros_text','wppr_review_pros_text_filter',10,2 );
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Filter html tag for the pros text heading
|
60 |
+
*
|
61 |
+
* @param int $id Id of the review.
|
62 |
+
* @param string $name The pros heading text.
|
63 |
+
* @return string $html tag for the pros text
|
64 |
+
* @since 2.6.9
|
65 |
+
*/
|
66 |
+
function wppr_review_pros_text_filter( $id = 0, $name = '' ) {
|
67 |
+
|
68 |
+
return ( ! empty( $name ) ) ? '<h2>'.$name.'</h2>' : '';
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
add_filter( 'wppr_review_cons_text','wppr_review_cons_text_filter',10,2 );
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Filter html tag for the cons text heading
|
76 |
+
*
|
77 |
+
* @param int $id Id of the review.
|
78 |
+
* @param string $name The cons heading text.
|
79 |
+
* @return string $html tag for the cons text
|
80 |
+
* @since 2.6.9
|
81 |
+
*/
|
82 |
+
function wppr_review_cons_text_filter( $id = 0, $name = '' ) {
|
83 |
+
|
84 |
+
return ( ! empty( $name ) ) ? '<h2>'.$name.'</h2>' : '';
|
85 |
+
|
86 |
+
}
|
inc/wppr-main.php
CHANGED
@@ -1,454 +1,530 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Core functions of WPPR
|
4 |
-
* @package WPPR
|
5 |
-
* @author ThemeIsle
|
6 |
-
* @since 1.0.0
|
7 |
-
*
|
8 |
-
*/
|
9 |
-
|
10 |
-
|
11 |
-
function cwppos_calc_overall_rating($id){
|
12 |
-
$options = cwppos();
|
13 |
-
|
14 |
-
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
15 |
-
|
16 |
-
${"option".$i."_grade"} = get_post_meta($id, "option_".$i."_grade", true);
|
17 |
-
// echo ${"option".$i."_grade"};
|
18 |
-
|
19 |
-
${"comment_meta_option_nr_".$i} = 0;
|
20 |
-
${"comment_meta_option_".$i} = 0;
|
21 |
-
|
22 |
-
}
|
23 |
-
$nr_of_comments = 0;
|
24 |
-
if( $options['cwppos_show_userreview'] == "yes" ) {
|
25 |
-
$args = array(
|
26 |
-
'status' => 'approve',
|
27 |
-
'post_id' => $id, // use post_id, not post_ID
|
28 |
-
);
|
29 |
-
$comments = get_comments($args);
|
30 |
-
$nr_of_comments = get_comments_number($id);
|
31 |
-
|
32 |
-
foreach($comments as $comment) :
|
33 |
-
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
34 |
-
|
35 |
-
if (get_comment_meta( $comment->comment_ID, "meta_option_{$i}", true)!=='') {
|
36 |
-
${"comment_meta_option_nr_".$i}++;
|
37 |
-
${"comment_meta_option_".$i} += get_comment_meta( $comment->comment_ID, "meta_option_{$i}", true)*10;
|
38 |
-
}
|
39 |
-
|
40 |
-
|
41 |
-
//var_dump(${"comment_meta_option_".$i});
|
42 |
-
}
|
43 |
-
|
44 |
-
|
45 |
-
endforeach;
|
46 |
-
|
47 |
-
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
48 |
-
if (${"comment_meta_option_nr_".$i}!==0)
|
49 |
-
${"comment_meta_option_".$i} = ${"comment_meta_option_".$i}/${"comment_meta_option_nr_".$i};
|
50 |
-
}
|
51 |
-
|
52 |
-
}
|
53 |
-
else {
|
54 |
-
$options['cwppos_infl_userreview'] = 0;
|
55 |
-
}
|
56 |
-
if ( $nr_of_comments==0 )
|
57 |
-
$options['cwppos_infl_userreview'] = 0;
|
58 |
-
|
59 |
-
$overall_score = 0;
|
60 |
-
$iter = 0;
|
61 |
-
$rating = array();
|
62 |
-
|
63 |
-
for ($i=1;$i<=cwppos("cwppos_option_nr");$i++) {
|
64 |
-
|
65 |
-
if (${"comment_meta_option_nr_".$i}!==0)
|
66 |
-
$infl = $options['cwppos_infl_userreview'];
|
67 |
-
else {
|
68 |
-
$infl = 0;
|
69 |
-
|
70 |
-
}
|
71 |
-
if(!empty(${'option'.$i.'_grade'})|| ${'option'.$i.'_grade'} === '0') {
|
72 |
-
//if($infl !== 0 ){
|
73 |
-
${'option'.$i.'_grade'} = round((${'option'.$i.'_grade'}*(100-$infl) + ${'comment_meta_option_'.$i}*$infl)/100);
|
74 |
-
//}else{
|
75 |
-
|
76 |
-
//}
|
77 |
-
$iter++;
|
78 |
-
$rating['option'.$i] = round(${'option'.$i.'_grade'});
|
79 |
-
$overall_score+=${'option'.$i.'_grade'};
|
80 |
-
}
|
81 |
-
}
|
82 |
-
//$overall_score = ($option1_grade + $option2_grade + $option3_grade + $option4_grade + $option5_grade) / $iter;
|
83 |
-
if ($iter !==0) $rating['overall'] = $overall_score/$iter;
|
84 |
-
else $rating['overall'] = 0;
|
85 |
-
update_post_meta($id, 'option_overall_score', $rating['overall']);
|
86 |
-
return $rating;
|
87 |
-
|
88 |
-
|
89 |
-
}
|
90 |
-
|
91 |
-
function cwppos_show_review($id = "") {
|
92 |
-
global $post;
|
93 |
-
if ( post_password_required($post) ) return false;
|
94 |
-
|
95 |
-
if ($id=="")
|
96 |
-
$id = $post->ID;
|
97 |
-
|
98 |
-
|
99 |
-
$cwp_review_stored_meta = get_post_meta( $id );
|
100 |
-
$return_string = "";
|
101 |
-
|
102 |
-
if(@$cwp_review_stored_meta['cwp_meta_box_check'][0] == 'Yes' ) {
|
103 |
-
|
104 |
-
wp_enqueue_style( 'cwp-pac-frontpage-stylesheet', WPPR_URL.'/css/frontpage.css',array(),WPPR_LITE_VERSION );
|
105 |
-
wp_enqueue_script( 'pie-chart', WPPR_URL.'/javascript/pie-chart.js',array("jquery"), WPPR_LITE_VERSION,true );
|
106 |
-
wp_enqueue_script( 'cwp-pac-main-script', WPPR_URL.'/javascript/main.js',array("jquery",'pie-chart'),WPPR_LITE_VERSION,true );
|
107 |
-
|
108 |
-
$
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
$
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
$
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
$
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
if(empty(${
|
202 |
-
$
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
}
|
213 |
-
|
214 |
-
$return_string .=
|
215 |
-
</div><!-- end .
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
}
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
$
|
322 |
-
}
|
323 |
-
$
|
324 |
-
|
325 |
-
|
326 |
-
$
|
327 |
-
$
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
}
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
454 |
Â
load_plugin_textdomain('cwppos', false, dirname(plugin_basename(WPPR_PATH)).'/languages/');
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Core functions of WPPR
|
4 |
+
* @package WPPR
|
5 |
+
* @author ThemeIsle
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
+
function cwppos_calc_overall_rating($id){
|
12 |
+
$options = cwppos();
|
13 |
+
|
14 |
+
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
15 |
+
|
16 |
+
${"option".$i."_grade"} = get_post_meta($id, "option_".$i."_grade", true);
|
17 |
+
// echo ${"option".$i."_grade"};
|
18 |
+
|
19 |
+
${"comment_meta_option_nr_".$i} = 0;
|
20 |
+
${"comment_meta_option_".$i} = 0;
|
21 |
+
|
22 |
+
}
|
23 |
+
$nr_of_comments = 0;
|
24 |
+
if( $options['cwppos_show_userreview'] == "yes" ) {
|
25 |
+
$args = array(
|
26 |
+
'status' => 'approve',
|
27 |
+
'post_id' => $id, // use post_id, not post_ID
|
28 |
+
);
|
29 |
+
$comments = get_comments($args);
|
30 |
+
$nr_of_comments = get_comments_number($id);
|
31 |
+
|
32 |
+
foreach($comments as $comment) :
|
33 |
+
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
34 |
+
|
35 |
+
if (get_comment_meta( $comment->comment_ID, "meta_option_{$i}", true)!=='') {
|
36 |
+
${"comment_meta_option_nr_".$i}++;
|
37 |
+
${"comment_meta_option_".$i} += get_comment_meta( $comment->comment_ID, "meta_option_{$i}", true)*10;
|
38 |
+
}
|
39 |
+
|
40 |
+
|
41 |
+
//var_dump(${"comment_meta_option_".$i});
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
endforeach;
|
46 |
+
|
47 |
+
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
48 |
+
if (${"comment_meta_option_nr_".$i}!==0)
|
49 |
+
${"comment_meta_option_".$i} = ${"comment_meta_option_".$i}/${"comment_meta_option_nr_".$i};
|
50 |
+
}
|
51 |
+
|
52 |
+
}
|
53 |
+
else {
|
54 |
+
$options['cwppos_infl_userreview'] = 0;
|
55 |
+
}
|
56 |
+
if ( $nr_of_comments==0 )
|
57 |
+
$options['cwppos_infl_userreview'] = 0;
|
58 |
+
|
59 |
+
$overall_score = 0;
|
60 |
+
$iter = 0;
|
61 |
+
$rating = array();
|
62 |
+
|
63 |
+
for ($i=1;$i<=cwppos("cwppos_option_nr");$i++) {
|
64 |
+
|
65 |
+
if (${"comment_meta_option_nr_".$i}!==0)
|
66 |
+
$infl = $options['cwppos_infl_userreview'];
|
67 |
+
else {
|
68 |
+
$infl = 0;
|
69 |
+
|
70 |
+
}
|
71 |
+
if(!empty(${'option'.$i.'_grade'})|| ${'option'.$i.'_grade'} === '0') {
|
72 |
+
//if($infl !== 0 ){
|
73 |
+
${'option'.$i.'_grade'} = round((${'option'.$i.'_grade'}*(100-$infl) + ${'comment_meta_option_'.$i}*$infl)/100);
|
74 |
+
//}else{
|
75 |
+
|
76 |
+
//}
|
77 |
+
$iter++;
|
78 |
+
$rating['option'.$i] = round(${'option'.$i.'_grade'});
|
79 |
+
$overall_score+=${'option'.$i.'_grade'};
|
80 |
+
}
|
81 |
+
}
|
82 |
+
//$overall_score = ($option1_grade + $option2_grade + $option3_grade + $option4_grade + $option5_grade) / $iter;
|
83 |
+
if ($iter !==0) $rating['overall'] = $overall_score/$iter;
|
84 |
+
else $rating['overall'] = 0;
|
85 |
+
update_post_meta($id, 'option_overall_score', $rating['overall']);
|
86 |
+
return $rating;
|
87 |
+
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
function cwppos_show_review($id = "") {
|
92 |
+
global $post;
|
93 |
+
if ( post_password_required($post) ) return false;
|
94 |
+
|
95 |
+
if ($id=="")
|
96 |
+
$id = $post->ID;
|
97 |
+
|
98 |
+
|
99 |
+
$cwp_review_stored_meta = get_post_meta( $id );
|
100 |
+
$return_string = "";
|
101 |
+
|
102 |
+
if(@$cwp_review_stored_meta['cwp_meta_box_check'][0] == 'Yes' ) {
|
103 |
+
|
104 |
+
wp_enqueue_style( 'cwp-pac-frontpage-stylesheet', WPPR_URL.'/css/frontpage.css',array(),WPPR_LITE_VERSION );
|
105 |
+
wp_enqueue_script( 'pie-chart', WPPR_URL.'/javascript/pie-chart.js',array("jquery"), WPPR_LITE_VERSION,true );
|
106 |
+
wp_enqueue_script( 'cwp-pac-main-script', WPPR_URL.'/javascript/main.js',array("jquery",'pie-chart'),WPPR_LITE_VERSION,true );
|
107 |
+
$cwp_price = get_post_meta($id, "cwp_rev_price", true);
|
108 |
+
$p_string = $cwp_price;
|
109 |
+
$p_name = apply_filters("wppr_review_product_name", $id) ;
|
110 |
+
|
111 |
+
if ($p_string!="") {
|
112 |
+
// Added by Ash/Upwork
|
113 |
+
$cwp_price = do_shortcode($cwp_price);
|
114 |
+
// Added by Ash/Upwork
|
115 |
+
|
116 |
+
$p_price = preg_replace("/[^0-9.,]/","",$cwp_price);
|
117 |
+
$p_currency = preg_replace("/[0-9.,]/","",$cwp_price);
|
118 |
+
|
119 |
+
// Added by Ash/Upwork
|
120 |
+
$p_disable = apply_filters("wppr_disable_price_richsnippet", FALSE);
|
121 |
+
// Added by Ash/Upwork
|
122 |
+
if(!$p_disable){
|
123 |
+
$p_string = '<span itemprop="offers" itemscope itemtype="http://schema.org/Offer"><span itemprop="priceCurrency">'.$p_currency.'</span><span itemprop="price">'.$p_price.'</span></span>';
|
124 |
+
}
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
+
$return_string = '<section id="review-statistics" class="article-section" itemscope itemtype="http://schema.org/Product">
|
129 |
+
<div class="review-wrap-up cwpr_clearfix" >
|
130 |
+
<div class="cwpr-review-top cwpr_clearfix">
|
131 |
+
<span itemprop="name">' . $p_name. '</span>
|
132 |
+
|
133 |
+
<span class="cwp-item-price cwp-item">'.$p_string.'</span>
|
134 |
+
</div><!-- end .cwpr-review-top -->
|
135 |
+
<div class="review-wu-left">
|
136 |
+
<div class="rev-wu-image">';
|
137 |
+
|
138 |
+
$product_image = get_post_meta($id, "cwp_rev_product_image", true);
|
139 |
+
$imgurl = get_post_meta($id, "cwp_image_link", true);
|
140 |
+
$lightbox = "";
|
141 |
+
$feat_image = wp_get_attachment_url( get_post_thumbnail_id( $id ) );
|
142 |
+
|
143 |
+
if(!empty($product_image)) {
|
144 |
+
$product_image_cropped = wppr_get_image_id($id,$product_image);
|
145 |
+
} else {
|
146 |
+
$product_image_cropped = wppr_get_image_id($id);
|
147 |
+
$product_image = $feat_image;
|
148 |
+
}
|
149 |
+
|
150 |
+
if ($imgurl =="image") {
|
151 |
+
|
152 |
+
//no means no disabled
|
153 |
+
if(cwppos("cwppos_lighbox") == "no"){
|
154 |
+
$lightbox = 'data-lightbox="' . $product_image . '"';
|
155 |
+
wp_enqueue_script("img-lightbox",WPPR_URL.'/javascript/lightbox.min.js',array(), WPPR_LITE_VERSION, array());
|
156 |
+
wp_enqueue_style("img-lightbox-css", WPPR_URL.'/css/lightbox.css' , array(), WPPR_LITE_VERSION );
|
157 |
+
}
|
158 |
+
}else{
|
159 |
+
$product_image = get_post_meta($id, "cwp_product_affiliate_link", true);
|
160 |
+
}
|
161 |
+
//print_r($product_image);
|
162 |
+
$return_string .= '<a href="'.$product_image.'" '.$lightbox.' rel="nofollow" target="_blank"><img itemprop="image" src="'.$product_image_cropped.'" alt="'. get_post_meta($id, "cwp_rev_product_name", true).'" class="photo photo-wrapup wppr-product-image" /></a>';
|
163 |
+
|
164 |
+
$rating = cwppos_calc_overall_rating($id);
|
165 |
+
|
166 |
+
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
167 |
+
${"option".$i."_content"} = get_post_meta($id, "option_".$i."_content", true);
|
168 |
+
|
169 |
+
if(empty(${"option".$i."_content"})) {
|
170 |
+
${"option".$i."_content"} = __("Default Feature ".$i, "cwppos");
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
$commentNr = get_comments_number($id)+1;
|
175 |
+
$divrating = $rating['overall']/10;
|
176 |
+
$return_string .= '</div><!-- end .rev-wu-image -->
|
177 |
+
<div class="review-wu-grade">
|
178 |
+
<div class="cwp-review-chart">
|
179 |
+
<meta itemprop="datePublished" datetime="'.get_the_time("Y-m-d", $id).'">
|
180 |
+
';
|
181 |
+
if(cwppos("cwppos_infl_userreview") !== 0 && $commentNr>1) {
|
182 |
+
$return_string .= '<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="cwp-review-percentage" data-percent="';
|
183 |
+
$return_string .= $rating['overall'] . '"><span itemprop="ratingValue" class="cwp-review-rating">' . $divrating . '</span><meta itemprop="bestRating" content = "10"/>
|
184 |
+
<meta itemprop="ratingCount" content="' . $commentNr . '"> </div>';
|
185 |
+
|
186 |
+
}else
|
187 |
+
{
|
188 |
+
$return_string .= '<span itemscope itemtype="http://schema.org/Review"><span itemprop="author" itemscope itemtype="http://schema.org/Person" >
|
189 |
+
<meta itemprop="name" content="'.get_the_author().'"/>
|
190 |
+
</span><span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product"><meta itemprop="name" content="'.get_post_meta($id,'cwp_rev_product_name',true).'"/></span><div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="cwp-review-percentage" data-percent="';
|
191 |
+
$return_string .= $rating['overall'] . '"><span itemprop="ratingValue" class="cwp-review-rating">' . $divrating . '</span> <meta itemprop="bestRating" content="10"> </div></span>';
|
192 |
+
|
193 |
+
|
194 |
+
}
|
195 |
+
$return_string .='
|
196 |
+
</div><!-- end .chart -->
|
197 |
+
</div><!-- end .review-wu-grade -->
|
198 |
+
<div class="review-wu-bars">';
|
199 |
+
|
200 |
+
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
201 |
+
if (!empty(${'option'.$i.'_content'}) && isset($rating['option'.$i]) && (!empty($rating['option'.$i]) || $rating['option'.$i] === '0' ) && strtoupper(${'option'.$i.'_content'}) != 'DEFAULT FEATURE '.$i) {
|
202 |
+
$return_string .= '<div class="rev-option" data-value='.$rating['option'.$i].'>
|
203 |
+
<div class="cwpr_clearfix">
|
204 |
+
'.apply_filters("wppr_option_name_html",$id, ${'option'.$i.'_content'} ).'
|
205 |
+
<span>'.round($rating['option'.$i]/10).'/10</span>
|
206 |
+
</div>
|
207 |
+
<ul class="cwpr_clearfix"></ul>
|
208 |
+
</div>';
|
209 |
+
}
|
210 |
+
|
211 |
+
|
212 |
+
}
|
213 |
+
|
214 |
+
$return_string .='
|
215 |
+
</div><!-- end .review-wu-bars -->
|
216 |
+
</div><!-- end .review-wu-left -->
|
217 |
+
<div class="review-wu-right">
|
218 |
+
<div class="pros">';
|
219 |
+
|
220 |
+
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
221 |
+
${"pro_option_".$i} = get_post_meta($id, "cwp_option_".$i."_pro", true);
|
222 |
+
if(empty(${"pro_option_".$i})) {
|
223 |
+
${"pro_option_".$i} = "" ;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
|
228 |
+
${"cons_option_".$i} = get_post_meta($id, "cwp_option_".$i."_cons", true);
|
229 |
+
if(empty(${"cons_option_".$i})) {
|
230 |
+
${"cons_option_".$i} = "";
|
231 |
+
}
|
232 |
+
|
233 |
+
}
|
234 |
+
|
235 |
+
$return_string .= apply_filters( 'wppr_review_pros_text',$id, __(cwppos("cwppos_pros_text"), "cwppos")).' <ul>';
|
236 |
+
for($i=1;$i<=cwppos("cwppos_option_nr");$i++) {
|
237 |
+
if(!empty(${"pro_option_".$i})) {
|
238 |
+
$return_string .= ' <li>- '.${"pro_option_".$i}.'</li>';
|
239 |
+
}
|
240 |
+
}
|
241 |
+
|
242 |
+
$return_string .= ' </ul>
|
243 |
+
</div><!-- end .pros -->
|
244 |
+
<div class="cons">';
|
245 |
+
$return_string .= apply_filters( 'wppr_review_cons_text',$id, __(cwppos("cwppos_cons_text"), "cwppos")).' <ul>';
|
246 |
+
|
247 |
+
for($i=1;$i<=cwppos("cwppos_option_nr");$i++){
|
248 |
+
if(!empty(${"cons_option_".$i})) {
|
249 |
+
$return_string .= ' <li>- '.${"cons_option_".$i}.'</li>';
|
250 |
+
}
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
$return_string .='
|
255 |
+
</ul>
|
256 |
+
</div>';
|
257 |
+
$return_string .='
|
258 |
+
</div><!-- end .review-wu-right -->
|
259 |
+
</div><!-- end .review-wrap-up -->
|
260 |
+
</section><!-- end #review-statistics -->';
|
261 |
+
|
262 |
+
if(cwppos("cwppos_show_poweredby") == 'yes' && !class_exists('CWP_PR_PRO_Core')) {
|
263 |
+
$return_string.='<div style="font-size:12px;width:100%;float:right"><p style="float:right;">Powered by <a href="http://wordpress.org/plugins/wp-product-review/" target="_blank" rel="nofollow" > WP Product Review</a></p></div>';
|
264 |
+
}
|
265 |
+
|
266 |
+
$affiliate_text = get_post_meta($id, "cwp_product_affiliate_text", true);
|
267 |
+
$affiliate_link = get_post_meta($id, "cwp_product_affiliate_link", true);
|
268 |
+
$affiliate_text2 = get_post_meta($id, "cwp_product_affiliate_text2", true);
|
269 |
+
$affiliate_link2 = get_post_meta($id, "cwp_product_affiliate_link2", true);
|
270 |
+
|
271 |
+
if(!empty($affiliate_text2) && !empty($affiliate_link2)) {
|
272 |
+
$bclass="affiliate-button2 affiliate-button";
|
273 |
+
}
|
274 |
+
else
|
275 |
+
$bclass="affiliate-button";
|
276 |
+
|
277 |
+
if(!empty($affiliate_text) && !empty($affiliate_link)) {
|
278 |
+
$return_string .= '<div class="'.$bclass.'">
|
279 |
+
<a href="'.$affiliate_link.'" rel="nofollow" target="_blank"><span>'. $affiliate_text.'</span> </a>
|
280 |
+
</div><!-- end .affiliate-button -->';
|
281 |
+
}
|
282 |
+
|
283 |
+
|
284 |
+
|
285 |
+
|
286 |
+
if(!empty($affiliate_text2) && !empty($affiliate_link2)) {
|
287 |
+
$return_string .= '<div class="affiliate-button affiliate-button2">
|
288 |
+
<a href="'.$affiliate_link2.'" rel="nofollow" target="_blank"><span>'. $affiliate_text2.'</span> </a>
|
289 |
+
</div><!-- end .affiliate-button -->';
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
return $return_string;
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
|
298 |
+
function cwppos_pac_admin_init() {
|
299 |
+
wp_enqueue_style( 'cwp-pac-admin-stylesheet', WPPR_URL.'/css/dashboard_styles.css' );
|
300 |
+
wp_register_script( 'cwp-pac-script', WPPR_URL.'/javascript/admin-review.js',array("jquery"),"20140101",true );
|
301 |
+
wp_localize_script( 'cwp-pac-script', 'ispro', array( 'value' => class_exists('CWP_PR_PRO_Core') ) );
|
302 |
+
wp_enqueue_script('cwp-pac-script' );
|
303 |
+
|
304 |
+
if(class_exists('CWP_PR_PRO_Core'))
|
305 |
+
wp_enqueue_style( 'cwp-pac-pro-admin-stylesheet', WPPR_URL.'/css/pro_dashboard_styles.css' );
|
306 |
+
|
307 |
+
// Added by Ash/Upwork
|
308 |
+
do_action("wppr-amazon-enqueue");
|
309 |
+
// Added by Ash/Upwork
|
310 |
+
}
|
311 |
+
|
312 |
+
function wppr_get_image_id($post_id, $image_url = "", $size = "thumbnail" ) {
|
313 |
+
|
314 |
+
global $wpdb;
|
315 |
+
//filter for image size;
|
316 |
+
$size = apply_filters("wppr_review_image_size",$size,$post_id);
|
317 |
+
|
318 |
+
if(!empty($image_url) && $image_url !== false ) {
|
319 |
+
|
320 |
+
$attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url ));
|
321 |
+
$image_id = isset($attachment[0]) ? $attachment[0] : '';
|
322 |
+
}else{
|
323 |
+
$image_id = get_post_thumbnail_id($post_id );
|
324 |
+
|
325 |
+
}
|
326 |
+
$image_thumb = "";
|
327 |
+
if(!empty($image_id)){
|
328 |
+
$image_thumb = wp_get_attachment_image_src($image_id, $size);
|
329 |
+
|
330 |
+
if( $size !== 'thumbnail' ) {
|
331 |
+
if($image_thumb[0] === $image_url){
|
332 |
+
$image_thumb = wp_get_attachment_image_src($image_id, "thumbnail");
|
333 |
+
}
|
334 |
+
}
|
335 |
+
}
|
336 |
+
return isset($image_thumb[0]) ? $image_thumb[0] : $image_url;
|
337 |
+
}
|
338 |
+
|
339 |
+
|
340 |
+
function custom_bar_icon() {
|
341 |
+
$options = cwppos();
|
342 |
+
|
343 |
+
if ($options['cwppos_show_poweredby']=="yes" || function_exists("wppr_ci_custom_bar_icon") || class_exists('CWP_PR_PRO_Core')) {
|
344 |
+
wp_register_script("cwp-custom-bar-icon", WPPR_URL.'/javascript/custom-bar-icon.js', false, "1.0", "all");
|
345 |
+
wp_enqueue_script("cwp-custom-bar-icon");
|
346 |
+
}
|
347 |
+
}
|
348 |
+
|
349 |
+
function cwppos_pac_register() {
|
350 |
+
add_image_size("wppr_widget_image",50,50);
|
351 |
+
}
|
352 |
+
|
353 |
+
function cwp_def_settings() {
|
354 |
+
global $post;
|
355 |
+
$options = cwppos();
|
356 |
+
if (function_exists('wppr_ci_custom_bar_icon') || $options['cwppos_show_poweredby']=="yes") {
|
357 |
+
$isSetToPro = true;
|
358 |
+
} else {
|
359 |
+
$isSetToPro = false;
|
360 |
+
}
|
361 |
+
|
362 |
+
$uni_font = cwppos("cwppos_change_bar_icon");
|
363 |
+
$track = $options['cwppos_rating_chart_default'];
|
364 |
+
|
365 |
+
//if ($uni_font!=="&#")
|
366 |
+
|
367 |
+
if(isset($uni_font[0])) { if ($uni_font[0]=="#") $uni_font = $uni_font; else $uni_font = $uni_font[0]; } else { $uni_font = ""; }
|
368 |
+
|
369 |
+
if(!empty($uni_font)){
|
370 |
+
if(function_exists("wppr_ci_custom_bar_icon") || cwppos('cwppos_show_poweredby') == 'yes'){
|
371 |
+
if(cwppos("cwppos_fontawesome") === "no"){
|
372 |
+
wp_enqueue_style( 'cwp-pac-fontawesome-stylesheet', WPPR_URL.'/css/font-awesome.min.css' );
|
373 |
+
}
|
374 |
+
}
|
375 |
+
}
|
376 |
+
echo "<script type='text/javascript'>
|
377 |
+
var cwpCustomBarIcon = '" . $uni_font . "';
|
378 |
+
var isSetToPro = '".$isSetToPro."';
|
379 |
+
var trackcolor = '".$track."';
|
380 |
+
</script>";
|
381 |
+
}
|
382 |
+
|
383 |
+
function cwppos_pac_print() {
|
384 |
+
//global $add_my_script;
|
385 |
+
global $post;
|
386 |
+
//echo get_post_meta($post->ID, "cwp_rev_product_name", true);
|
387 |
+
|
388 |
+
|
389 |
+
/*wp_print_styles('cwp-pac-frontpage-stylesheet');
|
390 |
+
wp_print_styles('cwp-pac-widget-stylesheet');
|
391 |
+
wp_print_styles('jqueryui');
|
392 |
+
wp_print_styles('cwp-pac-fontawesome-stylesheet');
|
393 |
+
//wp_print_styles('cwp-pac-widget-stylesheet');
|
394 |
+
wp_print_scripts('jquery-ui-core');
|
395 |
+
wp_print_scripts('jquery-ui-slider');
|
396 |
+
wp_print_scripts('pie-chart');
|
397 |
+
wp_print_scripts('cwp-pac-main-script');
|
398 |
+
wp_print_scripts('img-lightbox');
|
399 |
+
wp_print_styles('img-lightbox-css');*/
|
400 |
+
|
401 |
+
cwp_def_settings();
|
402 |
+
|
403 |
+
|
404 |
+
}
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Addons menu item
|
408 |
+
*/
|
409 |
+
function cwp_addons_menu() {
|
410 |
+
add_submenu_page( 'cwppos_options', __( 'WP Product Review Add-ons/Extensions', 'cwppos_options' ), __( 'Add-ons', 'cwppos' ) , 'manage_options', 'wp-addons', 'cwp_addons');
|
411 |
+
}
|
412 |
+
|
413 |
+
|
414 |
+
function cwppos_dynamic_stylesheet() {
|
415 |
+
$options = cwppos();
|
416 |
+
//Get theme content width or plugin setting content width
|
417 |
+
global $content_width;
|
418 |
+
$c_width = 700;
|
419 |
+
if ($options['cwppos_widget_size']!="")
|
420 |
+
$c_width = $options['cwppos_widget_size'];
|
421 |
+
else
|
422 |
+
$c_width = $content_width;
|
423 |
+
|
424 |
+
if ($c_width<200)
|
425 |
+
$c_width = 600;
|
426 |
+
|
427 |
+
$f_img_size = min(180,$c_width*0.51*0.4);
|
428 |
+
$h_tleft = $f_img_size +10;
|
429 |
+
$chart_size = 0.8 * $f_img_size;
|
430 |
+
|
431 |
+
?>
|
432 |
+
<style type="text/css">
|
433 |
+
|
434 |
+
|
435 |
+
@media (min-width: 820px) {
|
436 |
+
#review-statistics .review-wrap-up .review-wu-left .rev-wu-image, #review-statistics .review-wrap-up .review-wu-left .review-wu-grade { height:<?php echo $h_tleft;?>px;}
|
437 |
+
|
438 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart .cwp-review-percentage {
|
439 |
+
|
440 |
+
margin-top: <?php echo $f_img_size*0.1;?>%;
|
441 |
+
}
|
442 |
+
|
443 |
+
#review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart span {
|
444 |
+
font-size: <?php echo round(30*$f_img_size/140);?>px;
|
445 |
+
}
|
446 |
+
|
447 |
+
<?php if ($options['cwppos_widget_size']!="") { ?>
|
448 |
+
#review-statistics{
|
449 |
+
width:<?php echo $options['cwppos_widget_size']; ?>px;
|
450 |
+
}
|
451 |
+
<?php } ?>
|
452 |
+
|
453 |
+
}
|
454 |
+
|
455 |
+
#review-statistics .review-wrap-up div.cwpr-review-top { border-top: <?php echo $options['cwppos_reviewboxbd_width']; ?>px solid <?php echo $options['cwppos_reviewboxbd_color']; ?>; }
|
456 |
+
.user-comments-grades .comment-meta-grade-bar,
|
457 |
+
#review-statistics .review-wu-bars ul li{
|
458 |
+
background: <?php echo $options['cwppos_rating_default']; ?>;
|
459 |
+
}
|
460 |
+
|
461 |
+
#review-statistics .rev-option.customBarIcon ul li {
|
462 |
+
color: <?php echo $options['cwppos_rating_default']; ?>;
|
463 |
+
}
|
464 |
+
|
465 |
+
|
466 |
+
#review-statistics .review-wrap-up .review-wu-right ul li,#review-statistics .review-wu-bars h3, .review-wu-bars span,#review-statistics .review-wrap-up .cwpr-review-top .cwp-item-category a{
|
467 |
+
color: <?php echo $options['cwppos_font_color']; ?>;
|
468 |
+
}
|
469 |
+
#review-statistics .review-wrap-up .review-wu-right .pros h2 {
|
470 |
+
color: <?php echo $options['cwppos_pros_color']; ?>;
|
471 |
+
}
|
472 |
+
#review-statistics .review-wrap-up .review-wu-right .cons h2{
|
473 |
+
color: <?php echo $options['cwppos_cons_color']; ?>;
|
474 |
+
}
|
475 |
+
div.affiliate-button a{
|
476 |
+
border: 2px solid <?php echo $options['cwppos_buttonbd_color']; ?>;
|
477 |
+
}
|
478 |
+
div.affiliate-button a:hover{
|
479 |
+
border: 2px solid <?php echo $options['cwppos_buttonbh_color']; ?>;
|
480 |
+
}
|
481 |
+
div.affiliate-button a{
|
482 |
+
background: <?php echo $options['cwppos_buttonbkd_color']; ?>;
|
483 |
+
}
|
484 |
+
div.affiliate-button a:hover{
|
485 |
+
background: <?php echo $options['cwppos_buttonbkh_color']; ?>;
|
486 |
+
}
|
487 |
+
div.affiliate-button a span{
|
488 |
+
color: <?php echo $options['cwppos_buttontxtd_color']; ?>;
|
489 |
+
}
|
490 |
+
div.affiliate-button a:hover span{
|
491 |
+
color: <?php echo $options['cwppos_buttontxth_color']; ?>;
|
492 |
+
}
|
493 |
+
<?php if($options['cwppos_show_icon'] == 'yes') { ?>
|
494 |
+
div.affiliate-button a span {
|
495 |
+
background:url("<?php echo WPPR_URL; ?>/images/cart-icon.png") no-repeat left center;
|
496 |
+
}
|
497 |
+
div.affiliate-button a:hover span{
|
498 |
+
background:url("<?php echo WPPR_URL; ?>/images/cart-icon-hover.png") no-repeat left center;
|
499 |
+
}
|
500 |
+
<?php } ?>
|
501 |
+
|
502 |
+
<?php if($options['cwppos_show_userreview'] == 'yes') { ?>
|
503 |
+
.commentlist .comment-body p {
|
504 |
+
clear:left;
|
505 |
+
}
|
506 |
+
|
507 |
+
<?php } ?>
|
508 |
+
</style>
|
509 |
+
<script type="text/javascript">
|
510 |
+
var c1 = "<?php echo $options['cwppos_rating_weak'] ; ?>";
|
511 |
+
var c2 = "<?php echo $options['cwppos_rating_notbad'] ; ?>";
|
512 |
+
var c3 = "<?php echo $options['cwppos_rating_good'] ; ?>";
|
513 |
+
var c4 = "<?php echo $options['cwppos_rating_very_good'] ; ?>";
|
514 |
+
</script>
|
515 |
+
<?php
|
516 |
+
}
|
517 |
+
|
518 |
+
add_action('init', 'cwppos_pac_register');
|
519 |
+
add_action('wp_head', 'cwppos_pac_print');
|
520 |
+
add_action('wp_footer','cwppos_dynamic_stylesheet');
|
521 |
+
add_action( 'admin_init', 'cwppos_pac_admin_init' );
|
522 |
+
add_action('admin_menu', 'cwp_addons_menu');
|
523 |
+
add_action('admin_enqueue_scripts', 'custom_bar_icon');
|
524 |
+
|
525 |
+
if (!class_exists('TAV_Remote_Notification_Client')) require( WPPR_PATH.'/inc/class-remote-notification-client.php' );
|
526 |
+
$notification = new TAV_Remote_Notification_Client( 36, '71a28628279f6d55', 'https://themeisle.com/?post_type=notification' );
|
527 |
+
|
528 |
+
if (class_exists('CWP_PR_PRO_Core')) $cwp_pr_pro = new CWP_PR_PRO_Core();
|
529 |
+
|
530 |
Â
load_plugin_textdomain('cwppos', false, dirname(plugin_basename(WPPR_PATH)).'/languages/');
|
javascript/admin-review.js
CHANGED
@@ -50,6 +50,13 @@ jQuery(document).ready(function(){
|
|
50 |
Â
}
|
51 |
Â
});
|
52 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
53 |
Â
|
54 |
Â
|
55 |
Â
|
50 |
Â
}
|
51 |
Â
});
|
52 |
Â
|
53 |
+
jQuery('#cwp_add_button').click(function(e){
|
54 |
+
e.preventDefault();
|
55 |
+
jQuery('.cwp_hide_button2').show();
|
56 |
+
jQuery(this).hide();
|
57 |
+
return false;
|
58 |
+
})
|
59 |
+
|
60 |
Â
|
61 |
Â
|
62 |
Â
|
javascript/main.js
CHANGED
@@ -23,7 +23,8 @@ jQuery(document).ready(function($) {
|
|
23 |
Â
trackColorRight = '#ebebeb';
|
24 |
Â
}
|
25 |
Â
|
26 |
-
|
Â
|
|
27 |
Â
$('.cwp-review-percentage').cwp_easyPieChart({
|
28 |
Â
barColor: function(percent) {
|
29 |
Â
return returnColor(percent);
|
@@ -32,8 +33,9 @@ jQuery(document).ready(function($) {
|
|
32 |
Â
scaleColor: false,
|
33 |
Â
lineCap: 'butt',
|
34 |
Â
rotate: 0,
|
35 |
-
lineWidth: 15,
|
36 |
Â
animate: 1,
|
Â
|
|
37 |
Â
onStep: function(value) {
|
38 |
Â
var c = returnColor(value);
|
39 |
Â
|
@@ -92,11 +94,12 @@ jQuery(document).ready(function($) {
|
|
92 |
Â
$(this).slider({
|
93 |
Â
min: 0,
|
94 |
Â
max: 100,
|
95 |
-
value:
|
96 |
Â
slide: function(event, ui) {
|
97 |
Â
$(comm_meta_input).val(ui.value / 10);
|
98 |
Â
}
|
99 |
Â
});
|
100 |
Â
});
|
Â
|
|
101 |
Â
|
102 |
Â
});
|
23 |
Â
trackColorRight = '#ebebeb';
|
24 |
Â
}
|
25 |
Â
|
26 |
+
p_image_width = $('.review-wrap-up .rev-wu-image').width();
|
27 |
+
if (p_image_width==0 || p_image_width==null) p_image_width = 50;
|
28 |
Â
$('.cwp-review-percentage').cwp_easyPieChart({
|
29 |
Â
barColor: function(percent) {
|
30 |
Â
return returnColor(percent);
|
33 |
Â
scaleColor: false,
|
34 |
Â
lineCap: 'butt',
|
35 |
Â
rotate: 0,
|
36 |
+
lineWidth: 15 * Math.min(p_image_width,150)/140,
|
37 |
Â
animate: 1,
|
38 |
+
size : Math.min(p_image_width,150)*0.8,
|
39 |
Â
onStep: function(value) {
|
40 |
Â
var c = returnColor(value);
|
41 |
Â
|
94 |
Â
$(this).slider({
|
95 |
Â
min: 0,
|
96 |
Â
max: 100,
|
97 |
+
value: 4,
|
98 |
Â
slide: function(event, ui) {
|
99 |
Â
$(comm_meta_input).val(ui.value / 10);
|
100 |
Â
}
|
101 |
Â
});
|
102 |
Â
});
|
103 |
+
|
104 |
Â
|
105 |
Â
});
|
readme.txt
CHANGED
@@ -1,248 +1,286 @@
|
|
1 |
-
=== Plugin Name ===
|
2 |
-
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
|
3 |
-
Tags: review, rating, posts, widget, review blogger, review blogging, affiliate, product reviews,plugin, google rating, product review, rating, review, star rating, user rating, wp rating, wp review, google, hreview,rich snippets,seo,snippet
|
4 |
-
Author URI:
|
5 |
-
Requires at least: 3.5
|
6 |
-
Tested up to: 4.4.
|
7 |
-
Stable tag: trunk
|
8 |
-
License: GPLv2 or later
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
-
|
11 |
-
|
12 |
-
Easily turn your basic posts into in-depth reviews with ratings, pros and cons, affiliate links, rich snippets and user reviews.
|
13 |
-
== Description ==
|
14 |
-
|
15 |
-
|
16 |
-
> If you want to see a live demo of the review plugin + rich snippets you can check <a href="http://
|
17 |
-
|
18 |
-
|
19 |
-
### Why to get the PRO add-ons ?
|
20 |
-
|
21 |
-
Using the add-ons you will unleash the most important functionality : SHORTCODE . Using something like : [P_REVIEW post_id=3067 visual='full'] you are able to display the review box anywhere in the post, or you can even display 5 boxes in the same page (different products).
|
22 |
-
|
23 |
-
Other notable features :
|
24 |
-
|
25 |
-
* Custom Review Icons
|
26 |
-
* Preloader functionality
|
27 |
-
* Unlimited Options
|
28 |
-
* PROs/ Cons
|
29 |
-
|
30 |
-
### Knowledgebase
|
31 |
-
|
32 |
-
1. How to change the html format of the review name -> http://docs.themeisle.com/article/130-how-to-change-the-html-format-of-the-review-name
|
33 |
-
2. How to change dynamically the name of the review -> http://docs.themeisle.com/article/131-how-to-change-dynamically-the-name-of-the-review
|
34 |
-
3. How to change dynamically the option name format -> http://docs.themeisle.com/article/132-how-to-change-dynamically-the-option-name-format
|
35 |
-
4. How to change dynamically the pros/cons heading text -> http://docs.themeisle.com/article/133-how-to-change-dynamically-the-pros-cons-heading-text
|
36 |
-
5. How to change dynamically the image size for review -> http://docs.themeisle.com/article/135-how-to-change-dynamically-the-image-size-for-review
|
37 |
-
|
38 |
-
|
39 |
-
### User Review Enabled
|
40 |
-
|
41 |
-
1. This review plugin helps you to interact with your users with improved comments, you can expose your reviews in a easier to read way and will help you generate money by adding a buy now button in your post. Rich snippets are also supported.
|
42 |
-
|
43 |
-
1. After you install the plugin, go on a post admin page and you should be able to see a checkbox called : "Is this post a review ?", once this is checked you can add review details and those will appear on the post page.
|
44 |
-
|
45 |
-
1. If you want to to edit the colors, enable/disable the affiliate button, change icons go on the plugin options page.
|
46 |
-
|
47 |
-
1. All the plugin settings/colors are fully customizable, and you can read more about it <a rel="friend" href="https://themeisle.com/plugins/wp-product-review-lite/?utm_source=wpreadme&utm_medium=readme&utm_campaign=wporg">here</a>
|
48 |
-
|
49 |
-
1. For updates follow https://twitter.com/themeisle.
|
50 |
-
|
51 |
-
If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-wordpress-hosting/" rel="friend">fastest WordPress hosting</a> or which <a href="http://www.codeinwp.com/blog/15-best-wordpress-review-themes/" rel="friend">review themes</a> are playing nice with WP Product review, checkout our blog.
|
52 |
-
|
53 |
-
|
54 |
-
**Fortcoming**
|
55 |
-
|
56 |
-
- Direct amazon integration
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
-
|
63 |
-
-
|
64 |
-
- Add
|
65 |
-
- Add
|
66 |
-
- Add
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
*
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
-
|
102 |
-
|
103 |
-
**New in 2.
|
104 |
-
|
105 |
-
-
|
106 |
-
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
-
|
112 |
-
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
- Fixed
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
- Fixed
|
124 |
-
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
-
|
130 |
-
|
131 |
-
|
132 |
-
**New in
|
133 |
-
|
134 |
-
-
|
135 |
-
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
**New in
|
142 |
-
|
143 |
-
- Fixed
|
144 |
-
- Fixed
|
145 |
-
|
146 |
-
|
147 |
-
**New in
|
148 |
-
|
149 |
-
- Added
|
150 |
-
- Fixed
|
151 |
-
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
-
|
164 |
-
-
|
165 |
-
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
-
|
173 |
-
- Fixed
|
174 |
-
- Fixed
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
- Fixed
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
-
|
190 |
-
|
191 |
-
-
|
192 |
-
- Added
|
193 |
-
|
194 |
-
**New in v2.
|
195 |
-
|
196 |
-
- Fixed
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
=== Plugin Name ===
|
2 |
+
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
|
3 |
+
Tags: review, rating, posts, widget, review blogger, review blogging, affiliate, product reviews,plugin, google rating, product review, rating, review, star rating, user rating, wp rating, wp review, google, hreview,rich snippets,seo,snippet
|
4 |
+
Author URI: http://themeisle.com
|
5 |
+
Requires at least: 3.5
|
6 |
+
Tested up to: 4.4.2
|
7 |
+
Stable tag: trunk
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
|
12 |
+
Easily turn your basic posts into in-depth reviews with ratings, pros and cons, affiliate links, rich snippets and user reviews.
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
|
16 |
+
> If you want to see a live demo of the review plugin + rich snippets you can check <a href="http://demo.themeisle.com/parallax-one/wp-product-review/">http://demo.themeisle.com/parallax-one/wp-product-review/</a>.
|
17 |
+
|
18 |
+
|
19 |
+
### Why to get the PRO add-ons ?
|
20 |
+
|
21 |
+
Using the add-ons you will unleash the most important functionality : SHORTCODE . Using something like : [P_REVIEW post_id=3067 visual='full'] you are able to display the review box anywhere in the post, or you can even display 5 boxes in the same page (different products).
|
22 |
+
|
23 |
+
Other notable features :
|
24 |
+
|
25 |
+
* Custom Review Icons
|
26 |
+
* Preloader functionality
|
27 |
+
* Unlimited Options
|
28 |
+
* PROs/ Cons
|
29 |
+
|
30 |
+
### Knowledgebase
|
31 |
+
|
32 |
+
1. How to change the html format of the review name -> http://docs.themeisle.com/article/130-how-to-change-the-html-format-of-the-review-name
|
33 |
+
2. How to change dynamically the name of the review -> http://docs.themeisle.com/article/131-how-to-change-dynamically-the-name-of-the-review
|
34 |
+
3. How to change dynamically the option name format -> http://docs.themeisle.com/article/132-how-to-change-dynamically-the-option-name-format
|
35 |
+
4. How to change dynamically the pros/cons heading text -> http://docs.themeisle.com/article/133-how-to-change-dynamically-the-pros-cons-heading-text
|
36 |
+
5. How to change dynamically the image size for review -> http://docs.themeisle.com/article/135-how-to-change-dynamically-the-image-size-for-review
|
37 |
+
|
38 |
+
|
39 |
+
### User Review Enabled
|
40 |
+
|
41 |
+
1. This review plugin helps you to interact with your users with improved comments, you can expose your reviews in a easier to read way and will help you generate money by adding a buy now button in your post. Rich snippets are also supported.
|
42 |
+
|
43 |
+
1. After you install the plugin, go on a post admin page and you should be able to see a checkbox called : "Is this post a review ?", once this is checked you can add review details and those will appear on the post page.
|
44 |
+
|
45 |
+
1. If you want to to edit the colors, enable/disable the affiliate button, change icons go on the plugin options page.
|
46 |
+
|
47 |
+
1. All the plugin settings/colors are fully customizable, and you can read more about it <a rel="friend" href="https://themeisle.com/plugins/wp-product-review-lite/?utm_source=wpreadme&utm_medium=readme&utm_campaign=wporg">here</a>
|
48 |
+
|
49 |
+
1. For updates follow https://twitter.com/themeisle.
|
50 |
+
|
51 |
+
If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-wordpress-hosting/" rel="friend">fastest WordPress hosting</a> or which <a href="http://www.codeinwp.com/blog/15-best-wordpress-review-themes/" rel="friend">review themes</a> are playing nice with WP Product review, checkout our blog.
|
52 |
+
|
53 |
+
|
54 |
+
**Fortcoming**
|
55 |
+
|
56 |
+
- Direct amazon integration
|
57 |
+
|
58 |
+
|
59 |
+
**WP Product Review provides following features**
|
60 |
+
|
61 |
+
- Create a top products review widget
|
62 |
+
- Easily update all the colors of the widget from theme options
|
63 |
+
- Add a download button in the posts
|
64 |
+
- Add an awesome wrap-up widget at the end of your articles
|
65 |
+
- Add specific user review options to wordpress comments
|
66 |
+
- Add rich snippet ( schema ) to your posts
|
67 |
+
|
68 |
+
= Translations =
|
69 |
+
|
70 |
+
* sk_SK translation by Patrik Žec (PATWIST) of http://patwist.com
|
71 |
+
* fr_FR translation by Jacques Soule of http://wordpress-pour-vous.com/
|
72 |
+
|
73 |
+
== Changelog ==
|
74 |
+
|
75 |
+
**New in 2.8.0**
|
76 |
+
|
77 |
+
- Added a filter for price issues
|
78 |
+
|
79 |
+
**New in 2.7.9**
|
80 |
+
|
81 |
+
- Added support for amazon import in the pro version
|
82 |
+
|
83 |
+
**New in 2.7.8**
|
84 |
+
|
85 |
+
- Fixed price issues when . is present
|
86 |
+
|
87 |
+
**New in 2.7.7**
|
88 |
+
|
89 |
+
- Re-worked rich snippets (Added main Thing Object as Product, added Offers and improved review / aggregateRating)
|
90 |
+
|
91 |
+
**New in 2.7.6**
|
92 |
+
|
93 |
+
- Fixed empty inputs on comments and saving of non-reviews post metas
|
94 |
+
- Fixed circles widget issue
|
95 |
+
|
96 |
+
**New in 2.7.5**
|
97 |
+
|
98 |
+
- Fixed WP_query issue in the wp backed
|
99 |
+
- Added a minium content_width, since some themes set this wrong
|
100 |
+
- Fixed responsive issues when content_width is set
|
101 |
+
- Fixed circles widget issue
|
102 |
+
|
103 |
+
**New in 2.7.3**
|
104 |
+
|
105 |
+
- Improved layout based on $content_width so make sure this is set correctly
|
106 |
+
- Improved some settings description
|
107 |
+
- Fixed lightbox image logic
|
108 |
+
- Open image affiliate link in new tab
|
109 |
+
- Fixed various issues with comment sliders
|
110 |
+
- Pre-fill features from the latest edited post in the same category
|
111 |
+
- Pre-fill image settings and aff_button text from latest edited post in the same category
|
112 |
+
- Optimize the space on post review metaboxes
|
113 |
+
|
114 |
+
**New in 2.7.2**
|
115 |
+
|
116 |
+
- Fixed design issues in comments slider
|
117 |
+
- Fixed enque of media files when review is not available
|
118 |
+
- Fixed alt tags for images in the widgets
|
119 |
+
|
120 |
+
**New in 2.7.1**
|
121 |
+
|
122 |
+
- Fixed some design issues.
|
123 |
+
- Fixed rating problem on some instalation when display the numerator greater than denominator
|
124 |
+
- Added wppr_review_image_size for filter the image size;
|
125 |
+
|
126 |
+
|
127 |
+
**New in 2.7**
|
128 |
+
|
129 |
+
- Fixed responsive design bugs.
|
130 |
+
- Fixed border color and width customization for the review box
|
131 |
+
|
132 |
+
**New in 2.6.9**
|
133 |
+
|
134 |
+
- Improved design of the featured image
|
135 |
+
- Added filters heading tags for review name, option name, pros headings and cons headings.
|
136 |
+
|
137 |
+
**New in 2.6.8**
|
138 |
+
|
139 |
+
- Improved responsive design of the review
|
140 |
+
|
141 |
+
**New in 2.6.7**
|
142 |
+
|
143 |
+
- Fixed issue with rating value when visitator influence is off
|
144 |
+
- Fixed issue with auto optimization plugins
|
145 |
+
|
146 |
+
|
147 |
+
**New in v.2.6.6**
|
148 |
+
|
149 |
+
- Added option to remove loading of Font Awesome for websites that already enque it.
|
150 |
+
- Fixed microtags when is 0% visitator influence.
|
151 |
+
- Fixed multiple display of review where <!--nextpage--> quick tag is used.
|
152 |
+
|
153 |
+
|
154 |
+
**New in v.2.6.4**
|
155 |
+
|
156 |
+
- Fixed layout problem with widgets on some themes
|
157 |
+
- Added new image size for widgets 'wppr_widget_image' for 50x50. ( Requires thumbnail regeneration to use it )
|
158 |
+
|
159 |
+
**New in v.2.6.3**
|
160 |
+
|
161 |
+
- Fixed custom icons bug
|
162 |
+
- Fixed sorting order to top products widget
|
163 |
+
- Added 100% influence on visitators rating
|
164 |
+
- Added rel="nofollow" for img link
|
165 |
+
- Fixed bug for password protected reviews.
|
166 |
+
- Fixed long text for product titles in widgets
|
167 |
+
- Removed unecessary css
|
168 |
+
|
169 |
+
|
170 |
+
**New in v.2.6.2**
|
171 |
+
|
172 |
+
- Added thumbnails for reviews
|
173 |
+
- Fixed bug when no image is set for reviews
|
174 |
+
- Fixed reset button for product options
|
175 |
+
- Added option to disable lightbox for review image
|
176 |
+
|
177 |
+
|
178 |
+
|
179 |
+
**New in v.2.6.1**
|
180 |
+
|
181 |
+
- Fixed rich snippet bug
|
182 |
+
- Fixed loading of the assets files where the plugin is not used
|
183 |
+
|
184 |
+
|
185 |
+
**New in v2.5.2**
|
186 |
+
|
187 |
+
- Added multiple addons including ranking chart
|
188 |
+
- Fixed image in post issue
|
189 |
+
- Improved preloader logic
|
190 |
+
|
191 |
+
- Fixed issue with more than 5 options
|
192 |
+
- Added ability to modify the chart color
|
193 |
+
|
194 |
+
**New in v2.4.7**
|
195 |
+
|
196 |
+
- Fixed issue with more than 5 options
|
197 |
+
- Added ability to modify the chart color
|
198 |
+
|
199 |
+
**New in v2.4.5**
|
200 |
+
|
201 |
+
- Fixed the image affiliate link issue
|
202 |
+
- Improved responsive for the review box
|
203 |
+
- Now you can place the review box manually using php or shortcode
|
204 |
+
|
205 |
+
**New in v2.4.3**
|
206 |
+
|
207 |
+
- Added multiple options/ pros/ cons
|
208 |
+
- Fixed rich snippet issue
|
209 |
+
- Improved image linking
|
210 |
+
- Removed sticky posts
|
211 |
+
- Fixed Aff button2 link/text
|
212 |
+
- Fixed js errors
|
213 |
+
|
214 |
+
**New in v2.4.2**
|
215 |
+
|
216 |
+
- Fixed latest widget issue
|
217 |
+
- Added possibility of having 2 affiliate buttons
|
218 |
+
|
219 |
+
- Fixed js errors
|
220 |
+
|
221 |
+
**New in v2.4.1**
|
222 |
+
|
223 |
+
- Fixed division by zero
|
224 |
+
|
225 |
+
**New in v2.4**
|
226 |
+
|
227 |
+
- Added image and product title options in widget
|
228 |
+
- Added lightbox on product review image, that preload image from the featured image
|
229 |
+
- User is now able to select in admin how much user reviews will influence the main rating
|
230 |
+
- Added [P_REVIEW post_id=3067 visual="yes"] shortcode in the PRO version, without visual attribute only the rating is displayed
|
231 |
+
|
232 |
+
**New in v2.3**
|
233 |
+
|
234 |
+
- Fixed js errors
|
235 |
+
|
236 |
+
**New in v2.29**
|
237 |
+
|
238 |
+
- Fixed upgrade to pro issue
|
239 |
+
|
240 |
+
**New in v2.28**
|
241 |
+
|
242 |
+
- Fixed translation issues
|
243 |
+
- Added custom icons
|
244 |
+
- Added price attribute
|
245 |
+
|
246 |
+
== Installation ==
|
247 |
+
|
248 |
+
Following are the steps to install the WP Product Review
|
249 |
+
|
250 |
+
1. Download the latest version of the WP Product Review to your computer from here.
|
251 |
+
2. With an FTP program, access your site?s server.
|
252 |
+
3. Upload (copy) the Plugin file(s) or folder to the /wp-content/plugins folder.
|
253 |
+
4. In your WordPress Administration Panels, click on Plugins from the menu.
|
254 |
+
5. You should see WP Product Review Plugin listed. If not, with your FTP program, check the folder to see if it is installed. If it isn?t, upload the file(s) again. If it is, delete the files and upload them again.
|
255 |
+
6. To turn the WP Product Review on, click Activate.
|
256 |
+
7. Check your Administration Panels or WordPress blog to see if the Plugin is working.
|
257 |
+
8. You can change the plugin options from Tweet Old Posts under settings menu.
|
258 |
+
|
259 |
+
Alternatively you can also follow the following steps to install the WP Product Review plugin
|
260 |
+
|
261 |
+
1. In your WordPress Administration Panels, click on Add New option under Plugins from the menu.
|
262 |
+
2. Click on upload at the top.
|
263 |
+
3. Browse the location and select the WP Product Review Plugin and click install now.
|
264 |
+
4. To turn the WP Product Review Plugin on, click Activate.
|
265 |
+
5. Check your Administration Panels or WordPress blog to see if the Plugin is working.
|
266 |
+
6. You can change the plugin options from Tweet Old Posts under settings menu.
|
267 |
+
|
268 |
+
== Frequently Asked Questions ==
|
269 |
+
|
270 |
+
1. How to activate user reviews ?
|
271 |
+
|
272 |
+
By default user reviews are disabled since not all the themes are compatible with this option due to different designs for the comment box. You can easily activate them from General Settings
|
273 |
+
|
274 |
+
If you have any questions please get in touch with us at,
|
275 |
+
https://themeisle.com/contact
|
276 |
+
|
277 |
+
== Screenshots ==
|
278 |
+
|
279 |
+
1. Screenshot 1 Wrap-up review widget that is added at the end of the posts
|
280 |
+
2. Screenshot 2 User Review Options added to wp comments
|
281 |
+
3. Screenshot 3 Fully configurable theme options
|
282 |
+
4. Screenshot 4 Rich Snippets displayed in Google
|
283 |
+
|
284 |
+
for more you can check out
|
285 |
+
|
286 |
+
https://themeisle.com/plugins/wp-product-review-lite/
|
wp-product-review.php
CHANGED
@@ -1,40 +1,40 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Main loader file
|
4 |
-
*
|
5 |
-
* @package WPPR
|
6 |
-
* @author ThemeIsle
|
7 |
-
* @since 1.0.0
|
8 |
-
*
|
9 |
-
*
|
10 |
-
* Plugin Name: WP Product Review
|
11 |
-
* Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
|
12 |
-
* Version: 2.
|
13 |
-
* Author: Themeisle
|
14 |
-
* Author URI: https://themeisle.com/
|
15 |
-
* Plugin URI: https://themeisle.com/plugins/wp-product-review-lite/
|
16 |
-
* Requires at least: 3.5
|
17 |
-
* Tested up to: 4.3
|
18 |
-
* Stable tag: trunk
|
19 |
-
* License: GPLv2 or later
|
20 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
21 |
-
* Text Domain: cwppos
|
22 |
-
* Domain Path: /languages
|
23 |
-
*/
|
24 |
-
|
25 |
-
define( 'WPPR_LITE_VERSION','2.
|
26 |
-
define( 'WPPR_PATH',dirname( __FILE__ ) );
|
27 |
-
define( 'WPPR_URL',plugins_url( 'wp-product-review' ) );
|
28 |
-
|
29 |
-
if ( wp_get_theme() !== 'Reviewgine Affiliate PRO' ) {
|
30 |
-
include 'admin/functions.php';
|
31 |
-
include 'inc/wppr-filters.php';
|
32 |
-
include 'inc/cwp_metabox.php';
|
33 |
-
include 'inc/cwp_frontpage.php';
|
34 |
-
include 'inc/cwp_top_products_widget.php';
|
35 |
-
include 'inc/cwp_latest_products_widget.php';
|
36 |
-
include 'inc/cwp_comment.php';
|
37 |
-
include 'inc/cwp_js_preloader.php';
|
38 |
-
include 'inc/cwp-addons.php';
|
39 |
-
include 'inc/wppr-main.php';
|
40 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Main loader file
|
4 |
+
*
|
5 |
+
* @package WPPR
|
6 |
+
* @author ThemeIsle
|
7 |
+
* @since 1.0.0
|
8 |
+
*
|
9 |
+
*
|
10 |
+
* Plugin Name: WP Product Review
|
11 |
+
* Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
|
12 |
+
* Version: 2.8.0
|
13 |
+
* Author: Themeisle
|
14 |
+
* Author URI: https://themeisle.com/
|
15 |
+
* Plugin URI: https://themeisle.com/plugins/wp-product-review-lite/
|
16 |
+
* Requires at least: 3.5
|
17 |
+
* Tested up to: 4.3
|
18 |
+
* Stable tag: trunk
|
19 |
+
* License: GPLv2 or later
|
20 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
21 |
+
* Text Domain: cwppos
|
22 |
+
* Domain Path: /languages
|
23 |
+
*/
|
24 |
+
|
25 |
+
define( 'WPPR_LITE_VERSION','2.8.0' );
|
26 |
+
define( 'WPPR_PATH',dirname( __FILE__ ) );
|
27 |
+
define( 'WPPR_URL',plugins_url( 'wp-product-review' ) );
|
28 |
+
|
29 |
+
if ( wp_get_theme() !== 'Reviewgine Affiliate PRO' ) {
|
30 |
+
include 'admin/functions.php';
|
31 |
+
include 'inc/wppr-filters.php';
|
32 |
+
include 'inc/cwp_metabox.php';
|
33 |
+
include 'inc/cwp_frontpage.php';
|
34 |
+
include 'inc/cwp_top_products_widget.php';
|
35 |
+
include 'inc/cwp_latest_products_widget.php';
|
36 |
+
include 'inc/cwp_comment.php';
|
37 |
+
include 'inc/cwp_js_preloader.php';
|
38 |
+
include 'inc/cwp-addons.php';
|
39 |
+
include 'inc/wppr-main.php';
|
40 |
+
}
|