Completed
Push — master ( bcc365...341fb6 )
by Jamie
04:07
created
classes/views/frm-settings/form.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
     <div class="frmicon icon32"><br/></div>
3 3
     <h1><?php _e( 'Global Settings', 'formidable' ); ?></h1>
4 4
 
5
-    <?php require(FrmAppHelper::plugin_path() .'/classes/views/shared/errors.php'); ?>
5
+    <?php require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
6 6
 
7 7
     <div id="poststuff" class="metabox-holder">
8 8
     <div id="post-body">
@@ -15,21 +15,21 @@  discard block
 block discarded – undo
15 15
         <div class="contextual-help-tabs">
16 16
         <ul class="frm-category-tabs">
17 17
 			<?php $a = FrmAppHelper::simple_get( 't', 'sanitize_title', 'general_settings' ); ?>
18
-        	<li <?php echo ($a == 'general_settings') ? 'class="tabs active"' : '' ?>><a href="#general_settings" class="frm_cursor_pointer"><?php _e( 'General', 'formidable' ) ?></a></li>
18
+        	<li <?php echo ( $a == 'general_settings' ) ? 'class="tabs active"' : '' ?>><a href="#general_settings" class="frm_cursor_pointer"><?php _e( 'General', 'formidable' ) ?></a></li>
19 19
 			<?php foreach ( $sections as $sec_name => $section ) { ?>
20
-                <li <?php echo ($a == $sec_name .'_settings') ? 'class="tabs active"' : '' ?>><a href="#<?php echo esc_attr( $sec_name ) ?>_settings"><?php echo isset($section['name']) ? $section['name'] : ucfirst($sec_name) ?></a></li>
20
+                <li <?php echo ( $a == $sec_name . '_settings' ) ? 'class="tabs active"' : '' ?>><a href="#<?php echo esc_attr( $sec_name ) ?>_settings"><?php echo isset( $section['name'] ) ? $section['name'] : ucfirst( $sec_name ) ?></a></li>
21 21
             <?php } ?>
22 22
         </ul>
23 23
         </div>
24 24
 
25
-    <?php do_action('frm_before_settings'); ?>
25
+    <?php do_action( 'frm_before_settings' ); ?>
26 26
 
27 27
 	<form name="frm_settings_form" method="post" class="frm_settings_form" action="?page=formidable-settings<?php echo ( $a ? '&amp;t=' . $a : '' ); ?>">
28 28
         <input type="hidden" name="frm_action" value="process-form" />
29 29
         <input type="hidden" name="action" value="process-form" />
30
-        <?php wp_nonce_field('process_form_nonce', 'process_form'); ?>
30
+        <?php wp_nonce_field( 'process_form_nonce', 'process_form' ); ?>
31 31
 
32
-        <div class="general_settings tabs-panel <?php echo ($a == 'general_settings') ? 'frm_block' : 'frm_hidden'; ?>">
32
+        <div class="general_settings tabs-panel <?php echo ( $a == 'general_settings' ) ? 'frm_block' : 'frm_hidden'; ?>">
33 33
             <p class="submit">
34 34
 				<input class="button-primary" type="submit" value="<?php esc_attr_e( 'Update Options', 'formidable' ) ?>" />
35 35
             </p>
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
38 38
 
39 39
             <p><label class="frm_left_label"><?php _e( 'Load Formidable styling', 'formidable' ) ?></label>
40 40
                 <select id="frm_load_style" name="frm_load_style">
