@@ -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 esc_html_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 esc_html_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"> |
@@ -76,14 +76,14 @@ discard block |
||
| 76 | 76 | <?php |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - $col_class = empty($col_class) ? 'frm_col_one' : ''; |
|
| 80 | - unset($field_key, $field_type, $field_label); |
|
| 79 | + $col_class = empty( $col_class ) ? 'frm_col_one' : ''; |
|
| 80 | + unset( $field_key, $field_type, $field_label ); |
|
| 81 | 81 | } |
| 82 | 82 | ?> |
| 83 | 83 | </ul> |
| 84 | 84 | <div class="clear"></div> |
| 85 | 85 | </div> |
| 86 | - <?php do_action('frm_extra_form_instructions'); ?> |
|
| 86 | + <?php do_action( 'frm_extra_form_instructions' ); ?> |
|
| 87 | 87 | |
| 88 | 88 | <div id="frm-layout-classes" class="tabs-panel"> |
| 89 | 89 | <p class="howto"><?php esc_html_e( '1. Click inside the "CSS layout classes" field option in any field.', 'formidable' ) ?><br/> |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $title = ( ! empty( $d ) && is_array( $d ) && isset( $d['title'] ) ) ? $d['title'] : ''; |
| 155 | 155 | ?> |
| 156 | 156 | <li class="frm_col_<?php echo esc_attr( $col ) ?>"> |
| 157 | - <a href="javascript:void(0);" data-code="<?php echo esc_attr($c) ?>" class="frmbutton frm_insert_code button show_frm_classes<?php echo esc_attr( ! empty( $title ) ? ' frm_help' : '' ); ?>" <?php echo ( ! empty( $title ) ? ' title="' . esc_attr( $title ) . '"' : '' ); ?>> |
|
| 157 | + <a href="javascript:void(0);" data-code="<?php echo esc_attr( $c ) ?>" class="frmbutton frm_insert_code button show_frm_classes<?php echo esc_attr( ! empty( $title ) ? ' frm_help' : '' ); ?>" <?php echo ( ! empty( $title ) ? ' title="' . esc_attr( $title ) . '"' : '' ); ?>> |
|
| 158 | 158 | <?php |
| 159 | 159 | if ( empty( $d ) ) { |
| 160 | 160 | echo $c; |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | <div class="submitbox" id="major-publishing-actions"> |
| 180 | 180 | <div id="delete-action"> |
| 181 | - <?php echo FrmFormsHelper::delete_trash_link($id, $values['status']); ?> |
|
| 181 | + <?php echo FrmFormsHelper::delete_trash_link( $id, $values['status'] ); ?> |
|
| 182 | 182 | </div> |
| 183 | 183 | |
| 184 | 184 | <div id="publishing-action"> |
@@ -1,7 +1,7 @@ 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( |
| 6 | 6 | 'location' => 'front', |
| 7 | 7 | 'name' => $field_name, |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | $read_only = true; |
| 13 | 13 | |
| 14 | 14 | echo FrmProDropdownFieldsController::get_hidden_fields_with_readonly_values( $field, $field_name, $html_id ); ?> |
| 15 | - <select <?php do_action('frm_field_input_html', $field) ?>> |
|
| 15 | + <select <?php do_action( 'frm_field_input_html', $field ) ?>> |
|
| 16 | 16 | <?php } else { ?> |
| 17 | - <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php do_action('frm_field_input_html', $field) ?>> |
|
| 17 | + <select name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php do_action( 'frm_field_input_html', $field ) ?>> |
|
| 18 | 18 | <?php |
| 19 | 19 | } |
| 20 | 20 | |
@@ -1,12 +1,12 @@ discard block |
||
| 1 | 1 | <?php if ( in_array( $field['type'], array( 'email', 'url', 'text' ) ) ) { ?> |
| 2 | -<input type="<?php echo ( $frm_settings->use_html || $field['type'] == 'password' ) ? $field['type'] : 'text'; ?>" id="<?php echo esc_attr( $html_id ) ?>" name="<?php echo esc_attr( $field_name ) ?>" value="<?php echo esc_attr( $field['value'] ) ?>" <?php do_action('frm_field_input_html', $field) ?>/> |
|
| 2 | +<input type="<?php echo ( $frm_settings->use_html || $field['type'] == 'password' ) ? $field['type'] : 'text'; ?>" id="<?php echo esc_attr( $html_id ) ?>" name="<?php echo esc_attr( $field_name ) ?>" value="<?php echo esc_attr( $field['value'] ) ?>" <?php do_action( 'frm_field_input_html', $field ) ?>/> |
|
| 3 | 3 | <?php } else if ( $field['type'] == 'textarea' ) { ?> |
| 4 | 4 | <textarea name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" <?php |
| 5 | 5 | if ( $field['max'] ) { |
| 6 | 6 | echo 'rows="' . esc_attr( $field['max'] ) . '" '; |
| 7 | 7 | } |
| 8 | -do_action('frm_field_input_html', $field); |
|
| 9 | -?>><?php echo FrmAppHelper::esc_textarea($field['value']) ?></textarea> |
|
| 8 | +do_action( 'frm_field_input_html', $field ); |
|
| 9 | +?>><?php echo FrmAppHelper::esc_textarea( $field['value'] ) ?></textarea> |
|
| 10 | 10 | <?php |
| 11 | 11 | |
| 12 | 12 | } else if ( $field['type'] == 'radio' ) { |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | 'field_name' => $field_name, |
| 25 | 25 | 'type' => $field['type'], |
| 26 | 26 | ) ); |
| 27 | - } else if ( is_array($field['options']) ) { |
|
| 27 | + } else if ( is_array( $field['options'] ) ) { |
|
| 28 | 28 | foreach ( $field['options'] as $opt_key => $opt ) { |
| 29 | 29 | if ( isset( $atts ) && isset( $atts['opt'] ) && ( $atts['opt'] !== $opt_key ) ) { |
| 30 | 30 | continue; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | <label for="<?php echo esc_attr( $html_id ) ?>-<?php echo esc_attr( $opt_key ) ?>"> |
| 39 | 39 | <?php |
| 40 | 40 | } |
| 41 | - $checked = FrmAppHelper::check_selected($field['value'], $field_val) ? 'checked="checked" ' : ' '; |
|
| 41 | + $checked = FrmAppHelper::check_selected( $field['value'], $field_val ) ? 'checked="checked" ' : ' '; |
|
| 42 | 42 | |
| 43 | 43 | $other_opt = false; |
| 44 | 44 | $other_args = FrmFieldsHelper::prepare_other_input( compact( 'field_name', 'opt_key', 'field' ), $other_opt, $checked ); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
| 91 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
| 92 | 92 | do_action( 'frm_after_checkbox', array( |
| 93 | 93 | 'field' => $field, |
| 94 | 94 | 'field_name' => $field_name, |
@@ -100,9 +100,9 @@ discard block |
||
| 100 | 100 | continue; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
| 104 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
| 105 | - $checked = FrmAppHelper::check_selected($checked_values, $field_val) ? ' checked="checked"' : ''; |
|
| 103 | + $field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field ); |
|
| 104 | + $opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field ); |
|
| 105 | + $checked = FrmAppHelper::check_selected( $checked_values, $field_val ) ? ' checked="checked"' : ''; |
|
| 106 | 106 | |
| 107 | 107 | // Check if other opt, and get values for other field if needed |
| 108 | 108 | $other_opt = false; |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | } else if ( $field['type'] == 'captcha' && ! FrmAppHelper::is_admin() ) { |
| 142 | 142 | $frm_settings = FrmAppHelper::get_settings(); |
| 143 | - if ( ! empty($frm_settings->pubkey) ) { |
|
| 144 | - FrmFieldsHelper::display_recaptcha($field); |
|
| 143 | + if ( ! empty( $frm_settings->pubkey ) ) { |
|
| 144 | + FrmFieldsHelper::display_recaptcha( $field ); |
|
| 145 | 145 | } |
| 146 | 146 | } else { |
| 147 | 147 | do_action( 'frm_form_fields', $field, $field_name, compact( 'errors', 'html_id' ) ); |