Version Description
- Fixed shortcode
Download this release
Release Info
Developer | spwebguy |
Plugin | Responsive Pricing Table |
Version | 4.2.1 |
Comparing to | |
See all releases |
Code changes from version 4.2 to 4.2.1
- inc/rpt-metaboxes.php +75 -70
- readme.txt +14 -11
- rpt.php +147 -146
inc/rpt-metaboxes.php
CHANGED
@@ -9,12 +9,17 @@ function rpt_register_group_metabox() {
|
|
9 |
return wp_kses_post( $content );
|
10 |
}
|
11 |
|
|
|
|
|
|
|
|
|
|
|
12 |
$prefix = '_rpt_';
|
13 |
|
14 |
// Tables group
|
15 |
$main_group = new_cmb2_box( array(
|
16 |
'id' => $prefix . 'plan_metabox',
|
17 |
-
'title' => '<span style="font-weight:400;">'.__( 'Manage Plans', 'responsive-pricing-table' ).'</span> <a target="_blank" class="wpd_free_pro" title="'.__( 'Unlock more features with Responsive Pricing Table PRO!', 'responsive-pricing-table' ).'" href="http://wpdarko.com/items/responsive-pricing-table-pro"><span style="color:#8a7463;font-size:15px; font-weight:400; float:right; padding-right:14px;"><span class="dashicons dashicons-lock"></span> '.__( 'Free version', 'responsive-pricing-table' ).'</span></a>',
|
18 |
'object_types' => array( 'rpt_pricing_table' ),
|
19 |
));
|
20 |
|
@@ -22,23 +27,23 @@ function rpt_register_group_metabox() {
|
|
22 |
'id' => $prefix . 'plan_group',
|
23 |
'type' => 'group',
|
24 |
'options' => array(
|
25 |
-
'group_title' => __('Plan {#}', 'responsive-pricing-table' ),
|
26 |
-
'add_button' => __('Add another plan', 'responsive-pricing-table' ),
|
27 |
-
'remove_button' => __('Remove plan', 'responsive-pricing-table' ),
|
28 |
'sortable' => true,
|
29 |
'single' => false,
|
30 |
),
|
31 |
));
|
32 |
|
33 |
$main_group->add_group_field( $rpt_plan_group, array(
|
34 |
-
'name' => __( 'Plan header', 'responsive-pricing-table' ),
|
35 |
'id' => $prefix . 'head_header',
|
36 |
'type' => 'title',
|
37 |
'row_classes' => 'de_hundred de_heading',
|
38 |
));
|
39 |
|
40 |
$main_group->add_group_field( $rpt_plan_group, array(
|
41 |
-
'name' => __( 'Title', 'responsive-pricing-table' ),
|
42 |
'id' => $prefix . 'title',
|
43 |
'type' => 'text',
|
44 |
'row_classes' => 'de_first de_fifty de_text de_input',
|
@@ -46,7 +51,7 @@ function rpt_register_group_metabox() {
|
|
46 |
));
|
47 |
|
48 |
$main_group->add_group_field( $rpt_plan_group, array(
|
49 |
-
'name' => __( 'Subtitle', 'responsive-pricing-table' ),
|
50 |
'id' => $prefix . 'subtitle',
|
51 |
'type' => 'text',
|
52 |
'row_classes' => 'de_fifty de_text de_input',
|
@@ -54,7 +59,7 @@ function rpt_register_group_metabox() {
|
|
54 |
));
|
55 |
|
56 |
$main_group->add_group_field( $rpt_plan_group, array(
|
57 |
-
'name' => __( 'Recurrence', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'eg. \'per month/year\'', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
58 |
'id' => $prefix . 'recurrence',
|
59 |
'type' => 'text',
|
60 |
'row_classes' => 'de_first de_twentyfive de_text de_input',
|
@@ -62,7 +67,7 @@ function rpt_register_group_metabox() {
|
|
62 |
));
|
63 |
|
64 |
$main_group->add_group_field( $rpt_plan_group, array(
|
65 |
-
'name' => __( 'Price', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'No currency sign here (it can be set in the Settings tab)', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
66 |
'id' => $prefix . 'price',
|
67 |
'type' => 'text',
|
68 |
'row_classes' => 'de_twentyfive de_text de_input',
|
@@ -70,7 +75,7 @@ function rpt_register_group_metabox() {
|
|
70 |
));
|
71 |
|
72 |
$main_group->add_group_field( $rpt_plan_group, array(
|
73 |
-
'name' => __( 'Description', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Short text that will appear below the subtitle', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
74 |
'id' => $prefix . 'description',
|
75 |
'type' => 'text',
|
76 |
'row_classes' => 'de_fifty de_text de_input',
|
@@ -78,16 +83,16 @@ function rpt_register_group_metabox() {
|
|
78 |
));
|
79 |
|
80 |
$main_group->add_group_field( $rpt_plan_group, array(
|
81 |
-
'name' => __( 'Small icon', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Recommended:', 'responsive-pricing-table' ).' 30x30px"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
82 |
'id' => $prefix . 'icon',
|
83 |
'type' => 'file',
|
84 |
-
'options' => array('add_upload_file_text' => __( 'Upload', 'responsive-pricing-table' )),
|
85 |
'row_classes' => 'de_first de_hundred de_upload de_input',
|
86 |
));
|
87 |
|
88 |
$main_group->add_group_field( $rpt_plan_group, array(
|
89 |
-
'name' => __( 'Recommended plan', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Check this
|
90 |
-
'desc' => __( 'Mark as recommended', 'responsive-pricing-table' ),
|
91 |
'id' => $prefix . 'recommended',
|
92 |
'type' => 'checkbox',
|
93 |
'row_classes' => 'de_first de_fifty de_checkbox_side',
|
@@ -95,8 +100,8 @@ function rpt_register_group_metabox() {
|
|
95 |
));
|
96 |
|
97 |
$main_group->add_group_field( $rpt_plan_group, array(
|
98 |
-
'name' => __( 'Remove currency sign', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Check this to hide the currency sign (for free plans for example)', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
99 |
-
'desc' => __( 'Check to remove', 'responsive-pricing-table' ),
|
100 |
'id' => $prefix . 'free',
|
101 |
'type' => 'checkbox',
|
102 |
'row_classes' => 'de_fifty de_checkbox_side',
|
@@ -104,41 +109,41 @@ function rpt_register_group_metabox() {
|
|
104 |
));
|
105 |
|
106 |
$main_group->add_group_field( $rpt_plan_group, array(
|
107 |
-
'name' => __( 'Plan features', 'responsive-pricing-table' ),
|
108 |
'id' => $prefix . 'features_header',
|
109 |
'type' => 'title',
|
110 |
'row_classes' => 'de_hundred de_heading',
|
111 |
));
|
112 |
|
113 |
$main_group->add_group_field( $rpt_plan_group, array(
|
114 |
-
'name' => __( 'Feature list', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'One per line — Read the Tips & Tricks section for useful information', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
115 |
'id' => $prefix . 'features',
|
116 |
'type' => 'textarea',
|
117 |
'attributes' => array('rows' => 9),
|
118 |
'row_classes' => 'de_first de_fifty de_textarea de_input',
|
119 |
'sanitization_cb' => 'rpt_html_allowed_sani_cb',
|
120 |
'attributes' => array(
|
121 |
-
'placeholder' => __('One feature per line', 'responsive-pricing-table' ),
|
122 |
),
|
123 |
));
|
124 |
|
125 |
$main_group->add_group_field( $rpt_plan_group, array(
|
126 |
-
'name' => __( 'Tips & Tricks', 'responsive-pricing-table' ),
|
127 |
-
'desc' => '<span class="dashicons dashicons-yes"></span> '.__( 'Add images (not recommended)', 'responsive-pricing-table' ).'<br/><span style="color:#bbb;"><img src="http://yoursite.com/yourimage.png"/></span><br/><br/><span class="dashicons dashicons-yes"></span> '.__( 'Add links', 'responsive-pricing-table' ).'<br/><span style="color:#bbb;"><a href="http://yoursite.com">Go to yoursite.com</a></span><br/><br/><span class="dashicons dashicons-yes"></span> '.__( 'Add bold text', 'responsive-pricing-table' ).'<br/><span style="color:#bbb;"><strong>Something <strong>important</strong></strong></span><br/><br/><span class="dashicons dashicons-yes"></span> '.__( 'Show feature as unavailable with', 'responsive-pricing-table' ).' "-n"<br/><span style="color:#bbb;">-nMy feature</span>',
|
128 |
'id' => $prefix . 'features_desc',
|
129 |
'type' => 'title',
|
130 |
'row_classes' => 'de_fifty de_info',
|
131 |
));
|
132 |
|
133 |
$main_group->add_group_field( $rpt_plan_group, array(
|
134 |
-
'name' => __( 'Plan button...', 'responsive-pricing-table' ),
|
135 |
'id' => $prefix . 'button_header',
|
136 |
'type' => 'title',
|
137 |
'row_classes' => 'de_hundred de_heading',
|
138 |
));
|
139 |
|
140 |
$main_group->add_group_field( $rpt_plan_group, array(
|
141 |
-
'name' => __( 'Button text', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'eg. \'Sign up, Buy\'', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
142 |
'id' => $prefix . 'btn_text',
|
143 |
'type' => 'text',
|
144 |
'row_classes' => 'de_fifty de_text de_input',
|
@@ -146,7 +151,7 @@ function rpt_register_group_metabox() {
|
|
146 |
));
|
147 |
|
148 |
$main_group->add_group_field( $rpt_plan_group, array(
|
149 |
-
'name' => __( 'Button link', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'eg. \'http://anything.com\'', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
150 |
'id' => $prefix . 'btn_link',
|
151 |
'type' => 'text',
|
152 |
'row_classes' => 'de_fifty de_text de_input',
|
@@ -154,41 +159,41 @@ function rpt_register_group_metabox() {
|
|
154 |
));
|
155 |
|
156 |
$main_group->add_group_field( $rpt_plan_group, array(
|
157 |
-
'name' => __( '...or a custom button instead', 'responsive-pricing-table' ),
|
158 |
'id' => $prefix . 'cust_button_header',
|
159 |
'type' => 'title',
|
160 |
'row_classes' => 'de_hundred de_heading',
|
161 |
));
|
162 |
|
163 |
$main_group->add_group_field( $rpt_plan_group, array(
|
164 |
-
'name' => __( 'Custom button code', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'This field will overwrite the standard button fields', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
165 |
'id' => $prefix . 'btn_custom_btn',
|
166 |
'type' => 'textarea',
|
167 |
'attributes' => array('rows' => 9),
|
168 |
'row_classes' => 'de_first de_fifty de_textarea de_input',
|
169 |
-
'sanitization_cb' => '
|
170 |
'attributes' => array(
|
171 |
-
'placeholder' => __('Paste any button code here (Stripe, Paypal...)', 'responsive-pricing-table' ),
|
172 |
),
|
173 |
));
|
174 |
|
175 |
$main_group->add_group_field( $rpt_plan_group, array(
|
176 |
-
'name' => __( 'What is a custom button?', 'responsive-pricing-table' ),
|
177 |
-
'desc' => '<span class="dashicons dashicons-editor-help"></span> '.__( 'Custom buttons are provided by third-party payment plateforms to allow direct redirection to the payment page. Paypal, Stripe as well as many other companies will generate buying buttons for you.', 'responsive-pricing-table' ).' <br/><br/><span class="dashicons dashicons-admin-generic"></span> '.__( 'If you want your Pricing plan\'s footer to be replaced by a custom button, copy-paste the button code in this box. This will override the default button settings.', 'responsive-pricing-table' ).'<br/><br/>'.__( 'We do <strong>not</strong> recommend doing this as it may not always go well with the design.', 'responsive-pricing-table' ),
|
178 |
'id' => $prefix . 'custom_button_desc',
|
179 |
'type' => 'title',
|
180 |
'row_classes' => 'de_fifty de_info',
|
181 |
));
|
182 |
|
183 |
$main_group->add_group_field( $rpt_plan_group, array(
|
184 |
-
'name' => __( 'Plan styling', 'responsive-pricing-table' ),
|
185 |
'id' => $prefix . 'styling_desc',
|
186 |
'type' => 'title',
|
187 |
'row_classes' => 'de_hundred de_heading',
|
188 |
));
|
189 |
|
190 |
$main_group->add_group_field( $rpt_plan_group, array(
|
191 |
-
'name' => __( 'Color', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'This color will be used for several elements of the plan', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
192 |
'id' => $prefix . 'color',
|
193 |
'type' => 'colorpicker',
|
194 |
'default' => '#9fdb80',
|
@@ -199,33 +204,33 @@ function rpt_register_group_metabox() {
|
|
199 |
// Settings
|
200 |
$side_group = new_cmb2_box( array(
|
201 |
'id' => $prefix . 'settings_metabox',
|
202 |
-
'title' => '<span style="font-weight:400;">'.__( 'Settings', 'responsive-pricing-table' ).'</span>',
|
203 |
'object_types' => array( 'rpt_pricing_table' ),
|
204 |
'context' => 'side',
|
205 |
'priority' => 'high',
|
206 |
));
|
207 |
|
208 |
$side_group->add_field( array(
|
209 |
-
'name' => __( 'General settings', 'responsive-pricing-table' ),
|
210 |
'id' => $prefix . 'other_settings_desc',
|
211 |
'type' => 'title',
|
212 |
'row_classes' => 'de_hundred de_heading_side',
|
213 |
));
|
214 |
|
215 |
$side_group->add_field( array(
|
216 |
-
'name' => __( 'Change currency', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Add your currency sign here', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
217 |
'id' => $prefix . 'currency',
|
218 |
'type' => 'text',
|
219 |
'row_classes' => 'de_hundred de_text_side',
|
220 |
));
|
221 |
|
222 |
$side_group->add_field( array(
|
223 |
-
'name' => __( 'Links behavior', 'responsive-pricing-table' ),
|
224 |
'id' => $prefix . 'open_newwindow',
|
225 |
'type' => 'select',
|
226 |
'options' => array(
|
227 |
-
'currentwindow' => __( 'Open in current window', 'responsive-pricing-table' ),
|
228 |
-
'newwindow' => __( 'Open in new window/tab', 'responsive-pricing-table' ),
|
229 |
|
230 |
),
|
231 |
'default' => 'currentwindow',
|
@@ -233,8 +238,8 @@ function rpt_register_group_metabox() {
|
|
233 |
));
|
234 |
|
235 |
$side_group->add_field( array(
|
236 |
-
'name' => __( 'Force original fonts', 'responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Check this to use the plugin\'s font instead of your theme\'s', 'responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
237 |
-
'desc' => __( 'Check to enable', 'responsive-pricing-table' ),
|
238 |
'id' => $prefix . 'original_font',
|
239 |
'type' => 'checkbox',
|
240 |
'row_classes' => 'de_hundred de_checkbox_side',
|
@@ -244,95 +249,95 @@ function rpt_register_group_metabox() {
|
|
244 |
|
245 |
$side_group->add_field( array(
|
246 |
'name' => '',
|
247 |
-
'desc' => '<a id="rpt_font_sett_button" style="margin-top:-10px; cursor:pointer;"><span class="dashicons dashicons-admin-settings"></span> '.__( 'Adjust font sizes', 'responsive-pricing-table' ).'</a>',
|
248 |
'id' => $prefix . 'pro_desc',
|
249 |
'type' => 'title',
|
250 |
'row_classes' => 'de_hundred de_info de_info_side',
|
251 |
));
|
252 |
|
253 |
$side_group->add_field( array(
|
254 |
-
'name' => __( 'Title', 'responsive-pricing-table' ),
|
255 |
'id' => $prefix . 'title_fontsize',
|
256 |
'type' => 'select',
|
257 |
'options' => array(
|
258 |
-
'tiny' => __( 'Tiny', 'responsive-pricing-table' ),
|
259 |
-
'small' => __( 'Small', 'responsive-pricing-table' ),
|
260 |
-
'normal' => __( 'Normal', 'responsive-pricing-table' ),
|
261 |
),
|
262 |
'default' => 'normal',
|
263 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
264 |
));
|
265 |
|
266 |
$side_group->add_field( array(
|
267 |
-
'name' => __( 'Subtitle', 'responsive-pricing-table' ),
|
268 |
'id' => $prefix . 'subtitle_fontsize',
|
269 |
'type' => 'select',
|
270 |
'options' => array(
|
271 |
-
'tiny' => __( 'Tiny', 'responsive-pricing-table' ),
|
272 |
-
'small' => __( 'Small', 'responsive-pricing-table' ),
|
273 |
-
'normal' => __( 'Normal', 'responsive-pricing-table' ),
|
274 |
),
|
275 |
'default' => 'normal',
|
276 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
277 |
));
|
278 |
|
279 |
$side_group->add_field( array(
|
280 |
-
'name' => __( 'Description', 'responsive-pricing-table' ),
|
281 |
'id' => $prefix . 'description_fontsize',
|
282 |
'type' => 'select',
|
283 |
'options' => array(
|
284 |
-
'small' => __( 'Small', 'responsive-pricing-table' ),
|
285 |
-
'normal' => __( 'Normal', 'responsive-pricing-table' ),
|
286 |
),
|
287 |
'default' => 'normal',
|
288 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
289 |
));
|
290 |
|
291 |
$side_group->add_field( array(
|
292 |
-
'name' => __( 'Price', 'responsive-pricing-table' ),
|
293 |
'id' => $prefix . 'price_fontsize',
|
294 |
'type' => 'select',
|
295 |
'options' => array(
|
296 |
-
'supertiny' => __( 'Tiny', 'responsive-pricing-table' ),
|
297 |
-
'tiny' => __( 'Small', 'responsive-pricing-table' ),
|
298 |
-
'small' => __( 'Normal', 'responsive-pricing-table' ),
|
299 |
-
'normal' => __( 'Big', 'responsive-pricing-table' ),
|
300 |
),
|
301 |
'default' => 'normal',
|
302 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
303 |
));
|
304 |
|
305 |
$side_group->add_field( array(
|
306 |
-
'name' => __( 'Recurrence', 'responsive-pricing-table' ),
|
307 |
'id' => $prefix . 'recurrence_fontsize',
|
308 |
'type' => 'select',
|
309 |
'options' => array(
|
310 |
-
'small' => __( 'Small', 'responsive-pricing-table' ),
|
311 |
-
'normal' => __( 'Normal', 'responsive-pricing-table' ),
|
312 |
),
|
313 |
'default' => 'normal',
|
314 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
315 |
));
|
316 |
|
317 |
$side_group->add_field( array(
|
318 |
-
'name' => __( 'Button', 'responsive-pricing-table' ),
|
319 |
'id' => $prefix . 'button_fontsize',
|
320 |
'type' => 'select',
|
321 |
'options' => array(
|
322 |
-
'small' => __( 'Small', 'responsive-pricing-table' ),
|
323 |
-
'normal' => __( 'Normal', 'responsive-pricing-table' ),
|
324 |
),
|
325 |
'default' => 'normal',
|
326 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
327 |
));
|
328 |
|
329 |
$side_group->add_field( array(
|
330 |
-
'name' => __( 'Features', 'responsive-pricing-table' ),
|
331 |
'id' => $prefix . 'features_fontsize',
|
332 |
'type' => 'select',
|
333 |
'options' => array(
|
334 |
-
'small' => __( 'Small', 'responsive-pricing-table' ),
|
335 |
-
'normal' => __( 'Normal', 'responsive-pricing-table' ),
|
336 |
),
|
337 |
'default' => 'normal',
|
338 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
@@ -340,8 +345,8 @@ function rpt_register_group_metabox() {
|
|
340 |
|
341 |
|
342 |
$main_group->add_field( array(
|
343 |
-
'name' => '<span style="font-weight:400; color:#8a7463;">'.__( 'Up to 5 plans', 'responsive-pricing-table').'</span>',
|
344 |
-
'desc' => '<span class="dashicons dashicons-flag"></span> '.__( 'You can add up to 5 plans per Pricing Table.', 'responsive-pricing-table').'<br/> '.__( 'Adding more than that will result in display issues.', 'responsive-pricing-table'),
|
345 |
'id' => $prefix . 'max',
|
346 |
'type' => 'title',
|
347 |
'row_classes' => 'de_hundred de_instructions',
|
@@ -370,7 +375,7 @@ function rpt_register_group_metabox() {
|
|
370 |
// Help
|
371 |
$help_group = new_cmb2_box( array(
|
372 |
'id' => $prefix . 'help_metabox',
|
373 |
-
'title' => '<span style="font-weight:400;">'.__( 'Help & Support', 'responsive-pricing-table' ).'</span>',
|
374 |
'object_types' => array( 'rpt_pricing_table' ),
|
375 |
'context' => 'side',
|
376 |
'priority' => 'low',
|
@@ -379,7 +384,7 @@ function rpt_register_group_metabox() {
|
|
379 |
|
380 |
$help_group->add_field( array(
|
381 |
'name' => '',
|
382 |
-
'desc' => '<span style="font-size:15px;">'.__( 'Display your Pricing Table', 'responsive-pricing-table' ).'</span><br/><br/>'.__( 'To display your Pricing Table on your site, copy-paste the <strong>[Shortcode]</strong> in your post/page. You can find this shortcode by clicking <strong>All Pricing Tables</strong> in the menu on the left.', 'responsive-pricing-table' ).'<br/><br/><span style="font-size:15px;">'.__( 'Get support', 'responsive-pricing-table' ).'</span><br/><br/><a style="font-size:13px !important;" target="_blank" href="http://wpdarko.com/support/">— '.__( 'Submit a ticket', 'responsive-pricing-table' ).'</a><br/><a style="font-size:13px !important;" target="_blank" href="https://wpdarko.zendesk.com/hc/en-us/articles/206303517-Get-started-with-the-Responsive-Pricing-Table-plugin">— '.__( 'View documentation', 'responsive-pricing-table' ).'</a>',
|
383 |
'id' => $prefix . 'help_desc',
|
384 |
'type' => 'title',
|
385 |
'row_classes' => 'de_hundred de_info de_info_side',
|
9 |
return wp_kses_post( $content );
|
10 |
}
|
11 |
|
12 |
+
/* Custom sanitization call-back for custom button field */
|
13 |
+
function rpt_custom_button_sani_cb($content) {
|
14 |
+
return balanceTags( $content, true );
|
15 |
+
}
|
16 |
+
|
17 |
$prefix = '_rpt_';
|
18 |
|
19 |
// Tables group
|
20 |
$main_group = new_cmb2_box( array(
|
21 |
'id' => $prefix . 'plan_metabox',
|
22 |
+
'title' => '<span style="font-weight:400;">'.__( 'Manage Plans', 'dk-pricr-responsive-pricing-table' ).'</span> <a target="_blank" class="wpd_free_pro" title="'.__( 'Unlock more features with Responsive Pricing Table PRO!', 'dk-pricr-responsive-pricing-table' ).'" href="http://wpdarko.com/items/responsive-pricing-table-pro"><span style="color:#8a7463;font-size:15px; font-weight:400; float:right; padding-right:14px;"><span class="dashicons dashicons-lock"></span> '.__( 'Free version', 'dk-pricr-responsive-pricing-table' ).'</span></a>',
|
23 |
'object_types' => array( 'rpt_pricing_table' ),
|
24 |
));
|
25 |
|
27 |
'id' => $prefix . 'plan_group',
|
28 |
'type' => 'group',
|
29 |
'options' => array(
|
30 |
+
'group_title' => __('Plan {#}', 'dk-pricr-responsive-pricing-table' ),
|
31 |
+
'add_button' => __('Add another plan', 'dk-pricr-responsive-pricing-table' ),
|
32 |
+
'remove_button' => __('Remove plan', 'dk-pricr-responsive-pricing-table' ),
|
33 |
'sortable' => true,
|
34 |
'single' => false,
|
35 |
),
|
36 |
));
|
37 |
|
38 |
$main_group->add_group_field( $rpt_plan_group, array(
|
39 |
+
'name' => __( 'Plan header', 'dk-pricr-responsive-pricing-table' ),
|
40 |
'id' => $prefix . 'head_header',
|
41 |
'type' => 'title',
|
42 |
'row_classes' => 'de_hundred de_heading',
|
43 |
));
|
44 |
|
45 |
$main_group->add_group_field( $rpt_plan_group, array(
|
46 |
+
'name' => __( 'Title', 'dk-pricr-responsive-pricing-table' ),
|
47 |
'id' => $prefix . 'title',
|
48 |
'type' => 'text',
|
49 |
'row_classes' => 'de_first de_fifty de_text de_input',
|
51 |
));
|
52 |
|
53 |
$main_group->add_group_field( $rpt_plan_group, array(
|
54 |
+
'name' => __( 'Subtitle', 'dk-pricr-responsive-pricing-table' ),
|
55 |
'id' => $prefix . 'subtitle',
|
56 |
'type' => 'text',
|
57 |
'row_classes' => 'de_fifty de_text de_input',
|
59 |
));
|
60 |
|
61 |
$main_group->add_group_field( $rpt_plan_group, array(
|
62 |
+
'name' => __( 'Recurrence', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'eg. \'per month/year\'', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
63 |
'id' => $prefix . 'recurrence',
|
64 |
'type' => 'text',
|
65 |
'row_classes' => 'de_first de_twentyfive de_text de_input',
|
67 |
));
|
68 |
|
69 |
$main_group->add_group_field( $rpt_plan_group, array(
|
70 |
+
'name' => __( 'Price', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'No currency sign here (it can be set in the Settings tab)', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
71 |
'id' => $prefix . 'price',
|
72 |
'type' => 'text',
|
73 |
'row_classes' => 'de_twentyfive de_text de_input',
|
75 |
));
|
76 |
|
77 |
$main_group->add_group_field( $rpt_plan_group, array(
|
78 |
+
'name' => __( 'Description', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Short text that will appear below the subtitle', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
79 |
'id' => $prefix . 'description',
|
80 |
'type' => 'text',
|
81 |
'row_classes' => 'de_fifty de_text de_input',
|
83 |
));
|
84 |
|
85 |
$main_group->add_group_field( $rpt_plan_group, array(
|
86 |
+
'name' => __( 'Small icon', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Recommended:', 'dk-pricr-responsive-pricing-table' ).' 30x30px"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
87 |
'id' => $prefix . 'icon',
|
88 |
'type' => 'file',
|
89 |
+
'options' => array('add_upload_file_text' => __( 'Upload', 'dk-pricr-responsive-pricing-table' )),
|
90 |
'row_classes' => 'de_first de_hundred de_upload de_input',
|
91 |
));
|
92 |
|
93 |
$main_group->add_group_field( $rpt_plan_group, array(
|
94 |
+
'name' => __( 'Recommended plan', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Check this to highlight this plan', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
95 |
+
'desc' => __( 'Mark as recommended', 'dk-pricr-responsive-pricing-table' ),
|
96 |
'id' => $prefix . 'recommended',
|
97 |
'type' => 'checkbox',
|
98 |
'row_classes' => 'de_first de_fifty de_checkbox_side',
|
100 |
));
|
101 |
|
102 |
$main_group->add_group_field( $rpt_plan_group, array(
|
103 |
+
'name' => __( 'Remove currency sign', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Check this to hide the currency sign (for free plans for example)', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
104 |
+
'desc' => __( 'Check to remove', 'dk-pricr-responsive-pricing-table' ),
|
105 |
'id' => $prefix . 'free',
|
106 |
'type' => 'checkbox',
|
107 |
'row_classes' => 'de_fifty de_checkbox_side',
|
109 |
));
|
110 |
|
111 |
$main_group->add_group_field( $rpt_plan_group, array(
|
112 |
+
'name' => __( 'Plan features', 'dk-pricr-responsive-pricing-table' ),
|
113 |
'id' => $prefix . 'features_header',
|
114 |
'type' => 'title',
|
115 |
'row_classes' => 'de_hundred de_heading',
|
116 |
));
|
117 |
|
118 |
$main_group->add_group_field( $rpt_plan_group, array(
|
119 |
+
'name' => __( 'Feature list', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'One per line — Read the Tips & Tricks section for useful information', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
120 |
'id' => $prefix . 'features',
|
121 |
'type' => 'textarea',
|
122 |
'attributes' => array('rows' => 9),
|
123 |
'row_classes' => 'de_first de_fifty de_textarea de_input',
|
124 |
'sanitization_cb' => 'rpt_html_allowed_sani_cb',
|
125 |
'attributes' => array(
|
126 |
+
'placeholder' => __('One feature per line', 'dk-pricr-responsive-pricing-table' ),
|
127 |
),
|
128 |
));
|
129 |
|
130 |
$main_group->add_group_field( $rpt_plan_group, array(
|
131 |
+
'name' => __( 'Tips & Tricks', 'dk-pricr-responsive-pricing-table' ),
|
132 |
+
'desc' => '<span class="dashicons dashicons-yes"></span> '.__( 'Add images (not recommended)', 'dk-pricr-responsive-pricing-table' ).'<br/><span style="color:#bbb;"><img src="http://yoursite.com/yourimage.png"/></span><br/><br/><span class="dashicons dashicons-yes"></span> '.__( 'Add links', 'dk-pricr-responsive-pricing-table' ).'<br/><span style="color:#bbb;"><a href="http://yoursite.com">Go to yoursite.com</a></span><br/><br/><span class="dashicons dashicons-yes"></span> '.__( 'Add bold text', 'dk-pricr-responsive-pricing-table' ).'<br/><span style="color:#bbb;"><strong>Something <strong>important</strong></strong></span><br/><br/><span class="dashicons dashicons-yes"></span> '.__( 'Show feature as unavailable with', 'dk-pricr-responsive-pricing-table' ).' "-n"<br/><span style="color:#bbb;">-nMy feature</span>',
|
133 |
'id' => $prefix . 'features_desc',
|
134 |
'type' => 'title',
|
135 |
'row_classes' => 'de_fifty de_info',
|
136 |
));
|
137 |
|
138 |
$main_group->add_group_field( $rpt_plan_group, array(
|
139 |
+
'name' => __( 'Plan button...', 'dk-pricr-responsive-pricing-table' ),
|
140 |
'id' => $prefix . 'button_header',
|
141 |
'type' => 'title',
|
142 |
'row_classes' => 'de_hundred de_heading',
|
143 |
));
|
144 |
|
145 |
$main_group->add_group_field( $rpt_plan_group, array(
|
146 |
+
'name' => __( 'Button text', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'eg. \'Sign up, Buy\'', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
147 |
'id' => $prefix . 'btn_text',
|
148 |
'type' => 'text',
|
149 |
'row_classes' => 'de_fifty de_text de_input',
|
151 |
));
|
152 |
|
153 |
$main_group->add_group_field( $rpt_plan_group, array(
|
154 |
+
'name' => __( 'Button link', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'eg. \'http://anything.com\'', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
155 |
'id' => $prefix . 'btn_link',
|
156 |
'type' => 'text',
|
157 |
'row_classes' => 'de_fifty de_text de_input',
|
159 |
));
|
160 |
|
161 |
$main_group->add_group_field( $rpt_plan_group, array(
|
162 |
+
'name' => __( '...or a custom button instead', 'dk-pricr-responsive-pricing-table' ),
|
163 |
'id' => $prefix . 'cust_button_header',
|
164 |
'type' => 'title',
|
165 |
'row_classes' => 'de_hundred de_heading',
|
166 |
));
|
167 |
|
168 |
$main_group->add_group_field( $rpt_plan_group, array(
|
169 |
+
'name' => __( 'Custom button code', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'This field will overwrite the standard button fields', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
170 |
'id' => $prefix . 'btn_custom_btn',
|
171 |
'type' => 'textarea',
|
172 |
'attributes' => array('rows' => 9),
|
173 |
'row_classes' => 'de_first de_fifty de_textarea de_input',
|
174 |
+
'sanitization_cb' => 'rpt_custom_button_sani_cb',
|
175 |
'attributes' => array(
|
176 |
+
'placeholder' => __('Paste any button code here (Stripe, Paypal...)', 'dk-pricr-responsive-pricing-table' ),
|
177 |
),
|
178 |
));
|
179 |
|
180 |
$main_group->add_group_field( $rpt_plan_group, array(
|
181 |
+
'name' => __( 'What is a custom button?', 'dk-pricr-responsive-pricing-table' ),
|
182 |
+
'desc' => '<span class="dashicons dashicons-editor-help"></span> '.__( 'Custom buttons are provided by third-party payment plateforms to allow direct redirection to the payment page. Paypal, Stripe as well as many other companies will generate buying buttons for you.', 'dk-pricr-responsive-pricing-table' ).' <br/><br/><span class="dashicons dashicons-admin-generic"></span> '.__( 'If you want your Pricing plan\'s footer to be replaced by a custom button, copy-paste the button code in this box. This will override the default button settings.', 'dk-pricr-responsive-pricing-table' ).'<br/><br/>'.__( 'We do <strong>not</strong> recommend doing this as it may not always go well with the design.', 'dk-pricr-responsive-pricing-table' ),
|
183 |
'id' => $prefix . 'custom_button_desc',
|
184 |
'type' => 'title',
|
185 |
'row_classes' => 'de_fifty de_info',
|
186 |
));
|
187 |
|
188 |
$main_group->add_group_field( $rpt_plan_group, array(
|
189 |
+
'name' => __( 'Plan styling', 'dk-pricr-responsive-pricing-table' ),
|
190 |
'id' => $prefix . 'styling_desc',
|
191 |
'type' => 'title',
|
192 |
'row_classes' => 'de_hundred de_heading',
|
193 |
));
|
194 |
|
195 |
$main_group->add_group_field( $rpt_plan_group, array(
|
196 |
+
'name' => __( 'Color', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'This color will be used for several elements of the plan', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
197 |
'id' => $prefix . 'color',
|
198 |
'type' => 'colorpicker',
|
199 |
'default' => '#9fdb80',
|
204 |
// Settings
|
205 |
$side_group = new_cmb2_box( array(
|
206 |
'id' => $prefix . 'settings_metabox',
|
207 |
+
'title' => '<span style="font-weight:400;">'.__( 'Settings', 'dk-pricr-responsive-pricing-table' ).'</span>',
|
208 |
'object_types' => array( 'rpt_pricing_table' ),
|
209 |
'context' => 'side',
|
210 |
'priority' => 'high',
|
211 |
));
|
212 |
|
213 |
$side_group->add_field( array(
|
214 |
+
'name' => __( 'General settings', 'dk-pricr-responsive-pricing-table' ),
|
215 |
'id' => $prefix . 'other_settings_desc',
|
216 |
'type' => 'title',
|
217 |
'row_classes' => 'de_hundred de_heading_side',
|
218 |
));
|
219 |
|
220 |
$side_group->add_field( array(
|
221 |
+
'name' => __( 'Change currency', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Add your currency sign here', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
222 |
'id' => $prefix . 'currency',
|
223 |
'type' => 'text',
|
224 |
'row_classes' => 'de_hundred de_text_side',
|
225 |
));
|
226 |
|
227 |
$side_group->add_field( array(
|
228 |
+
'name' => __( 'Links behavior', 'dk-pricr-responsive-pricing-table' ),
|
229 |
'id' => $prefix . 'open_newwindow',
|
230 |
'type' => 'select',
|
231 |
'options' => array(
|
232 |
+
'currentwindow' => __( 'Open in current window', 'dk-pricr-responsive-pricing-table' ),
|
233 |
+
'newwindow' => __( 'Open in new window/tab', 'dk-pricr-responsive-pricing-table' ),
|
234 |
|
235 |
),
|
236 |
'default' => 'currentwindow',
|
238 |
));
|
239 |
|
240 |
$side_group->add_field( array(
|
241 |
+
'name' => __( 'Force original fonts', 'dk-pricr-responsive-pricing-table' ).' <a class="wpd_tooltip" title="'.__( 'Check this to use the plugin\'s font instead of your theme\'s', 'dk-pricr-responsive-pricing-table' ).'"><span class="wpd_help_icon dashicons dashicons-editor-help"></span></a>',
|
242 |
+
'desc' => __( 'Check to enable', 'dk-pricr-responsive-pricing-table' ),
|
243 |
'id' => $prefix . 'original_font',
|
244 |
'type' => 'checkbox',
|
245 |
'row_classes' => 'de_hundred de_checkbox_side',
|
249 |
|
250 |
$side_group->add_field( array(
|
251 |
'name' => '',
|
252 |
+
'desc' => '<a id="rpt_font_sett_button" style="margin-top:-10px; cursor:pointer;"><span class="dashicons dashicons-admin-settings"></span> '.__( 'Adjust font sizes', 'dk-pricr-responsive-pricing-table' ).'</a>',
|
253 |
'id' => $prefix . 'pro_desc',
|
254 |
'type' => 'title',
|
255 |
'row_classes' => 'de_hundred de_info de_info_side',
|
256 |
));
|
257 |
|
258 |
$side_group->add_field( array(
|
259 |
+
'name' => __( 'Title', 'dk-pricr-responsive-pricing-table' ),
|
260 |
'id' => $prefix . 'title_fontsize',
|
261 |
'type' => 'select',
|
262 |
'options' => array(
|
263 |
+
'tiny' => __( 'Tiny', 'dk-pricr-responsive-pricing-table' ),
|
264 |
+
'small' => __( 'Small', 'dk-pricr-responsive-pricing-table' ),
|
265 |
+
'normal' => __( 'Normal', 'dk-pricr-responsive-pricing-table' ),
|
266 |
),
|
267 |
'default' => 'normal',
|
268 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
269 |
));
|
270 |
|
271 |
$side_group->add_field( array(
|
272 |
+
'name' => __( 'Subtitle', 'dk-pricr-responsive-pricing-table' ),
|
273 |
'id' => $prefix . 'subtitle_fontsize',
|
274 |
'type' => 'select',
|
275 |
'options' => array(
|
276 |
+
'tiny' => __( 'Tiny', 'dk-pricr-responsive-pricing-table' ),
|
277 |
+
'small' => __( 'Small', 'dk-pricr-responsive-pricing-table' ),
|
278 |
+
'normal' => __( 'Normal', 'dk-pricr-responsive-pricing-table' ),
|
279 |
),
|
280 |
'default' => 'normal',
|
281 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
282 |
));
|
283 |
|
284 |
$side_group->add_field( array(
|
285 |
+
'name' => __( 'Description', 'dk-pricr-responsive-pricing-table' ),
|
286 |
'id' => $prefix . 'description_fontsize',
|
287 |
'type' => 'select',
|
288 |
'options' => array(
|
289 |
+
'small' => __( 'Small', 'dk-pricr-responsive-pricing-table' ),
|
290 |
+
'normal' => __( 'Normal', 'dk-pricr-responsive-pricing-table' ),
|
291 |
),
|
292 |
'default' => 'normal',
|
293 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
294 |
));
|
295 |
|
296 |
$side_group->add_field( array(
|
297 |
+
'name' => __( 'Price', 'dk-pricr-responsive-pricing-table' ),
|
298 |
'id' => $prefix . 'price_fontsize',
|
299 |
'type' => 'select',
|
300 |
'options' => array(
|
301 |
+
'supertiny' => __( 'Tiny', 'dk-pricr-responsive-pricing-table' ),
|
302 |
+
'tiny' => __( 'Small', 'dk-pricr-responsive-pricing-table' ),
|
303 |
+
'small' => __( 'Normal', 'dk-pricr-responsive-pricing-table' ),
|
304 |
+
'normal' => __( 'Big', 'dk-pricr-responsive-pricing-table' ),
|
305 |
),
|
306 |
'default' => 'normal',
|
307 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
308 |
));
|
309 |
|
310 |
$side_group->add_field( array(
|
311 |
+
'name' => __( 'Recurrence', 'dk-pricr-responsive-pricing-table' ),
|
312 |
'id' => $prefix . 'recurrence_fontsize',
|
313 |
'type' => 'select',
|
314 |
'options' => array(
|
315 |
+
'small' => __( 'Small', 'dk-pricr-responsive-pricing-table' ),
|
316 |
+
'normal' => __( 'Normal', 'dk-pricr-responsive-pricing-table' ),
|
317 |
),
|
318 |
'default' => 'normal',
|
319 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
320 |
));
|
321 |
|
322 |
$side_group->add_field( array(
|
323 |
+
'name' => __( 'Button', 'dk-pricr-responsive-pricing-table' ),
|
324 |
'id' => $prefix . 'button_fontsize',
|
325 |
'type' => 'select',
|
326 |
'options' => array(
|
327 |
+
'small' => __( 'Small', 'dk-pricr-responsive-pricing-table' ),
|
328 |
+
'normal' => __( 'Normal', 'dk-pricr-responsive-pricing-table' ),
|
329 |
),
|
330 |
'default' => 'normal',
|
331 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
332 |
));
|
333 |
|
334 |
$side_group->add_field( array(
|
335 |
+
'name' => __( 'Features', 'dk-pricr-responsive-pricing-table' ),
|
336 |
'id' => $prefix . 'features_fontsize',
|
337 |
'type' => 'select',
|
338 |
'options' => array(
|
339 |
+
'small' => __( 'Small', 'dk-pricr-responsive-pricing-table' ),
|
340 |
+
'normal' => __( 'Normal', 'dk-pricr-responsive-pricing-table' ),
|
341 |
),
|
342 |
'default' => 'normal',
|
343 |
'row_classes' => 'de_hundred de_text_side rpt_font_sett',
|
345 |
|
346 |
|
347 |
$main_group->add_field( array(
|
348 |
+
'name' => '<span style="font-weight:400; color:#8a7463;">'.__( 'Up to 5 plans', 'dk-pricr-responsive-pricing-table').'</span>',
|
349 |
+
'desc' => '<span class="dashicons dashicons-flag"></span> '.__( 'You can add up to 5 plans per Pricing Table.', 'dk-pricr-responsive-pricing-table').'<br/> '.__( 'Adding more than that will result in display issues.', 'dk-pricr-responsive-pricing-table'),
|
350 |
'id' => $prefix . 'max',
|
351 |
'type' => 'title',
|
352 |
'row_classes' => 'de_hundred de_instructions',
|
375 |
// Help
|
376 |
$help_group = new_cmb2_box( array(
|
377 |
'id' => $prefix . 'help_metabox',
|
378 |
+
'title' => '<span style="font-weight:400;">'.__( 'Help & Support', 'dk-pricr-responsive-pricing-table' ).'</span>',
|
379 |
'object_types' => array( 'rpt_pricing_table' ),
|
380 |
'context' => 'side',
|
381 |
'priority' => 'low',
|
384 |
|
385 |
$help_group->add_field( array(
|
386 |
'name' => '',
|
387 |
+
'desc' => '<span style="font-size:15px;">'.__( 'Display your Pricing Table', 'dk-pricr-responsive-pricing-table' ).'</span><br/><br/>'.__( 'To display your Pricing Table on your site, copy-paste the <strong>[Shortcode]</strong> in your post/page. You can find this shortcode by clicking <strong>All Pricing Tables</strong> in the menu on the left.', 'dk-pricr-responsive-pricing-table' ).'<br/><br/><span style="font-size:15px;">'.__( 'Get support', 'dk-pricr-responsive-pricing-table' ).'</span><br/><br/><a style="font-size:13px !important;" target="_blank" href="http://wpdarko.com/support/">— '.__( 'Submit a ticket', 'dk-pricr-responsive-pricing-table' ).'</a><br/><a style="font-size:13px !important;" target="_blank" href="https://wpdarko.zendesk.com/hc/en-us/articles/206303517-Get-started-with-the-Responsive-Pricing-Table-plugin">— '.__( 'View documentation', 'dk-pricr-responsive-pricing-table' ).'</a>',
|
388 |
'id' => $prefix . 'help_desc',
|
389 |
'type' => 'title',
|
390 |
'row_classes' => 'de_hundred de_info de_info_side',
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: spwebguy
|
3 |
Tags: pricing table, pricing tables, prices, pricing, plans, offer, shortcode, price, responsive, pricing, tables, pricing plan
|
4 |
Requires at least: 3.6
|
5 |
-
Tested up to: 4.
|
6 |
Stable tag: trunk
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
@@ -13,7 +13,7 @@ A responsive and elegant way to present your offer to your visitors. Create a ne
|
|
13 |
This plugin adds a “Pricing Tables” tab in the admin panel which allows you to create pricing tables for your website the easy way. You can quickly add features to your different plans, choose a color (as well as many other options) and display your price table anywhere with a simple shortcode. What you see is what you get, and it’s totally free.
|
14 |
|
15 |
= No limitation for the Free version =
|
16 |
-
The Free version of the Responsive Pricing Table plugin is **not limited**.
|
17 |
|
18 |
The [PRO version](http://wpdarko.com/items/responsive-pricing-table-pro/) adds two new features: **skins** and **tooltips**. Skins are new designs for your pricing tables, tooltips are “info bubbles” that you can easily add to your features.
|
19 |
|
@@ -64,7 +64,7 @@ Find help in [our forums](http://wpdarko.com/support/) for this plugin (we’ll
|
|
64 |
|
65 |
== Frequently Asked Questions ==
|
66 |
= No limitation for the Free version =
|
67 |
-
The free version of the Responsive Pricing Table plugin is **not limited**.
|
68 |
|
69 |
The [PRO version](http://wpdarko.com/items/responsive-pricing-table-pro/) adds two new features: **skins** and **tooltips**. Skins are new designs for your pricing tables, tooltips are “info bubbles” that you can easily add to your features.
|
70 |
|
@@ -88,6 +88,9 @@ Find help in [our forums](http://wpdarko.com/support/) for this plugin (we’ll
|
|
88 |
6. Finding the shortcode (admin view)
|
89 |
|
90 |
== Changelog ==
|
|
|
|
|
|
|
91 |
= 4.2 =
|
92 |
* Plugin is now translation ready
|
93 |
* Added French translation
|
@@ -98,7 +101,7 @@ Find help in [our forums](http://wpdarko.com/support/) for this plugin (we’ll
|
|
98 |
* Security update
|
99 |
|
100 |
= 4.1.1 =
|
101 |
-
* Fixed unwanted shortcode title output
|
102 |
|
103 |
= 4.1 =
|
104 |
* Added support for custom buttons (Paypal, Stripe etc…)
|
@@ -126,7 +129,7 @@ Find help in [our forums](http://wpdarko.com/support/) for this plugin (we’ll
|
|
126 |
= 3.4.2 =
|
127 |
* Admin panel small bug fix
|
128 |
|
129 |
-
= 3.4.1 =
|
130 |
* Minor bug fix
|
131 |
|
132 |
= 3.4.0 =
|
@@ -136,10 +139,10 @@ Find help in [our forums](http://wpdarko.com/support/) for this plugin (we’ll
|
|
136 |
* Allowing br tags in the description
|
137 |
* Allowing br tags in the subtitle
|
138 |
|
139 |
-
= 3.3.0 =
|
140 |
* Added a new font-size preset for the price element
|
141 |
* All font-sizes are more accurate and will better fit on your pages
|
142 |
-
* Fixed styling issues for small screens
|
143 |
|
144 |
= 3.2.4 =
|
145 |
* Fixed conflict when generating shortcode
|
@@ -162,20 +165,20 @@ Find help in [our forums](http://wpdarko.com/support/) for this plugin (we’ll
|
|
162 |
* Preventing plugin conflicts
|
163 |
|
164 |
= 3.0 =
|
165 |
-
* WARNING: If updating from an earlier version, pricing tables will need to be recreated.
|
166 |
* Cleaning plugin admin
|
167 |
* Cleaning code
|
168 |
|
169 |
= 2.3 =
|
170 |
-
* CSS bug fixes - better on small-width websites (or websites with sidebars)
|
171 |
|
172 |
= 2.2 =
|
173 |
-
* Links behavior can be changed
|
174 |
|
175 |
= 2.1 =
|
176 |
* Font sizes can be changed in case some words don’t fit
|
177 |
|
178 |
-
= 2.0 =
|
179 |
* Using WordPress’ custom post type feature to create Pricing Tables
|
180 |
* Plans can be marked as Free
|
181 |
* Plans can be marked as Recommended
|
2 |
Contributors: spwebguy
|
3 |
Tags: pricing table, pricing tables, prices, pricing, plans, offer, shortcode, price, responsive, pricing, tables, pricing plan
|
4 |
Requires at least: 3.6
|
5 |
+
Tested up to: 4.4
|
6 |
Stable tag: trunk
|
7 |
License: GPL2
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
13 |
This plugin adds a “Pricing Tables” tab in the admin panel which allows you to create pricing tables for your website the easy way. You can quickly add features to your different plans, choose a color (as well as many other options) and display your price table anywhere with a simple shortcode. What you see is what you get, and it’s totally free.
|
14 |
|
15 |
= No limitation for the Free version =
|
16 |
+
The Free version of the Responsive Pricing Table plugin is **not limited**.
|
17 |
|
18 |
The [PRO version](http://wpdarko.com/items/responsive-pricing-table-pro/) adds two new features: **skins** and **tooltips**. Skins are new designs for your pricing tables, tooltips are “info bubbles” that you can easily add to your features.
|
19 |
|
64 |
|
65 |
== Frequently Asked Questions ==
|
66 |
= No limitation for the Free version =
|
67 |
+
The free version of the Responsive Pricing Table plugin is **not limited**.
|
68 |
|
69 |
The [PRO version](http://wpdarko.com/items/responsive-pricing-table-pro/) adds two new features: **skins** and **tooltips**. Skins are new designs for your pricing tables, tooltips are “info bubbles” that you can easily add to your features.
|
70 |
|
88 |
6. Finding the shortcode (admin view)
|
89 |
|
90 |
== Changelog ==
|
91 |
+
= 4.2.1 =
|
92 |
+
* Fixed shortcode
|
93 |
+
|
94 |
= 4.2 =
|
95 |
* Plugin is now translation ready
|
96 |
* Added French translation
|
101 |
* Security update
|
102 |
|
103 |
= 4.1.1 =
|
104 |
+
* Fixed unwanted shortcode title output
|
105 |
|
106 |
= 4.1 =
|
107 |
* Added support for custom buttons (Paypal, Stripe etc…)
|
129 |
= 3.4.2 =
|
130 |
* Admin panel small bug fix
|
131 |
|
132 |
+
= 3.4.1 =
|
133 |
* Minor bug fix
|
134 |
|
135 |
= 3.4.0 =
|
139 |
* Allowing br tags in the description
|
140 |
* Allowing br tags in the subtitle
|
141 |
|
142 |
+
= 3.3.0 =
|
143 |
* Added a new font-size preset for the price element
|
144 |
* All font-sizes are more accurate and will better fit on your pages
|
145 |
+
* Fixed styling issues for small screens
|
146 |
|
147 |
= 3.2.4 =
|
148 |
* Fixed conflict when generating shortcode
|
165 |
* Preventing plugin conflicts
|
166 |
|
167 |
= 3.0 =
|
168 |
+
* WARNING: If updating from an earlier version, pricing tables will need to be recreated.
|
169 |
* Cleaning plugin admin
|
170 |
* Cleaning code
|
171 |
|
172 |
= 2.3 =
|
173 |
+
* CSS bug fixes - better on small-width websites (or websites with sidebars)
|
174 |
|
175 |
= 2.2 =
|
176 |
+
* Links behavior can be changed
|
177 |
|
178 |
= 2.1 =
|
179 |
* Font sizes can be changed in case some words don’t fit
|
180 |
|
181 |
+
= 2.0 =
|
182 |
* Using WordPress’ custom post type feature to create Pricing Tables
|
183 |
* Plans can be marked as Free
|
184 |
* Plans can be marked as Recommended
|
rpt.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
* Plugin Name: Responsive Pricing Table
|
4 |
* Plugin URI: http://wpdarko.com/items/responsive-pricing-table-pro/
|
5 |
* Description: A responsive, easy and elegant way to present your offer to your visitors. Just create a new pricing table (custom type) and copy-paste the shortcode into your posts/pages. Find help and information on our <a href="http://wpdarko.com/support/">support site</a>. This free version is NOT limited and does not contain any ad. Check out the <a href='http://wpdarko.com/items/responsive-pricing-table-pro/'>PRO version</a> for more great features.
|
6 |
-
* Version: 4.2
|
7 |
* Author: WP Darko
|
8 |
* Author URI: http://wpdarko.com
|
9 |
-
* Text Domain: responsive-pricing-table
|
10 |
* Domain Path: /lang/
|
11 |
* License: GPL2
|
12 |
*/
|
@@ -15,7 +15,7 @@
|
|
15 |
// Loading text domain
|
16 |
add_action( 'plugins_loaded', 'rpt_load_plugin_textdomain' );
|
17 |
function rpt_load_plugin_textdomain() {
|
18 |
-
load_plugin_textdomain( 'responsive-pricing-table', FALSE, basename( dirname( __FILE__ ) ) . '/lang/' );
|
19 |
}
|
20 |
|
21 |
|
@@ -58,19 +58,19 @@ function add_admin_rpt_style() {
|
|
58 |
add_action( 'init', 'register_rpt_type' );
|
59 |
function register_rpt_type() {
|
60 |
$labels = array(
|
61 |
-
'name' => __( 'Pricing Tables', 'responsive-pricing-table' ),
|
62 |
-
'singular_name' => __( 'Pricing Table', 'responsive-pricing-table' ),
|
63 |
-
'menu_name' => __( 'Pricing Tables', 'responsive-pricing-table' ),
|
64 |
-
'name_admin_bar' => __( 'Pricing Table', 'responsive-pricing-table' ),
|
65 |
-
'add_new' => __( 'Add New', 'responsive-pricing-table' ),
|
66 |
-
'add_new_item' => __( 'Add New Pricing Table', 'responsive-pricing-table' ),
|
67 |
-
'new_item' => __( 'New Pricing Table', 'responsive-pricing-table' ),
|
68 |
-
'edit_item' => __( 'Edit Pricing Table', 'responsive-pricing-table' ),
|
69 |
-
'view_item' => __( 'View Pricing Table', 'responsive-pricing-table' ),
|
70 |
-
'all_items' => __( 'All Pricing Tables', 'responsive-pricing-table' ),
|
71 |
-
'search_items' => __( 'Search Pricing Tables', 'responsive-pricing-table' ),
|
72 |
-
'not_found' => __( 'No Pricing Tables found.', 'responsive-pricing-table' ),
|
73 |
-
'not_found_in_trash' => __( 'No Pricing Tables found in Trash.', 'responsive-pricing-table' )
|
74 |
);
|
75 |
|
76 |
$args = array(
|
@@ -96,11 +96,11 @@ function rpt_updated_messages( $messages ) {
|
|
96 |
$post_type = get_post_type( $post );
|
97 |
$post_type_object = get_post_type_object( $post_type );
|
98 |
$messages['rpt_pricing_table'] = array(
|
99 |
-
1 => __( 'Pricing Table updated.', 'responsive-pricing-table' ),
|
100 |
-
4 => __( 'Pricing Table updated.', 'responsive-pricing-table' ),
|
101 |
-
6 => __( 'Pricing Table published.', 'responsive-pricing-table' ),
|
102 |
-
7 => __( 'Pricing Table saved.', 'responsive-pricing-table' ),
|
103 |
-
10 => __( 'Pricing Table draft updated.', 'responsive-pricing-table' )
|
104 |
);
|
105 |
|
106 |
if ( $post_type_object->publicly_queryable ) {
|
@@ -240,175 +240,176 @@ foreach($custom_posts as $post) : setup_postdata($post);
|
|
240 |
// Opening rpt_pricr inner
|
241 |
$output2 .= '<div class="'. $title_fs_class . $subtitle_fs_class . $description_fs_class . $price_fs_class . $recurrence_fs_class . $features_fs_class. $button_fs_class .'">';
|
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 |
-
} else {
|
386 |
-
// Default footer
|
387 |
-
if (!empty($plans['_rpt_btn_text'])){
|
388 |
-
$output2 .= '<a '. $link_behavior .' href="' . do_shortcode($btn_link) . '" style="background:' . $plans['_rpt_color'] . '" class="rpt_foot rpt_foot_' . $key . '">';
|
389 |
} else {
|
390 |
-
|
391 |
-
|
|
|
|
|
|
|
|
|
392 |
|
393 |
-
|
394 |
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
|
399 |
-
|
400 |
|
401 |
-
|
402 |
|
403 |
-
|
404 |
-
|
405 |
|
406 |
-
|
407 |
-
|
408 |
|
409 |
-
|
410 |
|
411 |
-
|
412 |
return $output2;
|
413 |
|
414 |
}
|
3 |
* Plugin Name: Responsive Pricing Table
|
4 |
* Plugin URI: http://wpdarko.com/items/responsive-pricing-table-pro/
|
5 |
* Description: A responsive, easy and elegant way to present your offer to your visitors. Just create a new pricing table (custom type) and copy-paste the shortcode into your posts/pages. Find help and information on our <a href="http://wpdarko.com/support/">support site</a>. This free version is NOT limited and does not contain any ad. Check out the <a href='http://wpdarko.com/items/responsive-pricing-table-pro/'>PRO version</a> for more great features.
|
6 |
+
* Version: 4.2.1
|
7 |
* Author: WP Darko
|
8 |
* Author URI: http://wpdarko.com
|
9 |
+
* Text Domain: dk-pricr-responsive-pricing-table
|
10 |
* Domain Path: /lang/
|
11 |
* License: GPL2
|
12 |
*/
|
15 |
// Loading text domain
|
16 |
add_action( 'plugins_loaded', 'rpt_load_plugin_textdomain' );
|
17 |
function rpt_load_plugin_textdomain() {
|
18 |
+
load_plugin_textdomain( 'dk-pricr-responsive-pricing-table', FALSE, basename( dirname( __FILE__ ) ) . '/lang/' );
|
19 |
}
|
20 |
|
21 |
|
58 |
add_action( 'init', 'register_rpt_type' );
|
59 |
function register_rpt_type() {
|
60 |
$labels = array(
|
61 |
+
'name' => __( 'Pricing Tables', 'dk-pricr-responsive-pricing-table' ),
|
62 |
+
'singular_name' => __( 'Pricing Table', 'dk-pricr-responsive-pricing-table' ),
|
63 |
+
'menu_name' => __( 'Pricing Tables', 'dk-pricr-responsive-pricing-table' ),
|
64 |
+
'name_admin_bar' => __( 'Pricing Table', 'dk-pricr-responsive-pricing-table' ),
|
65 |
+
'add_new' => __( 'Add New', 'dk-pricr-responsive-pricing-table' ),
|
66 |
+
'add_new_item' => __( 'Add New Pricing Table', 'dk-pricr-responsive-pricing-table' ),
|
67 |
+
'new_item' => __( 'New Pricing Table', 'dk-pricr-responsive-pricing-table' ),
|
68 |
+
'edit_item' => __( 'Edit Pricing Table', 'dk-pricr-responsive-pricing-table' ),
|
69 |
+
'view_item' => __( 'View Pricing Table', 'dk-pricr-responsive-pricing-table' ),
|
70 |
+
'all_items' => __( 'All Pricing Tables', 'dk-pricr-responsive-pricing-table' ),
|
71 |
+
'search_items' => __( 'Search Pricing Tables', 'dk-pricr-responsive-pricing-table' ),
|
72 |
+
'not_found' => __( 'No Pricing Tables found.', 'dk-pricr-responsive-pricing-table' ),
|
73 |
+
'not_found_in_trash' => __( 'No Pricing Tables found in Trash.', 'dk-pricr-responsive-pricing-table' )
|
74 |
);
|
75 |
|
76 |
$args = array(
|
96 |
$post_type = get_post_type( $post );
|
97 |
$post_type_object = get_post_type_object( $post_type );
|
98 |
$messages['rpt_pricing_table'] = array(
|
99 |
+
1 => __( 'Pricing Table updated.', 'dk-pricr-responsive-pricing-table' ),
|
100 |
+
4 => __( 'Pricing Table updated.', 'dk-pricr-responsive-pricing-table' ),
|
101 |
+
6 => __( 'Pricing Table published.', 'dk-pricr-responsive-pricing-table' ),
|
102 |
+
7 => __( 'Pricing Table saved.', 'dk-pricr-responsive-pricing-table' ),
|
103 |
+
10 => __( 'Pricing Table draft updated.', 'dk-pricr-responsive-pricing-table' )
|
104 |
);
|
105 |
|
106 |
if ( $post_type_object->publicly_queryable ) {
|
240 |
// Opening rpt_pricr inner
|
241 |
$output2 .= '<div class="'. $title_fs_class . $subtitle_fs_class . $description_fs_class . $price_fs_class . $recurrence_fs_class . $features_fs_class. $button_fs_class .'">';
|
242 |
|
243 |
+
if (is_array($entries) || is_object($entries))
|
244 |
+
foreach ($entries as $key => $plans) {
|
245 |
|
246 |
+
if (!empty($plans['_rpt_recommended'])){
|
247 |
+
$is_reco = $plans['_rpt_recommended'];
|
248 |
|
249 |
+
//Opening plan
|
250 |
+
if ($is_reco == true ){
|
251 |
+
$reco = '<img class="rpt_recommended" src="' . plugins_url('img/rpt_recommended.png', __FILE__) . '"/>';
|
252 |
+
$reco_class = 'rpt_recommended_plan';
|
253 |
+
} else if ($is_reco == false ) {
|
254 |
+
$reco = '';
|
255 |
+
$reco_class = '';
|
256 |
+
}
|
257 |
+
} else {
|
258 |
+
$reco = '';
|
259 |
+
$reco_class = '';
|
260 |
+
}
|
261 |
|
262 |
+
$output2 .= '<div class="rpt_plan '.$ori_f.' rpt_plan_' . $key . ' ' . $reco_class . '">';
|
263 |
|
264 |
+
// Title
|
265 |
+
if (!empty($plans['_rpt_title'])){
|
266 |
+
$output2 .= '<div class="rpt_title rpt_title_' . $key . '">';
|
267 |
|
268 |
+
if (!empty($plans['_rpt_icon'])){
|
269 |
+
$output2 .= '<img height=30px width=30px src="' . $plans['_rpt_icon'] . '" class="rpt_icon rpt_icon_' . $key . '"/> ';
|
270 |
+
}
|
271 |
|
272 |
+
$output2 .= $plans['_rpt_title'];
|
273 |
+
$output2 .= $reco . '</div>';
|
274 |
+
}
|
275 |
|
276 |
+
// Head
|
277 |
+
$output2 .= '<div class="rpt_head rpt_head_' . $key . '">';
|
278 |
|
279 |
+
// Recurrence
|
280 |
+
if (!empty($plans['_rpt_recurrence'])){
|
281 |
+
$output2 .= '<div class="rpt_recurrence rpt_recurrence_' . $key . '">' . $plans['_rpt_recurrence'] . '</div>';
|
282 |
+
}
|
283 |
|
284 |
+
// Price
|
285 |
+
if (!empty($plans['_rpt_price'])){
|
286 |
|
287 |
+
$output2 .= '<div class="rpt_price rpt_price_' . $key . '">';
|
288 |
|
289 |
+
if (!empty($plans['_rpt_free'])){
|
290 |
+
if ($plans['_rpt_free'] == true ){
|
291 |
+
$output2 .= $plans['_rpt_price'];
|
292 |
+
} else {
|
293 |
+
$output2 .= '<span class="rpt_currency"></span>' . $plans['_rpt_price'];
|
294 |
+
}
|
295 |
+
} else {
|
296 |
|
297 |
+
$currency = get_post_meta( $post->ID, '_rpt_currency', true );
|
298 |
|
299 |
+
if (!empty($currency)){
|
300 |
+
$output2 .= '<span class="rpt_currency">';
|
301 |
+
$output2 .= $currency;
|
302 |
+
$output2 .= '</span>';
|
303 |
+
}
|
304 |
|
305 |
+
$output2 .= $plans['_rpt_price'];
|
306 |
|
307 |
+
}
|
308 |
|
309 |
+
$output2 .= '</div>';
|
310 |
+
}
|
311 |
|
312 |
+
// Subtitle
|
313 |
+
if (!empty($plans['_rpt_subtitle'])){
|
314 |
+
$output2 .= '<div style="color:' . $plans['_rpt_color'] . ';" class="rpt_subtitle rpt_subtitle_' . $key . '">' . $plans['_rpt_subtitle'] . '</div>';
|
315 |
+
}
|
316 |
|
317 |
+
// Description
|
318 |
+
if (!empty($plans['_rpt_description'])){
|
319 |
+
$output2 .= '<div class="rpt_description rpt_description_' . $key . '">' . $plans['_rpt_description'] . '</div>';
|
320 |
+
}
|
321 |
|
322 |
+
// Closing plan head
|
323 |
+
$output2 .= '</div>';
|
324 |
|
325 |
|
326 |
+
if (!empty($plans['_rpt_features'])){
|
327 |
|
328 |
|
329 |
+
$output2 .= '<div class="rpt_features rpt_features_' . $key . '">';
|
330 |
|
331 |
|
332 |
+
$string = $plans['_rpt_features'];
|
333 |
+
$stringAr = explode("\n", $string);
|
334 |
+
$stringAr = array_filter($stringAr, 'trim');
|
335 |
|
336 |
+
$features = '';
|
337 |
|
338 |
+
foreach ($stringAr as $feature) {
|
339 |
+
$features[] .= strip_tags($feature,'<strong></strong><br><br/></br><img><a>');
|
340 |
+
}
|
341 |
|
342 |
+
foreach ($features as $small_key => $feature){
|
343 |
+
if (!empty($feature)){
|
344 |
|
345 |
+
$check = substr($feature, 0, 2);
|
346 |
+
if ($check == '-n') {
|
347 |
+
$feature = substr($feature, 2);
|
348 |
+
$check_color = '#bbbbbb';
|
349 |
+
} else {
|
350 |
+
$check_color = 'black';
|
351 |
+
}
|
352 |
|
353 |
+
$output2 .= '<div style="color:' . $check_color . ';" class="rpt_feature rpt_feature_' . $key . '-' . $small_key . '">';
|
354 |
+
$output2 .= $feature;
|
355 |
+
$output2 .= '</div>';
|
356 |
|
357 |
+
}
|
358 |
+
}
|
359 |
|
360 |
+
$output2 .= '</div>';
|
361 |
+
}
|
362 |
|
363 |
+
if (!empty($plans['_rpt_btn_text'])){
|
364 |
+
$btn_text = $plans['_rpt_btn_text'];
|
365 |
+
if (!empty($plans['_rpt_btn_link'])){
|
366 |
+
$btn_link = $plans['_rpt_btn_link'];
|
367 |
+
} else { $btn_link = '#'; }
|
368 |
+
} else {
|
369 |
+
$btn_text = '';
|
370 |
+
$btn_link = '#';
|
371 |
+
}
|
372 |
|
373 |
+
// Link option
|
374 |
+
$newcurrentwindow = get_post_meta( $post->ID, '_rpt_open_newwindow', true );
|
375 |
+
if ($newcurrentwindow == 'newwindow'){
|
376 |
+
$link_behavior = 'target="_blank"';
|
377 |
+
} else {
|
378 |
+
$link_behavior = 'target="_self"';
|
379 |
+
}
|
380 |
|
381 |
+
// Check for custom button
|
382 |
+
if (!empty($plans['_rpt_btn_custom_btn'])){
|
383 |
+
$output2 .= '<div class="rpt_custom_btn" style="border-bottom-left-radius:5px; border-bottom-right-radius:5px; text-align:center; padding:16px 20px; background-color:'.$plans['_rpt_color'].'">';
|
384 |
+
$output2 .= do_shortcode($plans['_rpt_btn_custom_btn']);
|
385 |
+
$output2 .= '</div>';
|
|
|
|
|
|
|
|
|
386 |
} else {
|
387 |
+
// Default footer
|
388 |
+
if (!empty($plans['_rpt_btn_text'])){
|
389 |
+
$output2 .= '<a '. $link_behavior .' href="' . do_shortcode($btn_link) . '" style="background:' . $plans['_rpt_color'] . '" class="rpt_foot rpt_foot_' . $key . '">';
|
390 |
+
} else {
|
391 |
+
$output2 .= '<a '. $link_behavior .' style="background:' . $plans['_rpt_color'] . '" class="rpt_foot rpt_foot_' . $key . '">';
|
392 |
+
}
|
393 |
|
394 |
+
$output2 .= do_shortcode($btn_text);
|
395 |
|
396 |
+
// Closing default footer
|
397 |
+
$output2 .= '</a>';
|
398 |
+
}
|
399 |
|
400 |
+
$output2 .= '</div>';
|
401 |
|
402 |
+
}
|
403 |
|
404 |
+
// Closing rpt_inner
|
405 |
+
$output2 .= '</div>';
|
406 |
|
407 |
+
// Closing rpt_container
|
408 |
+
$output2 .= '</div>';
|
409 |
|
410 |
+
$output2 .= '<div style="clear:both;"></div>';
|
411 |
|
412 |
+
endforeach; wp_reset_postdata();
|
413 |
return $output2;
|
414 |
|
415 |
}
|