@@ -51,15 +51,15 @@ |
||
51 | 51 | <ul id="new_fields" class="frm_sorting <?php echo version_compare( $GLOBALS['wp_version'], '3.7.2', '>') ? 'inside' : ''; ?>"> |
52 | 52 | <?php |
53 | 53 | if ( isset($values['fields']) && ! empty($values['fields']) ) { |
54 | - $count = 0; |
|
55 | - foreach ( $values['fields'] as $field ) { |
|
56 | - $count++; |
|
54 | + $count = 0; |
|
55 | + foreach ( $values['fields'] as $field ) { |
|
56 | + $count++; |
|
57 | 57 | $field_name = 'item_meta[' . $field['id'] . ']'; |
58 | - $html_id = FrmFieldsHelper::get_html_id($field); |
|
58 | + $html_id = FrmFieldsHelper::get_html_id($field); |
|
59 | 59 | require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_field.php' ); |
60 | - unset($field, $field_name); |
|
61 | - } |
|
62 | - unset($count); |
|
60 | + unset($field, $field_name); |
|
61 | + } |
|
62 | + unset($count); |
|
63 | 63 | } ?> |
64 | 64 | </ul> |
65 | 65 | </div> |
@@ -1,10 +1,10 @@ discard block |
||
1 | -<?php wp_nonce_field('frm_save_form_nonce', 'frm_save_form'); ?> |
|
1 | +<?php wp_nonce_field( 'frm_save_form_nonce', 'frm_save_form' ); ?> |
|
2 | 2 | <input type="hidden" name="status" value="<?php echo esc_attr( $values['status'] ); ?>" /> |
3 | 3 | <input type="hidden" name="new_status" value="" /> |
4 | 4 | |
5 | 5 | <div id="frm_form_editor_container"> |
6 | 6 | <div id="titlediv"> |
7 | - <input type="text" name="name" value="<?php echo esc_attr($form->name); ?>" id="title" placeholder="<?php esc_attr_e( 'Enter title here') ?>" /> |
|
7 | + <input type="text" name="name" value="<?php echo esc_attr( $form->name ); ?>" id="title" placeholder="<?php esc_attr_e( 'Enter title here' ) ?>" /> |
|
8 | 8 | <div id="edit-slug-box" class="hide-if-no-js"> |
9 | 9 | <div id="frm_form_key_box" class="alignright"> |
10 | 10 | <strong><?php _e( 'Form Key:', 'formidable' ) ?></strong> |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | </div> |
17 | 17 | |
18 | 18 | <div class="postbox"> |
19 | - <div class="frm_no_fields <?php echo ( isset($values['fields']) && ! empty($values['fields']) ) ? 'frm_hidden' : ''; ?>"> |
|
19 | + <div class="frm_no_fields <?php echo ( isset( $values['fields'] ) && ! empty( $values['fields'] ) ) ? 'frm_hidden' : ''; ?>"> |
|
20 | 20 | <div class="alignleft sketch1"> |
21 | 21 | <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow1.png' ); ?>" alt="" /> |
22 | 22 | </div> |
@@ -50,16 +50,16 @@ discard block |
||
50 | 50 | </div> |
51 | 51 | <ul id="new_fields" class="frm_sorting inside"> |
52 | 52 | <?php |
53 | -if ( isset($values['fields']) && ! empty($values['fields']) ) { |
|
53 | +if ( isset( $values['fields'] ) && ! empty( $values['fields'] ) ) { |
|
54 | 54 | $count = 0; |
55 | 55 | foreach ( $values['fields'] as $field ) { |
56 | - $count++; |
|
56 | + $count ++; |
|
57 | 57 | $field_name = 'item_meta[' . $field['id'] . ']'; |
58 | - $html_id = FrmFieldsHelper::get_html_id($field); |
|
58 | + $html_id = FrmFieldsHelper::get_html_id( $field ); |
|
59 | 59 | require( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_field.php' ); |
60 | - unset($field, $field_name); |
|
60 | + unset( $field, $field_name ); |
|
61 | 61 | } |
62 | - unset($count); |
|
62 | + unset( $count ); |
|
63 | 63 | } ?> |
64 | 64 | </ul> |
65 | 65 | </div> |
@@ -8,12 +8,12 @@ |
||
8 | 8 | <div id="post-body" class="metabox-holder columns-2"> |
9 | 9 | <div id="post-body-content"> |
10 | 10 | <?php |
11 | - if ( ! $values['is_template'] ) { |
|
12 | - FrmAppController::get_form_nav($id, true, 'hide'); |
|
13 | - } |
|
11 | + if ( ! $values['is_template'] ) { |
|
12 | + FrmAppController::get_form_nav($id, true, 'hide'); |
|
13 | + } |
|
14 | 14 | require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); |
15 | 15 | |
16 | - ?> |
|
16 | + ?> |
|
17 | 17 | |
18 | 18 | <div class="frm_form_builder with_frm_style"> |
19 | 19 |
@@ -9,7 +9,7 @@ |
||
9 | 9 | <div id="post-body-content"> |
10 | 10 | <?php |
11 | 11 | if ( ! $values['is_template'] ) { |
12 | - FrmAppController::get_form_nav($id, true, 'hide'); |
|
12 | + FrmAppController::get_form_nav( $id, true, 'hide' ); |
|
13 | 13 | } |
14 | 14 | require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); |
15 | 15 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | <option value="message" <?php selected($values['success_action'], 'message') ?>><?php _e( 'Show Message', 'formidable' )?></option> |
62 | 62 | <?php if ( FrmAppHelper::pro_is_installed() ) { ?> |
63 | 63 | <option value="redirect" <?php selected($values['success_action'], 'redirect'); |
64 | - ?>><?php _e( 'Redirect to URL', 'formidable' ) ?></option> |
|
64 | + ?>><?php _e( 'Redirect to URL', 'formidable' ) ?></option> |
|
65 | 65 | <option value="page" <?php selected($values['success_action'], 'page'); |
66 | 66 | ?>><?php _e( 'Show Page Content', 'formidable' ) ?></option> |
67 | 67 | <?php } else { ?> |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | <?php _e( '(Premium feature)', 'formidable' ); ?> |
72 | 72 | </option> |
73 | 73 | <option value="page" disabled="disabled" <?php selected($values['success_action'], 'page'); |
74 | - ?>> |
|
74 | + ?>> |
|
75 | 75 | <?php _e( 'Show Page Content', 'formidable' ); ?> |
76 | 76 | <?php _e( '(Premium feature)', 'formidable' ); ?> |
77 | 77 | </option> |
@@ -193,17 +193,17 @@ discard block |
||
193 | 193 | <ul class="frm_actions_list"> |
194 | 194 | <?php |
195 | 195 | |
196 | - //For each add-on, add an li, class, and javascript function. If active, add an additional class. |
|
197 | - foreach ( $action_controls as $action_control ) { |
|
198 | - ?> |
|
196 | + //For each add-on, add an li, class, and javascript function. If active, add an additional class. |
|
197 | + foreach ( $action_controls as $action_control ) { |
|
198 | + ?> |
|
199 | 199 | <li><a href="javascript:void(0)" class="frm_<?php echo esc_attr( $action_control->id_base ) ?>_action frm_bstooltip <?php |
200 | - echo ( isset($action_control->action_options['active']) && $action_control->action_options['active']) ? 'frm_active_action ' : 'frm_inactive_action '; |
|
201 | - echo esc_attr( $action_control->action_options['classes'] ); |
|
202 | - ?>" title="<?php echo esc_attr($action_control->action_options['tooltip']) ?>" data-limit="<?php echo isset($action_control->action_options['limit']) ? esc_attr( $action_control->action_options['limit'] ) : '99' ?>" data-actiontype="<?php echo esc_attr($action_control->id_base) ?>"></a></li> |
|
200 | + echo ( isset($action_control->action_options['active']) && $action_control->action_options['active']) ? 'frm_active_action ' : 'frm_inactive_action '; |
|
201 | + echo esc_attr( $action_control->action_options['classes'] ); |
|
202 | + ?>" title="<?php echo esc_attr($action_control->action_options['tooltip']) ?>" data-limit="<?php echo isset($action_control->action_options['limit']) ? esc_attr( $action_control->action_options['limit'] ) : '99' ?>" data-actiontype="<?php echo esc_attr($action_control->id_base) ?>"></a></li> |
|
203 | 203 | <?php |
204 | - unset($actions_icon); |
|
205 | - } |
|
206 | - ?> |
|
204 | + unset($actions_icon); |
|
205 | + } |
|
206 | + ?> |
|
207 | 207 | </ul> |
208 | 208 | </div> |
209 | 209 | <div class="frm_no_actions"> |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | <p><label><?php echo esc_html( $field['name'] ) ?></label> |
236 | 236 | <textarea name="field_options[custom_html_<?php echo esc_attr( $field['id'] ) ?>]" rows="7" id="custom_html_<?php echo esc_attr( $field['id'] ) ?>" class="field_custom_html frm_long_input"><?php echo FrmAppHelper::esc_textarea($field['custom_html']) ?></textarea></p> |
237 | 237 | <?php } |
238 | - unset($field); |
|
239 | - } |
|
240 | - } ?> |
|
238 | + unset($field); |
|
239 | + } |
|
240 | + } ?> |
|
241 | 241 | </div> |
242 | 242 | |
243 | 243 | <p><label><?php _e( 'After Fields', 'formidable' ) ?></label> |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | call_user_func( array( $section['class'], $section['function'] ), $values ); |
260 | 260 | } else { |
261 | 261 | call_user_func( ( isset( $section['function'] ) ? $section['function'] : $section ), $values ); |
262 | - } ?> |
|
262 | + } ?> |
|
263 | 263 | </div> |
264 | 264 | <?php } ?> |
265 | 265 |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | <div class="contextual-help-tabs"> |
28 | 28 | <ul class="frm-category-tabs frm-form-setting-tabs"> |
29 | 29 | <?php $a = FrmAppHelper::simple_get( 't', 'sanitize_title', 'advanced_settings' ); ?> |
30 | - <li <?php echo ($a == 'advanced_settings') ? 'class="tabs active"' : '' ?>><a href="#advanced_settings"><?php _e( 'General', 'formidable' ) ?></a></li> |
|
31 | - <li <?php echo ($a == 'email_settings') ? 'class="tabs active"' : '' ?>><a href="#email_settings"><?php _e( 'Form Actions', 'formidable' ); ?></a></li> |
|
32 | - <li <?php echo ($a == 'html_settings') ? 'class="tabs active"' : '' ?>><a href="#html_settings"><?php _e( 'Customize HTML', 'formidable' ) ?></a></li> |
|
30 | + <li <?php echo ( $a == 'advanced_settings' ) ? 'class="tabs active"' : '' ?>><a href="#advanced_settings"><?php _e( 'General', 'formidable' ) ?></a></li> |
|
31 | + <li <?php echo ( $a == 'email_settings' ) ? 'class="tabs active"' : '' ?>><a href="#email_settings"><?php _e( 'Form Actions', 'formidable' ); ?></a></li> |
|
32 | + <li <?php echo ( $a == 'html_settings' ) ? 'class="tabs active"' : '' ?>><a href="#html_settings"><?php _e( 'Customize HTML', 'formidable' ) ?></a></li> |
|
33 | 33 | <?php foreach ( $sections as $key => $section ) { |
34 | 34 | if ( isset( $section['name'] ) ) { |
35 | 35 | $sec_name = $section['name']; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | <?php } ?> |
44 | 44 | </ul> |
45 | 45 | </div> |
46 | - <div class="advanced_settings tabs-panel <?php echo ($a == 'advanced_settings') ? 'frm_block' : 'frm_hidden' ?>"> |
|
46 | + <div class="advanced_settings tabs-panel <?php echo ( $a == 'advanced_settings' ) ? 'frm_block' : 'frm_hidden' ?>"> |
|
47 | 47 | <?php FrmTipsHelper::pro_tip( 'get_form_settings_tip', 'p' ); ?> |
48 | 48 | |
49 | 49 | <h3 class="frm_first_h3"><?php _e( 'On Submit', 'formidable' ); ?> |
@@ -58,19 +58,19 @@ discard block |
||
58 | 58 | <tr> |
59 | 59 | <td class="frm_175_width"> |
60 | 60 | <select name="options[success_action]" id="success_action"> |
61 | - <option value="message" <?php selected($values['success_action'], 'message') ?>><?php _e( 'Show Message', 'formidable' )?></option> |
|
61 | + <option value="message" <?php selected( $values['success_action'], 'message' ) ?>><?php _e( 'Show Message', 'formidable' )?></option> |
|
62 | 62 | <?php if ( FrmAppHelper::pro_is_installed() ) { ?> |
63 | - <option value="redirect" <?php selected($values['success_action'], 'redirect'); |
|
63 | + <option value="redirect" <?php selected( $values['success_action'], 'redirect' ); |
|
64 | 64 | ?>><?php _e( 'Redirect to URL', 'formidable' ) ?></option> |
65 | - <option value="page" <?php selected($values['success_action'], 'page'); |
|
65 | + <option value="page" <?php selected( $values['success_action'], 'page' ); |
|
66 | 66 | ?>><?php _e( 'Show Page Content', 'formidable' ) ?></option> |
67 | 67 | <?php } else { ?> |
68 | - <option value="redirect" disabled="disabled" <?php selected($values['success_action'], 'redirect'); |
|
68 | + <option value="redirect" disabled="disabled" <?php selected( $values['success_action'], 'redirect' ); |
|
69 | 69 | ?>> |
70 | 70 | <?php _e( 'Redirect to URL', 'formidable' ); ?> |
71 | 71 | <?php _e( '(Premium feature)', 'formidable' ); ?> |
72 | 72 | </option> |
73 | - <option value="page" disabled="disabled" <?php selected($values['success_action'], 'page'); |
|
73 | + <option value="page" disabled="disabled" <?php selected( $values['success_action'], 'page' ); |
|
74 | 74 | ?>> |
75 | 75 | <?php _e( 'Show Page Content', 'formidable' ); ?> |
76 | 76 | <?php _e( '(Premium feature)', 'formidable' ); ?> |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | </select> |
80 | 80 | </td> |
81 | 81 | <td> |
82 | - <span class="success_action_redirect_box success_action_box<?php echo ($values['success_action'] == 'redirect') ? '' : ' frm_hidden'; ?>"> |
|
82 | + <span class="success_action_redirect_box success_action_box<?php echo ( $values['success_action'] == 'redirect' ) ? '' : ' frm_hidden'; ?>"> |
|
83 | 83 | <input type="text" name="options[success_url]" id="success_url" value="<?php |
84 | 84 | if ( isset( $values['success_url'] ) ) { |
85 | 85 | echo esc_attr( $values['success_url'] ); |
@@ -87,23 +87,23 @@ discard block |
||
87 | 87 | </span> |
88 | 88 | |
89 | 89 | <?php if ( FrmAppHelper::pro_is_installed() ) { ?> |
90 | - <span class="success_action_page_box success_action_box<?php echo ($values['success_action'] == 'page') ? '' : ' frm_hidden'; ?>"> |
|
90 | + <span class="success_action_page_box success_action_box<?php echo ( $values['success_action'] == 'page' ) ? '' : ' frm_hidden'; ?>"> |
|
91 | 91 | <label><?php _e( 'Use Content from Page', 'formidable' ) ?></label> |
92 | 92 | <?php FrmAppHelper::wp_pages_dropdown( 'options[success_page_id]', $values['success_page_id'] ) ?> |
93 | 93 | </span> |
94 | 94 | <?php } ?> |
95 | 95 | </td> |
96 | 96 | </tr> |
97 | - <tr class="frm_show_form_opt success_action_message_box success_action_box<?php echo ($values['success_action'] == 'message') ? '' : ' frm_hidden'; ?>"> |
|
97 | + <tr class="frm_show_form_opt success_action_message_box success_action_box<?php echo ( $values['success_action'] == 'message' ) ? '' : ' frm_hidden'; ?>"> |
|
98 | 98 | <td colspan="2"> |
99 | 99 | <label for="show_form"><input type="checkbox" name="options[show_form]" id="show_form" value="1" <?php checked( $values['show_form'], 1 ) ?> /> <?php _e( 'Show the form with the confirmation message', 'formidable' ) ?></label> |
100 | 100 | </td> |
101 | 101 | </tr> |
102 | 102 | <tr> |
103 | - <td colspan="2"><label for="no_save"><input type="checkbox" name="options[no_save]" id="no_save" value="1" <?php checked($values['no_save'], 1); ?> /> <?php _e( 'Do not store entries submitted from this form', 'formidable' ) ?></label> |
|
103 | + <td colspan="2"><label for="no_save"><input type="checkbox" name="options[no_save]" id="no_save" value="1" <?php checked( $values['no_save'], 1 ); ?> /> <?php _e( 'Do not store entries submitted from this form', 'formidable' ) ?></label> |
|
104 | 104 | </td> |
105 | 105 | </tr> |
106 | - <?php if ( function_exists( 'akismet_http_post') ) { ?> |
|
106 | + <?php if ( function_exists( 'akismet_http_post' ) ) { ?> |
|
107 | 107 | <tr> |
108 | 108 | <td colspan="2"><?php _e( 'Use Akismet to check entries for spam for', 'formidable' ) ?> |
109 | 109 | <select name="options[akismet]"> |
@@ -129,12 +129,12 @@ discard block |
||
129 | 129 | <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Recommended for long forms.', 'formidable' ) ?>" ></span> |
130 | 130 | </td> |
131 | 131 | </tr> |
132 | - <?php do_action('frm_add_form_ajax_options', $values); ?> |
|
132 | + <?php do_action( 'frm_add_form_ajax_options', $values ); ?> |
|
133 | 133 | </table> |
134 | 134 | |
135 | 135 | <!--Permissions Section--> |
136 | 136 | <table class="form-table"> |
137 | - <?php do_action('frm_add_form_perm_options', $values); ?> |
|
137 | + <?php do_action( 'frm_add_form_perm_options', $values ); ?> |
|
138 | 138 | </table> |
139 | 139 | |
140 | 140 | <!--Styling & Buttons Section--> |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | </tr> |
157 | 157 | <tr> |
158 | 158 | <td><label><?php _e( 'Submit Button Text', 'formidable' ) ?></label></td> |
159 | - <td><input type="text" name="options[submit_value]" value="<?php echo esc_attr($values['submit_value']); ?>" /></td> |
|
159 | + <td><input type="text" name="options[submit_value]" value="<?php echo esc_attr( $values['submit_value'] ); ?>" /></td> |
|
160 | 160 | </tr> |
161 | 161 | <?php do_action( 'frm_add_form_button_options', $values ); ?> |
162 | 162 | </table> |
@@ -166,27 +166,27 @@ discard block |
||
166 | 166 | <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Set up your confirmation messages.', 'formidable' ) ?>" ></span> |
167 | 167 | </h3> |
168 | 168 | <table class="form-table"> |
169 | - <tr class="success_action_message_box success_action_box<?php echo ($values['success_action'] == 'message') ? '' : ' frm_hidden'; ?>"> |
|
169 | + <tr class="success_action_message_box success_action_box<?php echo ( $values['success_action'] == 'message' ) ? '' : ' frm_hidden'; ?>"> |
|
170 | 170 | <td> |
171 | 171 | <div><?php _e( 'On Submit', 'formidable' ) ?></div> |
172 | - <textarea id="success_msg" name="options[success_msg]" cols="50" rows="2" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea($values['success_msg']); ?></textarea> |
|
172 | + <textarea id="success_msg" name="options[success_msg]" cols="50" rows="2" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea( $values['success_msg'] ); ?></textarea> |
|
173 | 173 | </td> |
174 | 174 | </tr> |
175 | - <?php do_action('frm_add_form_msg_options', $values); ?> |
|
175 | + <?php do_action( 'frm_add_form_msg_options', $values ); ?> |
|
176 | 176 | </table> |
177 | 177 | |
178 | 178 | <!--Misc Section--> |
179 | 179 | <?php if ( has_action( 'frm_additional_form_options' ) ) { ?> |
180 | 180 | <h3><?php _e( 'Miscellaneous', 'formidable' ); ?></h3> |
181 | 181 | <table class="form-table"> |
182 | - <?php do_action('frm_additional_form_options', $values); ?> |
|
182 | + <?php do_action( 'frm_additional_form_options', $values ); ?> |
|
183 | 183 | </table> |
184 | 184 | <?php } ?> |
185 | 185 | |
186 | 186 | </div> |
187 | 187 | |
188 | 188 | |
189 | - <div id="frm_notification_settings" class="frm_email_settings email_settings tabs-panel widgets-holder-wrap <?php echo ($a == 'email_settings') ? ' frm_block' : ' frm_hidden'; ?>"> |
|
189 | + <div id="frm_notification_settings" class="frm_email_settings email_settings tabs-panel widgets-holder-wrap <?php echo ( $a == 'email_settings' ) ? ' frm_block' : ' frm_hidden'; ?>"> |
|
190 | 190 | <?php FrmTipsHelper::pro_tip( 'get_form_action_tip', 'p' ); ?> |
191 | 191 | <div id="frm_email_addon_menu" class="manage-menus"> |
192 | 192 | <h3><?php _e( 'Add New Action', 'formidable' ) ?></h3> |
@@ -197,11 +197,11 @@ discard block |
||
197 | 197 | foreach ( $action_controls as $action_control ) { |
198 | 198 | ?> |
199 | 199 | <li><a href="javascript:void(0)" class="frm_<?php echo esc_attr( $action_control->id_base ) ?>_action frm_bstooltip <?php |
200 | - echo ( isset($action_control->action_options['active']) && $action_control->action_options['active']) ? 'frm_active_action ' : 'frm_inactive_action '; |
|
200 | + echo ( isset( $action_control->action_options['active'] ) && $action_control->action_options['active'] ) ? 'frm_active_action ' : 'frm_inactive_action '; |
|
201 | 201 | echo esc_attr( $action_control->action_options['classes'] ); |
202 | - ?>" title="<?php echo esc_attr($action_control->action_options['tooltip']) ?>" data-limit="<?php echo isset($action_control->action_options['limit']) ? esc_attr( $action_control->action_options['limit'] ) : '99' ?>" data-actiontype="<?php echo esc_attr($action_control->id_base) ?>"></a></li> |
|
202 | + ?>" title="<?php echo esc_attr( $action_control->action_options['tooltip'] ) ?>" data-limit="<?php echo isset( $action_control->action_options['limit'] ) ? esc_attr( $action_control->action_options['limit'] ) : '99' ?>" data-actiontype="<?php echo esc_attr( $action_control->id_base ) ?>"></a></li> |
|
203 | 203 | <?php |
204 | - unset($actions_icon); |
|
204 | + unset( $actions_icon ); |
|
205 | 205 | } |
206 | 206 | ?> |
207 | 207 | </ul> |
@@ -213,19 +213,19 @@ discard block |
||
213 | 213 | <?php _e( 'Click an action to add it to this form', 'formidable' ) ?> |
214 | 214 | </div> |
215 | 215 | </div> |
216 | - <?php FrmFormActionsController::list_actions($form, $values); ?> |
|
216 | + <?php FrmFormActionsController::list_actions( $form, $values ); ?> |
|
217 | 217 | </div> |
218 | 218 | |
219 | - <div id="html_settings" class="tabs-panel <?php echo ($a == 'html_settings') ? ' frm_block' : ' frm_hidden'; ?>"> |
|
219 | + <div id="html_settings" class="tabs-panel <?php echo ( $a == 'html_settings' ) ? ' frm_block' : ' frm_hidden'; ?>"> |
|
220 | 220 | |
221 | 221 | <div class="frm_field_html_box frm_top_container"> |
222 | 222 | <p><label><?php _e( 'Form Classes', 'formidable' ) ?></label> |
223 | - <input type="text" name="options[form_class]" value="<?php echo esc_attr($values['form_class']) ?>" /> |
|
223 | + <input type="text" name="options[form_class]" value="<?php echo esc_attr( $values['form_class'] ) ?>" /> |
|
224 | 224 | </p> |
225 | 225 | <div class="clear"></div> |
226 | 226 | |
227 | 227 | <p><label><?php _e( 'Before Fields', 'formidable' ) ?></label> |
228 | - <textarea name="options[before_html]" rows="4" id="before_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea($values['before_html']) ?></textarea></p> |
|
228 | + <textarea name="options[before_html]" rows="4" id="before_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea( $values['before_html'] ) ?></textarea></p> |
|
229 | 229 | |
230 | 230 | <div id="add_html_fields"> |
231 | 231 | <?php |
@@ -233,18 +233,18 @@ discard block |
||
233 | 233 | foreach ( $values['fields'] as $field ) { |
234 | 234 | if ( apply_filters( 'frm_show_custom_html', true, $field['type'] ) ) { ?> |
235 | 235 | <p><label><?php echo esc_html( $field['name'] ) ?></label> |
236 | - <textarea name="field_options[custom_html_<?php echo esc_attr( $field['id'] ) ?>]" rows="7" id="custom_html_<?php echo esc_attr( $field['id'] ) ?>" class="field_custom_html frm_long_input"><?php echo FrmAppHelper::esc_textarea($field['custom_html']) ?></textarea></p> |
|
236 | + <textarea name="field_options[custom_html_<?php echo esc_attr( $field['id'] ) ?>]" rows="7" id="custom_html_<?php echo esc_attr( $field['id'] ) ?>" class="field_custom_html frm_long_input"><?php echo FrmAppHelper::esc_textarea( $field['custom_html'] ) ?></textarea></p> |
|
237 | 237 | <?php } |
238 | - unset($field); |
|
238 | + unset( $field ); |
|
239 | 239 | } |
240 | 240 | } ?> |
241 | 241 | </div> |
242 | 242 | |
243 | 243 | <p><label><?php _e( 'After Fields', 'formidable' ) ?></label> |
244 | - <textarea name="options[after_html]" rows="3" id="after_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea($values['after_html']) ?></textarea></p> |
|
244 | + <textarea name="options[after_html]" rows="3" id="after_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea( $values['after_html'] ) ?></textarea></p> |
|
245 | 245 | |
246 | 246 | <p><label><?php _e( 'Submit Button', 'formidable' ) ?></label> |
247 | - <textarea name="options[submit_html]" rows="3" id="submit_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea($values['submit_html']) ?></textarea></p> |
|
247 | + <textarea name="options[submit_html]" rows="3" id="submit_html" class="frm_long_input"><?php echo FrmAppHelper::esc_textarea( $values['submit_html'] ) ?></textarea></p> |
|
248 | 248 | </div> |
249 | 249 | </div> |
250 | 250 | |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | </div> |
264 | 264 | <?php } ?> |
265 | 265 | |
266 | - <?php do_action('frm_add_form_option_section', $values); ?> |
|
266 | + <?php do_action( 'frm_add_form_option_section', $values ); ?> |
|
267 | 267 | <div class="clear"></div> |
268 | 268 | </div> |
269 | 269 | </div> |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <div id="postbox-container-1" class="postbox-container"> |
2 | 2 | <?php |
3 | 3 | |
4 | - if ( ! isset($hide_preview) || ! $hide_preview ) { |
|
4 | + if ( ! isset($hide_preview) || ! $hide_preview ) { |
|
5 | 5 | include( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/_publish_box.php' ); |
6 | - } |
|
6 | + } |
|
7 | 7 | |
8 | 8 | include( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/mb_insert_fields.php' ); |
9 | 9 | |
10 | - ?> |
|
10 | + ?> |
|
11 | 11 | </div> |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <div id="postbox-container-1" class="postbox-container"> |
2 | 2 | <?php |
3 | 3 | |
4 | - if ( ! isset($hide_preview) || ! $hide_preview ) { |
|
4 | + if ( ! isset( $hide_preview ) || ! $hide_preview ) { |
|
5 | 5 | include( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/_publish_box.php' ); |
6 | 6 | } |
7 | 7 |
@@ -21,15 +21,15 @@ |
||
21 | 21 | </div> |
22 | 22 | <div class="widget-inside frm_hidden"> |
23 | 23 | <?php |
24 | - if ( defined('DOING_AJAX') || ! $action_control->action_options['ajax_load'] ) { |
|
25 | - // only load settings if they are just added or are open |
|
24 | + if ( defined('DOING_AJAX') || ! $action_control->action_options['ajax_load'] ) { |
|
25 | + // only load settings if they are just added or are open |
|
26 | 26 | include( dirname( __FILE__ ) . '/_action_inside.php' ); |
27 | - } else { |
|
28 | - // include hidden settings so action won't get lost on update ?> |
|
27 | + } else { |
|
28 | + // include hidden settings so action won't get lost on update ?> |
|
29 | 29 | <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('post_excerpt', '') ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" /> |
30 | 30 | <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('ID', '') ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" /> |
31 | 31 | <?php |
32 | - } ?> |
|
32 | + } ?> |
|
33 | 33 | </div> |
34 | 34 | <style type="text/css"> |
35 | 35 | .frm_no_actions{ |
@@ -21,13 +21,13 @@ |
||
21 | 21 | </div> |
22 | 22 | <div class="widget-inside frm_hidden"> |
23 | 23 | <?php |
24 | - if ( defined('DOING_AJAX') || ! $action_control->action_options['ajax_load'] ) { |
|
24 | + if ( defined( 'DOING_AJAX' ) || ! $action_control->action_options['ajax_load'] ) { |
|
25 | 25 | // only load settings if they are just added or are open |
26 | 26 | include( dirname( __FILE__ ) . '/_action_inside.php' ); |
27 | 27 | } else { |
28 | 28 | // include hidden settings so action won't get lost on update ?> |
29 | - <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('post_excerpt', '') ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" /> |
|
30 | - <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('ID', '') ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" /> |
|
29 | + <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'post_excerpt', '' ) ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" /> |
|
30 | + <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'ID', '' ) ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" /> |
|
31 | 31 | <?php |
32 | 32 | } ?> |
33 | 33 | </div> |
@@ -4,12 +4,12 @@ discard block |
||
4 | 4 | |
5 | 5 | public function __construct() { |
6 | 6 | $action_ops = array( |
7 | - 'classes' => 'frm_email_icon frm_icon_font', |
|
8 | - 'active' => true, |
|
7 | + 'classes' => 'frm_email_icon frm_icon_font', |
|
8 | + 'active' => true, |
|
9 | 9 | 'event' => array( 'create' ), |
10 | - 'limit' => 99, |
|
11 | - 'priority' => 10, |
|
12 | - 'ajax_load' => false, |
|
10 | + 'limit' => 99, |
|
11 | + 'priority' => 10, |
|
12 | + 'ajax_load' => false, |
|
13 | 13 | ); |
14 | 14 | $action_ops = apply_filters('frm_email_control_settings', $action_ops); |
15 | 15 | |
@@ -17,23 +17,23 @@ discard block |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | public function form( $form_action, $args = array() ) { |
20 | - extract($args); |
|
20 | + extract($args); |
|
21 | 21 | |
22 | 22 | include( FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_email_settings.php' ); |
23 | 23 | } |
24 | 24 | |
25 | 25 | public function get_defaults() { |
26 | - return array( |
|
27 | - 'email_to' => '[admin_email]', |
|
28 | - 'cc' => '', |
|
29 | - 'bcc' => '', |
|
30 | - 'from' => '[sitename] <[admin_email]>', |
|
31 | - 'reply_to' => '', |
|
32 | - 'email_subject' => '', |
|
33 | - 'email_message' => '[default-message]', |
|
34 | - 'inc_user_info' => 0, |
|
35 | - 'plain_text' => 0, |
|
26 | + return array( |
|
27 | + 'email_to' => '[admin_email]', |
|
28 | + 'cc' => '', |
|
29 | + 'bcc' => '', |
|
30 | + 'from' => '[sitename] <[admin_email]>', |
|
31 | + 'reply_to' => '', |
|
32 | + 'email_subject' => '', |
|
33 | + 'email_message' => '[default-message]', |
|
34 | + 'inc_user_info' => 0, |
|
35 | + 'plain_text' => 0, |
|
36 | 36 | 'event' => array( 'create' ), |
37 | - ); |
|
37 | + ); |
|
38 | 38 | } |
39 | 39 | } |
@@ -11,13 +11,13 @@ |
||
11 | 11 | 'priority' => 10, |
12 | 12 | 'ajax_load' => false, |
13 | 13 | ); |
14 | - $action_ops = apply_filters('frm_email_control_settings', $action_ops); |
|
14 | + $action_ops = apply_filters( 'frm_email_control_settings', $action_ops ); |
|
15 | 15 | |
16 | - parent::__construct('email', __( 'Email Notification', 'formidable' ), $action_ops); |
|
16 | + parent::__construct( 'email', __( 'Email Notification', 'formidable' ), $action_ops ); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function form( $form_action, $args = array() ) { |
20 | - extract($args); |
|
20 | + extract( $args ); |
|
21 | 21 | |
22 | 22 | include( FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_email_settings.php' ); |
23 | 23 | } |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | } |
5 | 5 | |
6 | 6 | class FrmFormsListHelper extends FrmListHelper { |
7 | - var $status = ''; |
|
7 | + var $status = ''; |
|
8 | 8 | |
9 | 9 | public function __construct( $args ) { |
10 | 10 | $this->status = isset( $_REQUEST['form_type'] ) ? $_REQUEST['form_type'] : ''; |
@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | } |
14 | 14 | |
15 | 15 | public function prepare_items() { |
16 | - global $wpdb, $per_page, $mode; |
|
16 | + global $wpdb, $per_page, $mode; |
|
17 | 17 | |
18 | - $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode']; |
|
18 | + $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode']; |
|
19 | 19 | |
20 | 20 | $default_orderby = 'name'; |
21 | 21 | $default_order = 'ASC'; |
22 | 22 | |
23 | - $orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : $default_orderby; |
|
23 | + $orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : $default_orderby; |
|
24 | 24 | $order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : $default_order; |
25 | 25 | |
26 | 26 | $page = $this->get_pagenum(); |
@@ -28,40 +28,40 @@ discard block |
||
28 | 28 | |
29 | 29 | $start = ( isset( $_REQUEST['start'] ) ) ? $_REQUEST['start'] : (( $page - 1 ) * $per_page); |
30 | 30 | |
31 | - $s_query = array(); |
|
32 | - $s_query[] = array( 'or' => 1, 'parent_form_id' => null, 'parent_form_id <' => 1 ); |
|
31 | + $s_query = array(); |
|
32 | + $s_query[] = array( 'or' => 1, 'parent_form_id' => null, 'parent_form_id <' => 1 ); |
|
33 | 33 | switch ( $this->status ) { |
34 | - case 'template': |
|
35 | - $s_query['is_template'] = 1; |
|
36 | - $s_query['status !'] = 'trash'; |
|
37 | - break; |
|
38 | - case 'draft': |
|
39 | - $s_query['is_template'] = 0; |
|
40 | - $s_query['status'] = 'draft'; |
|
41 | - break; |
|
42 | - case 'trash': |
|
43 | - $s_query['status'] = 'trash'; |
|
44 | - break; |
|
45 | - default: |
|
46 | - $s_query['is_template'] = 0; |
|
47 | - $s_query['status !'] = 'trash'; |
|
48 | - break; |
|
34 | + case 'template': |
|
35 | + $s_query['is_template'] = 1; |
|
36 | + $s_query['status !'] = 'trash'; |
|
37 | + break; |
|
38 | + case 'draft': |
|
39 | + $s_query['is_template'] = 0; |
|
40 | + $s_query['status'] = 'draft'; |
|
41 | + break; |
|
42 | + case 'trash': |
|
43 | + $s_query['status'] = 'trash'; |
|
44 | + break; |
|
45 | + default: |
|
46 | + $s_query['is_template'] = 0; |
|
47 | + $s_query['status !'] = 'trash'; |
|
48 | + break; |
|
49 | 49 | } |
50 | 50 | |
51 | - $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : ''; |
|
52 | - if ( $s != '' ) { |
|
53 | - preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches); |
|
54 | - $search_terms = array_map('trim', $matches[0]); |
|
55 | - foreach ( (array) $search_terms as $term ) { |
|
56 | - $s_query[] = array( |
|
57 | - 'or' => true, 'name LIKE' => $term, 'description LIKE' => $term, 'created_at LIKE' => $term, |
|
58 | - ); |
|
59 | - unset($term); |
|
60 | - } |
|
61 | - } |
|
51 | + $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : ''; |
|
52 | + if ( $s != '' ) { |
|
53 | + preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches); |
|
54 | + $search_terms = array_map('trim', $matches[0]); |
|
55 | + foreach ( (array) $search_terms as $term ) { |
|
56 | + $s_query[] = array( |
|
57 | + 'or' => true, 'name LIKE' => $term, 'description LIKE' => $term, 'created_at LIKE' => $term, |
|
58 | + ); |
|
59 | + unset($term); |
|
60 | + } |
|
61 | + } |
|
62 | 62 | |
63 | 63 | $this->items = FrmForm::getAll( $s_query, $orderby . ' ' . $order, $start . ',' . $per_page ); |
64 | - $total_items = FrmDb::get_count( 'frm_forms', $s_query ); |
|
64 | + $total_items = FrmDb::get_count( 'frm_forms', $s_query ); |
|
65 | 65 | |
66 | 66 | $this->set_pagination_args( array( |
67 | 67 | 'total_items' => $total_items, |
@@ -70,69 +70,69 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | public function no_items() { |
73 | - if ( 'template' == $this->status ) { |
|
74 | - _e( 'No Templates Found.', 'formidable' ) ?> |
|
73 | + if ( 'template' == $this->status ) { |
|
74 | + _e( 'No Templates Found.', 'formidable' ) ?> |
|
75 | 75 | <br/><br/><?php _e( 'To add a new template:', 'formidable' ) ?> |
76 | 76 | <ol><li><?php printf( __( 'Create a new %1$sform%2$s.', 'formidable' ), '<a href="' . esc_url( admin_url( 'admin?page=formidable&frm_action=new' ) ) . '"', '</a>' ) ?></li> |
77 | 77 | <li><?php printf(__( 'After your form is created, go to Formidable -> %1$sForms%2$s.', 'formidable' ), '<a href="?page=formidable">', '</a>') ?></li> |
78 | 78 | <li><?php _e( 'Place your mouse over the name of the form you just created, and click the "Create Template" link.', 'formidable' ) ?></li> |
79 | 79 | </ol> |
80 | 80 | <?php } else { |
81 | - _e( 'No Forms Found.', 'formidable' ) ?> |
|
81 | + _e( 'No Forms Found.', 'formidable' ) ?> |
|
82 | 82 | <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable&frm_action=new' ) ) ?>"><?php _e( 'Add New', 'formidable' ); ?></a> |
83 | 83 | <?php } |
84 | 84 | } |
85 | 85 | |
86 | 86 | public function get_bulk_actions() { |
87 | - $actions = array(); |
|
87 | + $actions = array(); |
|
88 | 88 | |
89 | 89 | if ( in_array( $this->status, array( '', 'published' ) ) ) { |
90 | - $actions['bulk_create_template'] = __( 'Create Template', 'formidable' ); |
|
91 | - } |
|
92 | - |
|
93 | - if ( 'trash' == $this->status ) { |
|
94 | - if ( current_user_can('frm_edit_forms') ) { |
|
95 | - $actions['bulk_untrash'] = __( 'Restore', 'formidable' ); |
|
96 | - } |
|
97 | - |
|
98 | - if ( current_user_can('frm_delete_forms') ) { |
|
99 | - $actions['bulk_delete'] = __( 'Delete Permanently', 'formidable' ); |
|
100 | - } |
|
101 | - } else if ( EMPTY_TRASH_DAYS && current_user_can('frm_delete_forms') ) { |
|
102 | - $actions['bulk_trash'] = __( 'Move to Trash', 'formidable' ); |
|
103 | - } else if ( current_user_can('frm_delete_forms') ) { |
|
104 | - $actions['bulk_delete'] = __( 'Delete'); |
|
105 | - } |
|
106 | - |
|
107 | - return $actions; |
|
108 | - } |
|
90 | + $actions['bulk_create_template'] = __( 'Create Template', 'formidable' ); |
|
91 | + } |
|
92 | + |
|
93 | + if ( 'trash' == $this->status ) { |
|
94 | + if ( current_user_can('frm_edit_forms') ) { |
|
95 | + $actions['bulk_untrash'] = __( 'Restore', 'formidable' ); |
|
96 | + } |
|
97 | + |
|
98 | + if ( current_user_can('frm_delete_forms') ) { |
|
99 | + $actions['bulk_delete'] = __( 'Delete Permanently', 'formidable' ); |
|
100 | + } |
|
101 | + } else if ( EMPTY_TRASH_DAYS && current_user_can('frm_delete_forms') ) { |
|
102 | + $actions['bulk_trash'] = __( 'Move to Trash', 'formidable' ); |
|
103 | + } else if ( current_user_can('frm_delete_forms') ) { |
|
104 | + $actions['bulk_delete'] = __( 'Delete'); |
|
105 | + } |
|
106 | + |
|
107 | + return $actions; |
|
108 | + } |
|
109 | 109 | |
110 | 110 | public function extra_tablenav( $which ) { |
111 | - if ( 'top' != $which ) { |
|
112 | - return; |
|
113 | - } |
|
111 | + if ( 'top' != $which ) { |
|
112 | + return; |
|
113 | + } |
|
114 | 114 | |
115 | - if ( 'trash' == $this->status && current_user_can('frm_delete_forms') ) { |
|
115 | + if ( 'trash' == $this->status && current_user_can('frm_delete_forms') ) { |
|
116 | 116 | ?> |
117 | 117 | <div class="alignleft actions frm_visible_overflow"> |
118 | 118 | <?php submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); ?> |
119 | 119 | </div> |
120 | 120 | <?php |
121 | - return; |
|
122 | - } |
|
121 | + return; |
|
122 | + } |
|
123 | 123 | |
124 | - if ( 'template' != $this->status ) { |
|
125 | - return; |
|
126 | - } |
|
124 | + if ( 'template' != $this->status ) { |
|
125 | + return; |
|
126 | + } |
|
127 | 127 | |
128 | 128 | $where = apply_filters( 'frm_forms_dropdown', array(), '' ); |
129 | 129 | $forms = FrmForm::get_published_forms( $where ); |
130 | 130 | |
131 | - $base = admin_url('admin.php?page=formidable&form_type=template'); |
|
132 | - $args = array( |
|
133 | - 'frm_action' => 'duplicate', |
|
134 | - 'template' => true, |
|
135 | - ); |
|
131 | + $base = admin_url('admin.php?page=formidable&form_type=template'); |
|
132 | + $args = array( |
|
133 | + 'frm_action' => 'duplicate', |
|
134 | + 'template' => true, |
|
135 | + ); |
|
136 | 136 | |
137 | 137 | ?> |
138 | 138 | <div class="alignleft actions frm_visible_overflow"> |
@@ -140,18 +140,18 @@ discard block |
||
140 | 140 | <a href="#" id="frm-templateDrop" class="frm-dropdown-toggle button" data-toggle="dropdown"><?php _e( 'Create New Template', 'formidable' ) ?> <b class="caret"></b></a> |
141 | 141 | <ul class="frm-dropdown-menu" role="menu" aria-labelledby="frm-templateDrop"> |
142 | 142 | <?php |
143 | - if ( empty( $forms ) ) { ?> |
|
143 | + if ( empty( $forms ) ) { ?> |
|
144 | 144 | <li class="frm_dropdown_li"><?php _e( 'You have not created any forms yet. <br/>You must create a form before you can make a template.', 'formidable' ) ?></li> |
145 | 145 | <?php |
146 | - } else { |
|
147 | - foreach ( $forms as $form ) { |
|
148 | - $args['id'] = $form->id; ?> |
|
146 | + } else { |
|
147 | + foreach ( $forms as $form ) { |
|
148 | + $args['id'] = $form->id; ?> |
|
149 | 149 | <li><a href="<?php echo esc_url( add_query_arg( $args, $base ) ); ?>" tabindex="-1"><?php echo esc_html( empty( $form->name ) ? __( '(no title)' ) : FrmAppHelper::truncate( $form->name, 33 ) ); ?></a></li> |
150 | 150 | <?php |
151 | - unset($form); |
|
151 | + unset($form); |
|
152 | 152 | } |
153 | - } |
|
154 | - ?> |
|
153 | + } |
|
154 | + ?> |
|
155 | 155 | </ul> |
156 | 156 | </div> |
157 | 157 | </div> |
@@ -161,30 +161,30 @@ discard block |
||
161 | 161 | public function get_views() { |
162 | 162 | |
163 | 163 | $statuses = array( |
164 | - 'published' => __( 'My Forms', 'formidable' ), |
|
165 | - 'template' => __( 'Templates', 'formidable' ), |
|
166 | - 'draft' => __( 'Drafts', 'formidable' ), |
|
167 | - 'trash' => __( 'Trash', 'formidable' ), |
|
164 | + 'published' => __( 'My Forms', 'formidable' ), |
|
165 | + 'template' => __( 'Templates', 'formidable' ), |
|
166 | + 'draft' => __( 'Drafts', 'formidable' ), |
|
167 | + 'trash' => __( 'Trash', 'formidable' ), |
|
168 | 168 | ); |
169 | 169 | |
170 | - $links = array(); |
|
171 | - $counts = FrmForm::get_count(); |
|
172 | - $form_type = isset( $_REQUEST['form_type'] ) ? sanitize_text_field( $_REQUEST['form_type'] ) : 'published'; |
|
170 | + $links = array(); |
|
171 | + $counts = FrmForm::get_count(); |
|
172 | + $form_type = isset( $_REQUEST['form_type'] ) ? sanitize_text_field( $_REQUEST['form_type'] ) : 'published'; |
|
173 | 173 | |
174 | - foreach ( $statuses as $status => $name ) { |
|
174 | + foreach ( $statuses as $status => $name ) { |
|
175 | 175 | |
176 | - if ( $status == $form_type ) { |
|
177 | - $class = ' class="current"'; |
|
178 | - } else { |
|
179 | - $class = ''; |
|
180 | - } |
|
176 | + if ( $status == $form_type ) { |
|
177 | + $class = ' class="current"'; |
|
178 | + } else { |
|
179 | + $class = ''; |
|
180 | + } |
|
181 | 181 | |
182 | - if ( $counts->{$status} || 'published' == $status ) { |
|
182 | + if ( $counts->{$status} || 'published' == $status ) { |
|
183 | 183 | $links[ $status ] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>'; |
184 | - } |
|
184 | + } |
|
185 | 185 | |
186 | - unset($status, $name); |
|
187 | - } |
|
186 | + unset($status, $name); |
|
187 | + } |
|
188 | 188 | |
189 | 189 | return $links; |
190 | 190 | } |
@@ -200,16 +200,16 @@ discard block |
||
200 | 200 | } |
201 | 201 | |
202 | 202 | public function single_row( $item, $style = '' ) { |
203 | - global $frm_vars, $mode; |
|
203 | + global $frm_vars, $mode; |
|
204 | 204 | |
205 | 205 | // Set up the hover actions for this user |
206 | 206 | $actions = array(); |
207 | 207 | $edit_link = '?page=formidable&frm_action=edit&id=' . $item->id; |
208 | 208 | $duplicate_link = '?page=formidable&frm_action=duplicate&id=' . $item->id; |
209 | 209 | |
210 | - $this->get_actions($actions, $item, $edit_link, $duplicate_link); |
|
210 | + $this->get_actions($actions, $item, $edit_link, $duplicate_link); |
|
211 | 211 | |
212 | - $action_links = $this->row_actions( $actions ); |
|
212 | + $action_links = $this->row_actions( $actions ); |
|
213 | 213 | |
214 | 214 | // Set up the checkbox ( because the user is editable, otherwise its empty ) |
215 | 215 | $checkbox = '<input type="checkbox" name="item-action[]" id="cb-item-action-' . absint( $item->id ) . '" value="' . esc_attr( $item->id ) . '" />'; |
@@ -218,9 +218,9 @@ discard block |
||
218 | 218 | |
219 | 219 | list( $columns, $hidden ) = $this->get_column_info(); |
220 | 220 | |
221 | - $format = 'Y/m/d'; |
|
222 | - if ( 'list' != $mode ) { |
|
223 | - $format .= ' \<\b\r \/\> g:i:s a'; |
|
221 | + $format = 'Y/m/d'; |
|
222 | + if ( 'list' != $mode ) { |
|
223 | + $format .= ' \<\b\r \/\> g:i:s a'; |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | foreach ( $columns as $column_name => $column_display_name ) { |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | $style = ''; |
230 | 230 | if ( in_array( $column_name, $hidden ) ) { |
231 | - $class .= ' frm_hidden'; |
|
231 | + $class .= ' frm_hidden'; |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | $class = 'class="' . esc_attr( $class ) . '"'; |
@@ -241,41 +241,41 @@ discard block |
||
241 | 241 | break; |
242 | 242 | case 'id': |
243 | 243 | case 'form_key': |
244 | - $val = $item->{$column_name}; |
|
245 | - break; |
|
244 | + $val = $item->{$column_name}; |
|
245 | + break; |
|
246 | 246 | case 'name': |
247 | - $val = $this->get_form_name( $item, $actions, $edit_link, $mode ); |
|
248 | - $val .= $action_links; |
|
247 | + $val = $this->get_form_name( $item, $actions, $edit_link, $mode ); |
|
248 | + $val .= $action_links; |
|
249 | 249 | |
250 | - break; |
|
250 | + break; |
|
251 | 251 | case 'created_at': |
252 | - $date = date($format, strtotime($item->created_at)); |
|
252 | + $date = date($format, strtotime($item->created_at)); |
|
253 | 253 | $val = '<abbr title="' . esc_attr( date( 'Y/m/d g:i:s A', strtotime( $item->created_at ) ) ) . '">' . $date . '</abbr>'; |
254 | 254 | break; |
255 | 255 | case 'shortcode': |
256 | 256 | $val = '<input type="text" readonly="readonly" class="frm_select_box" value="' . esc_attr( '[formidable id=' . $item->id . ']' ) . '" /><br/>'; |
257 | - if ( 'excerpt' == $mode ) { |
|
257 | + if ( 'excerpt' == $mode ) { |
|
258 | 258 | $val .= '<input type="text" readonly="readonly" class="frm_select_box" value="' . esc_attr( '[formidable key=' . $item->form_key . ']' ) . '" />'; |
259 | - } |
|
260 | - break; |
|
261 | - case 'entries': |
|
259 | + } |
|
260 | + break; |
|
261 | + case 'entries': |
|
262 | 262 | if ( isset( $item->options['no_save'] ) && $item->options['no_save'] ) { |
263 | 263 | $val = '<i class="frm_icon_font frm_forbid_icon frm_bstooltip" title="' . esc_attr('Entries are not being saved', 'formidable' ) . '"></i>'; |
264 | - } else { |
|
265 | - $text = FrmEntry::getRecordCount($item->id); |
|
264 | + } else { |
|
265 | + $text = FrmEntry::getRecordCount($item->id); |
|
266 | 266 | $val = current_user_can('frm_view_entries') ? '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-entries&form=' . $item->id ) ) . '">' . $text . '</a>' : $text; |
267 | - unset($text); |
|
268 | - } |
|
269 | - break; |
|
270 | - case 'type': |
|
271 | - $val = ( $item->is_template && $item->default_template ) ? __( 'Default', 'formidable' ) : __( 'Custom', 'formidable' ); |
|
272 | - break; |
|
267 | + unset($text); |
|
268 | + } |
|
269 | + break; |
|
270 | + case 'type': |
|
271 | + $val = ( $item->is_template && $item->default_template ) ? __( 'Default', 'formidable' ) : __( 'Custom', 'formidable' ); |
|
272 | + break; |
|
273 | 273 | } |
274 | 274 | |
275 | 275 | if ( isset($val) ) { |
276 | - $r .= "<td $attributes>"; |
|
277 | - $r .= $val; |
|
278 | - $r .= '</td>'; |
|
276 | + $r .= "<td $attributes>"; |
|
277 | + $r .= $val; |
|
278 | + $r .= '</td>'; |
|
279 | 279 | } |
280 | 280 | unset($val); |
281 | 281 | } |
@@ -284,38 +284,38 @@ discard block |
||
284 | 284 | return $r; |
285 | 285 | } |
286 | 286 | |
287 | - /** |
|
288 | - * @param string $edit_link |
|
289 | - * @param string $duplicate_link |
|
290 | - */ |
|
291 | - private function get_actions( &$actions, $item, $edit_link, $duplicate_link ) { |
|
287 | + /** |
|
288 | + * @param string $edit_link |
|
289 | + * @param string $duplicate_link |
|
290 | + */ |
|
291 | + private function get_actions( &$actions, $item, $edit_link, $duplicate_link ) { |
|
292 | 292 | if ( 'trash' == $this->status ) { |
293 | 293 | if ( current_user_can('frm_edit_forms') ) { |
294 | 294 | $actions['restore'] = FrmFormsHelper::delete_trash_link( $item->id, $item->status, 'short' ); |
295 | 295 | } |
296 | 296 | |
297 | - if ( current_user_can('frm_delete_forms') ) { |
|
297 | + if ( current_user_can('frm_delete_forms') ) { |
|
298 | 298 | $trash_url = wp_nonce_url( '?page=formidable&form_status=trash&frm_action=destroy&id=' . $item->id, 'destroy_form_' . $item->id ); |
299 | 299 | $actions['trash'] = '<a href="' . esc_url( $trash_url ) .'" class="submitdelete" onclick="return confirm(\'' . __( 'Are you sure you want to permanently delete that?', 'formidable' ) . '\')">' . __( 'Delete Permanently' ) . '</a>'; |
300 | - } |
|
301 | - return; |
|
300 | + } |
|
301 | + return; |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | if ( current_user_can('frm_edit_forms') ) { |
305 | - if ( ! $item->is_template || ! $item->default_template ) { |
|
305 | + if ( ! $item->is_template || ! $item->default_template ) { |
|
306 | 306 | $actions['frm_edit'] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit' ) . '</a>'; |
307 | - } |
|
307 | + } |
|
308 | 308 | |
309 | - if ( $item->is_template ) { |
|
309 | + if ( $item->is_template ) { |
|
310 | 310 | $actions['frm_duplicate'] = '<a href="'. esc_url( wp_nonce_url( $duplicate_link ) ) . '">' . __( 'Create Form from Template', 'formidable' ) . '</a>'; |
311 | - } else { |
|
311 | + } else { |
|
312 | 312 | $actions['frm_settings'] = '<a href="' . esc_url( '?page=formidable&frm_action=settings&id=' . $item->id ) . '">' . __( 'Settings', 'formidable' ) . '</a>'; |
313 | 313 | |
314 | - if ( FrmAppHelper::pro_is_installed() ) { |
|
314 | + if ( FrmAppHelper::pro_is_installed() ) { |
|
315 | 315 | $actions['duplicate'] = '<a href="' . esc_url( wp_nonce_url( $duplicate_link ) ) . '">' . __( 'Duplicate', 'formidable' ) . '</a>'; |
316 | - } |
|
317 | - } |
|
318 | - } |
|
316 | + } |
|
317 | + } |
|
318 | + } |
|
319 | 319 | |
320 | 320 | $actions['trash'] = FrmFormsHelper::delete_trash_link( $item->id, $item->status, 'short' ); |
321 | 321 | if ( empty( $actions['trash'] ) ) { |
@@ -324,52 +324,52 @@ discard block |
||
324 | 324 | } |
325 | 325 | |
326 | 326 | $actions['view'] = '<a href="' . esc_url( FrmFormsHelper::get_direct_link( $item->form_key, $item ) ) . '" target="_blank">' . __( 'Preview') . '</a>'; |
327 | - } |
|
327 | + } |
|
328 | 328 | |
329 | - /** |
|
330 | - * @param string $edit_link |
|
331 | - */ |
|
329 | + /** |
|
330 | + * @param string $edit_link |
|
331 | + */ |
|
332 | 332 | private function get_form_name( $item, $actions, $edit_link, $mode = 'list' ) { |
333 | - $form_name = $item->name; |
|
334 | - if ( trim($form_name) == '' ) { |
|
335 | - $form_name = __( '(no title)'); |
|
336 | - } |
|
333 | + $form_name = $item->name; |
|
334 | + if ( trim($form_name) == '' ) { |
|
335 | + $form_name = __( '(no title)'); |
|
336 | + } |
|
337 | 337 | $form_name = FrmAppHelper::kses( $form_name ); |
338 | 338 | if ( 'excerpt' != $mode ) { |
339 | 339 | $form_name = FrmAppHelper::truncate( $form_name, 50 ); |
340 | 340 | } |
341 | 341 | |
342 | - $val = '<strong>'; |
|
343 | - if ( 'trash' == $this->status ) { |
|
344 | - $val .= $form_name; |
|
345 | - } else { |
|
342 | + $val = '<strong>'; |
|
343 | + if ( 'trash' == $this->status ) { |
|
344 | + $val .= $form_name; |
|
345 | + } else { |
|
346 | 346 | $val .= '<a href="' . esc_url( isset( $actions['frm_edit'] ) ? $edit_link : FrmFormsHelper::get_direct_link( $item->form_key, $item ) ) . '" class="row-title">' . FrmAppHelper::kses( $form_name ) . '</a> '; |
347 | - } |
|
347 | + } |
|
348 | 348 | |
349 | - $this->add_draft_label( $item, $val ); |
|
350 | - $val .= '</strong>'; |
|
349 | + $this->add_draft_label( $item, $val ); |
|
350 | + $val .= '</strong>'; |
|
351 | 351 | |
352 | - $this->add_form_description( $item, $val ); |
|
352 | + $this->add_form_description( $item, $val ); |
|
353 | 353 | |
354 | - return $val; |
|
355 | - } |
|
354 | + return $val; |
|
355 | + } |
|
356 | 356 | |
357 | - /** |
|
358 | - * @param string $val |
|
359 | - */ |
|
360 | - private function add_draft_label( $item, &$val ) { |
|
361 | - if ( 'draft' == $item->status && 'draft' != $this->status ) { |
|
357 | + /** |
|
358 | + * @param string $val |
|
359 | + */ |
|
360 | + private function add_draft_label( $item, &$val ) { |
|
361 | + if ( 'draft' == $item->status && 'draft' != $this->status ) { |
|
362 | 362 | $val .= ' - <span class="post-state">' . __( 'Draft', 'formidable' ) . '</span>'; |
363 | - } |
|
364 | - } |
|
365 | - |
|
366 | - /** |
|
367 | - * @param string $val |
|
368 | - */ |
|
369 | - private function add_form_description( $item, &$val ) { |
|
370 | - global $mode; |
|
371 | - if ( 'excerpt' == $mode ) { |
|
372 | - $val .= FrmAppHelper::truncate(strip_tags($item->description), 50); |
|
373 | - } |
|
374 | - } |
|
363 | + } |
|
364 | + } |
|
365 | + |
|
366 | + /** |
|
367 | + * @param string $val |
|
368 | + */ |
|
369 | + private function add_form_description( $item, &$val ) { |
|
370 | + global $mode; |
|
371 | + if ( 'excerpt' == $mode ) { |
|
372 | + $val .= FrmAppHelper::truncate(strip_tags($item->description), 50); |
|
373 | + } |
|
374 | + } |
|
375 | 375 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $page = $this->get_pagenum(); |
27 | 27 | $per_page = $this->get_items_per_page( 'formidable_page_formidable_per_page' ); |
28 | 28 | |
29 | - $start = ( isset( $_REQUEST['start'] ) ) ? $_REQUEST['start'] : (( $page - 1 ) * $per_page); |
|
29 | + $start = ( isset( $_REQUEST['start'] ) ) ? $_REQUEST['start'] : ( ( $page - 1 ) * $per_page ); |
|
30 | 30 | |
31 | 31 | $s_query = array(); |
32 | 32 | $s_query[] = array( 'or' => 1, 'parent_form_id' => null, 'parent_form_id <' => 1 ); |
@@ -48,15 +48,15 @@ discard block |
||
48 | 48 | break; |
49 | 49 | } |
50 | 50 | |
51 | - $s = isset( $_REQUEST['s'] ) ? stripslashes($_REQUEST['s']) : ''; |
|
51 | + $s = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : ''; |
|
52 | 52 | if ( $s != '' ) { |
53 | - preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches); |
|
54 | - $search_terms = array_map('trim', $matches[0]); |
|
53 | + preg_match_all( '/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches ); |
|
54 | + $search_terms = array_map( 'trim', $matches[0] ); |
|
55 | 55 | foreach ( (array) $search_terms as $term ) { |
56 | 56 | $s_query[] = array( |
57 | 57 | 'or' => true, 'name LIKE' => $term, 'description LIKE' => $term, 'created_at LIKE' => $term, |
58 | 58 | ); |
59 | - unset($term); |
|
59 | + unset( $term ); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | _e( 'No Templates Found.', 'formidable' ) ?> |
75 | 75 | <br/><br/><?php _e( 'To add a new template:', 'formidable' ) ?> |
76 | 76 | <ol><li><?php printf( __( 'Create a new %1$sform%2$s.', 'formidable' ), '<a href="' . esc_url( admin_url( 'admin?page=formidable&frm_action=new' ) ) . '"', '</a>' ) ?></li> |
77 | - <li><?php printf(__( 'After your form is created, go to Formidable -> %1$sForms%2$s.', 'formidable' ), '<a href="?page=formidable">', '</a>') ?></li> |
|
77 | + <li><?php printf( __( 'After your form is created, go to Formidable -> %1$sForms%2$s.', 'formidable' ), '<a href="?page=formidable">', '</a>' ) ?></li> |
|
78 | 78 | <li><?php _e( 'Place your mouse over the name of the form you just created, and click the "Create Template" link.', 'formidable' ) ?></li> |
79 | 79 | </ol> |
80 | 80 | <?php } else { |
@@ -91,17 +91,17 @@ discard block |
||
91 | 91 | } |
92 | 92 | |
93 | 93 | if ( 'trash' == $this->status ) { |
94 | - if ( current_user_can('frm_edit_forms') ) { |
|
94 | + if ( current_user_can( 'frm_edit_forms' ) ) { |
|
95 | 95 | $actions['bulk_untrash'] = __( 'Restore', 'formidable' ); |
96 | 96 | } |
97 | 97 | |
98 | - if ( current_user_can('frm_delete_forms') ) { |
|
98 | + if ( current_user_can( 'frm_delete_forms' ) ) { |
|
99 | 99 | $actions['bulk_delete'] = __( 'Delete Permanently', 'formidable' ); |
100 | 100 | } |
101 | - } else if ( EMPTY_TRASH_DAYS && current_user_can('frm_delete_forms') ) { |
|
101 | + } else if ( EMPTY_TRASH_DAYS && current_user_can( 'frm_delete_forms' ) ) { |
|
102 | 102 | $actions['bulk_trash'] = __( 'Move to Trash', 'formidable' ); |
103 | - } else if ( current_user_can('frm_delete_forms') ) { |
|
104 | - $actions['bulk_delete'] = __( 'Delete'); |
|
103 | + } else if ( current_user_can( 'frm_delete_forms' ) ) { |
|
104 | + $actions['bulk_delete'] = __( 'Delete' ); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | return $actions; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | return; |
113 | 113 | } |
114 | 114 | |
115 | - if ( 'trash' == $this->status && current_user_can('frm_delete_forms') ) { |
|
115 | + if ( 'trash' == $this->status && current_user_can( 'frm_delete_forms' ) ) { |
|
116 | 116 | ?> |
117 | 117 | <div class="alignleft actions frm_visible_overflow"> |
118 | 118 | <?php submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); ?> |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $where = apply_filters( 'frm_forms_dropdown', array(), '' ); |
129 | 129 | $forms = FrmForm::get_published_forms( $where ); |
130 | 130 | |
131 | - $base = admin_url('admin.php?page=formidable&form_type=template'); |
|
131 | + $base = admin_url( 'admin.php?page=formidable&form_type=template' ); |
|
132 | 132 | $args = array( |
133 | 133 | 'frm_action' => 'duplicate', |
134 | 134 | 'template' => true, |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $args['id'] = $form->id; ?> |
149 | 149 | <li><a href="<?php echo esc_url( add_query_arg( $args, $base ) ); ?>" tabindex="-1"><?php echo esc_html( empty( $form->name ) ? __( '(no title)' ) : FrmAppHelper::truncate( $form->name, 33 ) ); ?></a></li> |
150 | 150 | <?php |
151 | - unset($form); |
|
151 | + unset( $form ); |
|
152 | 152 | } |
153 | 153 | } |
154 | 154 | ?> |
@@ -180,10 +180,10 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | if ( $counts->{$status} || 'published' == $status ) { |
183 | - $links[ $status ] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>'; |
|
183 | + $links[$status] = '<a href="' . esc_url( '?page=formidable&form_type=' . $status ) . '" ' . $class . '>' . sprintf( __( '%1$s <span class="count">(%2$s)</span>', 'formidable' ), $name, number_format_i18n( $counts->{$status} ) ) . '</a>'; |
|
184 | 184 | } |
185 | 185 | |
186 | - unset($status, $name); |
|
186 | + unset( $status, $name ); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | return $links; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $edit_link = '?page=formidable&frm_action=edit&id=' . $item->id; |
208 | 208 | $duplicate_link = '?page=formidable&frm_action=duplicate&id=' . $item->id; |
209 | 209 | |
210 | - $this->get_actions($actions, $item, $edit_link, $duplicate_link); |
|
210 | + $this->get_actions( $actions, $item, $edit_link, $duplicate_link ); |
|
211 | 211 | |
212 | 212 | $action_links = $this->row_actions( $actions ); |
213 | 213 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | |
250 | 250 | break; |
251 | 251 | case 'created_at': |
252 | - $date = date($format, strtotime($item->created_at)); |
|
252 | + $date = date( $format, strtotime( $item->created_at ) ); |
|
253 | 253 | $val = '<abbr title="' . esc_attr( date( 'Y/m/d g:i:s A', strtotime( $item->created_at ) ) ) . '">' . $date . '</abbr>'; |
254 | 254 | break; |
255 | 255 | case 'shortcode': |
@@ -260,11 +260,11 @@ discard block |
||
260 | 260 | break; |
261 | 261 | case 'entries': |
262 | 262 | if ( isset( $item->options['no_save'] ) && $item->options['no_save'] ) { |
263 | - $val = '<i class="frm_icon_font frm_forbid_icon frm_bstooltip" title="' . esc_attr('Saving entries is disabled for this form', 'formidable' ) . '"></i>'; |
|
263 | + $val = '<i class="frm_icon_font frm_forbid_icon frm_bstooltip" title="' . esc_attr( 'Saving entries is disabled for this form', 'formidable' ) . '"></i>'; |
|
264 | 264 | } else { |
265 | - $text = FrmEntry::getRecordCount($item->id); |
|
266 | - $val = current_user_can('frm_view_entries') ? '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-entries&form=' . $item->id ) ) . '">' . $text . '</a>' : $text; |
|
267 | - unset($text); |
|
265 | + $text = FrmEntry::getRecordCount( $item->id ); |
|
266 | + $val = current_user_can( 'frm_view_entries' ) ? '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-entries&form=' . $item->id ) ) . '">' . $text . '</a>' : $text; |
|
267 | + unset( $text ); |
|
268 | 268 | } |
269 | 269 | break; |
270 | 270 | case 'type': |
@@ -272,12 +272,12 @@ discard block |
||
272 | 272 | break; |
273 | 273 | } |
274 | 274 | |
275 | - if ( isset($val) ) { |
|
275 | + if ( isset( $val ) ) { |
|
276 | 276 | $r .= "<td $attributes>"; |
277 | 277 | $r .= $val; |
278 | 278 | $r .= '</td>'; |
279 | 279 | } |
280 | - unset($val); |
|
280 | + unset( $val ); |
|
281 | 281 | } |
282 | 282 | $r .= '</tr>'; |
283 | 283 | |
@@ -290,18 +290,18 @@ discard block |
||
290 | 290 | */ |
291 | 291 | private function get_actions( &$actions, $item, $edit_link, $duplicate_link ) { |
292 | 292 | if ( 'trash' == $this->status ) { |
293 | - if ( current_user_can('frm_edit_forms') ) { |
|
293 | + if ( current_user_can( 'frm_edit_forms' ) ) { |
|
294 | 294 | $actions['restore'] = FrmFormsHelper::delete_trash_link( $item->id, $item->status, 'short' ); |
295 | 295 | } |
296 | 296 | |
297 | - if ( current_user_can('frm_delete_forms') ) { |
|
297 | + if ( current_user_can( 'frm_delete_forms' ) ) { |
|
298 | 298 | $trash_url = wp_nonce_url( '?page=formidable&form_status=trash&frm_action=destroy&id=' . $item->id, 'destroy_form_' . $item->id ); |
299 | 299 | $actions['trash'] = '<a href="' . esc_url( $trash_url ) . '" class="submitdelete" onclick="return confirm(\'' . __( 'Are you sure you want to permanently delete that?', 'formidable' ) . '\')">' . __( 'Delete Permanently' ) . '</a>'; |
300 | 300 | } |
301 | 301 | return; |
302 | 302 | } |
303 | 303 | |
304 | - if ( current_user_can('frm_edit_forms') ) { |
|
304 | + if ( current_user_can( 'frm_edit_forms' ) ) { |
|
305 | 305 | if ( ! $item->is_template || ! $item->default_template ) { |
306 | 306 | $actions['frm_edit'] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit' ) . '</a>'; |
307 | 307 | } |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | unset( $actions['trash'] ); |
324 | 324 | } |
325 | 325 | |
326 | - $actions['view'] = '<a href="' . esc_url( FrmFormsHelper::get_direct_link( $item->form_key, $item ) ) . '" target="_blank">' . __( 'Preview') . '</a>'; |
|
326 | + $actions['view'] = '<a href="' . esc_url( FrmFormsHelper::get_direct_link( $item->form_key, $item ) ) . '" target="_blank">' . __( 'Preview' ) . '</a>'; |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | /** |
@@ -331,8 +331,8 @@ discard block |
||
331 | 331 | */ |
332 | 332 | private function get_form_name( $item, $actions, $edit_link, $mode = 'list' ) { |
333 | 333 | $form_name = $item->name; |
334 | - if ( trim($form_name) == '' ) { |
|
335 | - $form_name = __( '(no title)'); |
|
334 | + if ( trim( $form_name ) == '' ) { |
|
335 | + $form_name = __( '(no title)' ); |
|
336 | 336 | } |
337 | 337 | $form_name = FrmAppHelper::kses( $form_name ); |
338 | 338 | if ( 'excerpt' != $mode ) { |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | private function add_form_description( $item, &$val ) { |
370 | 370 | global $mode; |
371 | 371 | if ( 'excerpt' == $mode ) { |
372 | - $val .= FrmAppHelper::truncate(strip_tags($item->description), 50); |
|
372 | + $val .= FrmAppHelper::truncate( strip_tags( $item->description ), 50 ); |
|
373 | 373 | } |
374 | 374 | } |
375 | 375 | } |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! isset($saving) ) { |
3 | - header( 'Content-type: text/css' ); |
|
3 | + header( 'Content-type: text/css' ); |
|
4 | 4 | |
5 | - if ( isset($css) && $css ) { |
|
6 | - echo $css; |
|
7 | - die(); |
|
8 | - } |
|
5 | + if ( isset($css) && $css ) { |
|
6 | + echo $css; |
|
7 | + die(); |
|
8 | + } |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | if ( ! isset($frm_style) ) { |
12 | - $frm_style = new FrmStyle(); |
|
12 | + $frm_style = new FrmStyle(); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | $styles = $frm_style->get_all(); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | <?php |
188 | 188 | foreach ( $styles as $style ) { |
189 | 189 | include( dirname( __FILE__ ) . '/_single_theme.css.php' ); |
190 | - unset($style); |
|
190 | + unset($style); |
|
191 | 191 | } |
192 | 192 | ?> |
193 | 193 |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <?php |
2 | -if ( ! isset($saving) ) { |
|
2 | +if ( ! isset( $saving ) ) { |
|
3 | 3 | header( 'Content-type: text/css' ); |
4 | 4 | |
5 | - if ( isset($css) && $css ) { |
|
5 | + if ( isset( $css ) && $css ) { |
|
6 | 6 | echo $css; |
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | } |
10 | 10 | |
11 | -if ( ! isset($frm_style) ) { |
|
11 | +if ( ! isset( $frm_style ) ) { |
|
12 | 12 | $frm_style = new FrmStyle(); |
13 | 13 | } |
14 | 14 | |
15 | 15 | $styles = $frm_style->get_all(); |
16 | -$default_style = $frm_style->get_default_style($styles); |
|
16 | +$default_style = $frm_style->get_default_style( $styles ); |
|
17 | 17 | $defaults = $default_style->post_content; |
18 | 18 | ?> |
19 | 19 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | <?php |
195 | 195 | foreach ( $styles as $style ) { |
196 | 196 | include( dirname( __FILE__ ) . '/_single_theme.css.php' ); |
197 | - unset($style); |
|
197 | + unset( $style ); |
|
198 | 198 | } |
199 | 199 | ?> |
200 | 200 | |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | overflow:hidden!important; |
620 | 620 | } |
621 | 621 | |
622 | -<?php include( dirname(__FILE__) . '/frm_grids.css' ); ?> |
|
622 | +<?php include( dirname( __FILE__ ) . '/frm_grids.css' ); ?> |
|
623 | 623 | |
624 | 624 | /* Left and right label styling for non-Formidable styling - very basic, not responsive */ |
625 | 625 | .frm_form_field.frm_left_container label.frm_primary_label{ |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | $display = apply_filters('frm_display_field_options', array( |
4 | - 'type' => $field['type'], 'field_data' => $field, |
|
5 | - 'required' => true, 'unique' => false, 'read_only' => false, |
|
6 | - 'description' => true, 'options' => true, 'label_position' => true, |
|
7 | - 'invalid' => false, 'size' => false, 'clear_on_focus' => false, |
|
8 | - 'default_blank' => true, 'css' => true, 'conf_field' => false, |
|
4 | + 'type' => $field['type'], 'field_data' => $field, |
|
5 | + 'required' => true, 'unique' => false, 'read_only' => false, |
|
6 | + 'description' => true, 'options' => true, 'label_position' => true, |
|
7 | + 'invalid' => false, 'size' => false, 'clear_on_focus' => false, |
|
8 | + 'default_blank' => true, 'css' => true, 'conf_field' => false, |
|
9 | 9 | 'max' => true, 'captcha_size' => false, |
10 | 10 | )); |
11 | 11 | |
@@ -25,19 +25,19 @@ discard block |
||
25 | 25 | $frm_settings = FrmAppHelper::get_settings(); |
26 | 26 | |
27 | 27 | if ( ! isset( $frm_all_field_selection ) ) { |
28 | - if ( isset($frm_field_selection) && isset($pro_field_selection) ) { |
|
29 | - $frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection); |
|
30 | - } else { |
|
28 | + if ( isset($frm_field_selection) && isset($pro_field_selection) ) { |
|
29 | + $frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection); |
|
30 | + } else { |
|
31 | 31 | $pro_field_selection = FrmField::pro_field_selection(); |
32 | 32 | $frm_all_field_selection = array_merge( FrmField::field_selection(), $pro_field_selection ); |
33 | - } |
|
33 | + } |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | $disabled_fields = FrmAppHelper::pro_is_installed() ? array() : $pro_field_selection; |
37 | 37 | |
38 | 38 | |
39 | 39 | if ( ! isset( $ajax ) ) { |
40 | - $li_classes .= ' ui-state-default widgets-holder-wrap'; ?> |
|
40 | + $li_classes .= ' ui-state-default widgets-holder-wrap'; ?> |
|
41 | 41 | <li id="frm_field_id_<?php echo esc_attr( $field['id'] ); ?>" class="<?php echo esc_attr( $li_classes ) ?>" data-fid="<?php echo esc_attr( $field['id'] ) ?>" data-formid="<?php echo ( 'divider' == $field['type'] ) ? esc_attr( $field['form_select'] ) : esc_attr( $field['form_id'] ); ?>"> |
42 | 42 | <?php |
43 | 43 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | </span> |
60 | 60 | <?php } |
61 | 61 | |
62 | - ?> |
|
62 | + ?> |
|
63 | 63 | <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button': ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label> |
64 | 64 | |
65 | 65 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | if ( in_array( $field['type'], array( 'select', 'radio', 'checkbox' ) ) ) { ?> |
106 | 106 | <div class="frm-show-click frm_small_top_margin"><?php |
107 | 107 | |
108 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
108 | + if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
109 | 109 | echo '<p class="howto">' . FrmFieldsHelper::get_term_link( $field['taxonomy'] ) . '</p>'; |
110 | 110 | } else if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) { |
111 | 111 | ?> |
@@ -117,16 +117,16 @@ discard block |
||
117 | 117 | <a href="javascript:void(0);" id="other_button_<?php echo esc_attr( $field['id'] ); ?>" data-opttype="other" data-ftype="<?php echo esc_attr( $field['type'] ) ?>" class="button frm_cb_button frm_add_opt<?php echo ( in_array( $field['type'], array( 'radio', 'select' ) ) && $field['other'] == true ? ' frm_hidden' : '' ); ?>"><?php _e( 'Add "Other"', 'formidable' ) ?></a> |
118 | 118 | <input type="hidden" value="<?php echo esc_attr( $field['other'] ); ?>" id="other_input_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[other_<?php echo esc_attr( $field['id'] ); ?>]"> |
119 | 119 | <?php |
120 | - } |
|
120 | + } |
|
121 | 121 | |
122 | - if ( ! isset($field['post_field']) || $field['post_field'] != 'post_category' ) { ?> |
|
122 | + if ( ! isset($field['post_field']) || $field['post_field'] != 'post_category' ) { ?> |
|
123 | 123 | <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=frm_import_choices&field_id=' . $field['id'] . '&TB_iframe=1' ) ) ?>" title="<?php echo esc_attr( FrmAppHelper::truncate( strip_tags( str_replace( '"', '"', $field['name'] ) ), 20 ) . ' ' . __( 'Field Choices', 'formidable' ) ); ?>" class="thickbox frm_orange"> |
124 | 124 | <?php _e( 'Bulk Edit Options', 'formidable' ) ?> |
125 | 125 | </a> |
126 | 126 | <?php } ?> |
127 | 127 | </div> |
128 | 128 | <?php |
129 | - } |
|
129 | + } |
|
130 | 130 | ?> |
131 | 131 | </div> |
132 | 132 | <?php |
@@ -158,28 +158,28 @@ discard block |
||
158 | 158 | if ( $display['required'] ) { ?> |
159 | 159 | <label for="frm_req_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label"><input type="checkbox" id="frm_req_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_req_field" name="field_options[required_<?php echo esc_attr( $field['id'] ) ?>]" value="1" <?php echo $field['required'] ? 'checked="checked"': ''; ?> /> <?php _e( 'Required', 'formidable' ) ?></label> |
160 | 160 | <?php |
161 | - } |
|
161 | + } |
|
162 | 162 | |
163 | 163 | if ( $display['unique'] ) { |
164 | - if ( ! isset( $field['unique'] ) ) { |
|
165 | - $field['unique'] = false; |
|
166 | - } |
|
167 | - ?> |
|
164 | + if ( ! isset( $field['unique'] ) ) { |
|
165 | + $field['unique'] = false; |
|
166 | + } |
|
167 | + ?> |
|
168 | 168 | <label for="frm_uniq_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Unique: Do not allow the same response multiple times. For example, if one user enters \'Joe\', then no one else will be allowed to enter the same name.', 'formidable' ) ?>"><input type="checkbox" name="field_options[unique_<?php echo esc_attr( $field['id'] ) ?>]" id="frm_uniq_field_<?php echo esc_attr( $field['id'] ) ?>" value="1" <?php checked( $field['unique'], 1 ); ?> class="frm_mark_unique" /> <?php _e( 'Unique', 'formidable' ) ?></label> |
169 | 169 | <?php |
170 | - } |
|
170 | + } |
|
171 | 171 | |
172 | 172 | if ( $display['read_only'] ) { |
173 | - if ( ! isset( $field['read_only'] ) ) { |
|
174 | - $field['read_only'] = false; |
|
173 | + if ( ! isset( $field['read_only'] ) ) { |
|
174 | + $field['read_only'] = false; |
|
175 | 175 | } |
176 | - ?> |
|
176 | + ?> |
|
177 | 177 | <label for="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Read Only: Show this field but do not allow the field value to be edited from the front-end.', 'formidable' ) ?>" ><input type="checkbox" id="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" name="field_options[read_only_<?php echo esc_attr( $field['id'] ) ?>]" value="1" <?php echo $field['read_only'] ? ' checked="checked"' : ''; ?>/> <?php _e( 'Read Only', 'formidable' ) ?></label> |
178 | 178 | <?php } |
179 | 179 | |
180 | - do_action('frm_field_options_form_top', $field, $display, $values); |
|
180 | + do_action('frm_field_options_form_top', $field, $display, $values); |
|
181 | 181 | |
182 | - ?> |
|
182 | + ?> |
|
183 | 183 | <?php |
184 | 184 | if ( $display['required'] ) { ?> |
185 | 185 | <div class="frm_required_details<?php echo esc_attr( $field['id'] . ( $field['required'] ? '' : ' frm_hidden' ) ); ?>"> |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | do_action( 'frm_' . $field['type'] . '_field_options_form', $field, $display, $values ); |
266 | 266 | do_action( 'frm_field_options_form', $field, $display, $values ); |
267 | 267 | |
268 | - if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?> |
|
268 | + if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?> |
|
269 | 269 | <tr class="frm_validation_msg <?php echo ($display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>"> |
270 | 270 | <td colspan="2"> |
271 | 271 | <div class="menu-settings"> |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | <input type="text" name="field_options[blank_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['blank'] ); ?>" /> |
279 | 279 | </p> |
280 | 280 | <?php |
281 | - } |
|
281 | + } |
|
282 | 282 | |
283 | 283 | if ( $display['invalid'] ) { ?> |
284 | 284 | <p><label><?php _e( 'Invalid Format', 'formidable' ) ?></label> |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | <input type="text" name="field_options[unique_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['unique_msg'] ); ?>" /> |
294 | 294 | </p> |
295 | 295 | <?php |
296 | - } |
|
296 | + } |
|
297 | 297 | |
298 | 298 | if ( $display['conf_field'] ) { ?> |
299 | 299 | <p class="frm_conf_details<?php echo esc_attr( $field['id'] . ( $field['conf_field'] ? '' : ' frm_hidden' ) ); ?>"> |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | <input type="text" name="field_options[conf_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_msg'] ); ?>" /> |
302 | 302 | </p> |
303 | 303 | <?php |
304 | - } ?> |
|
304 | + } ?> |
|
305 | 305 | </div> |
306 | 306 | </div> |
307 | 307 | </td> |
@@ -1,22 +1,22 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$display = apply_filters('frm_display_field_options', array( |
|
3 | +$display = apply_filters( 'frm_display_field_options', array( |
|
4 | 4 | 'type' => $field['type'], 'field_data' => $field, |
5 | 5 | 'required' => true, 'unique' => false, 'read_only' => false, |
6 | 6 | 'description' => true, 'options' => true, 'label_position' => true, |
7 | 7 | 'invalid' => false, 'size' => false, 'clear_on_focus' => false, |
8 | 8 | 'default_blank' => true, 'css' => true, 'conf_field' => false, |
9 | 9 | 'max' => true, 'captcha_size' => false, |
10 | -)); |
|
10 | +) ); |
|
11 | 11 | |
12 | 12 | $li_classes = 'form-field edit_form_item frm_field_box frm_top_container frm_not_divider edit_field_type_' . $display['type']; |
13 | -$li_classes = apply_filters('frm_build_field_class', $li_classes, $field ); |
|
13 | +$li_classes = apply_filters( 'frm_build_field_class', $li_classes, $field ); |
|
14 | 14 | |
15 | 15 | if ( isset( $values ) && isset( $values['ajax_load'] ) && $values['ajax_load'] && isset( $count ) && $count > 10 && ! in_array( $field['type'], array( 'divider', 'end_divider' ) ) ) { |
16 | 16 | ?> |
17 | 17 | <li id="frm_field_id_<?php echo esc_attr( $field['id'] ); ?>" class="<?php echo esc_attr( $li_classes ) ?> frm_field_loading" data-fid="<?php echo esc_attr( $field['id'] ) ?>" data-formid="<?php echo esc_attr( 'divider' == $field['type'] ? $field['form_select'] : $field['form_id'] ); ?>" data-ftype="<?php echo esc_attr( $display['type'] ) ?>"> |
18 | 18 | <img src="<?php echo FrmAppHelper::plugin_url() ?>/images/ajax_loader.gif" alt="<?php esc_attr_e( 'Loading', 'formidable' ) ?>" /> |
19 | -<span class="frm_hidden_fdata frm_hidden"><?php echo htmlspecialchars(json_encode($field)) ?></span> |
|
19 | +<span class="frm_hidden_fdata frm_hidden"><?php echo htmlspecialchars( json_encode( $field ) ) ?></span> |
|
20 | 20 | </li> |
21 | 21 | <?php |
22 | 22 | return; |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | $frm_settings = FrmAppHelper::get_settings(); |
26 | 26 | |
27 | 27 | if ( ! isset( $frm_all_field_selection ) ) { |
28 | - if ( isset($frm_field_selection) && isset($pro_field_selection) ) { |
|
29 | - $frm_all_field_selection = array_merge($frm_field_selection, $pro_field_selection); |
|
28 | + if ( isset( $frm_field_selection ) && isset( $pro_field_selection ) ) { |
|
29 | + $frm_all_field_selection = array_merge( $frm_field_selection, $pro_field_selection ); |
|
30 | 30 | } else { |
31 | 31 | $pro_field_selection = FrmField::pro_field_selection(); |
32 | 32 | $frm_all_field_selection = array_merge( FrmField::field_selection(), $pro_field_selection ); |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | <a href="javascript:void(0);" class="frm_bstooltip alignright frm-show-hover frm-move frm-hover-icon frm_icon_font frm_move_icon" title="<?php esc_attr_e( 'Move Field', 'formidable' ) ?>"> </a> |
52 | 52 | <a href="#" class="frm_bstooltip alignright frm-show-hover frm-hover-icon frm_icon_font frm_delete_icon frm_delete_field" title="<?php esc_attr_e( 'Delete Field', 'formidable' ) ?>"> </a> |
53 | 53 | <a href="#" class="frm_bstooltip alignright frm-show-hover frm-hover-icon frm_icon_font frm_duplicate_icon" title="<?php ( $field['type'] == 'divider' ) ? esc_attr_e( 'Duplicate Section', 'formidable' ) : esc_attr_e( 'Duplicate Field', 'formidable' ) ?>"> </a> |
54 | - <input type="hidden" name="frm_fields_submitted[]" value="<?php echo esc_attr($field['id']) ?>" /> |
|
55 | - <?php do_action('frm_extra_field_actions', $field['id']); ?> |
|
54 | + <input type="hidden" name="frm_fields_submitted[]" value="<?php echo esc_attr( $field['id'] ) ?>" /> |
|
55 | + <?php do_action( 'frm_extra_field_actions', $field['id'] ); ?> |
|
56 | 56 | <?php if ( $display['required'] ) { ?> |
57 | 57 | <span id="require_field_<?php echo esc_attr( $field['id'] ); ?>"> |
58 | 58 | <a href="javascript:void(0);" class="frm_req_field frm_action_icon frm_required_icon frm_icon_font alignleft frm_required<?php echo (int) $field['required'] ?>" id="req_field_<?php echo esc_attr( $field['id'] ); ?>" title="Click to Mark as <?php echo FrmField::is_required( $field ) ? 'not ' : ''; ?>Required"></a> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <?php } |
61 | 61 | |
62 | 62 | ?> |
63 | - <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button': ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label> |
|
63 | + <label class="<?php echo ( $field['type'] == 'end_divider' ) ? '' : 'frm_ipe_field_label'; ?> frm_primary_label <?php echo ( $field['type'] == 'break' ) ? 'button' : ''; ?>" id="field_label_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['name'] == '' ) ? __( '(no label)', 'formidable' ) : force_balance_tags( $field['name'] ); ?></label> |
|
64 | 64 | |
65 | 65 | |
66 | 66 | <div id="field_<?php echo esc_attr( $field['id'] ) ?>_inner_container" class="frm_inner_field_container"> |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | </div> |
79 | 79 | <?php |
80 | 80 | if ( $display['description'] ) { ?> |
81 | - <div class="frm_ipe_field_desc description <?php echo ($field['description'] == '') ? 'frm-show-click' : '' ?>" id="field_description_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ($field['description'] == '') ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['description'] ); ?></div> |
|
81 | + <div class="frm_ipe_field_desc description <?php echo ( $field['description'] == '' ) ? 'frm-show-click' : '' ?>" id="field_description_<?php echo esc_attr( $field['id'] ); ?>"><?php echo ( $field['description'] == '' ) ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['description'] ); ?></div> |
|
82 | 82 | <input type="hidden" name="field_options[description_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['description'] ); ?>" /> |
83 | 83 | |
84 | 84 | <?php } ?> |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | <div class="frm_form_fields"> |
91 | 91 | <input type="text" id="conf_field_<?php echo esc_attr( $field['field_key'] ) ?>" name="field_options[conf_input_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_input'] ); ?>" class="dyn_default_value" /> |
92 | 92 | </div> |
93 | - <div id="conf_field_description_<?php echo esc_attr( $field['id'] ) ?>" class="frm_ipe_field_conf_desc description <?php echo ($field['conf_desc'] == '') ? 'frm-show-click' : '' ?>"><?php |
|
94 | - echo ($field['conf_desc'] == '') ? __( '(Click to add description)', 'formidable' ) : force_balance_tags($field['conf_desc']); ?></div> |
|
93 | + <div id="conf_field_description_<?php echo esc_attr( $field['id'] ) ?>" class="frm_ipe_field_conf_desc description <?php echo ( $field['conf_desc'] == '' ) ? 'frm-show-click' : '' ?>"><?php |
|
94 | + echo ( $field['conf_desc'] == '' ) ? __( '(Click to add description)', 'formidable' ) : force_balance_tags( $field['conf_desc'] ); ?></div> |
|
95 | 95 | <input type="hidden" name="field_options[conf_desc_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_desc'] ); ?>" /> |
96 | 96 | </div> |
97 | 97 | <?php if ( $display['clear_on_focus'] ) { ?> |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | if ( in_array( $field['type'], array( 'select', 'radio', 'checkbox' ) ) ) { ?> |
107 | 107 | <div class="frm-show-click frm_small_top_margin"><?php |
108 | 108 | |
109 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
109 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
110 | 110 | echo '<p class="howto">' . FrmFieldsHelper::get_term_link( $field['taxonomy'] ) . '</p>'; |
111 | 111 | } else if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) { |
112 | 112 | ?> |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | <?php |
121 | 121 | } |
122 | 122 | |
123 | - if ( ! isset($field['post_field']) || $field['post_field'] != 'post_category' ) { ?> |
|
123 | + if ( ! isset( $field['post_field'] ) || $field['post_field'] != 'post_category' ) { ?> |
|
124 | 124 | <a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=frm_import_choices&field_id=' . $field['id'] . '&TB_iframe=1' ) ) ?>" title="<?php echo esc_attr( FrmAppHelper::truncate( strip_tags( str_replace( '"', '"', $field['name'] ) ), 20 ) . ' ' . __( 'Field Choices', 'formidable' ) ); ?>" class="thickbox frm_orange"> |
125 | 125 | <?php _e( 'Bulk Edit Options', 'formidable' ) ?> |
126 | 126 | </a> |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | <?php |
134 | 134 | } |
135 | 135 | |
136 | -do_action('frm_before_field_options', $field); |
|
136 | +do_action( 'frm_before_field_options', $field ); |
|
137 | 137 | |
138 | 138 | if ( $display['options'] ) { ?> |
139 | 139 | <div class="widget"> |
@@ -143,13 +143,13 @@ discard block |
||
143 | 143 | </div> |
144 | 144 | <div class="widget-inside"> |
145 | 145 | <table class="form-table frm_clear_none"> |
146 | - <?php $field_types = FrmFieldsHelper::get_field_types($field['type']); ?> |
|
146 | + <?php $field_types = FrmFieldsHelper::get_field_types( $field['type'] ); ?> |
|
147 | 147 | <tr><td class="frm_150_width"><label><?php _e( 'Field Type', 'formidable' ) ?></label></td> |
148 | 148 | <td> |
149 | - <select <?php if ( count($field_types) == 1 ) { ?>disabled="disabled"<?php } else { ?>name="field_options[type_<?php echo esc_attr( $field['id'] ) ?>]"<?php } ?>> |
|
149 | + <select <?php if ( count( $field_types ) == 1 ) { ?>disabled="disabled"<?php } else { ?>name="field_options[type_<?php echo esc_attr( $field['id'] ) ?>]"<?php } ?>> |
|
150 | 150 | <?php |
151 | 151 | foreach ( $field_types as $fkey => $ftype ) { ?> |
152 | - <option value="<?php echo esc_attr( $fkey ) ?>" <?php echo ( $fkey == $field['type'] ) ? ' selected="selected"' : ''; ?> <?php echo array_key_exists($fkey, $disabled_fields ) ? 'disabled="disabled"' : ''; ?>><?php echo is_array($ftype) ? $ftype['name'] : $ftype ?> </option> |
|
152 | + <option value="<?php echo esc_attr( $fkey ) ?>" <?php echo ( $fkey == $field['type'] ) ? ' selected="selected"' : ''; ?> <?php echo array_key_exists( $fkey, $disabled_fields ) ? 'disabled="disabled"' : ''; ?>><?php echo is_array( $ftype ) ? $ftype['name'] : $ftype ?> </option> |
|
153 | 153 | <?php |
154 | 154 | unset( $fkey, $ftype ); |
155 | 155 | } ?> |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | </label> |
185 | 185 | <?php } |
186 | 186 | |
187 | - do_action('frm_field_options_form_top', $field, $display, $values); |
|
187 | + do_action( 'frm_field_options_form_top', $field, $display, $values ); |
|
188 | 188 | |
189 | 189 | ?> |
190 | 190 | <?php |
@@ -221,13 +221,13 @@ discard block |
||
221 | 221 | if ( $display['label_position'] ) { ?> |
222 | 222 | <tr><td class="frm_150_width"><label><?php _e( 'Label Position', 'formidable' ) ?></label></td> |
223 | 223 | <td><select name="field_options[label_<?php echo esc_attr( $field['id'] ) ?>]"> |
224 | - <option value=""<?php selected($field['label'], ''); ?>><?php _e( 'Default', 'formidable' ) ?></option> |
|
225 | - <option value="top"<?php selected($field['label'], 'top'); ?>><?php _e( 'Top', 'formidable' ) ?></option> |
|
226 | - <option value="left"<?php selected($field['label'], 'left'); ?>><?php _e( 'Left', 'formidable' ) ?></option> |
|
227 | - <option value="right"<?php selected($field['label'], 'right'); ?>><?php _e( 'Right', 'formidable' ) ?></option> |
|
228 | - <option value="inline"<?php selected($field['label'], 'inline'); ?>><?php _e( 'Inline (left without a set width)', 'formidable' ) ?></option> |
|
229 | - <option value="none"<?php selected($field['label'], 'none'); ?>><?php _e( 'None', 'formidable' ) ?></option> |
|
230 | - <option value="hidden"<?php selected($field['label'], 'hidden'); ?>><?php _e( 'Hidden (but leave the space)', 'formidable' ) ?></option> |
|
224 | + <option value=""<?php selected( $field['label'], '' ); ?>><?php _e( 'Default', 'formidable' ) ?></option> |
|
225 | + <option value="top"<?php selected( $field['label'], 'top' ); ?>><?php _e( 'Top', 'formidable' ) ?></option> |
|
226 | + <option value="left"<?php selected( $field['label'], 'left' ); ?>><?php _e( 'Left', 'formidable' ) ?></option> |
|
227 | + <option value="right"<?php selected( $field['label'], 'right' ); ?>><?php _e( 'Right', 'formidable' ) ?></option> |
|
228 | + <option value="inline"<?php selected( $field['label'], 'inline' ); ?>><?php _e( 'Inline (left without a set width)', 'formidable' ) ?></option> |
|
229 | + <option value="none"<?php selected( $field['label'], 'none' ); ?>><?php _e( 'None', 'formidable' ) ?></option> |
|
230 | + <option value="hidden"<?php selected( $field['label'], 'hidden' ); ?>><?php _e( 'Hidden (but leave the space)', 'formidable' ) ?></option> |
|
231 | 231 | </select> |
232 | 232 | </td> |
233 | 233 | </tr> |
@@ -250,8 +250,8 @@ discard block |
||
250 | 250 | <span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Set the size of the captcha field. The compact option is best if your form is in a small area.', 'formidable' ) ?>" ></span> |
251 | 251 | </td> |
252 | 252 | <td><select name="field_options[captcha_size_<?php echo esc_attr( $field['id'] ) ?>]"> |
253 | - <option value="normal"<?php selected($field['captcha_size'], 'normal'); ?>><?php _e( 'Normal', 'formidable' ) ?></option> |
|
254 | - <option value="compact"<?php selected($field['captcha_size'], 'compact'); ?>><?php _e( 'Compact', 'formidable' ) ?></option> |
|
253 | + <option value="normal"<?php selected( $field['captcha_size'], 'normal' ); ?>><?php _e( 'Normal', 'formidable' ) ?></option> |
|
254 | + <option value="compact"<?php selected( $field['captcha_size'], 'compact' ); ?>><?php _e( 'Compact', 'formidable' ) ?></option> |
|
255 | 255 | </select> |
256 | 256 | </td> |
257 | 257 | </tr> |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | do_action( 'frm_field_options_form', $field, $display, $values ); |
274 | 274 | |
275 | 275 | if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?> |
276 | - <tr class="frm_validation_msg <?php echo ($display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>"> |
|
276 | + <tr class="frm_validation_msg <?php echo ( $display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>"> |
|
277 | 277 | <td colspan="2"> |
278 | 278 | <div class="menu-settings"> |
279 | 279 | <h3 class="frm_no_bg"><?php _e( 'Validation', 'formidable' ) ?></h3> |
@@ -337,4 +337,4 @@ discard block |
||
337 | 337 | <?php |
338 | 338 | } |
339 | 339 | |
340 | -unset($display); |
|
340 | +unset( $display ); |