@@ -1,16 +1,16 @@ |
||
1 | 1 | <div id="form_entries_page" class="wrap"> |
2 | 2 | <div class="frmicon icon32"><br/></div> |
3 | 3 | <h2><?php _e( 'Entries', 'formidable' ); ?> |
4 | - <?php do_action('frm_entry_inside_h2', $form); ?> |
|
4 | + <?php do_action( 'frm_entry_inside_h2', $form ); ?> |
|
5 | 5 | </h2> |
6 | 6 | |
7 | - <?php require(FrmAppHelper::plugin_path() .'/classes/views/shared/errors.php'); ?> |
|
7 | + <?php require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?> |
|
8 | 8 | |
9 | 9 | <form id="posts-filter" method="get"> |
10 | 10 | <div id="poststuff"> |
11 | 11 | <div id="post-body" class="metabox-holder columns-2"> |
12 | 12 | <div id="post-body-content"> |
13 | - <?php FrmAppController::get_form_nav($form, true, 'hide'); ?> |
|
13 | + <?php FrmAppController::get_form_nav( $form, true, 'hide' ); ?> |
|
14 | 14 | </div> |
15 | 15 | <div id="postbox-container-1" class="postbox-container"> |
16 | 16 | <input type="hidden" name="page" value="formidable-entries" /> |
@@ -1,17 +1,17 @@ |
||
1 | -<div class="frm_forms <?php echo FrmFormsHelper::get_form_style_class($values); ?>" id="frm_form_<?php echo esc_attr( $form->id ) ?>_container"> |
|
1 | +<div class="frm_forms <?php echo FrmFormsHelper::get_form_style_class( $values ); ?>" id="frm_form_<?php echo esc_attr( $form->id ) ?>_container"> |
|
2 | 2 | <?php |
3 | 3 | if ( ! isset( $include_form_tag ) || $include_form_tag ) { |
4 | 4 | ?> |
5 | -<form enctype="<?php echo esc_attr( apply_filters( 'frm_form_enctype', 'multipart/form-data', $form ) ) ?>" method="post" class="frm-show-form <?php do_action('frm_form_classes', $form) ?>" id="form_<?php echo esc_attr( $form->form_key ) ?>" <?php echo $frm_settings->use_html ? '' : 'action=""'; ?>> |
|
5 | +<form enctype="<?php echo esc_attr( apply_filters( 'frm_form_enctype', 'multipart/form-data', $form ) ) ?>" method="post" class="frm-show-form <?php do_action( 'frm_form_classes', $form ) ?>" id="form_<?php echo esc_attr( $form->form_key ) ?>" <?php echo $frm_settings->use_html ? '' : 'action=""'; ?>> |
|
6 | 6 | <?php |
7 | 7 | } else { ?> |
8 | -<div id="form_<?php echo esc_attr( $form->form_key ) ?>" class="frm-show-form <?php do_action('frm_form_classes', $form) ?>" > |
|
8 | +<div id="form_<?php echo esc_attr( $form->form_key ) ?>" class="frm-show-form <?php do_action( 'frm_form_classes', $form ) ?>" > |
|
9 | 9 | <?php |
10 | 10 | } |
11 | 11 | |
12 | -include(FrmAppHelper::plugin_path() .'/classes/views/frm-entries/errors.php'); |
|
12 | +include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/errors.php' ); |
|
13 | 13 | $form_action = 'create'; |
14 | -require(FrmAppHelper::plugin_path() .'/classes/views/frm-entries/form.php'); |
|
14 | +require( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/form.php' ); |
|
15 | 15 | |
16 | 16 | if ( ! isset( $include_form_tag ) || $include_form_tag ) { |
17 | 17 | ?> |
@@ -1,18 +1,18 @@ |
||
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 | -<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> |
|
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$sthis page%2$s <br/> or click "%3$sAdd New%4$s" above to add an entry from here (Requires License)', 'formidable' ), '<a href="https://formidablepro.com/knowledgebase/publish-your-forms/" target="_blank">', '</a>', '<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$sthis page%2$s <br/> or click "%3$sAdd New%4$s" above to add an entry from here (Requires License)', 'formidable' ), '<a href="https://formidablepro.com/knowledgebase/publish-your-forms/" target="_blank">', '</a>', '<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 | 14 | <div class="frm_no_entries_header"><?php _e( 'You have not created any forms yet.', 'formidable' ); ?></div> |
15 | -<p class="frm_no_entries_text"><?php printf( __( 'To view entries, you must first %1$sbuild a form%2$s', 'formidable' ), '<a href="'. esc_url( admin_url( 'admin.php?page=formidable&frm_action=new' ) ) . '">', '</a>' ); ?></p> |
|
15 | +<p class="frm_no_entries_text"><?php printf( __( 'To view entries, you must first %1$sbuild a form%2$s', 'formidable' ), '<a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_action=new' ) ) . '">', '</a>' ); ?></p> |
|
16 | 16 | <?php |
17 | 17 | } ?> |
18 | 18 | </div> |
@@ -15,43 +15,43 @@ |
||
15 | 15 | <div class="inside"> |
16 | 16 | <table class="form-table"><tbody> |
17 | 17 | <?php |
18 | - $first_h3 = 'frm_first_h3'; |
|
19 | - foreach ( $fields as $field ) { |
|
18 | + $first_h3 = 'frm_first_h3'; |
|
19 | + foreach ( $fields as $field ) { |
|
20 | 20 | if ( in_array( $field->type, array( 'captcha', 'html', 'end_divider', 'form' ) ) ) { |
21 | - continue; |
|
22 | - } |
|
21 | + continue; |
|
22 | + } |
|
23 | 23 | |
24 | - if ( in_array($field->type, array( 'break', 'divider' ) ) ) { |
|
25 | - ?> |
|
24 | + if ( in_array($field->type, array( 'break', 'divider' ) ) ) { |
|
25 | + ?> |
|
26 | 26 | </tbody></table> |
27 | 27 | <br/><h3 class="<?php echo esc_attr( $first_h3 ) ?>"><?php echo esc_html( $field->name ) ?></h3> |
28 | 28 | <table class="form-table"><tbody> |
29 | 29 | <?php |
30 | - $first_h3 = ''; |
|
31 | - } else { |
|
32 | - ?> |
|
30 | + $first_h3 = ''; |
|
31 | + } else { |
|
32 | + ?> |
|
33 | 33 | <tr> |
34 | 34 | <th scope="row"><?php echo esc_html( $field->name ) ?>:</th> |
35 | 35 | <td> |
36 | 36 | <?php |
37 | 37 | $embedded_field_id = ( $entry->form_id != $field->form_id ) ? 'form' . $field->form_id : 0; |
38 | - $atts = array( |
|
39 | - 'type' => $field->type, 'post_id' => $entry->post_id, |
|
40 | - 'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id, |
|
41 | - 'embedded_field_id' => $embedded_field_id, |
|
42 | - ); |
|
43 | - echo $display_value = FrmEntriesHelper::prepare_display_value($entry, $field, $atts); |
|
38 | + $atts = array( |
|
39 | + 'type' => $field->type, 'post_id' => $entry->post_id, |
|
40 | + 'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id, |
|
41 | + 'embedded_field_id' => $embedded_field_id, |
|
42 | + ); |
|
43 | + echo $display_value = FrmEntriesHelper::prepare_display_value($entry, $field, $atts); |
|
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,7 +1,7 @@ discard block |
||
1 | 1 | <div id="form_show_entry_page" class="wrap"> |
2 | 2 | <div class="frmicon icon32"><br/></div> |
3 | 3 | <h2><?php _e( 'View Entry', 'formidable' ) ?> |
4 | - <?php do_action('frm_entry_inside_h2', $entry->form_id); ?> |
|
4 | + <?php do_action( 'frm_entry_inside_h2', $entry->form_id ); ?> |
|
5 | 5 | </h2> |
6 | 6 | |
7 | 7 | <div class="frm_forms"> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <div id="poststuff"> |
10 | 10 | <div id="post-body" class="metabox-holder columns-2"> |
11 | 11 | <div id="post-body-content"> |
12 | - <?php FrmAppController::get_form_nav($entry->form_id, true); ?> |
|
12 | + <?php FrmAppController::get_form_nav( $entry->form_id, true ); ?> |
|
13 | 13 | <div class="postbox"> |
14 | 14 | <h3 class="hndle"><span><?php _e( 'Entry', 'formidable' ) ?></span></h3> |
15 | 15 | <div class="inside"> |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | continue; |
22 | 22 | } |
23 | 23 | |
24 | - if ( in_array($field->type, array( 'break', 'divider' ) ) ) { |
|
24 | + if ( in_array( $field->type, array( 'break', 'divider' ) ) ) { |
|
25 | 25 | ?> |
26 | 26 | </tbody></table> |
27 | 27 | <br/><h3 class="<?php echo esc_attr( $first_h3 ) ?>"><?php echo esc_html( $field->name ) ?></h3> |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | 'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id, |
41 | 41 | 'embedded_field_id' => $embedded_field_id, |
42 | 42 | ); |
43 | - echo $display_value = FrmEntriesHelper::prepare_display_value($entry, $field, $atts); |
|
43 | + echo $display_value = FrmEntriesHelper::prepare_display_value( $entry, $field, $atts ); |
|
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,14 +59,14 @@ 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 | - <?php require(FrmAppHelper::plugin_path() .'/classes/views/frm-entries/sidebar-show.php'); ?> |
|
69 | + <?php require( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/sidebar-show.php' ); ?> |
|
70 | 70 | </div> |
71 | 71 | </div> |
72 | 72 | </div> |
@@ -66,18 +66,18 @@ |
||
66 | 66 | <?php } ?> |
67 | 67 | |
68 | 68 | <?php |
69 | - foreach ( (array) $data as $k => $d ) { |
|
69 | + foreach ( (array) $data as $k => $d ) { |
|
70 | 70 | if ( in_array( $k, array( 'browser', 'referrer' ) ) ) { |
71 | - continue; |
|
72 | - } |
|
73 | - ?> |
|
71 | + continue; |
|
72 | + } |
|
73 | + ?> |
|
74 | 74 | <div class="misc-pub-section"> |
75 | 75 | <b><?php echo sanitize_text_field( ucfirst( str_replace( '-', ' ', $k ) ) ); ?></b>: |
76 | 76 | <?php echo wp_kses_post( implode( ', ', (array) $d ) ); ?> |
77 | 77 | </div> |
78 | 78 | <?php |
79 | - unset($k, $d); |
|
80 | - } |
|
81 | - ?> |
|
79 | + unset($k, $d); |
|
80 | + } |
|
81 | + ?> |
|
82 | 82 | </div> |
83 | 83 | </div> |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | <div class="misc-pub-section"> |
7 | 7 | <span class="dashicons dashicons-admin-post wp-media-buttons-icon"></span> |
8 | 8 | <?php _e( 'Post', 'formidable' ) ?>: |
9 | - <b><?php echo get_the_title($entry->post_id) ?></b> |
|
10 | - <span><a href="<?php echo esc_url( admin_url('post.php?post='. $entry->post_id .'&action=edit') ) ?>"><?php _e( 'Edit', 'formidable' ) ?></a> |
|
9 | + <b><?php echo get_the_title( $entry->post_id ) ?></b> |
|
10 | + <span><a href="<?php echo esc_url( admin_url( 'post.php?post=' . $entry->post_id . '&action=edit' ) ) ?>"><?php _e( 'Edit', 'formidable' ) ?></a> |
|
11 | 11 | <a href="<?php echo esc_url( get_permalink( $entry->post_id ) ) ?>"><?php _e( 'View', 'formidable' ) ?></a></span> |
12 | 12 | </div> |
13 | 13 | <?php } ?> |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | <?php if ( $entry->updated_by && $entry->updated_by != $entry->user_id ) { ?> |
36 | 36 | <div class="misc-pub-section"> |
37 | 37 | <span class="dashicons dashicons-admin-users wp-media-buttons-icon"></span> |
38 | - <?php printf( __( 'Updated by: %1$s', 'formidable' ), FrmProFieldsHelper::get_display_name( $entry->updated_by, 'display_name', array( 'link' => true ) ) ); ?> |
|
38 | + <?php printf( __( 'Updated by: %1$s', 'formidable' ), FrmProFieldsHelper::get_display_name( $entry->updated_by, 'display_name', array( 'link' => true ) ) ); ?> |
|
39 | 39 | </div> |
40 | 40 | <?php } ?> |
41 | 41 | <?php } ?> |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | </div> |
59 | 59 | <?php } ?> |
60 | 60 | |
61 | - <?php if ( isset($data['referrer']) ) { ?> |
|
61 | + <?php if ( isset( $data['referrer'] ) ) { ?> |
|
62 | 62 | <div class="misc-pub-section"> |
63 | 63 | <b><?php _e( 'Referrer', 'formidable' ) ?></b>:<br/> |
64 | - <?php echo wp_kses_post( str_replace( "\r\n", '<br/>', $data['referrer'] ) ); ?> |
|
64 | + <?php echo wp_kses_post( str_replace( "\r\n", '<br/>', $data['referrer'] ) ); ?> |
|
65 | 65 | </div> |
66 | 66 | <?php } ?> |
67 | 67 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | <?php echo wp_kses_post( implode( ', ', (array) $d ) ); ?> |
77 | 77 | </div> |
78 | 78 | <?php |
79 | - unset($k, $d); |
|
79 | + unset( $k, $d ); |
|
80 | 80 | } |
81 | 81 | ?> |
82 | 82 | </div> |
@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | <div class="submitbox"> |
6 | 6 | <div id="minor-publishing" class="frm_remove_border"> |
7 | 7 | <div class="misc-pub-section"> |
8 | - <?php do_action('frm_show_entry_publish_box', $entry); ?> |
|
8 | + <?php do_action( 'frm_show_entry_publish_box', $entry ); ?> |
|
9 | 9 | <div class="clear"></div> |
10 | 10 | </div> |
11 | 11 | <div id="misc-publishing-actions"> |
12 | - <?php include(dirname(__FILE__) .'/_sidebar-shared-pub.php'); ?> |
|
12 | + <?php include( dirname( __FILE__ ) . '/_sidebar-shared-pub.php' ); ?> |
|
13 | 13 | <div class="misc-pub-section"> |
14 | 14 | <span class="dashicons dashicons-format-aside wp-media-buttons-icon"></span> |
15 | 15 | <a href="#" onclick="window.print();return false;"><?php _e( 'Print', 'formidable' ) ?></a> |
@@ -17,22 +17,22 @@ discard block |
||
17 | 17 | </div> |
18 | 18 | </div> |
19 | 19 | <div id="major-publishing-actions"> |
20 | - <?php if ( current_user_can('frm_delete_entries') ) { ?> |
|
20 | + <?php if ( current_user_can( 'frm_delete_entries' ) ) { ?> |
|
21 | 21 | <div id="delete-action"> |
22 | - <a href="<?php echo esc_url( admin_url('admin.php?page=formidable-entries&frm_action=destroy&id='. $id .'&form='. $entry->form_id) ) ?>" class="submitdelete deletion" onclick="return confirm('<?php _e( 'Are you sure you want to delete that entry?', 'formidable' ) ?>');" title="<?php esc_attr_e( 'Delete' ) ?>"><?php _e( 'Delete' ) ?></a> |
|
23 | - <?php if ( ! empty($entry->post_id) ) { ?> |
|
24 | - <a href="<?php echo esc_url( admin_url('admin.php?page=formidable-entries&frm_action=destroy&id='. $id .'&form='. $entry->form_id .'&keep_post=1') ) ?>" class="submitdelete deletion frm_delete_wo_post" onclick="return confirm('<?php esc_attr_e( 'Are you sure you want to delete this entry?', 'formidable' ) ?>);" title="<?php esc_attr_e( 'Delete entry but leave the post', 'formidable' ) ?>"><?php _e( 'Delete without Post', 'formidable' ) ?></a> |
|
22 | + <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-entries&frm_action=destroy&id=' . $id . '&form=' . $entry->form_id ) ) ?>" class="submitdelete deletion" onclick="return confirm('<?php _e( 'Are you sure you want to delete that entry?', 'formidable' ) ?>');" title="<?php esc_attr_e( 'Delete' ) ?>"><?php _e( 'Delete' ) ?></a> |
|
23 | + <?php if ( ! empty( $entry->post_id ) ) { ?> |
|
24 | + <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-entries&frm_action=destroy&id=' . $id . '&form=' . $entry->form_id . '&keep_post=1' ) ) ?>" class="submitdelete deletion frm_delete_wo_post" onclick="return confirm('<?php esc_attr_e( 'Are you sure you want to delete this entry?', 'formidable' ) ?>);" title="<?php esc_attr_e( 'Delete entry but leave the post', 'formidable' ) ?>"><?php _e( 'Delete without Post', 'formidable' ) ?></a> |
|
25 | 25 | <?php } ?> |
26 | 26 | </div> |
27 | 27 | <?php } ?> |
28 | 28 | |
29 | - <?php do_action('frm_entry_major_pub', $entry); ?> |
|
29 | + <?php do_action( 'frm_entry_major_pub', $entry ); ?> |
|
30 | 30 | <div class="clear"></div> |
31 | 31 | </div> |
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | </div> |
35 | -<?php do_action('frm_show_entry_sidebar', $entry); |
|
36 | -FrmEntriesController::entry_sidebar($entry); |
|
35 | +<?php do_action( 'frm_show_entry_sidebar', $entry ); |
|
36 | +FrmEntriesController::entry_sidebar( $entry ); |
|
37 | 37 | ?> |
38 | 38 | </div> |
@@ -4,18 +4,18 @@ discard block |
||
4 | 4 | <meta charset="<?php bloginfo( 'charset' ); ?>" /> |
5 | 5 | <title><?php bloginfo('name'); ?></title> |
6 | 6 | <?php |
7 | - wp_admin_css( 'global' ); |
|
8 | - wp_admin_css(); |
|
9 | - wp_admin_css( 'colors' ); |
|
10 | - wp_admin_css( 'ie' ); |
|
7 | + wp_admin_css( 'global' ); |
|
8 | + wp_admin_css(); |
|
9 | + wp_admin_css( 'colors' ); |
|
10 | + wp_admin_css( 'ie' ); |
|
11 | 11 | if ( is_multisite() ) { |
12 | - wp_admin_css( 'ms' ); |
|
12 | + wp_admin_css( 'ms' ); |
|
13 | 13 | } |
14 | 14 | |
15 | - do_action('admin_print_styles'); |
|
16 | - do_action('admin_print_scripts'); |
|
15 | + do_action('admin_print_styles'); |
|
16 | + do_action('admin_print_scripts'); |
|
17 | 17 | |
18 | - ?> |
|
18 | + ?> |
|
19 | 19 | </head> |
20 | 20 | <body class="wp-admin no-js wp-core-ui frm_field_opts_popup <?php echo esc_attr( apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class ); ?>"> |
21 | 21 | <div class="frm_med_padding"> |
@@ -29,21 +29,21 @@ discard block |
||
29 | 29 | <?php |
30 | 30 | $other_array = array(); |
31 | 31 | foreach ( $field->options as $fkey => $fopt ) { |
32 | - //If it is an other option, don't include it |
|
33 | - if ( $fkey && strpos( $fkey, 'other') !== false ) { |
|
34 | - continue; |
|
35 | - } |
|
32 | + //If it is an other option, don't include it |
|
33 | + if ( $fkey && strpos( $fkey, 'other') !== false ) { |
|
34 | + continue; |
|
35 | + } |
|
36 | 36 | if ( is_array( $fopt ) ) { |
37 | - $label = (isset($fopt['label'])) ? $fopt['label'] : reset($fopt); |
|
38 | - $value = (isset($fopt['value'])) ? $fopt['value'] : $label; |
|
37 | + $label = (isset($fopt['label'])) ? $fopt['label'] : reset($fopt); |
|
38 | + $value = (isset($fopt['value'])) ? $fopt['value'] : $label; |
|
39 | 39 | if ( $label != $value && FrmField::is_option_true( $field, 'separate_value' ) ) { |
40 | - echo "$label|$value\n"; |
|
40 | + echo "$label|$value\n"; |
|
41 | 41 | } else { |
42 | - echo $label ."\n"; |
|
43 | - } |
|
42 | + echo $label ."\n"; |
|
43 | + } |
|
44 | 44 | } else { |
45 | - echo $fopt ."\n"; |
|
46 | - } |
|
45 | + echo $fopt ."\n"; |
|
46 | + } |
|
47 | 47 | } ?> |
48 | 48 | </textarea> |
49 | 49 |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <html <?php language_attributes(); ?>> |
3 | 3 | <head> |
4 | 4 | <meta charset="<?php bloginfo( 'charset' ); ?>" /> |
5 | - <title><?php bloginfo('name'); ?></title> |
|
5 | + <title><?php bloginfo( 'name' ); ?></title> |
|
6 | 6 | <?php |
7 | 7 | wp_admin_css( 'global' ); |
8 | 8 | wp_admin_css(); |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | wp_admin_css( 'ms' ); |
13 | 13 | } |
14 | 14 | |
15 | - do_action('admin_print_styles'); |
|
16 | - do_action('admin_print_scripts'); |
|
15 | + do_action( 'admin_print_styles' ); |
|
16 | + do_action( 'admin_print_scripts' ); |
|
17 | 17 | |
18 | 18 | ?> |
19 | 19 | </head> |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | <p class="howto"><?php _e( 'Edit or add field options (one per line)', 'formidable' ) ?></p> |
23 | 23 | <ul class="frm_prepop"> |
24 | 24 | <?php foreach ( $prepop as $label => $pop ) { ?> |
25 | - <li><a href="javascript:void(0)" onclick='frmPrePop(<?php echo str_replace("'", '‘', json_encode($pop)) ?>); return false;'><?php echo esc_html( $label ) ?></a></li> |
|
25 | + <li><a href="javascript:void(0)" onclick='frmPrePop(<?php echo str_replace( "'", '‘', json_encode( $pop ) ) ?>); return false;'><?php echo esc_html( $label ) ?></a></li> |
|
26 | 26 | <?php } ?> |
27 | 27 | </ul> |
28 | 28 | <textarea name="frm_bulk_options" id="frm_bulk_options"> |
@@ -30,19 +30,19 @@ discard block |
||
30 | 30 | $other_array = array(); |
31 | 31 | foreach ( $field->options as $fkey => $fopt ) { |
32 | 32 | //If it is an other option, don't include it |
33 | - if ( $fkey && strpos( $fkey, 'other') !== false ) { |
|
33 | + if ( $fkey && strpos( $fkey, 'other' ) !== false ) { |
|
34 | 34 | continue; |
35 | 35 | } |
36 | 36 | if ( is_array( $fopt ) ) { |
37 | - $label = (isset($fopt['label'])) ? $fopt['label'] : reset($fopt); |
|
38 | - $value = (isset($fopt['value'])) ? $fopt['value'] : $label; |
|
37 | + $label = ( isset( $fopt['label'] ) ) ? $fopt['label'] : reset( $fopt ); |
|
38 | + $value = ( isset( $fopt['value'] ) ) ? $fopt['value'] : $label; |
|
39 | 39 | if ( $label != $value && FrmField::is_option_true( $field, 'separate_value' ) ) { |
40 | 40 | echo "$label|$value\n"; |
41 | 41 | } else { |
42 | - echo $label ."\n"; |
|
42 | + echo $label . "\n"; |
|
43 | 43 | } |
44 | 44 | } else { |
45 | - echo $fopt ."\n"; |
|
45 | + echo $fopt . "\n"; |
|
46 | 46 | } |
47 | 47 | } ?> |
48 | 48 | </textarea> |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | if ( ! is_array($field['options']) ) { |
3 | - return; |
|
3 | + return; |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | foreach ( $field['options'] as $opt_key => $opt ) { |
7 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
8 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
7 | + $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
8 | + $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
9 | 9 | |
10 | - // Get string for Other text field, if needed |
|
10 | + // Get string for Other text field, if needed |
|
11 | 11 | $other_val = FrmFieldsHelper::get_other_val( compact( 'opt_key', 'field' ) ); |
12 | 12 | |
13 | - $checked = ( $other_val || isset($field['value']) && (( ! is_array($field['value']) && $field['value'] == $field_val ) || (is_array($field['value']) && in_array($field_val, $field['value']) ) ) ) ? ' checked="checked"':''; |
|
13 | + $checked = ( $other_val || isset($field['value']) && (( ! is_array($field['value']) && $field['value'] == $field_val ) || (is_array($field['value']) && in_array($field_val, $field['value']) ) ) ) ? ' checked="checked"':''; |
|
14 | 14 | |
15 | 15 | if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) { |
16 | - include(FrmAppHelper::plugin_path() .'/pro/classes/views/frmpro-fields/other-option.php'); |
|
17 | - } else { |
|
18 | - include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/single-option.php'); |
|
19 | - } |
|
16 | + include(FrmAppHelper::plugin_path() .'/pro/classes/views/frmpro-fields/other-option.php'); |
|
17 | + } else { |
|
18 | + include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/single-option.php'); |
|
19 | + } |
|
20 | 20 | |
21 | - unset($checked, $other_val); |
|
21 | + unset($checked, $other_val); |
|
22 | 22 | } |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | -if ( ! is_array($field['options']) ) { |
|
2 | +if ( ! is_array( $field['options'] ) ) { |
|
3 | 3 | return; |
4 | 4 | } |
5 | 5 | |
6 | 6 | foreach ( $field['options'] as $opt_key => $opt ) { |
7 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
8 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
7 | + $field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field ); |
|
8 | + $opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field ); |
|
9 | 9 | |
10 | 10 | // Get string for Other text field, if needed |
11 | 11 | $other_val = FrmFieldsHelper::get_other_val( compact( 'opt_key', 'field' ) ); |
12 | 12 | |
13 | - $checked = ( $other_val || isset($field['value']) && (( ! is_array($field['value']) && $field['value'] == $field_val ) || (is_array($field['value']) && in_array($field_val, $field['value']) ) ) ) ? ' checked="checked"':''; |
|
13 | + $checked = ( $other_val || isset( $field['value'] ) && ( ( ! is_array( $field['value'] ) && $field['value'] == $field_val ) || ( is_array( $field['value'] ) && in_array( $field_val, $field['value'] ) ) ) ) ? ' checked="checked"' : ''; |
|
14 | 14 | |
15 | 15 | if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) { |
16 | - include(FrmAppHelper::plugin_path() .'/pro/classes/views/frmpro-fields/other-option.php'); |
|
16 | + include( FrmAppHelper::plugin_path() . '/pro/classes/views/frmpro-fields/other-option.php' ); |
|
17 | 17 | } else { |
18 | - include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/single-option.php'); |
|
18 | + include( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/single-option.php' ); |
|
19 | 19 | } |
20 | 20 | |
21 | - unset($checked, $other_val); |
|
21 | + unset( $checked, $other_val ); |
|
22 | 22 | } |
@@ -2,39 +2,39 @@ discard block |
||
2 | 2 | <input type="text" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" value="<?php echo esc_attr( $field['default_value'] ); ?>" <?php echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; ?> class="dyn_default_value" /> |
3 | 3 | <?php } else if ( $field['type'] == 'textarea' ) { ?> |
4 | 4 | <textarea name="<?php echo esc_attr( $field_name ) ?>" <?php |
5 | - echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; |
|
6 | - ?> rows="<?php echo esc_attr( $field['max'] ); ?>" id="<?php echo esc_attr( $html_id ) ?>" class="dyn_default_value"><?php echo FrmAppHelper::esc_textarea(force_balance_tags($field['default_value'])); ?></textarea> |
|
5 | + echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; |
|
6 | + ?> rows="<?php echo esc_attr( $field['max'] ); ?>" id="<?php echo esc_attr( $html_id ) ?>" class="dyn_default_value"><?php echo FrmAppHelper::esc_textarea(force_balance_tags($field['default_value'])); ?></textarea> |
|
7 | 7 | |
8 | 8 | <?php |
9 | 9 | |
10 | 10 | } else if ( $field['type'] == 'radio' || $field['type'] == 'checkbox' ) { |
11 | - $field['default_value'] = maybe_unserialize($field['default_value']); |
|
12 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
11 | + $field['default_value'] = maybe_unserialize($field['default_value']); |
|
12 | + if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
13 | 13 | do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) ); |
14 | - } else { |
|
15 | - do_action('frm_add_multiple_opts_labels', $field); ?> |
|
14 | + } else { |
|
15 | + do_action('frm_add_multiple_opts_labels', $field); ?> |
|
16 | 16 | <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo (count($field['options']) > 10) ? ' frm_field_opts_list' : ''; ?>"> |
17 | 17 | <?php include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/radio.php'); ?> |
18 | 18 | </ul> |
19 | 19 | <?php |
20 | - } |
|
20 | + } |
|
21 | 21 | } else if ( $field['type'] == 'select' ) { |
22 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
22 | + if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
23 | 23 | echo FrmFieldsHelper::dropdown_categories( array( 'name' => $field_name, 'field' => $field ) ); |
24 | - } else { ?> |
|
24 | + } else { ?> |
|
25 | 25 | <select name="<?php echo esc_attr( $field_name ) . ( FrmField::is_option_true( $field, 'multiple' ) ? '[]' : '' ); ?>" <?php |
26 | 26 | echo FrmField::is_option_true( $field, 'size' ) ? 'class="auto_width"' : ''; |
27 | 27 | echo FrmField::is_option_true( $field, 'multiple' ) ? ' multiple="multiple"' : ''; ?> > |
28 | 28 | <?php foreach ( $field['options'] as $opt_key => $opt ) { |
29 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
30 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
29 | + $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
30 | + $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
31 | 31 | $selected = ( $field['default_value'] == $field_val || FrmFieldsHelper::get_other_val( array( 'opt_key', 'field' ) ) ) ? ' selected="selected"' : ''; ?> |
32 | 32 | <option value="<?php echo esc_attr( $field_val ) ?>"<?php echo $selected ?>><?php echo esc_html( $opt ) ?> </option> |
33 | 33 | <?php } ?> |
34 | 34 | </select> |
35 | 35 | <?php } |
36 | 36 | |
37 | - if ( $display['default_blank'] ) { ?> |
|
37 | + if ( $display['default_blank'] ) { ?> |
|
38 | 38 | <span id="frm_clear_on_focus_<?php echo esc_attr( $field['id'] ) ?>" class="frm_clear_on_focus frm-show-click"> |
39 | 39 | <?php FrmFieldsHelper::show_default_blank_js( $field['default_blank'] ); ?> |
40 | 40 | </span> |
@@ -49,17 +49,17 @@ discard block |
||
49 | 49 | <?php FrmFieldsHelper::show_single_option($field); ?> |
50 | 50 | </ul> |
51 | 51 | <?php |
52 | - } ?> |
|
52 | + } ?> |
|
53 | 53 | </div> |
54 | 54 | <?php |
55 | 55 | } else if ( $field['type'] == 'captcha' ) { |
56 | 56 | if ( empty($frm_settings->pubkey) ) { ?> |
57 | 57 | <div class="howto frm_no_captcha_text"><?php printf(__( 'Your captcha will not appear on your form until you %1$sset up%2$s the Site and Private Keys', 'formidable' ), '<a href="?page=formidable-settings">', '</a>') ?></div> |
58 | 58 | <?php |
59 | - } ?> |
|
59 | + } ?> |
|
60 | 60 | <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/recaptcha.png' ) ?>" class="recaptcha_placeholder" alt="reCaptcha"/> |
61 | 61 | <input type="hidden" name="<?php echo esc_attr( $field_name ) ?>" value="1" /> |
62 | 62 | <?php |
63 | 63 | } else { |
64 | - do_action( 'frm_display_added_fields', $field ); |
|
64 | + do_action( 'frm_display_added_fields', $field ); |
|
65 | 65 | } |
@@ -1,33 +1,33 @@ discard block |
||
1 | 1 | <?php if ( in_array( $display['type'], array( 'text', 'website', 'email', 'url' ) ) ) { ?> |
2 | - <input type="text" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" value="<?php echo esc_attr( $field['default_value'] ); ?>" <?php echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; ?> class="dyn_default_value" /> |
|
2 | + <input type="text" name="<?php echo esc_attr( $field_name ) ?>" id="<?php echo esc_attr( $html_id ) ?>" value="<?php echo esc_attr( $field['default_value'] ); ?>" <?php echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:' . $field['size'] . ( is_numeric( $field['size'] ) ? 'px' : '' ) . ';"' ) : ''; ?> class="dyn_default_value" /> |
|
3 | 3 | <?php } else if ( $field['type'] == 'textarea' ) { ?> |
4 | 4 | <textarea name="<?php echo esc_attr( $field_name ) ?>" <?php |
5 | - echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:'. $field['size'] . ( is_numeric($field['size']) ? 'px' : '') .';"' ) : ''; |
|
6 | - ?> rows="<?php echo esc_attr( $field['max'] ); ?>" id="<?php echo esc_attr( $html_id ) ?>" class="dyn_default_value"><?php echo FrmAppHelper::esc_textarea(force_balance_tags($field['default_value'])); ?></textarea> |
|
5 | + echo ( FrmField::is_option_true( $field, 'size' ) ) ? esc_attr( 'style="width:' . $field['size'] . ( is_numeric( $field['size'] ) ? 'px' : '' ) . ';"' ) : ''; |
|
6 | + ?> rows="<?php echo esc_attr( $field['max'] ); ?>" id="<?php echo esc_attr( $html_id ) ?>" class="dyn_default_value"><?php echo FrmAppHelper::esc_textarea( force_balance_tags( $field['default_value'] ) ); ?></textarea> |
|
7 | 7 | |
8 | 8 | <?php |
9 | 9 | |
10 | 10 | } else if ( $field['type'] == 'radio' || $field['type'] == 'checkbox' ) { |
11 | - $field['default_value'] = maybe_unserialize($field['default_value']); |
|
12 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
11 | + $field['default_value'] = maybe_unserialize( $field['default_value'] ); |
|
12 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
13 | 13 | do_action( 'frm_after_checkbox', array( 'field' => $field, 'field_name' => $field_name, 'type' => $field['type'] ) ); |
14 | 14 | } else { |
15 | - do_action('frm_add_multiple_opts_labels', $field); ?> |
|
16 | - <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo (count($field['options']) > 10) ? ' frm_field_opts_list' : ''; ?>"> |
|
17 | - <?php include(FrmAppHelper::plugin_path() .'/classes/views/frm-fields/radio.php'); ?> |
|
15 | + do_action( 'frm_add_multiple_opts_labels', $field ); ?> |
|
16 | + <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo ( count( $field['options'] ) > 10 ) ? ' frm_field_opts_list' : ''; ?>"> |
|
17 | + <?php include( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/radio.php' ); ?> |
|
18 | 18 | </ul> |
19 | 19 | <?php |
20 | 20 | } |
21 | 21 | } else if ( $field['type'] == 'select' ) { |
22 | - if ( isset($field['post_field']) && $field['post_field'] == 'post_category' ) { |
|
22 | + if ( isset( $field['post_field'] ) && $field['post_field'] == 'post_category' ) { |
|
23 | 23 | echo FrmFieldsHelper::dropdown_categories( array( 'name' => $field_name, 'field' => $field ) ); |
24 | 24 | } else { ?> |
25 | 25 | <select name="<?php echo esc_attr( $field_name ) . ( FrmField::is_option_true( $field, 'multiple' ) ? '[]' : '' ); ?>" <?php |
26 | 26 | echo FrmField::is_option_true( $field, 'size' ) ? 'class="auto_width"' : ''; |
27 | 27 | echo FrmField::is_option_true( $field, 'multiple' ) ? ' multiple="multiple"' : ''; ?> > |
28 | 28 | <?php foreach ( $field['options'] as $opt_key => $opt ) { |
29 | - $field_val = apply_filters('frm_field_value_saved', $opt, $opt_key, $field); |
|
30 | - $opt = apply_filters('frm_field_label_seen', $opt, $opt_key, $field); |
|
29 | + $field_val = apply_filters( 'frm_field_value_saved', $opt, $opt_key, $field ); |
|
30 | + $opt = apply_filters( 'frm_field_label_seen', $opt, $opt_key, $field ); |
|
31 | 31 | $selected = ( $field['default_value'] == $field_val || FrmFieldsHelper::get_other_val( array( 'opt_key', 'field' ) ) ) ? ' selected="selected"' : ''; ?> |
32 | 32 | <option value="<?php echo esc_attr( $field_val ) ?>"<?php echo $selected ?>><?php echo esc_html( $opt ) ?> </option> |
33 | 33 | <?php } ?> |
@@ -44,17 +44,17 @@ discard block |
||
44 | 44 | <?php |
45 | 45 | |
46 | 46 | if ( ! isset( $field['post_field'] ) || ! in_array( $field['post_field'], array( 'post_category' ) ) ) { ?> |
47 | - <?php do_action('frm_add_multiple_opts_labels', $field); ?> |
|
48 | - <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' : ''; ?>"> |
|
49 | - <?php FrmFieldsHelper::show_single_option($field); ?> |
|
47 | + <?php do_action( 'frm_add_multiple_opts_labels', $field ); ?> |
|
48 | + <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' : ''; ?>"> |
|
49 | + <?php FrmFieldsHelper::show_single_option( $field ); ?> |
|
50 | 50 | </ul> |
51 | 51 | <?php |
52 | 52 | } ?> |
53 | 53 | </div> |
54 | 54 | <?php |
55 | 55 | } else if ( $field['type'] == 'captcha' ) { |
56 | - if ( empty($frm_settings->pubkey) ) { ?> |
|
57 | - <div class="howto frm_no_captcha_text"><?php printf(__( 'Your captcha will not appear on your form until you %1$sset up%2$s the Site and Private Keys', 'formidable' ), '<a href="?page=formidable-settings">', '</a>') ?></div> |
|
56 | + if ( empty( $frm_settings->pubkey ) ) { ?> |
|
57 | + <div class="howto frm_no_captcha_text"><?php printf( __( 'Your captcha will not appear on your form until you %1$sset up%2$s the Site and Private Keys', 'formidable' ), '<a href="?page=formidable-settings">', '</a>' ) ?></div> |
|
58 | 58 | <?php |
59 | 59 | } ?> |
60 | 60 | <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/recaptcha.png' ) ?>" class="recaptcha_placeholder" alt="reCaptcha"/> |