41
-                <option value="all" <?php selected($frm_settings->load_style, 'all') ?>><?php _e( 'on every page of your site', 'formidable' ) ?></option>
42
-                <option value="dynamic" <?php selected($frm_settings->load_style, 'dynamic') ?>><?php _e( 'only on applicable pages', 'formidable' ) ?></option>
43
-                <option value="none" <?php selected($frm_settings->load_style, 'none') ?>><?php _e( 'Don\'t use Formidable styling on any page', 'formidable' ) ?></option>
41
+                <option value="all" <?php selected( $frm_settings->load_style, 'all' ) ?>><?php _e( 'on every page of your site', 'formidable' ) ?></option>
42
+                <option value="dynamic" <?php selected( $frm_settings->load_style, 'dynamic' ) ?>><?php _e( 'only on applicable pages', 'formidable' ) ?></option>
43
+                <option value="none" <?php selected( $frm_settings->load_style, 'none' ) ?>><?php _e( 'Don\'t use Formidable styling on any page', 'formidable' ) ?></option>
44 44
                 </select>
45 45
             </p>
46 46
 
47 47
             <p>
48 48
 				<label for="frm_use_html">
49
-					<input type="checkbox" id="frm_use_html" name="frm_use_html" value="1" <?php checked($frm_settings->use_html, 1) ?>	> <?php _e( 'Use HTML5 in forms', 'formidable' ) ?>
49
+					<input type="checkbox" id="frm_use_html" name="frm_use_html" value="1" <?php checked( $frm_settings->use_html, 1 ) ?>	> <?php _e( 'Use HTML5 in forms', 'formidable' ) ?>
50 50
 				</label>
51 51
 				<span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'We recommend using HTML 5 for your forms. It adds some nifty options like placeholders, patterns, and autocomplete.', 'formidable' ) ?>"></span>
52 52
             </p>
53 53
 
54
-            <?php do_action('frm_style_general_settings', $frm_settings); ?>
54
+            <?php do_action( 'frm_style_general_settings', $frm_settings ); ?>
55 55
 
56 56
 			<h3><?php _e( 'User Permissions', 'formidable' ); ?>
57 57
 				<span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'Select users that are allowed access to Formidable. Without access to View Forms, users will be unable to see the Formidable menu.', 'formidable' ) ?>"></span>
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
 			</p>
75 75
 
76 76
 			<p><label class="frm_left_label"><?php _e( 'Site Key', 'formidable' ) ?></label>
77
-			<input type="text" name="frm_pubkey" id="frm_pubkey" size="42" value="<?php echo esc_attr($frm_settings->pubkey) ?>" /></p>
77
+			<input type="text" name="frm_pubkey" id="frm_pubkey" size="42" value="<?php echo esc_attr( $frm_settings->pubkey ) ?>" /></p>
78 78
 
79 79
 			<p><label class="frm_left_label"><?php _e( 'Private Key', 'formidable' ) ?></label>
80
-			<input type="text" name="frm_privkey" id="frm_privkey" size="42" value="<?php echo esc_attr($frm_settings->privkey) ?>" /></p>
80
+			<input type="text" name="frm_privkey" id="frm_privkey" size="42" value="<?php echo esc_attr( $frm_settings->privkey ) ?>" /></p>
81 81
 
82 82
 		    <p><label class="frm_left_label"><?php _e( 'reCAPTCHA Language', 'formidable' ) ?></label>
83 83
 			<select name="frm_re_lang" id="frm_re_lang">
84 84
 			    <?php foreach ( $captcha_lang as $lang => $lang_name ) { ?>
85
-				<option value="<?php echo esc_attr($lang) ?>" <?php selected($frm_settings->re_lang, $lang) ?>><?php echo esc_html( $lang_name ) ?></option>
85
+				<option value="<?php echo esc_attr( $lang ) ?>" <?php selected( $frm_settings->re_lang, $lang ) ?>><?php echo esc_html( $lang_name ) ?></option>
86 86
                 <?php } ?>
87 87
             </select></p>
88 88
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 			<label class="frm_left_label"><?php _e( 'Success Message', 'formidable' ); ?>
128 128
 				<span class="frm_help frm_icon_font frm_tooltip_icon" title="<?php esc_attr_e( 'The default message seen after a form is submitted.', 'formidable' ) ?>" ></span>
129 129
 			</label>
