@@ -19,7 +19,7 @@ |
||
19 | 19 | FrmAppController::get_form_nav( $id, true, 'hide' ); |
20 | 20 | } |
21 | 21 | |
22 | - ?> |
|
22 | + ?> |
|
23 | 23 | <div class="frm_form_builder with_frm_style"> |
24 | 24 | |
25 | 25 | <p class="frm_hidden frm-no-margin"> |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <div class="wrap"> |
2 | - <h2><?php echo ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build', 'formidable' )); ?> |
|
2 | + <h2><?php echo ( $form->is_template ? __( 'Templates', 'formidable' ) : __( 'Build', 'formidable' ) ); ?> |
|
3 | 3 | <a href="?page=formidable&frm_action=new" class="add-new-h2"><?php _e( 'Add New', 'formidable' ); ?></a> |
4 | 4 | </h2> |
5 | 5 |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <div class="posttypediv"> |
2 | 2 | <ul class="posttype-tabs add-menu-item-tabs"> |
3 | 3 | <li <?php echo ( 'default' == $current_tab ? ' class="tabs"' : '' ); ?>> |
4 | - <a href="<?php echo esc_url('?page=formidable-styles&page-tab=default#tabs-panel-success-msg') ?>" class="nav-tab-link" data-type="tabs-panel-success-msg" ><?php _e( 'Success', 'formidable' ) ?></a> |
|
4 | + <a href="<?php echo esc_url( '?page=formidable-styles&page-tab=default#tabs-panel-success-msg' ) ?>" class="nav-tab-link" data-type="tabs-panel-success-msg" ><?php _e( 'Success', 'formidable' ) ?></a> |
|
5 | 5 | </li> |
6 | 6 | <li <?php echo ( 'error-msg' == $current_tab ? ' class="tabs"' : '' ); ?>> |
7 | - <a href="<?php echo esc_url('?page=formidable-styles&page-tab=error-msge#page-error-msg') ?>" class="nav-tab-link" data-type="tabs-panel-error-msg" ><?php _e( 'Error', 'formidable' ) ?></a> |
|
7 | + <a href="<?php echo esc_url( '?page=formidable-styles&page-tab=error-msge#page-error-msg' ) ?>" class="nav-tab-link" data-type="tabs-panel-error-msg" ><?php _e( 'Error', 'formidable' ) ?></a> |
|
8 | 8 | </li> |
9 | 9 | </ul><!-- .posttype-tabs --> |
10 | 10 | |
@@ -14,19 +14,19 @@ discard block |
||
14 | 14 | <div class="field-group field-group-border clearfix"> |
15 | 15 | <label><?php _e( 'BG color', 'formidable' ) ?></label> |
16 | 16 | <div class="hasPicker"> |
17 | - <input name="<?php echo esc_attr( $frm_style->get_field_name('success_bg_color') ) ?>" id="frm_success_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_bg_color'] ) ?>" type="text" /></div> |
|
17 | + <input name="<?php echo esc_attr( $frm_style->get_field_name( 'success_bg_color' ) ) ?>" id="frm_success_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_bg_color'] ) ?>" type="text" /></div> |
|
18 | 18 | </div> |
19 | 19 | <div class="field-group clearfix"> |
20 | 20 | <label><?php _e( 'Border', 'formidable' ) ?></label> |
21 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('success_border_color') ) ?>" id="frm_success_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_border_color'] ) ?>" /> |
|
21 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'success_border_color' ) ) ?>" id="frm_success_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_border_color'] ) ?>" /> |
|
22 | 22 | </div> |
23 | 23 | <div class="field-group clearfix"> |
24 | 24 | <label><?php _e( 'Text', 'formidable' ) ?></label> |
25 | - <input name="<?php echo esc_attr( $frm_style->get_field_name('success_text_color') ) ?>" id="frm_success_text_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_text_color'] ) ?>" type="text" /> |
|
25 | + <input name="<?php echo esc_attr( $frm_style->get_field_name( 'success_text_color' ) ) ?>" id="frm_success_text_color" class="hex" value="<?php echo esc_attr( $style->post_content['success_text_color'] ) ?>" type="text" /> |
|
26 | 26 | </div> |
27 | 27 | <div class="field-group clearfix"> |
28 | 28 | <label><?php _e( 'Size', 'formidable' ) ?></label> |
29 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('success_font_size') ) ?>" id="frm_success_font_size" value="<?php echo esc_attr( $style->post_content['success_font_size'] ) ?>" size="3" /> |
|
29 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'success_font_size' ) ) ?>" id="frm_success_font_size" value="<?php echo esc_attr( $style->post_content['success_font_size'] ) ?>" size="3" /> |
|
30 | 30 | </div> |
31 | 31 | <div class="clear"></div> |
32 | 32 | </div><!-- /.tabs-panel --> |
@@ -37,21 +37,21 @@ discard block |
||
37 | 37 | <div class="field-group field-group-border clearfix"> |
38 | 38 | <label><?php _e( 'BG color', 'formidable' ) ?></label> |
39 | 39 | <div class="hasPicker"> |
40 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('error_bg') ) ?>" id="frm_error_bg" class="hex" value="<?php echo esc_attr($style->post_content['error_bg']) ?>" /></div> |
|
40 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'error_bg' ) ) ?>" id="frm_error_bg" class="hex" value="<?php echo esc_attr( $style->post_content['error_bg'] ) ?>" /></div> |
|
41 | 41 | </div> |
42 | 42 | <div class="field-group clearfix"> |
43 | 43 | <label><?php _e( 'Border', 'formidable' ) ?></label> |
44 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('error_border') ) ?>" id="frm_error_border" class="hex" value="<?php echo esc_attr( $style->post_content['error_border'] ) ?>" /> |
|
44 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'error_border' ) ) ?>" id="frm_error_border" class="hex" value="<?php echo esc_attr( $style->post_content['error_border'] ) ?>" /> |
|
45 | 45 | </div> |
46 | 46 | <div class="field-group clearfix"> |
47 | 47 | |
48 | 48 | <label><?php _e( 'Text', 'formidable' ) ?></label> |
49 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('error_text') ) ?>" id="frm_error_text" class="hex" value="<?php echo esc_attr( $style->post_content['error_text'] ) ?>" /> |
|
49 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'error_text' ) ) ?>" id="frm_error_text" class="hex" value="<?php echo esc_attr( $style->post_content['error_text'] ) ?>" /> |
|
50 | 50 | </div> |
51 | 51 | |
52 | 52 | <div class="field-group clearfix"> |
53 | 53 | <label><?php _e( 'Size', 'formidable' ) ?></label> |
54 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('error_font_size') ) ?>" id="frm_error_font_size" value="<?php echo esc_attr( $style->post_content['error_font_size'] ) ?>" size="3" /> |
|
54 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'error_font_size' ) ) ?>" id="frm_error_font_size" value="<?php echo esc_attr( $style->post_content['error_font_size'] ) ?>" size="3" /> |
|
55 | 55 | </div> |
56 | 56 | <div class="clear"></div> |
57 | 57 | </div><!-- /.tabs-panel --> |
@@ -1,42 +1,42 @@ |
||
1 | 1 | <div class="field-group clearfix frm-first-row"> |
2 | 2 | <label><?php _e( 'Size', 'formidable' ) ?></label> |
3 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_font_size') ) ?>" id="frm_field_font_size" value="<?php echo esc_attr( $style->post_content['field_font_size'] ) ?>" /> |
|
3 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_font_size' ) ) ?>" id="frm_field_font_size" value="<?php echo esc_attr( $style->post_content['field_font_size'] ) ?>" /> |
|
4 | 4 | </div> |
5 | 5 | |
6 | 6 | <div class="field-group clearfix frm-first-row"> |
7 | 7 | <label><?php _e( 'Height', 'formidable' ) ?></label> |
8 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_height') ) ?>" id="frm_field_height" value="<?php echo esc_attr( $style->post_content['field_height'] ) ?>" /> |
|
8 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_height' ) ) ?>" id="frm_field_height" value="<?php echo esc_attr( $style->post_content['field_height'] ) ?>" /> |
|
9 | 9 | </div> |
10 | 10 | |
11 | 11 | <div class="field-group clearfix frm-first-row"> |
12 | 12 | <label><?php _e( 'Width', 'formidable' ) ?></label> |
13 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_width') ) ?>" id="frm_field_width" value="<?php echo esc_attr( $style->post_content['field_width'] ) ?>" /> |
|
13 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_width' ) ) ?>" id="frm_field_width" value="<?php echo esc_attr( $style->post_content['field_width'] ) ?>" /> |
|
14 | 14 | </div> |
15 | 15 | |
16 | 16 | <div class="clear"></div> |
17 | 17 | <p class="frm_no_bottom_margin"> |
18 | - <label><input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name('auto_width') ) ?>" id="frm_auto_width" value="1" <?php checked( $style->post_content['auto_width'], 1 ) ?> /> |
|
18 | + <label><input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name( 'auto_width' ) ) ?>" id="frm_auto_width" value="1" <?php checked( $style->post_content['auto_width'], 1 ) ?> /> |
|
19 | 19 | <?php _e( 'Automatic Width for drop-down fields', 'formidable' ) ?></label> |
20 | 20 | </p> |
21 | 21 | |
22 | 22 | <div class="field-group clearfix"> |
23 | 23 | <label><?php _e( 'Padding', 'formidable' ) ?></label> |
24 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_pad') ) ?>" id="frm_field_pad" value="<?php echo esc_attr( $style->post_content['field_pad'] ) ?>" /> |
|
24 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_pad' ) ) ?>" id="frm_field_pad" value="<?php echo esc_attr( $style->post_content['field_pad'] ) ?>" /> |
|
25 | 25 | </div> |
26 | 26 | |
27 | 27 | <div class="field-group clearfix"> |
28 | 28 | <label><?php _e( 'Margin', 'formidable' ) ?></label> |
29 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('field_margin') ) ?>" id="frm_field_margin" value="<?php echo esc_attr( $style->post_content['field_margin'] ) ?>" /> |
|
29 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'field_margin' ) ) ?>" id="frm_field_margin" value="<?php echo esc_attr( $style->post_content['field_margin'] ) ?>" /> |
|
30 | 30 | </div> |
31 | 31 | |
32 | 32 | <div class="field-group clearfix"> |
33 | 33 | <label><?php _e( 'Corners', 'formidable' ) ?> <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Formidable uses CSS3 border-radius for corner rounding, which is not currently supported by Internet Explorer.', 'formidable' ) ?>" ></span></label> |
34 | - <input type="text" value="<?php echo esc_attr( $style->post_content['border_radius'] ) ?>" name="<?php echo esc_attr( $frm_style->get_field_name('border_radius') ) ?>" id="frm_border_radius" /> |
|
34 | + <input type="text" value="<?php echo esc_attr( $style->post_content['border_radius'] ) ?>" name="<?php echo esc_attr( $frm_style->get_field_name( 'border_radius' ) ) ?>" id="frm_border_radius" /> |
|
35 | 35 | </div> |
36 | 36 | |
37 | 37 | <div class="field-group clearfix frm-first-row"> |
38 | 38 | <label><?php _e( 'Weight', 'formidable' ) ?></label> |
39 | - <select name="<?php echo esc_attr( $frm_style->get_field_name('field_weight') ) ?>" id="frm_field_weight"> |
|
39 | + <select name="<?php echo esc_attr( $frm_style->get_field_name( 'field_weight' ) ) ?>" id="frm_field_weight"> |
|
40 | 40 | <?php foreach ( FrmStyle::get_bold_options() as $value => $name ) { ?> |
41 | 41 | <option value="<?php echo esc_attr( $value ) ?>" <?php selected( $style->post_content['field_weight'], $value ) ?>><?php echo esc_attr( $name ) ?></option> |
42 | 42 | <?php } ?> |
@@ -1,26 +1,26 @@ discard block |
||
1 | 1 | <div class="field-group clearfix frm-half frm-first-row"> |
2 | 2 | <label><?php _e( 'Radio', 'formidable' ) ?></label> |
3 | - <select name="<?php echo esc_attr( $frm_style->get_field_name('radio_align') ) ?>" id="frm_radio_align"> |
|
4 | - <option value="block" <?php selected($style->post_content['radio_align'], 'block') ?>><?php _e( 'Multiple Rows' , 'formidable' ) ?></option> |
|
5 | - <option value="inline" <?php selected($style->post_content['radio_align'], 'inline') ?>><?php _e( 'Single Row' , 'formidable' ) ?></option> |
|
3 | + <select name="<?php echo esc_attr( $frm_style->get_field_name( 'radio_align' ) ) ?>" id="frm_radio_align"> |
|
4 | + <option value="block" <?php selected( $style->post_content['radio_align'], 'block' ) ?>><?php _e( 'Multiple Rows', 'formidable' ) ?></option> |
|
5 | + <option value="inline" <?php selected( $style->post_content['radio_align'], 'inline' ) ?>><?php _e( 'Single Row', 'formidable' ) ?></option> |
|
6 | 6 | </select> |
7 | 7 | </div> |
8 | 8 | |
9 | 9 | <div class="field-group clearfix frm-half frm-first-row"> |
10 | 10 | <label><?php _e( 'Check Box', 'formidable' ) ?></label> |
11 | - <select name="<?php echo esc_attr( $frm_style->get_field_name('check_align') ) ?>" id="frm_check_align"> |
|
12 | - <option value="block" <?php selected($style->post_content['check_align'], 'block') ?>><?php _e( 'Multiple Rows' , 'formidable' ) ?></option> |
|
13 | - <option value="inline" <?php selected($style->post_content['check_align'], 'inline') ?>><?php _e( 'Single Row' , 'formidable' ) ?></option> |
|
11 | + <select name="<?php echo esc_attr( $frm_style->get_field_name( 'check_align' ) ) ?>" id="frm_check_align"> |
|
12 | + <option value="block" <?php selected( $style->post_content['check_align'], 'block' ) ?>><?php _e( 'Multiple Rows', 'formidable' ) ?></option> |
|
13 | + <option value="inline" <?php selected( $style->post_content['check_align'], 'inline' ) ?>><?php _e( 'Single Row', 'formidable' ) ?></option> |
|
14 | 14 | </select> |
15 | 15 | </div> |
16 | 16 | |
17 | 17 | <div class="field-group field-group-background clearfix"> |
18 | 18 | <label><?php _e( 'Color', 'formidable' ) ?></label> |
19 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('check_label_color') ) ?>" id="frm_check_label_color" class="hex" value="<?php echo esc_attr( $style->post_content['check_label_color'] ) ?>" /> |
|
19 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'check_label_color' ) ) ?>" id="frm_check_label_color" class="hex" value="<?php echo esc_attr( $style->post_content['check_label_color'] ) ?>" /> |
|
20 | 20 | </div> |
21 | 21 | <div class="field-group clearfix"> |
22 | 22 | <label><?php _e( 'Weight', 'formidable' ) ?></label> |
23 | - <select name="<?php echo esc_attr( $frm_style->get_field_name('check_weight') ) ?>" id="frm_check_weight"> |
|
23 | + <select name="<?php echo esc_attr( $frm_style->get_field_name( 'check_weight' ) ) ?>" id="frm_check_weight"> |
|
24 | 24 | <?php foreach ( FrmStyle::get_bold_options() as $value => $name ) { ?> |
25 | 25 | <option value="<?php echo esc_attr( $value ) ?>" <?php selected( $style->post_content['check_weight'], $value ) ?>><?php echo esc_html( $name ) ?></option> |
26 | 26 | <?php } ?> |
@@ -28,5 +28,5 @@ discard block |
||
28 | 28 | </div> |
29 | 29 | <div class="field-group clearfix"> |
30 | 30 | <label><?php _e( 'Size', 'formidable' ) ?></label> |
31 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('check_font_size') ) ?>" id="frm_check_font_size" value="<?php echo esc_attr( $style->post_content['check_font_size'] ) ?>" size="3" /> |
|
31 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'check_font_size' ) ) ?>" id="frm_check_font_size" value="<?php echo esc_attr( $style->post_content['check_font_size'] ) ?>" size="3" /> |
|
32 | 32 | </div> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <p class="frm_no_top_margin"> |
2 | 2 | <label for="frm_submit_style"> |
3 | - <input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name('submit_style') ) ?>" id="frm_submit_style" <?php checked( $style->post_content['submit_style'], 1 ) ?> value="1" /> |
|
3 | + <input type="checkbox" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_style' ) ) ?>" id="frm_submit_style" <?php checked( $style->post_content['submit_style'], 1 ) ?> value="1" /> |
|
4 | 4 | <?php esc_html_e( 'Disable submit button styling', 'formidable' ); ?> |
5 | 5 | <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Note: If disabled, you may not see the change take effect until you make 2 more styling changes or click "Update Options".', 'formidable' ) ?>"></span> |
6 | 6 | </label> |
@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | <div class="posttypediv"> |
10 | 10 | <ul class="posttype-tabs add-menu-item-tabs"> |
11 | 11 | <li <?php echo ( 'default' == $current_tab ? ' class="tabs"' : '' ); ?>> |
12 | - <a href="<?php echo esc_url('?page=formidable-styles&page-tab=default#tabs-panel-button-default') ?>" class="nav-tab-link" data-type="tabs-panel-button-default" ><?php _e( 'Default', 'formidable' ) ?></a> |
|
12 | + <a href="<?php echo esc_url( '?page=formidable-styles&page-tab=default#tabs-panel-button-default' ) ?>" class="nav-tab-link" data-type="tabs-panel-button-default" ><?php _e( 'Default', 'formidable' ) ?></a> |
|
13 | 13 | </li> |
14 | 14 | <li <?php echo ( 'button-hover' == $current_tab ? ' class="tabs"' : '' ); ?>> |
15 | - <a href="<?php echo esc_url('?page=formidable-styles&page-tab=button-hover#page-button-hover') ?>" class="nav-tab-link" data-type="tabs-panel-button-hover" ><?php _e( 'Hover', 'formidable' ) ?></a> |
|
15 | + <a href="<?php echo esc_url( '?page=formidable-styles&page-tab=button-hover#page-button-hover' ) ?>" class="nav-tab-link" data-type="tabs-panel-button-hover" ><?php _e( 'Hover', 'formidable' ) ?></a> |
|
16 | 16 | </li> |
17 | 17 | <li <?php echo ( 'button-click' == $current_tab ? ' class="tabs"' : '' ); ?>> |
18 | 18 | <a href="?page=formidable-styles&page-tab=button-click#tabs-panel-button-click" class="nav-tab-link" data-type="tabs-panel-button-click"><?php _e( 'Click', 'formidable' ) ?></a> |
@@ -24,22 +24,22 @@ discard block |
||
24 | 24 | ?>"> |
25 | 25 | <div class="field-group field-group-border clearfix"> |
26 | 26 | <label><?php _e( 'Size', 'formidable' ) ?></label> |
27 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_font_size') ) ?>" id="frm_submit_font_size" value="<?php echo esc_attr( $style->post_content['submit_font_size'] ) ?>" size="3" /> |
|
27 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_font_size' ) ) ?>" id="frm_submit_font_size" value="<?php echo esc_attr( $style->post_content['submit_font_size'] ) ?>" size="3" /> |
|
28 | 28 | </div> |
29 | 29 | |
30 | 30 | <div class="field-group clearfix"> |
31 | 31 | <label><?php _e( 'Width', 'formidable' ) ?></label> |
32 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_width') ) ?>" id="frm_submit_width" value="<?php echo esc_attr( $style->post_content['submit_width'] ) ?>" size="5" /> |
|
32 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_width' ) ) ?>" id="frm_submit_width" value="<?php echo esc_attr( $style->post_content['submit_width'] ) ?>" size="5" /> |
|
33 | 33 | </div> |
34 | 34 | |
35 | 35 | <div class="field-group clearfix"> |
36 | 36 | <label><?php _e( 'Height', 'formidable' ) ?></label> |
37 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_height') ) ?>" id="frm_submit_height" value="<?php echo esc_attr( $style->post_content['submit_height'] ) ?>" size="5" /> |
|
37 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_height' ) ) ?>" id="frm_submit_height" value="<?php echo esc_attr( $style->post_content['submit_height'] ) ?>" size="5" /> |
|
38 | 38 | </div> |
39 | 39 | |
40 | 40 | <div class="field-group clearfix"> |
41 | 41 | <label><?php _e( 'Weight', 'formidable' ) ?></label> |
42 | - <select name="<?php echo esc_attr( $frm_style->get_field_name('submit_weight') ) ?>" id="frm_submit_weight"> |
|
42 | + <select name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_weight' ) ) ?>" id="frm_submit_weight"> |
|
43 | 43 | <?php foreach ( FrmStyle::get_bold_options() as $value => $name ) { ?> |
44 | 44 | <option value="<?php echo esc_attr( $value ) ?>" <?php selected( $style->post_content['submit_weight'], $value ) ?>><?php echo esc_html( $name ) ?></option> |
45 | 45 | <?php } ?> |
@@ -48,48 +48,48 @@ discard block |
||
48 | 48 | |
49 | 49 | <div class="field-group clearfix"> |
50 | 50 | <label><?php _e( 'Corners', 'formidable' ) ?></label> |
51 | - <input type="text" value="<?php echo esc_attr( $style->post_content['submit_border_radius'] ) ?>" name="<?php echo esc_attr( $frm_style->get_field_name('submit_border_radius') ) ?>" id="frm_submit_border_radius" size="4"/> |
|
51 | + <input type="text" value="<?php echo esc_attr( $style->post_content['submit_border_radius'] ) ?>" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_border_radius' ) ) ?>" id="frm_submit_border_radius" size="4"/> |
|
52 | 52 | </div> |
53 | 53 | |
54 | 54 | <div class="field-group field-group-border clearfix"> |
55 | 55 | <label><?php _e( 'BG color', 'formidable' ) ?></label> |
56 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_bg_color') ) ?>" id="frm_submit_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_bg_color'] ) ?>" /> |
|
56 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_bg_color' ) ) ?>" id="frm_submit_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_bg_color'] ) ?>" /> |
|
57 | 57 | </div> |
58 | 58 | |
59 | 59 | <div class="field-group clearfix"> |
60 | 60 | <label><?php _e( 'Text', 'formidable' ) ?></label> |
61 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_text_color') ) ?>" id="frm_submit_text_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_text_color'] ) ?>" /> |
|
61 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_text_color' ) ) ?>" id="frm_submit_text_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_text_color'] ) ?>" /> |
|
62 | 62 | </div> |
63 | 63 | |
64 | 64 | <div class="field-group field-group-border clearfix"> |
65 | 65 | <label><?php _e( 'Border', 'formidable' ) ?></label> |
66 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_border_color') ) ?>" id="frm_submit_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_border_color'] ) ?>" /> |
|
66 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_border_color' ) ) ?>" id="frm_submit_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_border_color'] ) ?>" /> |
|
67 | 67 | </div> |
68 | 68 | |
69 | 69 | <div class="field-group clearfix"> |
70 | 70 | <label><?php _e( 'Thickness', 'formidable' ) ?></label> |
71 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_border_width') ) ?>" id="frm_submit_border_width" value="<?php echo esc_attr( $style->post_content['submit_border_width'] ) ?>" size="4" /> |
|
71 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_border_width' ) ) ?>" id="frm_submit_border_width" value="<?php echo esc_attr( $style->post_content['submit_border_width'] ) ?>" size="4" /> |
|
72 | 72 | </div> |
73 | 73 | |
74 | 74 | <div class="field-group clearfix"> |
75 | 75 | <label><?php _e( 'Shadow', 'formidable' ) ?></label> |
76 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_shadow_color') ) ?>" id="frm_submit_shadow_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_shadow_color'] ) ?>" /> |
|
76 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_shadow_color' ) ) ?>" id="frm_submit_shadow_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_shadow_color'] ) ?>" /> |
|
77 | 77 | </div> |
78 | 78 | |
79 | 79 | <div class="clear"></div> |
80 | 80 | <div class="field-group field-group-border frm-full"> |
81 | 81 | <label><?php _e( 'BG Image', 'formidable' ) ?></label> |
82 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_bg_img') ) ?>" id="frm_submit_bg_img" value="<?php echo esc_attr( $style->post_content['submit_bg_img'] ) ?>" /> |
|
82 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_bg_img' ) ) ?>" id="frm_submit_bg_img" value="<?php echo esc_attr( $style->post_content['submit_bg_img'] ) ?>" /> |
|
83 | 83 | </div> |
84 | 84 | |
85 | 85 | <div class="field-group field-group-border clearfix"> |
86 | 86 | <label><?php _e( 'Margin', 'formidable' ) ?></label> |
87 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_margin') ) ?>" id="frm_submit_margin" value="<?php echo esc_attr( $style->post_content['submit_margin'] ) ?>" size="6" /> |
|
87 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_margin' ) ) ?>" id="frm_submit_margin" value="<?php echo esc_attr( $style->post_content['submit_margin'] ) ?>" size="6" /> |
|
88 | 88 | </div> |
89 | 89 | |
90 | 90 | <div class="field-group clearfix"> |
91 | 91 | <label><?php _e( 'Padding', 'formidable' ) ?></label> |
92 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_padding') ) ?>" id="frm_submit_padding" value="<?php echo esc_attr( $style->post_content['submit_padding'] ) ?>" size="6" /> |
|
92 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_padding' ) ) ?>" id="frm_submit_padding" value="<?php echo esc_attr( $style->post_content['submit_padding'] ) ?>" size="6" /> |
|
93 | 93 | </div> |
94 | 94 | <div class="clear"></div> |
95 | 95 | </div><!-- /.tabs-panel --> |
@@ -99,17 +99,17 @@ discard block |
||
99 | 99 | ?>"> |
100 | 100 | <div class="field-group clearfix"> |
101 | 101 | <label><?php _e( 'BG color', 'formidable' ) ?></label> |
102 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_hover_bg_color') ) ?>" id="frm_submit_hover_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_hover_bg_color'] ) ?>" /> |
|
102 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_hover_bg_color' ) ) ?>" id="frm_submit_hover_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_hover_bg_color'] ) ?>" /> |
|
103 | 103 | </div> |
104 | 104 | |
105 | 105 | <div class="field-group clearfix"> |
106 | 106 | <label><?php _e( 'Text', 'formidable' ) ?></label> |
107 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_hover_color') ) ?>" id="frm_submit_hover_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_hover_color'] ) ?>" /> |
|
107 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_hover_color' ) ) ?>" id="frm_submit_hover_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_hover_color'] ) ?>" /> |
|
108 | 108 | </div> |
109 | 109 | |
110 | 110 | <div class="field-group clearfix"> |
111 | 111 | <label><?php _e( 'Border', 'formidable' ) ?></label> |
112 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_hover_border_color') ) ?>" id="frm_submit_hover_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_hover_border_color'] ) ?>" /> |
|
112 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_hover_border_color' ) ) ?>" id="frm_submit_hover_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_hover_border_color'] ) ?>" /> |
|
113 | 113 | </div> |
114 | 114 | |
115 | 115 | <div class="clear"></div> |
@@ -120,17 +120,17 @@ discard block |
||
120 | 120 | ?>"> |
121 | 121 | <div class="field-group clearfix"> |
122 | 122 | <label><?php _e( 'BG color', 'formidable' ) ?></label> |
123 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_active_bg_color') ) ?>" id="frm_submit_active_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_active_bg_color'] ) ?>" /> |
|
123 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_active_bg_color' ) ) ?>" id="frm_submit_active_bg_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_active_bg_color'] ) ?>" /> |
|
124 | 124 | </div> |
125 | 125 | |
126 | 126 | <div class="field-group clearfix"> |
127 | 127 | <label><?php _e( 'Text', 'formidable' ) ?></label> |
128 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_active_color') ) ?>" id="frm_submit_active_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_active_color'] ) ?>" /> |
|
128 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_active_color' ) ) ?>" id="frm_submit_active_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_active_color'] ) ?>" /> |
|
129 | 129 | </div> |
130 | 130 | |
131 | 131 | <div class="field-group clearfix"> |
132 | 132 | <label><?php _e( 'Border', 'formidable' ) ?></label> |
133 | - <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name('submit_active_border_color') ) ?>" id="frm_submit_active_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_active_border_color'] ) ?>" /> |
|
133 | + <input type="text" name="<?php echo esc_attr( $frm_style->get_field_name( 'submit_active_border_color' ) ) ?>" id="frm_submit_active_border_color" class="hex" value="<?php echo esc_attr( $style->post_content['submit_active_border_color'] ) ?>" /> |
|
134 | 134 | </div> |
135 | 135 | |
136 | 136 | <div class="clear"></div> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <div id="form_entries_page" class="wrap"> |
2 | 2 | <h1><?php _e( 'Entries', 'formidable' ); ?> |
3 | - <?php do_action('frm_entry_inside_h2', $form); ?> |
|
3 | + <?php do_action( 'frm_entry_inside_h2', $form ); ?> |
|
4 | 4 | </h1> |
5 | 5 | |
6 | 6 | <?php require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <div id="poststuff"> |
10 | 10 | <div id="post-body" class="metabox-holder columns-2"> |
11 | 11 | <div id="post-body-content"> |
12 | - <?php FrmAppController::get_form_nav($form, true, 'hide'); ?> |
|
12 | + <?php FrmAppController::get_form_nav( $form, true, 'hide' ); ?> |
|
13 | 13 | </div> |
14 | 14 | <div id="postbox-container-1" class="postbox-container"> |
15 | 15 | <input type="hidden" name="page" value="formidable-entries" /> |
@@ -23,41 +23,41 @@ |
||
23 | 23 | |
24 | 24 | global $frm_vars; |
25 | 25 | $frm_vars = array( |
26 | - 'load_css' => false, 'forms_loaded' => array(), |
|
27 | - 'created_entries' => array(), |
|
28 | - 'pro_is_authorized' => false, |
|
26 | + 'load_css' => false, 'forms_loaded' => array(), |
|
27 | + 'created_entries' => array(), |
|
28 | + 'pro_is_authorized' => false, |
|
29 | 29 | ); |
30 | 30 | |
31 | 31 | function frm_forms_autoloader( $class_name ) { |
32 | - // Only load Frm classes here |
|
32 | + // Only load Frm classes here |
|
33 | 33 | if ( ! preg_match( '/^Frm.+$/', $class_name ) ) { |
34 | - return; |
|
35 | - } |
|
34 | + return; |
|
35 | + } |
|
36 | 36 | |
37 | - $filepath = dirname(__FILE__); |
|
37 | + $filepath = dirname(__FILE__); |
|
38 | 38 | if ( preg_match( '/^FrmPro.+$/', $class_name ) ) { |
39 | - $filepath .= '/pro'; |
|
40 | - } |
|
41 | - $filepath .= '/classes'; |
|
39 | + $filepath .= '/pro'; |
|
40 | + } |
|
41 | + $filepath .= '/classes'; |
|
42 | 42 | |
43 | 43 | if ( preg_match( '/^.+Helper$/', $class_name ) ) { |
44 | - $filepath .= '/helpers/'; |
|
44 | + $filepath .= '/helpers/'; |
|
45 | 45 | } else if ( preg_match( '/^.+Controller$/', $class_name ) ) { |
46 | - $filepath .= '/controllers/'; |
|
47 | - } else { |
|
48 | - $filepath .= '/models/'; |
|
49 | - } |
|
46 | + $filepath .= '/controllers/'; |
|
47 | + } else { |
|
48 | + $filepath .= '/models/'; |
|
49 | + } |
|
50 | 50 | |
51 | 51 | $filepath .= $class_name . '.php'; |
52 | 52 | |
53 | - if ( file_exists($filepath) ) { |
|
54 | - include($filepath); |
|
55 | - } |
|
53 | + if ( file_exists($filepath) ) { |
|
54 | + include($filepath); |
|
55 | + } |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // if __autoload is active, put it on the spl_autoload stack |
59 | 59 | if ( is_array(spl_autoload_functions()) && in_array( '__autoload', spl_autoload_functions()) ) { |
60 | - spl_autoload_register('__autoload'); |
|
60 | + spl_autoload_register('__autoload'); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // Add the autoloader |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | return; |
35 | 35 | } |
36 | 36 | |
37 | - $filepath = dirname(__FILE__); |
|
37 | + $filepath = dirname( __FILE__ ); |
|
38 | 38 | if ( preg_match( '/^FrmPro.+$/', $class_name ) ) { |
39 | 39 | $filepath .= '/pro'; |
40 | 40 | } |
@@ -50,25 +50,25 @@ discard block |
||
50 | 50 | |
51 | 51 | $filepath .= $class_name . '.php'; |
52 | 52 | |
53 | - if ( file_exists($filepath) ) { |
|
54 | - include($filepath); |
|
53 | + if ( file_exists( $filepath ) ) { |
|
54 | + include( $filepath ); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | 58 | // if __autoload is active, put it on the spl_autoload stack |
59 | -if ( is_array(spl_autoload_functions()) && in_array( '__autoload', spl_autoload_functions()) ) { |
|
60 | - spl_autoload_register('__autoload'); |
|
59 | +if ( is_array( spl_autoload_functions() ) && in_array( '__autoload', spl_autoload_functions() ) ) { |
|
60 | + spl_autoload_register( '__autoload' ); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | // Add the autoloader |
64 | -spl_autoload_register('frm_forms_autoloader'); |
|
64 | +spl_autoload_register( 'frm_forms_autoloader' ); |
|
65 | 65 | |
66 | -$frm_path = dirname(__FILE__); |
|
67 | -if ( file_exists($frm_path . '/pro/formidable-pro.php') ) { |
|
66 | +$frm_path = dirname( __FILE__ ); |
|
67 | +if ( file_exists( $frm_path . '/pro/formidable-pro.php' ) ) { |
|
68 | 68 | include( $frm_path . '/pro/formidable-pro.php' ); |
69 | 69 | } |
70 | 70 | |
71 | 71 | FrmHooksController::trigger_load_hook(); |
72 | 72 | |
73 | 73 | include_once( $frm_path . '/deprecated.php' ); |
74 | -unset($frm_path); |
|
74 | +unset( $frm_path ); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $join_form_in_query = true; |
24 | 24 | } |
25 | 25 | |
26 | - $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : ''; |
|
26 | + $s = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; |
|
27 | 27 | |
28 | 28 | if ( $s != '' && FrmAppHelper::pro_is_installed() ) { |
29 | 29 | $fid = isset( $_REQUEST['fid'] ) ? sanitize_title( $_REQUEST['fid'] ) : ''; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | $orderby = isset( $_REQUEST['orderby'] ) ? sanitize_title( $_REQUEST['orderby'] ) : $default_orderby; |
34 | - if ( strpos($orderby, 'meta') !== false ) { |
|
34 | + if ( strpos( $orderby, 'meta' ) !== false ) { |
|
35 | 35 | $order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) ); |
36 | 36 | $orderby .= in_array( $order_field_type, array( 'number', 'scale' ) ) ? ' +0 ' : ''; |
37 | 37 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $start = (int) isset( $_REQUEST['start'] ) ? absint( $_REQUEST['start'] ) : ( ( $page - 1 ) * $per_page ); |
44 | 44 | |
45 | 45 | $this->items = FrmEntry::getAll( $s_query, $order, ' LIMIT ' . $start . ',' . $per_page, true, $join_form_in_query ); |
46 | - $total_items = FrmEntry::getRecordCount($s_query); |
|
46 | + $total_items = FrmEntry::getRecordCount( $s_query ); |
|
47 | 47 | |
48 | 48 | $this->set_pagination_args( array( |
49 | 49 | 'total_items' => $total_items, |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | public function no_items() { |
55 | 55 | $s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''; |
56 | - if ( ! empty($s) ) { |
|
56 | + if ( ! empty( $s ) ) { |
|
57 | 57 | _e( 'No Entries Found', 'formidable' ); |
58 | 58 | return; |
59 | 59 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $form = $this->params['form']; |
63 | 63 | |
64 | 64 | if ( $form_id ) { |
65 | - $form = FrmForm::getOne($form_id); |
|
65 | + $form = FrmForm::getOne( $form_id ); |
|
66 | 66 | } |
67 | 67 | $colspan = $this->get_column_count(); |
68 | 68 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | $r = "<tr id='item-action-{$item->id}'$style>"; |
122 | 122 | |
123 | - list( $columns, $hidden, , $primary ) = $this->get_column_info(); |
|
123 | + list( $columns, $hidden,, $primary ) = $this->get_column_info(); |
|
124 | 124 | $action_col = false; |
125 | 125 | |
126 | 126 | foreach ( $columns as $column_name => $column_display_name ) { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | $attributes = 'class="' . esc_attr( $class ) . '"'; |
140 | - unset($class); |
|
140 | + unset( $class ); |
|
141 | 141 | $attributes .= ' data-colname="' . $column_display_name . '"'; |
142 | 142 | |
143 | 143 | $form_id = $this->params['form'] ? $this->params['form'] : 0; |
@@ -155,24 +155,24 @@ discard block |
||
155 | 155 | break; |
156 | 156 | case 'name': |
157 | 157 | case 'description': |
158 | - $val = FrmAppHelper::truncate(strip_tags($item->{$col_name}), 100); |
|
158 | + $val = FrmAppHelper::truncate( strip_tags( $item->{$col_name}), 100 ); |
|
159 | 159 | break; |
160 | 160 | case 'created_at': |
161 | 161 | case 'updated_at': |
162 | - $date = FrmAppHelper::get_formatted_time($item->{$col_name}); |
|
162 | + $date = FrmAppHelper::get_formatted_time( $item->{$col_name}); |
|
163 | 163 | $val = '<abbr title="' . esc_attr( FrmAppHelper::get_formatted_time( $item->{$col_name}, '', 'g:i:s A' ) ) . '">' . $date . '</abbr>'; |
164 | 164 | break; |
165 | 165 | case 'is_draft': |
166 | - $val = empty($item->is_draft) ? __( 'No') : __( 'Yes'); |
|
166 | + $val = empty( $item->is_draft ) ? __( 'No' ) : __( 'Yes' ); |
|
167 | 167 | break; |
168 | 168 | case 'form_id': |
169 | - $val = FrmFormsHelper::edit_form_link($item->form_id); |
|
169 | + $val = FrmFormsHelper::edit_form_link( $item->form_id ); |
|
170 | 170 | break; |
171 | 171 | case 'post_id': |
172 | - $val = FrmAppHelper::post_edit_link($item->post_id); |
|
172 | + $val = FrmAppHelper::post_edit_link( $item->post_id ); |
|
173 | 173 | break; |
174 | 174 | case 'user_id': |
175 | - $user = get_userdata($item->user_id); |
|
175 | + $user = get_userdata( $item->user_id ); |
|
176 | 176 | $val = $user ? $user->user_login : ''; |
177 | 177 | break; |
178 | 178 | default: |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | } |
195 | 195 | $r .= '</td>'; |
196 | 196 | } |
197 | - unset($val); |
|
197 | + unset( $val ); |
|
198 | 198 | } |
199 | 199 | $r .= '</tr>'; |
200 | 200 | |
@@ -207,12 +207,12 @@ discard block |
||
207 | 207 | private function get_actions( &$actions, $item, $view_link ) { |
208 | 208 | $actions['view'] = '<a href="' . esc_url( $view_link ) . '">' . __( 'View', 'formidable' ) . '</a>'; |
209 | 209 | |
210 | - if ( current_user_can('frm_delete_entries') ) { |
|
210 | + if ( current_user_can( 'frm_delete_entries' ) ) { |
|
211 | 211 | $delete_link = '?page=formidable-entries&frm_action=destroy&id=' . $item->id . '&form=' . $this->params['form']; |
212 | 212 | $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( $delete_link ) ) . '" class="submitdelete" onclick="return confirm(\'' . esc_attr( __( 'Are you sure you want to delete that?', 'formidable' ) ) . '\')">' . __( 'Delete' ) . '</a>'; |
213 | 213 | } |
214 | 214 | |
215 | - $actions = apply_filters('frm_row_actions', $actions, $item); |
|
215 | + $actions = apply_filters( 'frm_row_actions', $actions, $item ); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | private function get_column_value( $item, &$val ) { |
@@ -6,10 +6,10 @@ discard block |
||
6 | 6 | protected $field; |
7 | 7 | |
8 | 8 | public function prepare_items() { |
9 | - global $per_page; |
|
9 | + global $per_page; |
|
10 | 10 | |
11 | 11 | $per_page = $this->get_items_per_page( 'formidable_page_formidable_entries_per_page' ); |
12 | - $form_id = $this->params['form']; |
|
12 | + $form_id = $this->params['form']; |
|
13 | 13 | |
14 | 14 | $default_orderby = 'id'; |
15 | 15 | $default_order = 'DESC'; |
@@ -25,25 +25,25 @@ discard block |
||
25 | 25 | |
26 | 26 | $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : ''; |
27 | 27 | |
28 | - if ( $s != '' && FrmAppHelper::pro_is_installed() ) { |
|
29 | - $fid = isset( $_REQUEST['fid'] ) ? sanitize_title( $_REQUEST['fid'] ) : ''; |
|
30 | - $s_query = FrmProEntriesHelper::get_search_str( $s_query, $s, $form_id, $fid ); |
|
31 | - } |
|
28 | + if ( $s != '' && FrmAppHelper::pro_is_installed() ) { |
|
29 | + $fid = isset( $_REQUEST['fid'] ) ? sanitize_title( $_REQUEST['fid'] ) : ''; |
|
30 | + $s_query = FrmProEntriesHelper::get_search_str( $s_query, $s, $form_id, $fid ); |
|
31 | + } |
|
32 | 32 | |
33 | - $orderby = isset( $_REQUEST['orderby'] ) ? sanitize_title( $_REQUEST['orderby'] ) : $default_orderby; |
|
34 | - if ( strpos($orderby, 'meta') !== false ) { |
|
35 | - $order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) ); |
|
33 | + $orderby = isset( $_REQUEST['orderby'] ) ? sanitize_title( $_REQUEST['orderby'] ) : $default_orderby; |
|
34 | + if ( strpos($orderby, 'meta') !== false ) { |
|
35 | + $order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) ); |
|
36 | 36 | $orderby .= in_array( $order_field_type, array( 'number', 'scale' ) ) ? ' +0 ' : ''; |
37 | - } |
|
37 | + } |
|
38 | 38 | |
39 | 39 | $order = isset( $_REQUEST['order'] ) ? sanitize_title( $_REQUEST['order'] ) : $default_order; |
40 | 40 | $order = ' ORDER BY ' . $orderby . ' ' . $order; |
41 | 41 | |
42 | - $page = $this->get_pagenum(); |
|
42 | + $page = $this->get_pagenum(); |
|
43 | 43 | $start = (int) isset( $_REQUEST['start'] ) ? absint( $_REQUEST['start'] ) : ( ( $page - 1 ) * $per_page ); |
44 | 44 | |
45 | 45 | $this->items = FrmEntry::getAll( $s_query, $order, ' LIMIT ' . $start . ',' . $per_page, true, $join_form_in_query ); |
46 | - $total_items = FrmEntry::getRecordCount($s_query); |
|
46 | + $total_items = FrmEntry::getRecordCount($s_query); |
|
47 | 47 | |
48 | 48 | $this->set_pagination_args( array( |
49 | 49 | 'total_items' => $total_items, |
@@ -52,19 +52,19 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | public function no_items() { |
55 | - $s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''; |
|
56 | - if ( ! empty($s) ) { |
|
57 | - _e( 'No Entries Found', 'formidable' ); |
|
58 | - return; |
|
59 | - } |
|
55 | + $s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''; |
|
56 | + if ( ! empty($s) ) { |
|
57 | + _e( 'No Entries Found', 'formidable' ); |
|
58 | + return; |
|
59 | + } |
|
60 | 60 | |
61 | 61 | $form_id = $this->params['form']; |
62 | 62 | $form = $this->params['form']; |
63 | 63 | |
64 | - if ( $form_id ) { |
|
65 | - $form = FrmForm::getOne($form_id); |
|
66 | - } |
|
67 | - $colspan = $this->get_column_count(); |
|
64 | + if ( $form_id ) { |
|
65 | + $form = FrmForm::getOne($form_id); |
|
66 | + } |
|
67 | + $colspan = $this->get_column_count(); |
|
68 | 68 | |
69 | 69 | include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/no_entries.php' ); |
70 | 70 | } |
@@ -84,12 +84,12 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
87 | - * Gets the name of the primary column in the Entries screen |
|
88 | - * |
|
89 | - * @since 2.0.14 |
|
90 | - * |
|
91 | - * @return string $primary_column |
|
92 | - */ |
|
87 | + * Gets the name of the primary column in the Entries screen |
|
88 | + * |
|
89 | + * @since 2.0.14 |
|
90 | + * |
|
91 | + * @return string $primary_column |
|
92 | + */ |
|
93 | 93 | protected function get_primary_column_name() { |
94 | 94 | $columns = get_column_headers( $this->screen ); |
95 | 95 | $hidden = get_hidden_columns( $this->screen ); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | $this->get_actions( $actions, $item, $view_link ); |
115 | 115 | |
116 | - $action_links = $this->row_actions( $actions ); |
|
116 | + $action_links = $this->row_actions( $actions ); |
|
117 | 117 | |
118 | 118 | // Set up the checkbox ( because the user is editable, otherwise its empty ) |
119 | 119 | $checkbox = "<input type='checkbox' name='item-action[]' id='cb-item-action-{$item->id}' value='{$item->id}' />"; |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $r = "<tr id='item-action-{$item->id}'$style>"; |
122 | 122 | |
123 | 123 | list( $columns, $hidden, , $primary ) = $this->get_column_info(); |
124 | - $action_col = false; |
|
124 | + $action_col = false; |
|
125 | 125 | |
126 | 126 | foreach ( $columns as $column_name => $column_display_name ) { |
127 | 127 | $class = $column_name . ' column-' . $column_name; |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | if ( in_array( $column_name, $hidden ) ) { |
134 | 134 | $class .= ' frm_hidden'; |
135 | 135 | } else if ( ! $action_col && ! in_array( $column_name, array( 'cb', 'id', 'form_id', 'post_id' ) ) ) { |
136 | - $action_col = $column_name; |
|
137 | - } |
|
136 | + $action_col = $column_name; |
|
137 | + } |
|
138 | 138 | |
139 | 139 | $attributes = 'class="' . esc_attr( $class ) . '"'; |
140 | 140 | unset($class); |
@@ -152,30 +152,30 @@ discard block |
||
152 | 152 | case 'ip': |
153 | 153 | case 'id': |
154 | 154 | case 'item_key': |
155 | - $val = $item->{$col_name}; |
|
156 | - break; |
|
155 | + $val = $item->{$col_name}; |
|
156 | + break; |
|
157 | 157 | case 'name': |
158 | 158 | case 'description': |
159 | - $val = FrmAppHelper::truncate(strip_tags($item->{$col_name}), 100); |
|
160 | - break; |
|
159 | + $val = FrmAppHelper::truncate(strip_tags($item->{$col_name}), 100); |
|
160 | + break; |
|
161 | 161 | case 'created_at': |
162 | 162 | case 'updated_at': |
163 | - $date = FrmAppHelper::get_formatted_time($item->{$col_name}); |
|
163 | + $date = FrmAppHelper::get_formatted_time($item->{$col_name}); |
|
164 | 164 | $val = '<abbr title="' . esc_attr( FrmAppHelper::get_formatted_time( $item->{$col_name}, '', 'g:i:s A' ) ) . '">' . $date . '</abbr>'; |
165 | 165 | break; |
166 | 166 | case 'is_draft': |
167 | - $val = empty($item->is_draft) ? __( 'No') : __( 'Yes'); |
|
168 | - break; |
|
167 | + $val = empty($item->is_draft) ? __( 'No') : __( 'Yes'); |
|
168 | + break; |
|
169 | 169 | case 'form_id': |
170 | - $val = FrmFormsHelper::edit_form_link($item->form_id); |
|
171 | - break; |
|
170 | + $val = FrmFormsHelper::edit_form_link($item->form_id); |
|
171 | + break; |
|
172 | 172 | case 'post_id': |
173 | - $val = FrmAppHelper::post_edit_link($item->post_id); |
|
174 | - break; |
|
173 | + $val = FrmAppHelper::post_edit_link($item->post_id); |
|
174 | + break; |
|
175 | 175 | case 'user_id': |
176 | - $user = get_userdata($item->user_id); |
|
177 | - $val = $user ? $user->user_login : ''; |
|
178 | - break; |
|
176 | + $user = get_userdata($item->user_id); |
|
177 | + $val = $user ? $user->user_login : ''; |
|
178 | + break; |
|
179 | 179 | default: |
180 | 180 | $val = apply_filters( 'frm_entries_' . $col_name . '_column', false, compact( 'item' ) ); |
181 | 181 | if ( $val === false ) { |
@@ -185,15 +185,15 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | if ( $col_name != 'cb' ) { |
188 | - $r .= "<td $attributes>"; |
|
188 | + $r .= "<td $attributes>"; |
|
189 | 189 | if ( $column_name == $action_col ) { |
190 | 190 | $edit_link = '?page=formidable-entries&frm_action=edit&id=' . $item->id; |
191 | 191 | $r .= '<a href="' . esc_url( isset( $actions['edit'] ) ? $edit_link : $view_link ) . '" class="row-title" >' . $val . '</a> '; |
192 | - $r .= $action_links; |
|
192 | + $r .= $action_links; |
|
193 | 193 | } else { |
194 | - $r .= $val; |
|
195 | - } |
|
196 | - $r .= '</td>'; |
|
194 | + $r .= $val; |
|
195 | + } |
|
196 | + $r .= '</td>'; |
|
197 | 197 | } |
198 | 198 | unset($val); |
199 | 199 | } |
@@ -202,19 +202,19 @@ discard block |
||
202 | 202 | return $r; |
203 | 203 | } |
204 | 204 | |
205 | - /** |
|
206 | - * @param string $view_link |
|
207 | - */ |
|
208 | - private function get_actions( &$actions, $item, $view_link ) { |
|
205 | + /** |
|
206 | + * @param string $view_link |
|
207 | + */ |
|
208 | + private function get_actions( &$actions, $item, $view_link ) { |
|
209 | 209 | $actions['view'] = '<a href="' . esc_url( $view_link ) . '">' . __( 'View', 'formidable' ) . '</a>'; |
210 | 210 | |
211 | - if ( current_user_can('frm_delete_entries') ) { |
|
211 | + if ( current_user_can('frm_delete_entries') ) { |
|
212 | 212 | $delete_link = '?page=formidable-entries&frm_action=destroy&id=' . $item->id . '&form=' . $this->params['form']; |
213 | 213 | $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( $delete_link ) ) . '" class="submitdelete" onclick="return confirm(\'' . esc_attr( __( 'Are you sure you want to delete that?', 'formidable' ) ) . '\')">' . __( 'Delete' ) . '</a>'; |
214 | - } |
|
214 | + } |
|
215 | 215 | |
216 | - $actions = apply_filters('frm_row_actions', $actions, $item); |
|
217 | - } |
|
216 | + $actions = apply_filters('frm_row_actions', $actions, $item); |
|
217 | + } |
|
218 | 218 | |
219 | 219 | private function get_column_value( $item, &$val ) { |
220 | 220 | $col_name = $this->column_name; |
@@ -196,9 +196,9 @@ discard block |
||
196 | 196 | } |
197 | 197 | |
198 | 198 | /** |
199 | - * Flatten multi-dimensional array for multi-file upload fields |
|
200 | - * @since 2.0.9 |
|
201 | - */ |
|
199 | + * Flatten multi-dimensional array for multi-file upload fields |
|
200 | + * @since 2.0.9 |
|
201 | + */ |
|
202 | 202 | public static function flatten_multi_file_upload( $field, &$val ) { |
203 | 203 | if ( $field->type == 'file' && FrmField::is_option_true( $field, 'multiple' ) ) { |
204 | 204 | $val = FrmAppHelper::array_flatten( $val ); |
@@ -218,10 +218,10 @@ discard block |
||
218 | 218 | self::maybe_strip_html( $atts['plain_text'], $val ); |
219 | 219 | } |
220 | 220 | |
221 | - /** |
|
222 | - * Replace returns with HTML line breaks for display |
|
223 | - * @since 2.0.9 |
|
224 | - */ |
|
221 | + /** |
|
222 | + * Replace returns with HTML line breaks for display |
|
223 | + * @since 2.0.9 |
|
224 | + */ |
|
225 | 225 | public static function textarea_display_value( $type, $plain_text, &$value ) { |
226 | 226 | if ( $type == 'textarea' && ! $plain_text ) { |
227 | 227 | $value = str_replace( array( "\r\n", "\r", "\n" ), ' <br/>', $value ); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | if ( ! self::skip_field( $atts, $f ) ) { |
53 | 53 | self::fill_entry_values( $atts, $f, $values ); |
54 | 54 | } |
55 | - unset($f); |
|
55 | + unset( $f ); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | self::fill_entry_user_info( $atts, $values ); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | 'type' => $f->type, |
122 | 122 | ); |
123 | 123 | |
124 | - $values[ $f->id ] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $field_shortcodes, $f ); |
|
124 | + $values[$f->id] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $field_shortcodes, $f ); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | public static function fill_entry_values( $atts, $f, array &$values ) { |
@@ -153,22 +153,22 @@ discard block |
||
153 | 153 | self::prepare_field_output( $atts, $val ); |
154 | 154 | |
155 | 155 | if ( $atts['format'] != 'text' ) { |
156 | - $values[ $f->field_key ] = $val; |
|
156 | + $values[$f->field_key] = $val; |
|
157 | 157 | if ( $atts['entry'] && $f->type != 'textarea' ) { |
158 | - $prev_val = maybe_unserialize( $atts['entry']->metas[ $f->id ] ); |
|
158 | + $prev_val = maybe_unserialize( $atts['entry']->metas[$f->id] ); |
|
159 | 159 | if ( $prev_val != $val ) { |
160 | - $values[ $f->field_key . '-value' ] = $prev_val; |
|
160 | + $values[$f->field_key . '-value'] = $prev_val; |
|
161 | 161 | } |
162 | 162 | } |
163 | 163 | } else { |
164 | - $values[ $f->id ] = array( 'label' => $f->name, 'val' => $val, 'type' => $f->type ); |
|
164 | + $values[$f->id] = array( 'label' => $f->name, 'val' => $val, 'type' => $f->type ); |
|
165 | 165 | } |
166 | 166 | } |
167 | 167 | |
168 | 168 | private static function fill_missing_fields( $atts, &$values ) { |
169 | - if ( $atts['entry'] && ! isset( $atts['entry']->metas[ $atts['field']->id ] ) ) { |
|
169 | + if ( $atts['entry'] && ! isset( $atts['entry']->metas[$atts['field']->id] ) ) { |
|
170 | 170 | // In case include_blank is set |
171 | - $atts['entry']->metas[ $atts['field']->id ] = ''; |
|
171 | + $atts['entry']->metas[$atts['field']->id] = ''; |
|
172 | 172 | $atts['entry'] = apply_filters( 'frm_prepare_entry_content', $atts['entry'], array( 'field' => $atts['field'] ) ); |
173 | 173 | self::fill_values_from_entry( $atts, $values ); |
174 | 174 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | private static function get_field_value( $atts, &$val ) { |
182 | 182 | $f = $atts['field']; |
183 | 183 | if ( $atts['entry'] ) { |
184 | - $prev_val = maybe_unserialize( $atts['entry']->metas[ $f->id ] ); |
|
184 | + $prev_val = maybe_unserialize( $atts['entry']->metas[$f->id] ); |
|
185 | 185 | $meta = array( 'item_id' => $atts['id'], 'field_id' => $f->id, 'meta_value' => $prev_val, 'field_type' => $f->type ); |
186 | 186 | |
187 | 187 | //This filter applies to the default-message shortcode and frm-show-entry shortcode only |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | return; |
264 | 264 | } |
265 | 265 | |
266 | - $data = self::get_entry_description_data( $atts ); |
|
266 | + $data = self::get_entry_description_data( $atts ); |
|
267 | 267 | |
268 | 268 | if ( $atts['default_email'] ) { |
269 | 269 | $atts['entry']->ip = '[ip]'; |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | preg_match_all( $pattern, $u_agent, $matches ); // get the matching numbers |
351 | 351 | |
352 | 352 | // see how many we have |
353 | - $i = count($matches['browser']); |
|
353 | + $i = count( $matches['browser'] ); |
|
354 | 354 | if ( $i != 1 ) { |
355 | 355 | //we will have two since we are not using 'other' argument yet |
356 | 356 | //see if version is before or after the name |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | self::convert_entry_to_content( $values, $atts, $content ); |
376 | 376 | |
377 | 377 | if ( 'text' == $atts['format'] ) { |
378 | - $content = implode('', $content); |
|
378 | + $content = implode( '', $content ); |
|
379 | 379 | } |
380 | 380 | |
381 | 381 | if ( $atts['clickable'] ) { |
@@ -428,11 +428,11 @@ discard block |
||
428 | 428 | |
429 | 429 | // merge defaults, global settings, and shortcode options |
430 | 430 | foreach ( $default_settings as $key => $setting ) { |
431 | - if ( $atts[ $key ] != '' ) { |
|
431 | + if ( $atts[$key] != '' ) { |
|
432 | 432 | continue; |
433 | 433 | } |
434 | 434 | |
435 | - $atts[ $key ] = $setting; |
|
435 | + $atts[$key] = $setting; |
|
436 | 436 | unset( $key, $setting ); |
437 | 437 | } |
438 | 438 | } |