@@ -1,13 +1,13 @@ |
||
1 | 1 | <div class="frmcenter frm_no_entries_form"> |
2 | 2 | <?php |
3 | -if ( $form && isset($form->options['no_save']) && $form->options['no_save'] ) { ?> |
|
3 | +if ( $form && isset( $form->options['no_save'] ) && $form->options['no_save'] ) { ?> |
|
4 | 4 | <h3><?php _e( 'This form is not set to save any entries.', 'formidable' ) ?></h3> |
5 | 5 | <p>If you would like entries in this form to be saved, go to the <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable' ) . '&frm_action=settings&id=' . $form->id ) ?>">form Settings</a> page and uncheck the "Do not store any entries submitted from this form" box.</p> |
6 | 6 | <?php |
7 | 7 | } else if ( $form ) { |
8 | 8 | ?> |
9 | -<div class="frm_no_entries_header"><?php printf(__( 'No Entries for form: %s', 'formidable' ), $form->name); ?></div> |
|
10 | -<p class="frm_no_entries_text"><?php printf( __( 'For instructions on publishing your form see %1$sthe docs%2$s or click "%3$sAdd New%4$s" above to add an entry from here (Requires License)', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/publish-your-forms/" target="_blank">', '</a> <br/>', '<a href="' . esc_url( admin_url('admin.php?page=formidable-entries&frm_action=new&form=' . $form->id ) ) . '">', '</a>' ); ?></p> |
|
9 | +<div class="frm_no_entries_header"><?php printf( __( 'No Entries for form: %s', 'formidable' ), $form->name ); ?></div> |
|
10 | +<p class="frm_no_entries_text"><?php printf( __( 'For instructions on publishing your form see %1$sthe docs%2$s or click "%3$sAdd New%4$s" above to add an entry from here (Requires License)', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/publish-your-forms/" target="_blank">', '</a> <br/>', '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-entries&frm_action=new&form=' . $form->id ) ) . '">', '</a>' ); ?></p> |
|
11 | 11 | <?php |
12 | 12 | } else { |
13 | 13 | ?> |
@@ -14,44 +14,44 @@ |
||
14 | 14 | <div class="inside"> |
15 | 15 | <table class="form-table"><tbody> |
16 | 16 | <?php |
17 | - $first_h3 = 'frm_first_h3'; |
|
18 | - foreach ( $fields as $field ) { |
|
17 | + $first_h3 = 'frm_first_h3'; |
|
18 | + foreach ( $fields as $field ) { |
|
19 | 19 | if ( in_array( $field->type, array( 'captcha', 'html', 'end_divider', 'form' ) ) ) { |
20 | - continue; |
|
21 | - } |
|
20 | + continue; |
|
21 | + } |
|
22 | 22 | |
23 | - if ( in_array($field->type, array( 'break', 'divider' ) ) ) { |
|
24 | - ?> |
|
23 | + if ( in_array($field->type, array( 'break', 'divider' ) ) ) { |
|
24 | + ?> |
|
25 | 25 | </tbody></table> |
26 | 26 | <br/><h3 class="<?php echo esc_attr( $first_h3 ) ?>"><?php echo esc_html( $field->name ) ?></h3> |
27 | 27 | <table class="form-table"><tbody> |
28 | 28 | <?php |
29 | - $first_h3 = ''; |
|
30 | - } else { |
|
31 | - ?> |
|
29 | + $first_h3 = ''; |
|
30 | + } else { |
|
31 | + ?> |
|
32 | 32 | <tr> |
33 | 33 | <th scope="row"><?php echo esc_html( $field->name ) ?>:</th> |
34 | 34 | <td> |
35 | 35 | <?php |
36 | 36 | $embedded_field_id = ( $entry->form_id != $field->form_id ) ? 'form' . $field->form_id : 0; |
37 | - $atts = array( |
|
38 | - 'type' => $field->type, 'post_id' => $entry->post_id, |
|
39 | - 'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id, |
|
40 | - 'embedded_field_id' => $embedded_field_id, |
|
41 | - ); |
|
37 | + $atts = array( |
|
38 | + 'type' => $field->type, 'post_id' => $entry->post_id, |
|
39 | + 'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id, |
|
40 | + 'embedded_field_id' => $embedded_field_id, |
|
41 | + ); |
|
42 | 42 | $display_value = FrmEntriesHelper::prepare_display_value( $entry, $field, $atts ); |
43 | 43 | echo $display_value; |
44 | 44 | |
45 | - if ( is_email($display_value) && ! in_array($display_value, $to_emails) ) { |
|
46 | - $to_emails[] = $display_value; |
|
47 | - } |
|
48 | - ?> |
|
45 | + if ( is_email($display_value) && ! in_array($display_value, $to_emails) ) { |
|
46 | + $to_emails[] = $display_value; |
|
47 | + } |
|
48 | + ?> |
|
49 | 49 | </td> |
50 | 50 | </tr> |
51 | 51 | <?php } |
52 | - } |
|
52 | + } |
|
53 | 53 | |
54 | - ?> |
|
54 | + ?> |
|
55 | 55 | |
56 | 56 | <?php if ( $entry->parent_item_id ) { ?> |
57 | 57 | <tr><th><?php _e( 'Parent Entry ID', 'formidable' ) ?>:</th> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <div id="form_show_entry_page" class="wrap"> |
2 | 2 | <h2 class="frm_no_print"><?php _e( 'View Entry', 'formidable' ) ?> |
3 | - <?php do_action('frm_entry_inside_h2', $entry->form_id); ?> |
|
3 | + <?php do_action( 'frm_entry_inside_h2', $entry->form_id ); ?> |
|
4 | 4 | </h2> |
5 | 5 | |
6 | 6 | <div class="frm_forms"> |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | <div id="poststuff"> |
9 | 9 | <div id="post-body" class="metabox-holder columns-2"> |
10 | 10 | <div id="post-body-content"> |
11 | - <?php FrmAppController::get_form_nav($entry->form_id, true); ?> |
|
11 | + <?php FrmAppController::get_form_nav( $entry->form_id, true ); ?> |
|
12 | 12 | <div class="postbox"> |
13 | 13 | <h3 class="hndle"><span><?php _e( 'Entry', 'formidable' ) ?></span></h3> |
14 | 14 | <div class="inside"> |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | continue; |
21 | 21 | } |
22 | 22 | |
23 | - if ( in_array($field->type, array( 'break', 'divider' ) ) ) { |
|
23 | + if ( in_array( $field->type, array( 'break', 'divider' ) ) ) { |
|
24 | 24 | ?> |
25 | 25 | </tbody></table> |
26 | 26 | <br/><h3 class="<?php echo esc_attr( $first_h3 ) ?>"><?php echo esc_html( $field->name ) ?></h3> |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $display_value = FrmEntriesHelper::prepare_display_value( $entry, $field, $atts ); |
43 | 43 | echo $display_value; |
44 | 44 | |
45 | - if ( is_email($display_value) && ! in_array($display_value, $to_emails) ) { |
|
45 | + if ( is_email( $display_value ) && ! in_array( $display_value, $to_emails ) ) { |
|
46 | 46 | $to_emails[] = $display_value; |
47 | 47 | } |
48 | 48 | ?> |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | </td></tr> |
60 | 60 | <?php } ?> |
61 | 61 | </tbody></table> |
62 | - <?php do_action('frm_show_entry', $entry); ?> |
|
62 | + <?php do_action( 'frm_show_entry', $entry ); ?> |
|
63 | 63 | </div> |
64 | 64 | </div> |
65 | 65 | |
66 | - <?php do_action('frm_after_show_entry', $entry); ?> |
|
66 | + <?php do_action( 'frm_after_show_entry', $entry ); ?> |
|
67 | 67 | |
68 | 68 | </div> |
69 | 69 | <?php require( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/sidebar-show.php' ); ?> |
@@ -1,16 +1,16 @@ discard block |
||
1 | -<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 ); ?>" /> |
|
2 | -<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('ID', '') ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" /> |
|
1 | +<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 ); ?>" /> |
|
2 | +<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'ID', '' ) ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" /> |
|
3 | 3 | |
4 | 4 | <table class="form-table"> |
5 | 5 | <tr> |
6 | 6 | <th> |
7 | - <label <?php FrmAppHelper::maybe_add_tooltip('action_title') ?>><?php _e( 'Label', 'formidable' ) ?></label> |
|
7 | + <label <?php FrmAppHelper::maybe_add_tooltip( 'action_title' ) ?>><?php _e( 'Label', 'formidable' ) ?></label> |
|
8 | 8 | </th> |
9 | - <td><input type="text" name="<?php echo esc_attr( $action_control->get_field_name('post_title', '') ) ?>" value="<?php echo esc_attr($form_action->post_title); ?>" class="large-text <?php FrmAppHelper::maybe_add_tooltip('action_title', 'open') ?>" id="<?php echo esc_attr( $action_control->get_field_id('action_post_title') ) ?>" /> |
|
9 | + <td><input type="text" name="<?php echo esc_attr( $action_control->get_field_name( 'post_title', '' ) ) ?>" value="<?php echo esc_attr( $form_action->post_title ); ?>" class="large-text <?php FrmAppHelper::maybe_add_tooltip( 'action_title', 'open' ) ?>" id="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ) ?>" /> |
|
10 | 10 | </td> |
11 | 11 | </tr> |
12 | 12 | </table> |
13 | -<?php $action_control->form($form_action, compact('form', 'action_key', 'values')); |
|
13 | +<?php $action_control->form( $form_action, compact( 'form', 'action_key', 'values' ) ); |
|
14 | 14 | |
15 | 15 | if ( ! isset( $action_control->action_options['event'] ) ) { |
16 | 16 | $events = 'create'; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | if ( count( $action_control->action_options['event'] ) == 1 || $action_control->action_options['force_event'] ) { |
24 | 24 | foreach ( $action_control->action_options['event'] as $e ) { ?> |
25 | - <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('event') ) ?>[]" value="<?php echo esc_attr( $e ) ?>" /> |
|
25 | + <input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ) ?>[]" value="<?php echo esc_attr( $e ) ?>" /> |
|
26 | 26 | <?php |
27 | 27 | } |
28 | 28 | } else { |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | <h3><?php _e( 'Action Triggers', 'formidable' ); ?></h3> |
31 | 31 | <p> |
32 | 32 | <label class="frm_left_label"><?php _e( 'Trigger this action after', 'formidable' ) ?></label> |
33 | - <select name="<?php echo esc_attr( $action_control->get_field_name('event') ) ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id('event') ) ?>"> |
|
33 | + <select name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ) ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id( 'event' ) ) ?>"> |
|
34 | 34 | <?php |
35 | 35 | |
36 | 36 | $event_labels = FrmFormAction::trigger_labels(); |
37 | 37 | foreach ( $action_control->action_options['event'] as $event ) { ?> |
38 | - <option value="<?php echo esc_attr( $event ) ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event; ?></option> |
|
38 | + <option value="<?php echo esc_attr( $event ) ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo isset( $event_labels[$event] ) ? $event_labels[$event] : $event; ?></option> |
|
39 | 39 | <?php |
40 | 40 | }?> |
41 | 41 | </select> |
@@ -47,5 +47,5 @@ discard block |
||
47 | 47 | do_action( 'frm_additional_action_settings', $form_action, $pass_args ); |
48 | 48 | |
49 | 49 | ?> |
50 | -<span class="alignright frm_action_id <?php echo empty( $form_action->ID ) ? 'frm_hidden' : ''; ?>"><?php printf( __( 'Action ID: %1$s', 'formidable' ), $form_action->ID); ?></span> |
|
50 | +<span class="alignright frm_action_id <?php echo empty( $form_action->ID ) ? 'frm_hidden' : ''; ?>"><?php printf( __( 'Action ID: %1$s', 'formidable' ), $form_action->ID ); ?></span> |
|
51 | 51 | <div style="clear:both;"></div> |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | 'swanky-purse' => 'Swanky Purse', |
30 | 30 | ); |
31 | 31 | |
32 | - $themes = apply_filters('frm_jquery_themes', $themes); |
|
32 | + $themes = apply_filters( 'frm_jquery_themes', $themes ); |
|
33 | 33 | return $themes; |
34 | 34 | } |
35 | 35 | |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | |
41 | 41 | if ( ! $theme_css || $theme_css == '' || $theme_css == 'ui-lightness' ) { |
42 | 42 | $css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css'; |
43 | - } else if ( preg_match('/^http.?:\/\/.*\..*$/', $theme_css) ) { |
|
43 | + } else if ( preg_match( '/^http.?:\/\/.*\..*$/', $theme_css ) ) { |
|
44 | 44 | $css_file = $theme_css; |
45 | 45 | } else { |
46 | 46 | $uploads = self::get_upload_base(); |
47 | 47 | $file_path = '/formidable/css/' . $theme_css . '/jquery-ui.css'; |
48 | - if ( file_exists($uploads['basedir'] . $file_path) ) { |
|
48 | + if ( file_exists( $uploads['basedir'] . $file_path ) ) { |
|
49 | 49 | $css_file = $uploads['baseurl'] . $file_path; |
50 | 50 | } else { |
51 | 51 | $css_file = FrmAppHelper::jquery_ui_base_url() . '/themes/' . $theme_css . '/jquery-ui.min.css'; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $form = self::get_form_for_page(); |
60 | 60 | $theme_css = FrmStylesController::get_style_val( 'theme_css', $form ); |
61 | 61 | if ( $theme_css != -1 ) { |
62 | - wp_enqueue_style('jquery-theme', self::jquery_css_url($theme_css), array(), FrmAppHelper::plugin_version()); |
|
62 | + wp_enqueue_style( 'jquery-theme', self::jquery_css_url( $theme_css ), array(), FrmAppHelper::plugin_version() ); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | |
80 | 80 | public static function get_upload_base() { |
81 | 81 | $uploads = wp_upload_dir(); |
82 | - if ( is_ssl() && ! preg_match('/^https:\/\/.*\..*$/', $uploads['baseurl']) ) { |
|
83 | - $uploads['baseurl'] = str_replace('http://', 'https://', $uploads['baseurl']); |
|
82 | + if ( is_ssl() && ! preg_match( '/^https:\/\/.*\..*$/', $uploads['baseurl'] ) ) { |
|
83 | + $uploads['baseurl'] = str_replace( 'http://', 'https://', $uploads['baseurl'] ); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | return $uploads; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | <h2 class="nav-tab-wrapper"> |
92 | 92 | <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles' ) ) ?>" class="nav-tab <?php echo ( '' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Edit Styles', 'formidable' ) ?></a> |
93 | 93 | <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles&frm_action=manage' ) ) ?>" class="nav-tab <?php echo ( 'manage' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Manage Form Styles', 'formidable' ) ?></a> |
94 | - <a href="<?php echo esc_url( admin_url('admin.php?page=formidable-styles&frm_action=custom_css' ) ) ?>" class="nav-tab <?php echo ( 'custom_css' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Custom CSS', 'formidable' ) ?></a> |
|
94 | + <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-styles&frm_action=custom_css' ) ) ?>" class="nav-tab <?php echo ( 'custom_css' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Custom CSS', 'formidable' ) ?></a> |
|
95 | 95 | </h2> |
96 | 96 | <?php |
97 | 97 | } |
@@ -130,15 +130,15 @@ discard block |
||
130 | 130 | * @return The class for this icon |
131 | 131 | */ |
132 | 132 | public static function icon_key_to_class( $key, $icon = '+', $type = 'arrow' ) { |
133 | - if ( 'arrow' == $type && is_numeric($key) ) { |
|
133 | + if ( 'arrow' == $type && is_numeric( $key ) ) { |
|
134 | 134 | //frm_arrowup6_icon |
135 | 135 | $arrow = array( '-' => 'down', '+' => 'up' ); |
136 | - $class = 'frm_arrow' . $arrow[ $icon ]; |
|
136 | + $class = 'frm_arrow' . $arrow[$icon]; |
|
137 | 137 | } else { |
138 | 138 | //frm_minus1_icon |
139 | - $key = str_replace('p', '', $key); |
|
139 | + $key = str_replace( 'p', '', $key ); |
|
140 | 140 | $plus = array( '-' => 'minus', '+' => 'plus' ); |
141 | - $class = 'frm_' . $plus[ $icon ]; |
|
141 | + $class = 'frm_' . $plus[$icon]; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | if ( $key ) { |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | |
157 | 157 | $name = ( 'arrow' == $type ) ? 'collapse_icon' : 'repeat_icon'; |
158 | 158 | ?> |
159 | - <select name="<?php echo esc_attr( $frm_style->get_field_name($name) ) ?>" id="frm_<?php echo esc_attr( $name ) ?>" class="frm_icon_font frm_multiselect hide-if-js"> |
|
159 | + <select name="<?php echo esc_attr( $frm_style->get_field_name( $name ) ) ?>" id="frm_<?php echo esc_attr( $name ) ?>" class="frm_icon_font frm_multiselect hide-if-js"> |
|
160 | 160 | <?php foreach ( $icons as $key => $icon ) { ?> |
161 | - <option value="<?php echo esc_attr( $key ) ?>" <?php selected( $style->post_content[ $name ], $key ) ?>> |
|
161 | + <option value="<?php echo esc_attr( $key ) ?>" <?php selected( $style->post_content[$name], $key ) ?>> |
|
162 | 162 | <?php echo '' . $icon['+'] . '; ' . $icon['-'] . ';'; ?> |
163 | 163 | </option> |
164 | 164 | <?php } ?> |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | |
167 | 167 | <div class="btn-group hide-if-no-js" id="frm_<?php echo esc_attr( $name ) ?>_select"> |
168 | 168 | <button class="multiselect dropdown-toggle btn btn-default" data-toggle="dropdown" type="button"> |
169 | - <i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[ $name ], '+', $type ) ) ?>"></i> |
|
170 | - <i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[ $name ], '-', $type ) ) ?>"></i> |
|
169 | + <i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[$name], '+', $type ) ) ?>"></i> |
|
170 | + <i class="frm_icon_font <?php echo esc_attr( self::icon_key_to_class( $style->post_content[$name], '-', $type ) ) ?>"></i> |
|
171 | 171 | <b class="caret"></b> |
172 | 172 | </button> |
173 | 173 | <ul class="multiselect-container frm-dropdown-menu"> |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | } |
191 | 191 | |
192 | 192 | public static function hex2rgb( $hex ) { |
193 | - $hex = str_replace('#', '', $hex); |
|
193 | + $hex = str_replace( '#', '', $hex ); |
|
194 | 194 | |
195 | - if ( strlen($hex) == 3 ) { |
|
195 | + if ( strlen( $hex ) == 3 ) { |
|
196 | 196 | $r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) ); |
197 | 197 | $g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) ); |
198 | 198 | $b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) ); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $b = hexdec( substr( $hex, 4, 2 ) ); |
203 | 203 | } |
204 | 204 | $rgb = array( $r, $g, $b ); |
205 | - return implode(',', $rgb); // returns the rgb values separated by commas |
|
205 | + return implode( ',', $rgb ); // returns the rgb values separated by commas |
|
206 | 206 | //return $rgb; // returns an array with the rgb values |
207 | 207 | } |
208 | 208 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * @since 2.3 |
213 | 213 | */ |
214 | 214 | public static function adjust_brightness( $hex, $steps ) { |
215 | - $steps = max( -255, min( 255, $steps ) ); |
|
215 | + $steps = max( - 255, min( 255, $steps ) ); |
|
216 | 216 | |
217 | 217 | // Normalize into a six character long hex string |
218 | 218 | $hex = str_replace( '#', '', $hex ); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | foreach ( $color_parts as $color ) { |
230 | 230 | $color = hexdec( $color ); // Convert to decimal |
231 | - $color = max( 0,min( 255,$color + $steps ) ); // Adjust color |
|
231 | + $color = max( 0, min( 255, $color + $steps ) ); // Adjust color |
|
232 | 232 | $return .= str_pad( dechex( $color ), 2, '0', STR_PAD_LEFT ); // Make two char hex code |
233 | 233 | } |
234 | 234 | |
@@ -263,8 +263,8 @@ discard block |
||
263 | 263 | |
264 | 264 | $checkbox_opts = array( 'important_style', 'auto_width', 'submit_style', 'collapse_icon', 'center_form' ); |
265 | 265 | foreach ( $checkbox_opts as $opt ) { |
266 | - if ( ! isset( $settings[ $opt ] ) ) { |
|
267 | - $settings[ $opt ] = 0; |
|
266 | + if ( ! isset( $settings[$opt] ) ) { |
|
267 | + $settings[$opt] = 0; |
|
268 | 268 | } |
269 | 269 | } |
270 | 270 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $colors = self::allow_color_override(); |
281 | 281 | foreach ( $colors as $css => $opts ) { |
282 | 282 | foreach ( $opts as $opt ) { |
283 | - self::get_color_output( $css, $settings[ $opt ] ); |
|
283 | + self::get_color_output( $css, $settings[$opt] ); |
|
284 | 284 | } |
285 | 285 | } |
286 | 286 | } |
@@ -1,67 +1,67 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | class FrmStylesHelper { |
3 | 3 | |
4 | - public static function jquery_themes() { |
|
5 | - $themes = array( |
|
6 | - 'ui-lightness' => 'UI Lightness', |
|
7 | - 'ui-darkness' => 'UI Darkness', |
|
8 | - 'smoothness' => 'Smoothness', |
|
9 | - 'start' => 'Start', |
|
10 | - 'redmond' => 'Redmond', |
|
11 | - 'sunny' => 'Sunny', |
|
12 | - 'overcast' => 'Overcast', |
|
13 | - 'le-frog' => 'Le Frog', |
|
14 | - 'flick' => 'Flick', |
|
4 | + public static function jquery_themes() { |
|
5 | + $themes = array( |
|
6 | + 'ui-lightness' => 'UI Lightness', |
|
7 | + 'ui-darkness' => 'UI Darkness', |
|
8 | + 'smoothness' => 'Smoothness', |
|
9 | + 'start' => 'Start', |
|
10 | + 'redmond' => 'Redmond', |
|
11 | + 'sunny' => 'Sunny', |
|
12 | + 'overcast' => 'Overcast', |
|
13 | + 'le-frog' => 'Le Frog', |
|
14 | + 'flick' => 'Flick', |
|
15 | 15 | 'pepper-grinder' => 'Pepper Grinder', |
16 | - 'eggplant' => 'Eggplant', |
|
17 | - 'dark-hive' => 'Dark Hive', |
|
18 | - 'cupertino' => 'Cupertino', |
|
19 | - 'south-street' => 'South Street', |
|
20 | - 'blitzer' => 'Blitzer', |
|
21 | - 'humanity' => 'Humanity', |
|
22 | - 'hot-sneaks' => 'Hot Sneaks', |
|
23 | - 'excite-bike' => 'Excite Bike', |
|
24 | - 'vader' => 'Vader', |
|
25 | - 'dot-luv' => 'Dot Luv', |
|
26 | - 'mint-choc' => 'Mint Choc', |
|
27 | - 'black-tie' => 'Black Tie', |
|
28 | - 'trontastic' => 'Trontastic', |
|
29 | - 'swanky-purse' => 'Swanky Purse', |
|
30 | - ); |
|
31 | - |
|
32 | - $themes = apply_filters('frm_jquery_themes', $themes); |
|
33 | - return $themes; |
|
34 | - } |
|
16 | + 'eggplant' => 'Eggplant', |
|
17 | + 'dark-hive' => 'Dark Hive', |
|
18 | + 'cupertino' => 'Cupertino', |
|
19 | + 'south-street' => 'South Street', |
|
20 | + 'blitzer' => 'Blitzer', |
|
21 | + 'humanity' => 'Humanity', |
|
22 | + 'hot-sneaks' => 'Hot Sneaks', |
|
23 | + 'excite-bike' => 'Excite Bike', |
|
24 | + 'vader' => 'Vader', |
|
25 | + 'dot-luv' => 'Dot Luv', |
|
26 | + 'mint-choc' => 'Mint Choc', |
|
27 | + 'black-tie' => 'Black Tie', |
|
28 | + 'trontastic' => 'Trontastic', |
|
29 | + 'swanky-purse' => 'Swanky Purse', |
|
30 | + ); |
|
31 | + |
|
32 | + $themes = apply_filters('frm_jquery_themes', $themes); |
|
33 | + return $themes; |
|
34 | + } |
|
35 | 35 | |
36 | 36 | public static function jquery_css_url( $theme_css ) { |
37 | - if ( $theme_css == -1 ) { |
|
38 | - return; |
|
39 | - } |
|
40 | - |
|
41 | - if ( ! $theme_css || $theme_css == '' || $theme_css == 'ui-lightness' ) { |
|
42 | - $css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css'; |
|
43 | - } else if ( preg_match('/^http.?:\/\/.*\..*$/', $theme_css) ) { |
|
44 | - $css_file = $theme_css; |
|
45 | - } else { |
|
46 | - $uploads = self::get_upload_base(); |
|
37 | + if ( $theme_css == -1 ) { |
|
38 | + return; |
|
39 | + } |
|
40 | + |
|
41 | + if ( ! $theme_css || $theme_css == '' || $theme_css == 'ui-lightness' ) { |
|
42 | + $css_file = FrmAppHelper::plugin_url() . '/css/ui-lightness/jquery-ui.css'; |
|
43 | + } else if ( preg_match('/^http.?:\/\/.*\..*$/', $theme_css) ) { |
|
44 | + $css_file = $theme_css; |
|
45 | + } else { |
|
46 | + $uploads = self::get_upload_base(); |
|
47 | 47 | $file_path = '/formidable/css/' . $theme_css . '/jquery-ui.css'; |
48 | - if ( file_exists($uploads['basedir'] . $file_path) ) { |
|
49 | - $css_file = $uploads['baseurl'] . $file_path; |
|
50 | - } else { |
|
48 | + if ( file_exists($uploads['basedir'] . $file_path) ) { |
|
49 | + $css_file = $uploads['baseurl'] . $file_path; |
|
50 | + } else { |
|
51 | 51 | $css_file = FrmAppHelper::jquery_ui_base_url() . '/themes/' . $theme_css . '/jquery-ui.min.css'; |
52 | - } |
|
53 | - } |
|
52 | + } |
|
53 | + } |
|
54 | 54 | |
55 | - return $css_file; |
|
56 | - } |
|
55 | + return $css_file; |
|
56 | + } |
|
57 | 57 | |
58 | - public static function enqueue_jquery_css() { |
|
58 | + public static function enqueue_jquery_css() { |
|
59 | 59 | $form = self::get_form_for_page(); |
60 | 60 | $theme_css = FrmStylesController::get_style_val( 'theme_css', $form ); |
61 | - if ( $theme_css != -1 ) { |
|
62 | - wp_enqueue_style('jquery-theme', self::jquery_css_url($theme_css), array(), FrmAppHelper::plugin_version()); |
|
63 | - } |
|
64 | - } |
|
61 | + if ( $theme_css != -1 ) { |
|
62 | + wp_enqueue_style('jquery-theme', self::jquery_css_url($theme_css), array(), FrmAppHelper::plugin_version()); |
|
63 | + } |
|
64 | + } |
|
65 | 65 | |
66 | 66 | public static function get_form_for_page() { |
67 | 67 | global $frm_vars; |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | return $form_id; |
78 | 78 | } |
79 | 79 | |
80 | - public static function get_upload_base() { |
|
81 | - $uploads = wp_upload_dir(); |
|
82 | - if ( is_ssl() && ! preg_match('/^https:\/\/.*\..*$/', $uploads['baseurl']) ) { |
|
83 | - $uploads['baseurl'] = str_replace('http://', 'https://', $uploads['baseurl']); |
|
84 | - } |
|
80 | + public static function get_upload_base() { |
|
81 | + $uploads = wp_upload_dir(); |
|
82 | + if ( is_ssl() && ! preg_match('/^https:\/\/.*\..*$/', $uploads['baseurl']) ) { |
|
83 | + $uploads['baseurl'] = str_replace('http://', 'https://', $uploads['baseurl']); |
|
84 | + } |
|
85 | 85 | |
86 | - return $uploads; |
|
87 | - } |
|
86 | + return $uploads; |
|
87 | + } |
|
88 | 88 | |
89 | 89 | public static function style_menu( $active = '' ) { |
90 | 90 | ?> |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | <a href="<?php echo esc_url( admin_url('admin.php?page=formidable-styles&frm_action=custom_css' ) ) ?>" class="nav-tab <?php echo ( 'custom_css' == $active ) ? 'nav-tab-active' : '' ?>"><?php _e( 'Custom CSS', 'formidable' ) ?></a> |
95 | 95 | </h2> |
96 | 96 | <?php |
97 | - } |
|
97 | + } |
|
98 | 98 | |
99 | 99 | /** |
100 | 100 | * @since 2.05 |
@@ -121,20 +121,20 @@ discard block |
||
121 | 121 | ); |
122 | 122 | } |
123 | 123 | |
124 | - public static function minus_icons() { |
|
125 | - return array( |
|
124 | + public static function minus_icons() { |
|
125 | + return array( |
|
126 | 126 | 0 => array( '-' => '62e', '+' => '62f' ), |
127 | 127 | 1 => array( '-' => '600', '+' => '602' ), |
128 | 128 | 2 => array( '-' => '604', '+' => '603' ), |
129 | 129 | 3 => array( '-' => '633', '+' => '632' ), |
130 | 130 | 4 => array( '-' => '613', '+' => '60f' ), |
131 | - ); |
|
132 | - } |
|
131 | + ); |
|
132 | + } |
|
133 | 133 | |
134 | - public static function arrow_icons() { |
|
135 | - $minus_icons = self::minus_icons(); |
|
134 | + public static function arrow_icons() { |
|
135 | + $minus_icons = self::minus_icons(); |
|
136 | 136 | |
137 | - return array( |
|
137 | + return array( |
|
138 | 138 | 6 => array( '-' => '62d', '+' => '62a' ), |
139 | 139 | 0 => array( '-' => '60d', '+' => '609' ), |
140 | 140 | 1 => array( '-' => '60e', '+' => '60c' ), |
@@ -142,44 +142,44 @@ discard block |
||
142 | 142 | 3 => array( '-' => '62b', '+' => '628' ), |
143 | 143 | 4 => array( '-' => '62c', '+' => '629' ), |
144 | 144 | 5 => array( '-' => '635', '+' => '634' ), |
145 | - 'p0' => $minus_icons[0], |
|
146 | - 'p1' => $minus_icons[1], |
|
147 | - 'p2' => $minus_icons[2], |
|
148 | - 'p3' => $minus_icons[3], |
|
149 | - 'p4' => $minus_icons[4], |
|
150 | - ); |
|
151 | - } |
|
152 | - |
|
153 | - /** |
|
154 | - * @since 2.0 |
|
155 | - * @return The class for this icon |
|
156 | - */ |
|
145 | + 'p0' => $minus_icons[0], |
|
146 | + 'p1' => $minus_icons[1], |
|
147 | + 'p2' => $minus_icons[2], |
|
148 | + 'p3' => $minus_icons[3], |
|
149 | + 'p4' => $minus_icons[4], |
|
150 | + ); |
|
151 | + } |
|
152 | + |
|
153 | + /** |
|
154 | + * @since 2.0 |
|
155 | + * @return The class for this icon |
|
156 | + */ |
|
157 | 157 | public static function icon_key_to_class( $key, $icon = '+', $type = 'arrow' ) { |
158 | - if ( 'arrow' == $type && is_numeric($key) ) { |
|
159 | - //frm_arrowup6_icon |
|
158 | + if ( 'arrow' == $type && is_numeric($key) ) { |
|
159 | + //frm_arrowup6_icon |
|
160 | 160 | $arrow = array( '-' => 'down', '+' => 'up' ); |
161 | 161 | $class = 'frm_arrow' . $arrow[ $icon ]; |
162 | - } else { |
|
163 | - //frm_minus1_icon |
|
164 | - $key = str_replace('p', '', $key); |
|
162 | + } else { |
|
163 | + //frm_minus1_icon |
|
164 | + $key = str_replace('p', '', $key); |
|
165 | 165 | $plus = array( '-' => 'minus', '+' => 'plus' ); |
166 | 166 | $class = 'frm_' . $plus[ $icon ]; |
167 | - } |
|
167 | + } |
|
168 | 168 | |
169 | - if ( $key ) { |
|
170 | - $class .= $key; |
|
171 | - } |
|
172 | - $class .= '_icon'; |
|
169 | + if ( $key ) { |
|
170 | + $class .= $key; |
|
171 | + } |
|
172 | + $class .= '_icon'; |
|
173 | 173 | |
174 | - return $class; |
|
175 | - } |
|
174 | + return $class; |
|
175 | + } |
|
176 | 176 | |
177 | 177 | public static function bs_icon_select( $style, $frm_style, $type = 'arrow' ) { |
178 | 178 | $function_name = $type . '_icons'; |
179 | 179 | $icons = self::$function_name(); |
180 | 180 | unset( $function_name ); |
181 | 181 | |
182 | - $name = ( 'arrow' == $type ) ? 'collapse_icon' : 'repeat_icon'; |
|
182 | + $name = ( 'arrow' == $type ) ? 'collapse_icon' : 'repeat_icon'; |
|
183 | 183 | ?> |
184 | 184 | <select name="<?php echo esc_attr( $frm_style->get_field_name($name) ) ?>" id="frm_<?php echo esc_attr( $name ) ?>" class="frm_icon_font frm_multiselect hide-if-js"> |
185 | 185 | <?php foreach ( $icons as $key => $icon ) { ?> |
@@ -212,24 +212,24 @@ discard block |
||
212 | 212 | </ul> |
213 | 213 | </div> |
214 | 214 | <?php |
215 | - } |
|
215 | + } |
|
216 | 216 | |
217 | 217 | public static function hex2rgb( $hex ) { |
218 | - $hex = str_replace('#', '', $hex); |
|
218 | + $hex = str_replace('#', '', $hex); |
|
219 | 219 | |
220 | - if ( strlen($hex) == 3 ) { |
|
220 | + if ( strlen($hex) == 3 ) { |
|
221 | 221 | $r = hexdec( substr( $hex, 0, 1 ) . substr( $hex, 0, 1 ) ); |
222 | 222 | $g = hexdec( substr( $hex, 1, 1 ) . substr( $hex, 1, 1 ) ); |
223 | 223 | $b = hexdec( substr( $hex, 2, 1 ) . substr( $hex, 2, 1 ) ); |
224 | - } else { |
|
224 | + } else { |
|
225 | 225 | $r = hexdec( substr( $hex, 0, 2 ) ); |
226 | 226 | $g = hexdec( substr( $hex, 2, 2 ) ); |
227 | 227 | $b = hexdec( substr( $hex, 4, 2 ) ); |
228 | - } |
|
228 | + } |
|
229 | 229 | $rgb = array( $r, $g, $b ); |
230 | - return implode(',', $rgb); // returns the rgb values separated by commas |
|
231 | - //return $rgb; // returns an array with the rgb values |
|
232 | - } |
|
230 | + return implode(',', $rgb); // returns the rgb values separated by commas |
|
231 | + //return $rgb; // returns an array with the rgb values |
|
232 | + } |
|
233 | 233 | |
234 | 234 | /** |
235 | 235 | * @param $hex string - The original color in hex format #ffffff |
@@ -139,8 +139,8 @@ |
||
139 | 139 | add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' ); |
140 | 140 | |
141 | 141 | // Addons |
142 | - add_action('wp_ajax_frm_addon_activate', 'FrmAddon::activate' ); |
|
143 | - add_action('wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' ); |
|
142 | + add_action( 'wp_ajax_frm_addon_activate', 'FrmAddon::activate' ); |
|
143 | + add_action( 'wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' ); |
|
144 | 144 | add_action( 'wp_ajax_frm_fill_licenses', 'FrmAddonsController::get_licenses' ); |
145 | 145 | |
146 | 146 | // Fields Controller |
@@ -1,89 +1,89 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | class FrmHooksController { |
4 | - /** |
|
5 | - * Trigger plugin-wide hook loading |
|
6 | - */ |
|
7 | - public static function trigger_load_hook( $hooks = 'load_hooks' ) { |
|
8 | - $controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) ); |
|
9 | - |
|
10 | - $trigger_hooks = $hooks; |
|
11 | - $hooks = (array) $hooks; |
|
12 | - |
|
13 | - if ( 'load_hooks' == $trigger_hooks ) { |
|
14 | - if ( is_admin() ) { |
|
15 | - $hooks[] = 'load_admin_hooks'; |
|
16 | - if ( defined( 'DOING_AJAX' ) ) { |
|
17 | - $hooks[] = 'load_ajax_hooks'; |
|
18 | - $hooks[] = 'load_form_hooks'; |
|
19 | - } |
|
20 | - } |
|
21 | - |
|
22 | - if ( is_multisite() ) { |
|
23 | - $hooks[] = 'load_multisite_hooks'; |
|
24 | - } |
|
25 | - } else { |
|
26 | - // Make sure the hooks are only triggered once |
|
27 | - add_filter( 'frm' . str_replace( 'load', '', $trigger_hooks ) . '_loaded', '__return_true' ); |
|
28 | - } |
|
29 | - unset( $trigger_hooks ); |
|
30 | - |
|
31 | - // Instansiate Controllers |
|
32 | - foreach ( $controllers as $c ) { |
|
33 | - foreach ( $hooks as $hook ) { |
|
4 | + /** |
|
5 | + * Trigger plugin-wide hook loading |
|
6 | + */ |
|
7 | + public static function trigger_load_hook( $hooks = 'load_hooks' ) { |
|
8 | + $controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) ); |
|
9 | + |
|
10 | + $trigger_hooks = $hooks; |
|
11 | + $hooks = (array) $hooks; |
|
12 | + |
|
13 | + if ( 'load_hooks' == $trigger_hooks ) { |
|
14 | + if ( is_admin() ) { |
|
15 | + $hooks[] = 'load_admin_hooks'; |
|
16 | + if ( defined( 'DOING_AJAX' ) ) { |
|
17 | + $hooks[] = 'load_ajax_hooks'; |
|
18 | + $hooks[] = 'load_form_hooks'; |
|
19 | + } |
|
20 | + } |
|
21 | + |
|
22 | + if ( is_multisite() ) { |
|
23 | + $hooks[] = 'load_multisite_hooks'; |
|
24 | + } |
|
25 | + } else { |
|
26 | + // Make sure the hooks are only triggered once |
|
27 | + add_filter( 'frm' . str_replace( 'load', '', $trigger_hooks ) . '_loaded', '__return_true' ); |
|
28 | + } |
|
29 | + unset( $trigger_hooks ); |
|
30 | + |
|
31 | + // Instansiate Controllers |
|
32 | + foreach ( $controllers as $c ) { |
|
33 | + foreach ( $hooks as $hook ) { |
|
34 | 34 | call_user_func( array( $c, $hook ) ); |
35 | 35 | unset( $hook ); |
36 | - } |
|
36 | + } |
|
37 | 37 | unset( $c ); |
38 | - } |
|
38 | + } |
|
39 | 39 | |
40 | - } |
|
40 | + } |
|
41 | 41 | |
42 | - public static function trigger_load_form_hooks() { |
|
43 | - self::trigger_load_hook( 'load_form_hooks' ); |
|
44 | - } |
|
42 | + public static function trigger_load_form_hooks() { |
|
43 | + self::trigger_load_hook( 'load_form_hooks' ); |
|
44 | + } |
|
45 | 45 | |
46 | 46 | public static function load_hooks() { |
47 | - if ( ! is_admin() ) { |
|
48 | - add_filter( 'the_content', 'FrmAppController::page_route', 10 ); |
|
49 | - } |
|
47 | + if ( ! is_admin() ) { |
|
48 | + add_filter( 'the_content', 'FrmAppController::page_route', 10 ); |
|
49 | + } |
|
50 | 50 | |
51 | - add_action( 'plugins_loaded', 'FrmAppController::load_lang' ); |
|
52 | - add_filter( 'widget_text', 'FrmAppController::widget_text_filter', 8 ); |
|
51 | + add_action( 'plugins_loaded', 'FrmAppController::load_lang' ); |
|
52 | + add_filter( 'widget_text', 'FrmAppController::widget_text_filter', 8 ); |
|
53 | 53 | |
54 | - // Entries controller |
|
55 | - add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 10, 0 ); |
|
56 | - add_filter( 'frm_redirect_url', 'FrmEntriesController::delete_entry_before_redirect', 50, 3 ); |
|
57 | - add_action( 'frm_after_entry_processed', 'FrmEntriesController::delete_entry_after_save', 100 ); |
|
54 | + // Entries controller |
|
55 | + add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 10, 0 ); |
|
56 | + add_filter( 'frm_redirect_url', 'FrmEntriesController::delete_entry_before_redirect', 50, 3 ); |
|
57 | + add_action( 'frm_after_entry_processed', 'FrmEntriesController::delete_entry_after_save', 100 ); |
|
58 | 58 | |
59 | - // Form Actions Controller |
|
60 | - add_action( 'init', 'FrmFormActionsController::register_post_types', 1 ); |
|
59 | + // Form Actions Controller |
|
60 | + add_action( 'init', 'FrmFormActionsController::register_post_types', 1 ); |
|
61 | 61 | add_action( 'frm_after_create_entry', 'FrmFormActionsController::trigger_create_actions', 20, 3 ); |
62 | 62 | |
63 | - // Forms Controller |
|
64 | - add_action( 'widgets_init', 'FrmFormsController::register_widgets' ); |
|
63 | + // Forms Controller |
|
64 | + add_action( 'widgets_init', 'FrmFormsController::register_widgets' ); |
|
65 | 65 | add_action( 'init', 'FrmFormsController::front_head' ); |
66 | - add_filter( 'frm_content', 'FrmFormsController::filter_content', 10, 3 ); |
|
67 | - add_filter( 'frm_replace_content_shortcodes', 'FrmFormsController::replace_content_shortcodes', 20, 3 ); |
|
68 | - add_action( 'admin_bar_init', 'FrmFormsController::admin_bar_css' ); |
|
66 | + add_filter( 'frm_content', 'FrmFormsController::filter_content', 10, 3 ); |
|
67 | + add_filter( 'frm_replace_content_shortcodes', 'FrmFormsController::replace_content_shortcodes', 20, 3 ); |
|
68 | + add_action( 'admin_bar_init', 'FrmFormsController::admin_bar_css' ); |
|
69 | 69 | add_action( 'wp_footer', 'FrmFormsController::footer_js', 1, 0 ); |
70 | 70 | |
71 | 71 | add_action( 'wp_scheduled_delete', 'FrmForm::scheduled_delete' ); |
72 | 72 | |
73 | - // Form Shortcodes |
|
74 | - add_shortcode( 'formidable', 'FrmFormsController::get_form_shortcode' ); |
|
73 | + // Form Shortcodes |
|
74 | + add_shortcode( 'formidable', 'FrmFormsController::get_form_shortcode' ); |
|
75 | 75 | |
76 | - // Styles Controller |
|
77 | - add_action( 'init', 'FrmStylesController::register_post_types', 0 ); |
|
78 | - add_filter( 'frm_get_style_opts', 'FrmStylesController::get_style_opts' ); |
|
79 | - add_filter( 'frm_add_form_style_class', 'FrmStylesController::get_form_style_class', 10, 2 ); |
|
80 | - add_filter( 'frm_show_entry_styles', 'FrmStylesController::show_entry_styles' ); |
|
81 | - } |
|
76 | + // Styles Controller |
|
77 | + add_action( 'init', 'FrmStylesController::register_post_types', 0 ); |
|
78 | + add_filter( 'frm_get_style_opts', 'FrmStylesController::get_style_opts' ); |
|
79 | + add_filter( 'frm_add_form_style_class', 'FrmStylesController::get_form_style_class', 10, 2 ); |
|
80 | + add_filter( 'frm_show_entry_styles', 'FrmStylesController::show_entry_styles' ); |
|
81 | + } |
|
82 | 82 | |
83 | 83 | public static function load_admin_hooks() { |
84 | - add_action( 'admin_menu', 'FrmAppController::menu', 1 ); |
|
85 | - add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' ); |
|
86 | - add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' ); |
|
84 | + add_action( 'admin_menu', 'FrmAppController::menu', 1 ); |
|
85 | + add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' ); |
|
86 | + add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' ); |
|
87 | 87 | add_action( 'admin_init', 'FrmAppController::admin_init', 11 ); |
88 | 88 | add_filter( 'plugin_action_links_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::settings_link' ); |
89 | 89 | register_activation_hook( FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::activation_install' ); |
@@ -92,120 +92,120 @@ discard block |
||
92 | 92 | add_action( 'admin_menu', 'FrmAddonsController::menu', 100 ); |
93 | 93 | add_filter( 'upgrader_pre_download', 'FrmAddonsController::add_shorten_edd_filename_filter', 10, 4 ); |
94 | 94 | |
95 | - // Entries Controller |
|
96 | - add_action( 'admin_menu', 'FrmEntriesController::menu', 12 ); |
|
97 | - add_filter( 'contextual_help', 'FrmEntriesController::contextual_help', 10, 3 ); |
|
98 | - add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 ); |
|
99 | - add_filter( 'update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5 ); |
|
100 | - add_action( 'updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4 ); |
|
95 | + // Entries Controller |
|
96 | + add_action( 'admin_menu', 'FrmEntriesController::menu', 12 ); |
|
97 | + add_filter( 'contextual_help', 'FrmEntriesController::contextual_help', 10, 3 ); |
|
98 | + add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 ); |
|
99 | + add_filter( 'update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5 ); |
|
100 | + add_action( 'updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4 ); |
|
101 | 101 | |
102 | - // Fields Controller |
|
103 | - add_filter( 'frm_display_field_options', 'FrmFieldsController::display_field_options' ); |
|
102 | + // Fields Controller |
|
103 | + add_filter( 'frm_display_field_options', 'FrmFieldsController::display_field_options' ); |
|
104 | 104 | |
105 | - // Form Actions Controller |
|
106 | - if ( FrmAppHelper::is_admin_page( 'formidable' ) ) { |
|
107 | - add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' ); |
|
108 | - } |
|
109 | - add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 ); |
|
105 | + // Form Actions Controller |
|
106 | + if ( FrmAppHelper::is_admin_page( 'formidable' ) ) { |
|
107 | + add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' ); |
|
108 | + } |
|
109 | + add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 ); |
|
110 | 110 | |
111 | - // Forms Controller |
|
112 | - add_action( 'admin_menu', 'FrmFormsController::menu', 10 ); |
|
113 | - add_action( 'admin_head-toplevel_page_formidable', 'FrmFormsController::head' ); |
|
111 | + // Forms Controller |
|
112 | + add_action( 'admin_menu', 'FrmFormsController::menu', 10 ); |
|
113 | + add_action( 'admin_head-toplevel_page_formidable', 'FrmFormsController::head' ); |
|
114 | 114 | |
115 | - add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 ); |
|
116 | - add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' ); |
|
115 | + add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 ); |
|
116 | + add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' ); |
|
117 | 117 | add_action( 'media_buttons', 'FrmFormsController::insert_form_button' ); |
118 | 118 | |
119 | - // Forms Model |
|
120 | - add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 ); |
|
119 | + // Forms Model |
|
120 | + add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 ); |
|
121 | 121 | |
122 | - // Settings Controller |
|
123 | - add_action( 'admin_menu', 'FrmSettingsController::menu', 45 ); |
|
124 | - add_action( 'frm_before_settings', 'FrmSettingsController::license_box' ); |
|
122 | + // Settings Controller |
|
123 | + add_action( 'admin_menu', 'FrmSettingsController::menu', 45 ); |
|
124 | + add_action( 'frm_before_settings', 'FrmSettingsController::license_box' ); |
|
125 | 125 | add_action( 'wp_ajax_frm_settings_tab', 'FrmSettingsController::load_settings_tab' ); |
126 | 126 | |
127 | - // Styles Controller |
|
128 | - add_action( 'admin_menu', 'FrmStylesController::menu', 14 ); |
|
129 | - add_action( 'admin_init', 'FrmStylesController::admin_init' ); |
|
127 | + // Styles Controller |
|
128 | + add_action( 'admin_menu', 'FrmStylesController::menu', 14 ); |
|
129 | + add_action( 'admin_init', 'FrmStylesController::admin_init' ); |
|
130 | 130 | |
131 | - // XML Controller |
|
132 | - add_action( 'admin_menu', 'FrmXMLController::menu', 41 ); |
|
133 | - } |
|
131 | + // XML Controller |
|
132 | + add_action( 'admin_menu', 'FrmXMLController::menu', 41 ); |
|
133 | + } |
|
134 | 134 | |
135 | 135 | public static function load_ajax_hooks() { |
136 | 136 | add_action( 'wp_ajax_frm_silent_upgrade', 'FrmAppController::ajax_install' ); |
137 | 137 | add_action( 'wp_ajax_nopriv_frm_silent_upgrade', 'FrmAppController::ajax_install' ); |
138 | 138 | add_action( 'wp_ajax_frm_install', 'FrmAppController::ajax_install' ); |
139 | - add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' ); |
|
140 | - add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' ); |
|
139 | + add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' ); |
|
140 | + add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' ); |
|
141 | 141 | |
142 | 142 | // Addons |
143 | 143 | add_action('wp_ajax_frm_addon_activate', 'FrmAddon::activate' ); |
144 | 144 | add_action('wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' ); |
145 | 145 | add_action( 'wp_ajax_frm_fill_licenses', 'FrmAddonsController::get_licenses' ); |
146 | 146 | |
147 | - // Fields Controller |
|
148 | - add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' ); |
|
149 | - add_action( 'wp_ajax_frm_insert_field', 'FrmFieldsController::create' ); |
|
150 | - add_action( 'wp_ajax_frm_field_name_in_place_edit', 'FrmFieldsController::edit_name' ); |
|
151 | - add_action( 'wp_ajax_frm_update_ajax_option', 'FrmFieldsController::update_ajax_option' ); |
|
152 | - add_action( 'wp_ajax_frm_duplicate_field', 'FrmFieldsController::duplicate' ); |
|
153 | - add_action( 'wp_ajax_frm_delete_field', 'FrmFieldsController::destroy' ); |
|
154 | - add_action( 'wp_ajax_frm_add_field_option', 'FrmFieldsController::add_option' ); |
|
155 | - add_action( 'wp_ajax_frm_import_choices', 'FrmFieldsController::import_choices' ); |
|
156 | - add_action( 'wp_ajax_frm_import_options', 'FrmFieldsController::import_options' ); |
|
157 | - add_action( 'wp_ajax_frm_update_field_order', 'FrmFieldsController::update_order' ); |
|
158 | - |
|
159 | - // Form Actions Controller |
|
160 | - add_action( 'wp_ajax_frm_add_form_action', 'FrmFormActionsController::add_form_action' ); |
|
161 | - add_action( 'wp_ajax_frm_form_action_fill', 'FrmFormActionsController::fill_action' ); |
|
162 | - |
|
163 | - // Forms Controller |
|
147 | + // Fields Controller |
|
148 | + add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' ); |
|
149 | + add_action( 'wp_ajax_frm_insert_field', 'FrmFieldsController::create' ); |
|
150 | + add_action( 'wp_ajax_frm_field_name_in_place_edit', 'FrmFieldsController::edit_name' ); |
|
151 | + add_action( 'wp_ajax_frm_update_ajax_option', 'FrmFieldsController::update_ajax_option' ); |
|
152 | + add_action( 'wp_ajax_frm_duplicate_field', 'FrmFieldsController::duplicate' ); |
|
153 | + add_action( 'wp_ajax_frm_delete_field', 'FrmFieldsController::destroy' ); |
|
154 | + add_action( 'wp_ajax_frm_add_field_option', 'FrmFieldsController::add_option' ); |
|
155 | + add_action( 'wp_ajax_frm_import_choices', 'FrmFieldsController::import_choices' ); |
|
156 | + add_action( 'wp_ajax_frm_import_options', 'FrmFieldsController::import_options' ); |
|
157 | + add_action( 'wp_ajax_frm_update_field_order', 'FrmFieldsController::update_order' ); |
|
158 | + |
|
159 | + // Form Actions Controller |
|
160 | + add_action( 'wp_ajax_frm_add_form_action', 'FrmFormActionsController::add_form_action' ); |
|
161 | + add_action( 'wp_ajax_frm_form_action_fill', 'FrmFormActionsController::fill_action' ); |
|
162 | + |
|
163 | + // Forms Controller |
|
164 | 164 | add_action( 'wp_ajax_frm_create_from_template', 'FrmFormsController::_create_from_template' ); |
165 | 165 | add_action( 'wp_ajax_frm_save_form', 'FrmFormsController::route' ); |
166 | 166 | add_action( 'wp_ajax_frm_form_key_in_place_edit', 'FrmFormsController::edit_key' ); |
167 | 167 | add_action( 'wp_ajax_frm_form_desc_in_place_edit', 'FrmFormsController::edit_description' ); |
168 | - add_action( 'wp_ajax_frm_get_default_html', 'FrmFormsController::get_email_html' ); |
|
169 | - add_action( 'wp_ajax_frm_get_shortcode_opts', 'FrmFormsController::get_shortcode_opts' ); |
|
170 | - add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' ); |
|
171 | - add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' ); |
|
172 | - |
|
173 | - // Styles Controller |
|
174 | - add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' ); |
|
175 | - add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' ); |
|
176 | - add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' ); |
|
177 | - add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' ); |
|
168 | + add_action( 'wp_ajax_frm_get_default_html', 'FrmFormsController::get_email_html' ); |
|
169 | + add_action( 'wp_ajax_frm_get_shortcode_opts', 'FrmFormsController::get_shortcode_opts' ); |
|
170 | + add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' ); |
|
171 | + add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' ); |
|
172 | + |
|
173 | + // Styles Controller |
|
174 | + add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' ); |
|
175 | + add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' ); |
|
176 | + add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' ); |
|
177 | + add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' ); |
|
178 | 178 | add_action( 'wp_ajax_frmpro_css', 'FrmStylesController::load_saved_css' ); |
179 | 179 | add_action( 'wp_ajax_nopriv_frmpro_css', 'FrmStylesController::load_saved_css' ); |
180 | 180 | |
181 | - // XML Controller |
|
181 | + // XML Controller |
|
182 | 182 | add_action( 'wp_ajax_frm_entries_csv', 'FrmXMLController::csv' ); |
183 | 183 | add_action( 'wp_ajax_nopriv_frm_entries_csv', 'FrmXMLController::csv' ); |
184 | - add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' ); |
|
185 | - } |
|
184 | + add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' ); |
|
185 | + } |
|
186 | 186 | |
187 | 187 | public static function load_form_hooks() { |
188 | - // Fields Controller |
|
189 | - add_filter( 'frm_field_type', 'FrmFieldsController::change_type' ); |
|
190 | - add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' ); |
|
191 | - add_filter( 'frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3 ); |
|
192 | - add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' ); |
|
188 | + // Fields Controller |
|
189 | + add_filter( 'frm_field_type', 'FrmFieldsController::change_type' ); |
|
190 | + add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' ); |
|
191 | + add_filter( 'frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3 ); |
|
192 | + add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' ); |
|
193 | 193 | |
194 | 194 | // Forms Controller |
195 | 195 | add_filter( 'frm_form_classes', 'FrmFormsController::form_classes' ); |
196 | 196 | |
197 | - // Styles Controller |
|
198 | - add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 ); |
|
199 | - } |
|
197 | + // Styles Controller |
|
198 | + add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 ); |
|
199 | + } |
|
200 | 200 | |
201 | 201 | public static function load_view_hooks() { |
202 | - // Hooks go here when a view is loaded |
|
203 | - } |
|
202 | + // Hooks go here when a view is loaded |
|
203 | + } |
|
204 | 204 | |
205 | 205 | public static function load_multisite_hooks() { |
206 | 206 | add_action( 'wpmu_upgrade_site', 'FrmAppController::network_upgrade_site' ); |
207 | 207 | |
208 | - // drop tables when mu site is deleted |
|
209 | - add_filter( 'wpmu_drop_tables', 'FrmAppController::drop_tables' ); |
|
210 | - } |
|
208 | + // drop tables when mu site is deleted |
|
209 | + add_filter( 'wpmu_drop_tables', 'FrmAppController::drop_tables' ); |
|
210 | + } |
|
211 | 211 | } |
@@ -1,17 +1,17 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | $read_only = false; |
4 | -if ( isset($field['post_field']) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed() ) { |
|
4 | +if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed() ) { |
|
5 | 5 | echo FrmProPost::get_category_dropdown( $field, array( 'location' => 'front', 'name' => $field_name, 'id' => $html_id ) ); |
6 | 6 | } else { |
7 | 7 | if ( FrmAppHelper::pro_is_installed() && FrmField::is_read_only( $field ) && ! FrmAppHelper::is_admin() ) { |
8 | 8 | $read_only = true; |
9 | 9 | |
10 | 10 | echo FrmProDropdownFieldsController::get_hidden_fields_with_readonly_values( $field, $field_name, $html_id ); ?> |
11 | - <select <?php do_action('frm_field_input_html', $field) ?>> <?php |
|
11 | + <select <?php do_action( 'frm_field_input_html', $field ) ?>> <?php |
|
12 | 12 | |
13 | 13 | } else { ?> |
14 | - <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php do_action('frm_field_input_html', $field) ?>> |
|
14 | + <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php do_action( 'frm_field_input_html', $field ) ?>> |
|
15 | 15 | <?php } |
16 | 16 | |
17 | 17 | $other_opt = false; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | } |
29 | 29 | ?> |
30 | - <option value="<?php echo esc_attr($field_val) ?>" <?php echo $selected ? ' selected="selected"' : ''; ?><?php echo ( FrmFieldsHelper::is_other_opt( $opt_key ) ) ? ' class="frm_other_trigger"' : '';?>><?php echo esc_html( $opt == '' ? ' ' : $opt ); ?></option> |
|
30 | + <option value="<?php echo esc_attr( $field_val ) ?>" <?php echo $selected ? ' selected="selected"' : ''; ?><?php echo ( FrmFieldsHelper::is_other_opt( $opt_key ) ) ? ' class="frm_other_trigger"' : ''; ?>><?php echo esc_html( $opt == '' ? ' ' : $opt ); ?></option> |
|
31 | 31 | <?php |
32 | 32 | } ?> |
33 | 33 | </select> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if ( isset($field['post_field']) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed() ) { |
|
3 | +if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' && FrmAppHelper::pro_is_installed() ) { |
|
4 | 4 | echo FrmProPost::get_category_dropdown( $field, array( 'name' => $field_name, 'id' => 'placeholder_id', 'location' => 'form_builder' ) ); |
5 | 5 | } else { ?> |
6 | 6 | <select id="frm_dropdown_<?php echo esc_attr( $field['id'] ) ?>" |
@@ -8,8 +8,8 @@ discard block |
||
8 | 8 | echo FrmField::is_option_true( $field, 'size' ) ? 'class="auto_width"' : ''; |
9 | 9 | echo FrmField::is_option_true( $field, 'multiple' ) ? ' multiple="multiple"' : ''; ?> > |
10 | 10 | <?php foreach ( $field['options'] as $opt_key => $opt ) { |
11 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
12 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
11 | + $field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field ); |
|
12 | + $opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field ); |
|
13 | 13 | $selected = ( $field['default_value'] == $field_val || FrmFieldsHelper::get_other_val( array( 'opt_key', 'field' ) ) ) ? ' selected="selected"' : ''; ?> |
14 | 14 | <option value="<?php echo esc_attr( $field_val ) ?>"<?php echo $selected ?>><?php echo esc_html( $opt ) ?> </option> |
15 | 15 | <?php } ?> |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | <?php |
28 | 28 | |
29 | 29 | if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) { ?> |
30 | - <?php do_action('frm_add_multiple_opts_labels', $field); ?> |
|
31 | - <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts<?php echo ( count($field['options']) > 10 ) ? ' frm_field_opts_list' : ''; ?>"> |
|
32 | - <?php FrmFieldsHelper::show_single_option($field); ?> |
|
30 | + <?php do_action( 'frm_add_multiple_opts_labels', $field ); ?> |
|
31 | + <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts<?php echo ( count( $field['options'] ) > 10 ) ? ' frm_field_opts_list' : ''; ?>"> |
|
32 | + <?php FrmFieldsHelper::show_single_option( $field ); ?> |
|
33 | 33 | </ul> |
34 | 34 | <?php |
35 | 35 | } ?> |
@@ -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'] ); ?>" data-ftype="<?php echo esc_attr( $display['type'] ) ?>"> |
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 | |
@@ -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 | ?> |
@@ -118,16 +118,16 @@ discard block |
||
118 | 118 | <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> |
119 | 119 | <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'] ); ?>]"> |
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> |
127 | 127 | <?php } ?> |
128 | 128 | </div> |
129 | 129 | <?php |
130 | - } |
|
130 | + } |
|
131 | 131 | ?> |
132 | 132 | </div> |
133 | 133 | <?php |
@@ -162,31 +162,31 @@ discard block |
||
162 | 162 | <?php _e( 'Required', 'formidable' ) ?> |
163 | 163 | </label> |
164 | 164 | <?php |
165 | - } |
|
165 | + } |
|
166 | 166 | |
167 | 167 | if ( $display['unique'] ) { |
168 | - if ( ! isset( $field['unique'] ) ) { |
|
169 | - $field['unique'] = false; |
|
170 | - } |
|
171 | - ?> |
|
168 | + if ( ! isset( $field['unique'] ) ) { |
|
169 | + $field['unique'] = false; |
|
170 | + } |
|
171 | + ?> |
|
172 | 172 | <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> |
173 | 173 | <?php |
174 | - } |
|
174 | + } |
|
175 | 175 | |
176 | 176 | if ( $display['read_only'] ) { |
177 | - if ( ! isset( $field['read_only'] ) ) { |
|
178 | - $field['read_only'] = false; |
|
177 | + if ( ! isset( $field['read_only'] ) ) { |
|
178 | + $field['read_only'] = false; |
|
179 | 179 | } |
180 | - ?> |
|
180 | + ?> |
|
181 | 181 | <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' ) ?>" > |
182 | 182 | <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 checked( $field['read_only'], 1 ) ?>/> |
183 | 183 | <?php _e( 'Read Only', 'formidable' ) ?> |
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 |
191 | 191 | if ( $display['required'] ) { ?> |
192 | 192 | <div class="frm_required_details<?php echo esc_attr( $field['id'] . ( $field['required'] ? '' : ' frm_hidden' ) ); ?>"> |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | do_action( 'frm_' . $field['type'] . '_field_options_form', $field, $display, $values ); |
273 | 273 | do_action( 'frm_field_options_form', $field, $display, $values ); |
274 | 274 | |
275 | - if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?> |
|
275 | + if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?> |
|
276 | 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"> |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | <input type="text" name="field_options[blank_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['blank'] ); ?>" /> |
286 | 286 | </p> |
287 | 287 | <?php |
288 | - } |
|
288 | + } |
|
289 | 289 | |
290 | 290 | if ( $display['invalid'] ) { ?> |
291 | 291 | <p><label><?php _e( 'Invalid Format', 'formidable' ) ?></label> |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | <input type="text" name="field_options[unique_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['unique_msg'] ); ?>" /> |
301 | 301 | </p> |
302 | 302 | <?php |
303 | - } |
|
303 | + } |
|
304 | 304 | |
305 | 305 | if ( $display['conf_field'] ) { ?> |
306 | 306 | <p class="frm_conf_details<?php echo esc_attr( $field['id'] . ( $field['conf_field'] ? '' : ' frm_hidden' ) ); ?>"> |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | <input type="text" name="field_options[conf_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['conf_msg'] ); ?>" /> |
309 | 309 | </p> |
310 | 310 | <?php |
311 | - } ?> |
|
311 | + } ?> |
|
312 | 312 | </div> |
313 | 313 | </div> |
314 | 314 | </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 |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | <td class="frm_150_width"><label><?php _e( 'Label Position', 'formidable' ) ?></label></td> |
224 | 224 | <td> |
225 | 225 | <select name="field_options[label_<?php echo esc_attr( $field['id'] ) ?>]"> |
226 | - <option value=""<?php selected($field['label'], ''); ?>> |
|
226 | + <option value=""<?php selected( $field['label'], '' ); ?>> |
|
227 | 227 | <?php _e( 'Default', 'formidable' ) ?> |
228 | 228 | </option> |
229 | 229 | <?php foreach ( FrmStylesHelper::get_sigle_label_postitions() as $pos => $pos_label ) { ?> |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | do_action( 'frm_field_options_form', $field, $display, $values ); |
282 | 282 | |
283 | 283 | if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) { ?> |
284 | - <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'; ?>"> |
|
284 | + <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'; ?>"> |
|
285 | 285 | <td colspan="2"> |
286 | 286 | <div class="menu-settings"> |
287 | 287 | <h3 class="frm_no_bg"><?php _e( 'Validation', 'formidable' ) ?></h3> |
@@ -345,4 +345,4 @@ discard block |
||
345 | 345 | <?php |
346 | 346 | } |
347 | 347 | |
348 | -unset($display); |
|
348 | +unset( $display ); |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | </ul> |
66 | 66 | </li> |
67 | 67 | <?php |
68 | - } else { |
|
69 | - $field_label = $field_type; |
|
70 | - ?> |
|
68 | + } else { |
|
69 | + $field_label = $field_type; |
|
70 | + ?> |
|
71 | 71 | <li class="frmbutton button <?php echo esc_attr( $col_class . ' ' . $no_allow_class . ' frm_t' . $field_key ) ?>" id="<?php echo esc_attr( $field_key ) ?>"> |
72 | 72 | <?php echo apply_filters( 'frmpro_field_links', $field_label, $id, $field_key ) ?> |
73 | 73 | </li> |
74 | 74 | <?php |
75 | - } |
|
75 | + } |
|
76 | 76 | |
77 | - $col_class = empty($col_class) ? 'frm_col_one' : ''; |
|
78 | - unset($field_key, $field_type, $field_label); |
|
79 | - } ?> |
|
77 | + $col_class = empty($col_class) ? 'frm_col_one' : ''; |
|
78 | + unset($field_key, $field_type, $field_label); |
|
79 | + } ?> |
|
80 | 80 | </ul> |
81 | 81 | <div class="clear"></div> |
82 | 82 | </div> |
@@ -87,33 +87,33 @@ discard block |
||
87 | 87 | <?php _e( '2. This box will activate and you can click to insert classes.', 'formidable' ) ?></p> |
88 | 88 | <ul class="frm_code_list"> |
89 | 89 | <?php $classes = array( |
90 | - 'frm_first' => array( |
|
91 | - 'label' => __( 'First', 'formidable' ), |
|
92 | - 'title' => __( 'Add this to the first field in each row along with a width. ie frm_first frm_third', 'formidable' ), |
|
93 | - ), |
|
94 | - 'frm_half' => __( '1/2', 'formidable' ), |
|
95 | - 'frm_third' => __( '1/3', 'formidable' ), |
|
96 | - 'frm_two_thirds' => __( '2/3', 'formidable' ), |
|
97 | - 'frm_fourth' => __( '1/4', 'formidable' ), |
|
90 | + 'frm_first' => array( |
|
91 | + 'label' => __( 'First', 'formidable' ), |
|
92 | + 'title' => __( 'Add this to the first field in each row along with a width. ie frm_first frm_third', 'formidable' ), |
|
93 | + ), |
|
94 | + 'frm_half' => __( '1/2', 'formidable' ), |
|
95 | + 'frm_third' => __( '1/3', 'formidable' ), |
|
96 | + 'frm_two_thirds' => __( '2/3', 'formidable' ), |
|
97 | + 'frm_fourth' => __( '1/4', 'formidable' ), |
|
98 | 98 | 'frm_three_fourths' => __( '3/4', 'formidable' ), |
99 | - 'frm_fifth' => __( '1/5', 'formidable' ), |
|
99 | + 'frm_fifth' => __( '1/5', 'formidable' ), |
|
100 | 100 | 'frm_two_fifths' => __( '2/5', 'formidable' ), |
101 | - 'frm_sixth' => __( '1/6', 'formidable' ), |
|
102 | - 'frm_seventh' => __( '1/7', 'formidable' ), |
|
101 | + 'frm_sixth' => __( '1/6', 'formidable' ), |
|
102 | + 'frm_seventh' => __( '1/7', 'formidable' ), |
|
103 | 103 | 'frm_eighth' => __( '1/8', 'formidable' ), |
104 | 104 | 'frm_alignright' => __( 'Right', 'formidable' ), |
105 | - 'frm_inline' => array( |
|
106 | - 'label' => __( 'Inline', 'formidable' ), |
|
105 | + 'frm_inline' => array( |
|
106 | + 'label' => __( 'Inline', 'formidable' ), |
|
107 | 107 | 'title' => __( 'Align fields in a row without a specific width.', 'formidable' ), |
108 | - ), |
|
108 | + ), |
|
109 | 109 | |
110 | - 'frm_full' => array( |
|
111 | - 'label' => __( '100% width', 'formidable' ), |
|
110 | + 'frm_full' => array( |
|
111 | + 'label' => __( '100% width', 'formidable' ), |
|
112 | 112 | 'title' => __( 'Force the field to fill the full space with 100% width.', 'formidable' ), |
113 | - ), |
|
114 | - 'frm_grid_first' => __( 'First Grid Row', 'formidable' ), |
|
115 | - 'frm_grid' => __( 'Even Grid Row', 'formidable' ), |
|
116 | - 'frm_grid_odd' => __( 'Odd Grid Row', 'formidable' ), |
|
113 | + ), |
|
114 | + 'frm_grid_first' => __( 'First Grid Row', 'formidable' ), |
|
115 | + 'frm_grid' => __( 'Even Grid Row', 'formidable' ), |
|
116 | + 'frm_grid_odd' => __( 'Odd Grid Row', 'formidable' ), |
|
117 | 117 | 'frm_two_col' => array( 'label' => __( '2 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into two columns.', 'formidable' ) ), |
118 | 118 | 'frm_three_col' => array( 'label' => __( '3 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into three columns.', 'formidable' ) ), |
119 | 119 | 'frm_four_col' => array( 'label' => __( '4 Col Options', 'formidable' ), 'title' => __( 'Put your radio button or checkbox options into four columns.', 'formidable' ) ), |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | 'frm_scroll_box' => array( 'label' => __( 'Scroll Box', 'formidable' ), 'title' => __( 'If you have many checkbox or radio button options, you may add this class to allow your user to easily scroll through the options.', 'formidable' ) ), |
122 | 122 | 'frm_text_block' => array( 'label' => __( 'Align Option Text', 'formidable' ), 'title' => __( 'If you have a large amount of text in a checkbox or radio button field, use this class to align all the text in a block.', 'formidable' ) ), |
123 | 123 | 'frm_capitalize' => array( 'label' => __( 'Capitalize', 'formidable' ), 'title' => __( 'Automatically capitalize the first letter in each word.', 'formidable' ) ), |
124 | - ); |
|
124 | + ); |
|
125 | 125 | |
126 | 126 | $classes = apply_filters( 'frm_layout_classes', $classes ); |
127 | 127 | $col = 'one'; |
@@ -138,11 +138,11 @@ discard block |
||
138 | 138 | } ?>> |
139 | 139 | <?php |
140 | 140 | if ( empty( $d ) ) { |
141 | - echo $c; |
|
141 | + echo $c; |
|
142 | 142 | } else if ( ! is_array( $d ) ) { |
143 | - echo $d; |
|
143 | + echo $d; |
|
144 | 144 | } else if ( isset( $d['label'] ) ) { |
145 | - echo $d['label']; |
|
145 | + echo $d['label']; |
|
146 | 146 | } |
147 | 147 | ?> |
148 | 148 | </a> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <ul id="category-tabs" class="category-tabs frm-category-tabs"> |
18 | 18 | <li class="tabs" ><a href="#frm-insert-fields" id="frm_insert_fields_tab"><?php _e( 'Fields', 'formidable' ); ?></a></li> |
19 | 19 | <li class="hide-if-no-js"><a href="#frm-layout-classes" id="frm_layout_classes_tab" class="frm_help" title="<?php esc_attr_e( 'Open the Field Options and click on the CSS Layout Classes option to enable this tab', 'formidable' ) ?>"><?php _e( 'Layout', 'formidable' ); ?></a></li> |
20 | -<?php do_action('frm_extra_form_instruction_tabs'); ?> |
|
20 | +<?php do_action( 'frm_extra_form_instruction_tabs' ); ?> |
|
21 | 21 | </ul> |
22 | 22 | |
23 | 23 | <div id="frm-insert-fields" class="tabs-panel"> |
@@ -74,13 +74,13 @@ discard block |
||
74 | 74 | <?php |
75 | 75 | } |
76 | 76 | |
77 | - $col_class = empty($col_class) ? 'frm_col_one' : ''; |
|
78 | - unset($field_key, $field_type, $field_label); |
|
77 | + $col_class = empty( $col_class ) ? 'frm_col_one' : ''; |
|
78 | + unset( $field_key, $field_type, $field_label ); |
|
79 | 79 | } ?> |
80 | 80 | </ul> |
81 | 81 | <div class="clear"></div> |
82 | 82 | </div> |
83 | - <?php do_action('frm_extra_form_instructions'); ?> |
|
83 | + <?php do_action( 'frm_extra_form_instructions' ); ?> |
|
84 | 84 | |
85 | 85 | <div id="frm-layout-classes" class="tabs-panel"> |
86 | 86 | <p class="howto"><?php _e( '1. Click inside the "CSS layout classes" field option in any field.', 'formidable' ) ?><br/> |
@@ -132,9 +132,9 @@ discard block |
||
132 | 132 | <a href="javascript:void(0);" class="frmbutton frm_insert_code button show_frm_classes<?php |
133 | 133 | if ( ! empty( $title ) ) { |
134 | 134 | echo ' frm_help'; |
135 | - } ?>" data-code="<?php echo esc_attr($c) ?>" <?php |
|
135 | + } ?>" data-code="<?php echo esc_attr( $c ) ?>" <?php |
|
136 | 136 | if ( ! empty( $title ) ) { |
137 | - ?>title="<?php echo esc_attr($title); ?>"<?php |
|
137 | + ?>title="<?php echo esc_attr( $title ); ?>"<?php |
|
138 | 138 | } ?>> |
139 | 139 | <?php |
140 | 140 | if ( empty( $d ) ) { |
@@ -159,14 +159,14 @@ discard block |
||
159 | 159 | |
160 | 160 | <div class="submitbox" id="major-publishing-actions"> |
161 | 161 | <div id="delete-action"> |
162 | - <?php echo FrmFormsHelper::delete_trash_link($id, $values['status']); ?> |
|
162 | + <?php echo FrmFormsHelper::delete_trash_link( $id, $values['status'] ); ?> |
|
163 | 163 | </div> |
164 | 164 | |
165 | 165 | <div id="publishing-action"> |
166 | 166 | <form method="post" id="frm_js_build_form"> |
167 | 167 | <span class="spinner"></span> |
168 | 168 | <input type="hidden" id="frm_compact_fields" name="frm_compact_fields" value="" /> |
169 | - <input type="button" value="<?php echo esc_attr($button) ?>" class="frm_submit_form frm_submit_<?php echo ( isset($values['ajax_load']) && $values['ajax_load'] ) ? '': 'no_'; ?>ajax button-primary button-large" id="frm_submit_side" /> |
|
169 | + <input type="button" value="<?php echo esc_attr( $button ) ?>" class="frm_submit_form frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-primary button-large" id="frm_submit_side" /> |
|
170 | 170 | </form> |
171 | 171 | </div> |
172 | 172 | <div class="clear"></div> |