130
-            <input type="text" id="frm_success_msg" name="frm_success_msg" class="frm_with_left_label" value="<?php echo esc_attr($frm_settings->success_msg) ?>" />
130
+            <input type="text" id="frm_success_msg" name="frm_success_msg" class="frm_with_left_label" value="<?php echo esc_attr( $frm_settings->success_msg ) ?>" />
131 131
 		</p>
132 132
 
133 133
 		<p>
@@ -135,30 +135,30 @@  discard block
 block discarded – undo
135 135
 			<input type="text" value="<?php echo esc_attr( $frm_settings->submit_value ) ?>" id="frm_submit_value" name="frm_submit_value" class="frm_with_left_label" />
136 136
 		</p>
137 137
 
138
-        <?php do_action('frm_settings_form', $frm_settings); ?>
138
+        <?php do_action( 'frm_settings_form', $frm_settings ); ?>
139 139
 
140 140
         <?php if ( ! FrmAppHelper::pro_is_installed() ) { ?>
141 141
         <div class="clear"></div>
142 142
         <h3><?php _e( 'Miscellaneous', 'formidable' ) ?></h3>
143 143
         <?php } ?>
144 144
         <p><label class="frm_left_label"><?php _e( 'Admin menu label', 'formidable' ); ?></label>
145
-            <input type="text" name="frm_menu" id="frm_menu" value="<?php echo esc_attr($frm_settings->menu) ?>" />
145
+            <input type="text" name="frm_menu" id="frm_menu" value="<?php echo esc_attr( $frm_settings->menu ) ?>" />
146 146
             <?php if ( is_multisite() && is_super_admin() ) { ?>
147
-            <label for="frm_mu_menu"><input type="checkbox" name="frm_mu_menu" id="frm_mu_menu" value="1" <?php checked($frm_settings->mu_menu, 1) ?> /> <?php _e( 'Use this menu name site-wide', 'formidable' ); ?></label>
147
+            <label for="frm_mu_menu"><input type="checkbox" name="frm_mu_menu" id="frm_mu_menu" value="1" <?php checked( $frm_settings->mu_menu, 1 ) ?> /> <?php _e( 'Use this menu name site-wide', 'formidable' ); ?></label>
148 148
             <?php } ?>
149 149
         </p>
150 150
 
151 151
         <p><label class="frm_left_label"><?php _e( 'Preview Page', 'formidable' ); ?></label>
152
-        <?php FrmAppHelper::wp_pages_dropdown('frm-preview-page-id', $frm_settings->preview_page_id ) ?>
152
+        <?php FrmAppHelper::wp_pages_dropdown( 'frm-preview-page-id', $frm_settings->preview_page_id ) ?>
153 153
         </p>
154 154
 
155 155
     </div>
156 156
 
157 157
         <?php
158 158
 		foreach ( $sections as $sec_name => $section ) {
159
-			if ( $a == $sec_name .'_settings' ) { ?>
159
+			if ( $a == $sec_name . '_settings' ) { ?>
160 160
 <style type="text/css">.<?php echo esc_attr( $sec_name ) ?>_settings{display:block;}</style><?php }?>
161
-            <div id="<?php echo esc_attr( $sec_name ) ?>_settings" class="<?php echo esc_attr( $sec_name ) ?>_settings tabs-panel <?php echo ( $a == $sec_name .'_settings' ) ? 'frm_block' : 'frm_hidden'; ?>"><?php
161
+            <div id="<?php echo esc_attr( $sec_name ) ?>_settings" class="<?php echo esc_attr( $sec_name ) ?>_settings tabs-panel <?php echo ( $a == $sec_name . '_settings' ) ? 'frm_block' : 'frm_hidden'; ?>"><?php
162 162
 				if ( isset( $section['class'] ) ) {
163 163
 					call_user_func( array( $section['class'], $section['function'] ) );
164 164
 				} else {
Please login to merge, or discard this patch.