Passed
Pull Request — master (#195)
by Jonathan
06:35
created
templates/admin/fieldmaps-list.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1
-<h3><?php echo esc_html__( 'Fieldmaps', 'object-sync-for-salesforce' ); ?> <a class="page-title-action" href="<?php echo esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=add' ) ); ?>"><?php echo esc_html__( 'Add New', 'object-sync-for-salesforce' ); ?></a></h3>
1
+<h3><?php echo esc_html__('Fieldmaps', 'object-sync-for-salesforce'); ?> <a class="page-title-action" href="<?php echo esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=add')); ?>"><?php echo esc_html__('Add New', 'object-sync-for-salesforce'); ?></a></h3>
2 2
 <table class="widefat striped">
3 3
 	<thead>
4 4
 		<tr>
5
-			<th><?php echo esc_html__( 'Label', 'object-sync-for-salesforce' ); ?></th>
6
-			<th><?php echo esc_html__( 'WordPress Object', 'object-sync-for-salesforce' ); ?></th>
7
-			<th><?php echo esc_html__( 'Salesforce Object', 'object-sync-for-salesforce' ); ?></th>
8
-			<th colspan="3"><?php echo esc_html__( 'Actions', 'object-sync-for-salesforce' ); ?></th>
5
+			<th><?php echo esc_html__('Label', 'object-sync-for-salesforce'); ?></th>
6
+			<th><?php echo esc_html__('WordPress Object', 'object-sync-for-salesforce'); ?></th>
7
+			<th><?php echo esc_html__('Salesforce Object', 'object-sync-for-salesforce'); ?></th>
8
+			<th colspan="3"><?php echo esc_html__('Actions', 'object-sync-for-salesforce'); ?></th>
9 9
 		</tr>
10 10
 	</thead>
11 11
 	<tfoot>
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 				<p><small>
15 15
 					<?php
16 16
 					// translators: the placeholders refer to: 1) the cache clear link, 2) the cache clear link text
17
-					echo sprintf( esc_html__( 'Has your WordPress or Salesforce data structure changed? ', 'object-sync-for-salesforce' ) . '<a href="%1$s" id="clear-sfwp-cache">%2$s</a>' . esc_html__( ' to make sure you can map the most recent data structures.', 'object-sync-for-salesforce' ),
18
-						esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=clear_cache' ) ),
19
-						esc_html__( 'Clear the plugin cache' )
17
+					echo sprintf(esc_html__('Has your WordPress or Salesforce data structure changed? ', 'object-sync-for-salesforce') . '<a href="%1$s" id="clear-sfwp-cache">%2$s</a>' . esc_html__(' to make sure you can map the most recent data structures.', 'object-sync-for-salesforce'),
18
+						esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=clear_cache')),
19
+						esc_html__('Clear the plugin cache')
20 20
 					);
21 21
 					?>
22 22
 				</small></p>
@@ -24,20 +24,20 @@  discard block
 block discarded – undo
24 24
 		</tr>
25 25
 	</tfoot>
26 26
 	<tbody>
27
-		<?php if ( count( $fieldmaps ) > 0 ) : ?>
28
-			<?php foreach ( $fieldmaps as $record ) { ?>
27
+		<?php if (count($fieldmaps) > 0) : ?>
28
+			<?php foreach ($fieldmaps as $record) { ?>
29 29
 		<tr>
30
-			<td><?php echo esc_html( $record['label'] ); ?></td>
31
-			<td><?php echo esc_html( $record['wordpress_object'] ); ?></td>
32
-			<td><?php echo esc_html( $record['salesforce_object'] ); ?></td>
30
+			<td><?php echo esc_html($record['label']); ?></td>
31
+			<td><?php echo esc_html($record['wordpress_object']); ?></td>
32
+			<td><?php echo esc_html($record['salesforce_object']); ?></td>
33 33
 			<td>
34
-				<a href="<?php echo esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=edit&id=' . $record['id'] ) ); ?>"><?php echo esc_html__( 'Edit', 'object-sync-for-salesforce' ); ?></a>
34
+				<a href="<?php echo esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=edit&id=' . $record['id'])); ?>"><?php echo esc_html__('Edit', 'object-sync-for-salesforce'); ?></a>
35 35
 			</td>
36 36
 			<td>
37
-				<a href="<?php echo esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=clone&id=' . $record['id'] ) ); ?>"><?php echo esc_html__( 'Clone', 'object-sync-for-salesforce' ); ?></a>
37
+				<a href="<?php echo esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=clone&id=' . $record['id'])); ?>"><?php echo esc_html__('Clone', 'object-sync-for-salesforce'); ?></a>
38 38
 			</td>
39 39
 			<td>
40
-				<a href="<?php echo esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=delete&id=' . $record['id'] ) ); ?>"><?php echo esc_html__( 'Delete', 'object-sync-for-salesforce' ); ?></a>
40
+				<a href="<?php echo esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=delete&id=' . $record['id'])); ?>"><?php echo esc_html__('Delete', 'object-sync-for-salesforce'); ?></a>
41 41
 			</td>
42 42
 		</tr>
43 43
 			<?php } ?>
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 				<p>
48 48
 				<?php
49 49
 					// translators: the placeholders refer to: 1) the fieldmap label, 2) the saleforce object name, and 3) the WordPress object name
50
-					echo sprintf( esc_html__( 'No fieldmaps exist yet. You can ', 'object-sync-for-salesforce' ) . '<a href="%1$s">%2$s</a>.',
51
-						esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=add' ) ),
52
-						esc_html__( 'add one' )
50
+					echo sprintf(esc_html__('No fieldmaps exist yet. You can ', 'object-sync-for-salesforce') . '<a href="%1$s">%2$s</a>.',
51
+						esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=add')),
52
+						esc_html__('add one')
53 53
 					);
54 54
 				?>
55 55
 				</p>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
 			</td>
42 42
 		</tr>
43 43
 			<?php } ?>
44
-		<?php else : ?>
44
+		<?php else {
45
+	: ?>
45 46
 		<tr>
46 47
 			<td colspan="4">
47 48
 				<p>
@@ -51,6 +52,7 @@  discard block
 block discarded – undo
51 52
 						esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=add' ) ),
52 53
 						esc_html__( 'add one' )
53 54
 					);
55
+}
54 56
 				?>
55 57
 				</p>
56 58
 			</td>
Please login to merge, or discard this patch.
templates/admin/settings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <form method="post" action="options.php">
2 2
 	<?php
3
-		settings_fields( $tab ) . do_settings_sections( $tab );
4
-		submit_button( esc_html__( 'Save settings', 'object-sync-for-salesforce' ) );
3
+		settings_fields($tab) . do_settings_sections($tab);
4
+		submit_button(esc_html__('Save settings', 'object-sync-for-salesforce'));
5 5
 	?>
6 6
 </form>
Please login to merge, or discard this patch.
templates/admin/notice.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1
-<div class="notice<?php echo esc_attr( $class ); ?><?php echo esc_attr( $dismissible ); ?>">
2
-	<p><?php echo esc_html( $message ); ?></p>
1
+<div class="notice<?php echo esc_attr($class); ?><?php echo esc_attr($dismissible); ?>">
2
+	<p><?php echo esc_html($message); ?></p>
3 3
 </div>
Please login to merge, or discard this patch.
templates/admin/fieldmaps-delete.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1
-<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
2
-	<input type="hidden" name="redirect_url_error" value="<?php echo esc_url( $error_url ); ?>" />
3
-	<input type="hidden" name="redirect_url_success" value="<?php echo esc_url( $success_url ); ?>" />
4
-	<input type="hidden" name="id" value="<?php echo absint( $map['id'] ); ?>" />
1
+<form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>">
2
+	<input type="hidden" name="redirect_url_error" value="<?php echo esc_url($error_url); ?>" />
3
+	<input type="hidden" name="redirect_url_success" value="<?php echo esc_url($success_url); ?>" />
4
+	<input type="hidden" name="id" value="<?php echo absint($map['id']); ?>" />
5 5
 	<input type="hidden" name="action" value="delete_fieldmap">
6
-	<h2><?php echo esc_html__( 'Are you sure you want to delete this fieldmap?', 'object-sync-for-salesforce' ); ?></h2>
6
+	<h2><?php echo esc_html__('Are you sure you want to delete this fieldmap?', 'object-sync-for-salesforce'); ?></h2>
7 7
 	<p>
8 8
 	<?php
9 9
 		// translators: the placeholders refer to: 1) the fieldmap label, 2) the saleforce object name, and 3) the WordPress object name
10
-		echo sprintf( esc_html__( 'This fieldmap is called %1$s and it maps the Salesforce %2$s object to the WordPress %3$s object.', 'object-sync-for-salesforce' ),
11
-			'<strong> ' . esc_html( $map['label'] ) . '</strong>',
12
-			esc_html( $map['salesforce_object'] ),
13
-			esc_html( $map['wordpress_object'] )
10
+		echo sprintf(esc_html__('This fieldmap is called %1$s and it maps the Salesforce %2$s object to the WordPress %3$s object.', 'object-sync-for-salesforce'),
11
+			'<strong> ' . esc_html($map['label']) . '</strong>',
12
+			esc_html($map['salesforce_object']),
13
+			esc_html($map['wordpress_object'])
14 14
 		);
15 15
 	?>
16 16
 	</p>
17
-	<?php submit_button( esc_html__( 'Confirm deletion', 'object-sync-for-salesforce' ) ); ?>
17
+	<?php submit_button(esc_html__('Confirm deletion', 'object-sync-for-salesforce')); ?>
18 18
 </form>
Please login to merge, or discard this patch.
templates/admin/mapping-errors-edit.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@
 block discarded – undo
1
-<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" class="fieldmap">
2
-	<input type="hidden" name="redirect_url_error" value="<?php echo esc_url( $error_url ); ?>" />
3
-	<input type="hidden" name="redirect_url_success" value="<?php echo esc_url( $success_url ); ?>" />
4
-	<?php if ( isset( $transient ) ) { ?>
5
-	<input type="hidden" name="transient" value="<?php echo esc_html( $transient ); ?>" />
1
+<form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>" class="fieldmap">
2
+	<input type="hidden" name="redirect_url_error" value="<?php echo esc_url($error_url); ?>" />
3
+	<input type="hidden" name="redirect_url_success" value="<?php echo esc_url($success_url); ?>" />
4
+	<?php if (isset($transient)) { ?>
5
+	<input type="hidden" name="transient" value="<?php echo esc_html($transient); ?>" />
6 6
 	<?php } ?>
7 7
 	<input type="hidden" name="action" value="post_object_map" >
8
-	<input type="hidden" name="method" value="<?php echo esc_attr( $method ); ?>" />
9
-	<?php if ( 'edit' === $method ) { ?>
10
-	<input type="hidden" name="id" value="<?php echo absint( $map_row['id'] ); ?>" />
8
+	<input type="hidden" name="method" value="<?php echo esc_attr($method); ?>" />
9
+	<?php if ('edit' === $method) { ?>
10
+	<input type="hidden" name="id" value="<?php echo absint($map_row['id']); ?>" />
11 11
 	<?php } ?>
12 12
 	<div class="wordpress_id">
13
-		<label for="wordpress_id"><?php echo esc_html__( 'WordPress Id', 'object-sync-for-salesforce' ); ?>: </label>
14
-		<input type="text" id="wordpress_id" name="wordpress_id" required value="<?php echo isset( $wordpress_id ) ? esc_html( $wordpress_id ) : ''; ?>" />
13
+		<label for="wordpress_id"><?php echo esc_html__('WordPress Id', 'object-sync-for-salesforce'); ?>: </label>
14
+		<input type="text" id="wordpress_id" name="wordpress_id" required value="<?php echo isset($wordpress_id) ? esc_html($wordpress_id) : ''; ?>" />
15 15
 	</div>
16 16
 	<div class="salesforce_id">
17
-		<label for="salesforce_id"><?php echo esc_html__( 'Salesforce Id', 'object-sync-for-salesforce' ); ?>: </label>
18
-		<input type="text" id="salesforce_id" name="salesforce_id" required value="<?php echo isset( $salesforce_id ) ? esc_html( $salesforce_id ) : ''; ?>" />
17
+		<label for="salesforce_id"><?php echo esc_html__('Salesforce Id', 'object-sync-for-salesforce'); ?>: </label>
18
+		<input type="text" id="salesforce_id" name="salesforce_id" required value="<?php echo isset($salesforce_id) ? esc_html($salesforce_id) : ''; ?>" />
19 19
 	</div>
20 20
 	<?php
21 21
 		submit_button(
22 22
 			// translators: the placeholder refers to the currently selected method (edit or delete)
23
-			sprintf( esc_html__( '%1$s object map', 'object-sync-for-salesforce' ), ucfirst( $method ) )
23
+			sprintf(esc_html__('%1$s object map', 'object-sync-for-salesforce'), ucfirst($method))
24 24
 		);
25 25
 	?>
26 26
 </form>
Please login to merge, or discard this patch.
templates/admin/mapping-errors.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,50 +1,50 @@
 block discarded – undo
1
-<h2><?php echo esc_html__( 'Mapping Errors', 'object-sync-for-salesforce' ); ?></h2>
2
-<p><?php echo esc_html__( 'When this tab is present, it means one or more mapping errors have occurred when the plugin has tried to save a new mapping object, either based on data pulled in from Salesforce or data that was sent to Salesforce. The plugin creates a temporary flag for WordPress (if it is a pull action) or for Salesforce (if it is a push action), and if it fails the temporary flag remains.', 'object-sync-for-salesforce' ); ?></p>
3
-<p><?php echo esc_html__( 'For any mapping object error, you can edit (if, for example, you know the ID of the item that should be in place) or delete each database row, or you can try to track down what the plugin was doing based on the other data displayed here.', 'object-sync-for-salesforce' ); ?></p>
4
-<p><?php echo esc_html__( 'If you edit one of these items, and it correctly maps data between the two systems, the sync for those items will behave as normal going forward, so any edits you do after that will sync as they should.', 'object-sync-for-salesforce' ); ?></p>
1
+<h2><?php echo esc_html__('Mapping Errors', 'object-sync-for-salesforce'); ?></h2>
2
+<p><?php echo esc_html__('When this tab is present, it means one or more mapping errors have occurred when the plugin has tried to save a new mapping object, either based on data pulled in from Salesforce or data that was sent to Salesforce. The plugin creates a temporary flag for WordPress (if it is a pull action) or for Salesforce (if it is a push action), and if it fails the temporary flag remains.', 'object-sync-for-salesforce'); ?></p>
3
+<p><?php echo esc_html__('For any mapping object error, you can edit (if, for example, you know the ID of the item that should be in place) or delete each database row, or you can try to track down what the plugin was doing based on the other data displayed here.', 'object-sync-for-salesforce'); ?></p>
4
+<p><?php echo esc_html__('If you edit one of these items, and it correctly maps data between the two systems, the sync for those items will behave as normal going forward, so any edits you do after that will sync as they should.', 'object-sync-for-salesforce'); ?></p>
5 5
 
6 6
 <table class="widefat striped">
7 7
 	<thead>
8 8
 		<tr>
9
-			<th><?php echo esc_html__( 'Type', 'object-sync-for-salesforce' ); ?></th>
10
-			<th><?php echo esc_html__( 'WordPress ID', 'object-sync-for-salesforce' ); ?></th>
11
-			<th><?php echo esc_html__( 'WordPress Object Type', 'object-sync-for-salesforce' ); ?></th>
12
-			<th><?php echo esc_html__( 'Salesforce ID', 'object-sync-for-salesforce' ); ?></th>
13
-			<th><?php echo esc_html__( 'Created Date/Time', 'object-sync-for-salesforce' ); ?></th>
14
-			<th colspan="2"><?php echo esc_html__( 'Actions', 'object-sync-for-salesforce' ); ?></th>
9
+			<th><?php echo esc_html__('Type', 'object-sync-for-salesforce'); ?></th>
10
+			<th><?php echo esc_html__('WordPress ID', 'object-sync-for-salesforce'); ?></th>
11
+			<th><?php echo esc_html__('WordPress Object Type', 'object-sync-for-salesforce'); ?></th>
12
+			<th><?php echo esc_html__('Salesforce ID', 'object-sync-for-salesforce'); ?></th>
13
+			<th><?php echo esc_html__('Created Date/Time', 'object-sync-for-salesforce'); ?></th>
14
+			<th colspan="2"><?php echo esc_html__('Actions', 'object-sync-for-salesforce'); ?></th>
15 15
 		</tr>
16 16
 	</thead>
17 17
 	<tbody>
18
-		<?php if ( ! empty( $mapping_errors['pull_errors'] ) ) : ?>
19
-			<?php foreach ( $mapping_errors['pull_errors'] as $error ) { ?>
18
+		<?php if ( ! empty($mapping_errors['pull_errors'])) : ?>
19
+			<?php foreach ($mapping_errors['pull_errors'] as $error) { ?>
20 20
 		<tr>
21
-			<td><?php echo esc_html__( 'Pull from Salesforce', 'object-sync-for-salesforce' ); ?></td>
21
+			<td><?php echo esc_html__('Pull from Salesforce', 'object-sync-for-salesforce'); ?></td>
22 22
 			<td><?php echo $error['wordpress_id']; ?></td>
23 23
 			<td><?php echo $error['wordpress_object']; ?></td>
24 24
 			<td><?php echo $error['salesforce_id']; ?></td>
25
-			<td><?php echo date_i18n( 'Y-m-d g:i:sa', strtotime( $error['created'] ) ); ?></td>
25
+			<td><?php echo date_i18n('Y-m-d g:i:sa', strtotime($error['created'])); ?></td>
26 26
 			<td>
27
-				<a href="<?php echo esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=mapping_errors&method=edit&id=' . $error['id'] ) ); ?>"><?php echo esc_html__( 'Edit', 'object-sync-for-salesforce' ); ?></a>
27
+				<a href="<?php echo esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=mapping_errors&method=edit&id=' . $error['id'])); ?>"><?php echo esc_html__('Edit', 'object-sync-for-salesforce'); ?></a>
28 28
 			</td>
29 29
 			<td>
30
-				<a href="<?php echo esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=mapping_errors&method=delete&id=' . $error['id'] ) ); ?>"><?php echo esc_html__( 'Delete', 'object-sync-for-salesforce' ); ?></a>
30
+				<a href="<?php echo esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=mapping_errors&method=delete&id=' . $error['id'])); ?>"><?php echo esc_html__('Delete', 'object-sync-for-salesforce'); ?></a>
31 31
 			</td>
32 32
 		</tr>
33 33
 			<?php } ?>
34 34
 		<?php endif; ?>
35
-		<?php if ( ! empty( $mapping_errors['push_errors'] ) ) : ?>
36
-			<?php foreach ( $mapping_errors['push_errors'] as $error ) { ?>
35
+		<?php if ( ! empty($mapping_errors['push_errors'])) : ?>
36
+			<?php foreach ($mapping_errors['push_errors'] as $error) { ?>
37 37
 		<tr>
38
-			<td><?php echo esc_html__( 'Push to Salesforce', 'object-sync-for-salesforce' ); ?></td>
38
+			<td><?php echo esc_html__('Push to Salesforce', 'object-sync-for-salesforce'); ?></td>
39 39
 			<td><?php echo $error['wordpress_id']; ?></td>
40 40
 			<td><?php echo $error['wordpress_object']; ?></td>
41 41
 			<td><?php echo $error['salesforce_id']; ?></td>
42
-			<td><?php echo date_i18n( 'Y-m-d g:i:sa', strtotime( $error['created'] ) ); ?></td>
42
+			<td><?php echo date_i18n('Y-m-d g:i:sa', strtotime($error['created'])); ?></td>
43 43
 			<td>
44
-				<a href="<?php echo esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=mapping_errors&method=edit&id=' . $error['id'] ) ); ?>"><?php echo esc_html__( 'Edit', 'object-sync-for-salesforce' ); ?></a>
44
+				<a href="<?php echo esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=mapping_errors&method=edit&id=' . $error['id'])); ?>"><?php echo esc_html__('Edit', 'object-sync-for-salesforce'); ?></a>
45 45
 			</td>
46 46
 			<td>
47
-				<a href="<?php echo esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=mapping_errors&method=delete&id=' . $error['id'] ) ); ?>"><?php echo esc_html__( 'Delete', 'object-sync-for-salesforce' ); ?></a>
47
+				<a href="<?php echo esc_url(get_admin_url(null, 'options-general.php?page=object-sync-salesforce-admin&tab=mapping_errors&method=delete&id=' . $error['id'])); ?>"><?php echo esc_html__('Delete', 'object-sync-for-salesforce'); ?></a>
48 48
 			</td>
49 49
 		</tr>
50 50
 			<?php } ?>
Please login to merge, or discard this patch.
templates/admin/import-export.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,33 +1,33 @@
 block discarded – undo
1
-<h3><?php echo esc_html__( 'Import', 'object-sync-for-salesforce' ); ?></h3>
2
-<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" enctype="multipart/form-data" class="import">
1
+<h3><?php echo esc_html__('Import', 'object-sync-for-salesforce'); ?></h3>
2
+<form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>" enctype="multipart/form-data" class="import">
3 3
 	<input type="hidden" name="action" value="object_sync_for_salesforce_import">
4
-	<?php wp_nonce_field( 'object_sync_for_salesforce_nonce_import', 'object_sync_for_salesforce_nonce_import' ); ?>
5
-	<p><?php _e( 'Import the plugin data from a .json file. You can use the Export options below to get this file.', 'object-sync-for-salesforce' ); ?></p>
4
+	<?php wp_nonce_field('object_sync_for_salesforce_nonce_import', 'object_sync_for_salesforce_nonce_import'); ?>
5
+	<p><?php _e('Import the plugin data from a .json file. You can use the Export options below to get this file.', 'object-sync-for-salesforce'); ?></p>
6 6
 	<p>
7 7
 		<input type="file" name="import_file" id="object-sync-for-salesforce-import" required>
8 8
 	</p>
9 9
 	<p>
10 10
 		<input type="checkbox" value="1" name="overwrite" id="object-sync-for-salesforce-import-overwrite">
11
-		<label for="object-sync-for-salesforce-import-overwrite"><?php _e( 'Overwrite existing data', 'object-sync-for-salesforce' ); ?></label>
11
+		<label for="object-sync-for-salesforce-import-overwrite"><?php _e('Overwrite existing data', 'object-sync-for-salesforce'); ?></label>
12 12
 	</p>
13
-	<input type="submit" class="button button-primary" value="<?php _e( 'Import', 'object-sync-for-salesforce' ); ?>" />
13
+	<input type="submit" class="button button-primary" value="<?php _e('Import', 'object-sync-for-salesforce'); ?>" />
14 14
 </form>
15 15
 
16
-<h3><?php echo esc_html__( 'Export', 'object-sync-for-salesforce' ); ?></h3>
17
-<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" class="export">
16
+<h3><?php echo esc_html__('Export', 'object-sync-for-salesforce'); ?></h3>
17
+<form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>" class="export">
18 18
 	<input type="hidden" name="action" value="object_sync_for_salesforce_export">
19
-	<?php wp_nonce_field( 'object_sync_for_salesforce_nonce_export', 'object_sync_for_salesforce_nonce_export' ); ?>
19
+	<?php wp_nonce_field('object_sync_for_salesforce_nonce_export', 'object_sync_for_salesforce_nonce_export'); ?>
20 20
 	<p>
21 21
 		<input type="checkbox" value="fieldmaps" name="export[]" id="object-sync-for-salesforce-export-fieldmaps">
22
-		<label for="object-sync-for-salesforce-export-fieldmaps"><?php _e( 'Include Fieldmaps', 'object-sync-for-salesforce' ); ?></label>
22
+		<label for="object-sync-for-salesforce-export-fieldmaps"><?php _e('Include Fieldmaps', 'object-sync-for-salesforce'); ?></label>
23 23
 	</p>
24 24
 	<p>
25 25
 		<input type="checkbox" value="object_maps" name="export[]" id="object-sync-for-salesforce-export-object-maps" />
26
-		<label for="object-sync-for-salesforce-export-object-maps"><?php _e( 'Include Object Maps', 'object-sync-for-salesforce' ); ?></label>
26
+		<label for="object-sync-for-salesforce-export-object-maps"><?php _e('Include Object Maps', 'object-sync-for-salesforce'); ?></label>
27 27
 	</p>
28 28
 	<p>
29 29
 		<input type="checkbox" value="plugin_settings" name="export[]" id="object-sync-for-salesforce-export-plugin-settings" />
30
-		<label for="object-sync-for-salesforce-export-plugin-settings"><?php _e( 'Include Plugin Settings', 'object-sync-for-salesforce' ); ?></label>
30
+		<label for="object-sync-for-salesforce-export-plugin-settings"><?php _e('Include Plugin Settings', 'object-sync-for-salesforce'); ?></label>
31 31
 	</p>
32
-	<input type="submit" class="button button-primary" value="<?php _e( 'Export', 'object-sync-for-salesforce' ); ?>" />
32
+	<input type="submit" class="button button-primary" value="<?php _e('Export', 'object-sync-for-salesforce'); ?>" />
33 33
 </form>
Please login to merge, or discard this patch.
templates/admin/user-profile-salesforce.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 block discarded – undo
1
-<input type="hidden" name="mapping_id" id="mapping_id_ajax" value="<?php echo absint( $mapping['id'] ); ?>" />
2
-<input type="hidden" name="salesforce_id" id="salesforce_id_ajax" value="<?php echo esc_attr( $mapping['salesforce_id'] ); ?>" />
3
-<input type="hidden" name="wordpress_id" id="wordpress_id_ajax" value="<?php echo absint( $mapping['wordpress_id'] ); ?>" />
4
-<input type="hidden" name="wordpress_object" id="wordpress_object_ajax" value="<?php echo esc_attr( $mapping['wordpress_object'] ); ?>" />
5
-<h2><?php echo esc_html__( 'Salesforce', 'object-sync-for-salesforce' ); ?></h2>
1
+<input type="hidden" name="mapping_id" id="mapping_id_ajax" value="<?php echo absint($mapping['id']); ?>" />
2
+<input type="hidden" name="salesforce_id" id="salesforce_id_ajax" value="<?php echo esc_attr($mapping['salesforce_id']); ?>" />
3
+<input type="hidden" name="wordpress_id" id="wordpress_id_ajax" value="<?php echo absint($mapping['wordpress_id']); ?>" />
4
+<input type="hidden" name="wordpress_object" id="wordpress_object_ajax" value="<?php echo esc_attr($mapping['wordpress_object']); ?>" />
5
+<h2><?php echo esc_html__('Salesforce', 'object-sync-for-salesforce'); ?></h2>
6 6
 <table class="wp-list-table widefat striped mapped-salesforce-user">
7
-	<caption><?php echo esc_html__( 'This user is mapped to a Salesforce object', 'object-sync-for-salesforce' ); ?></caption>
7
+	<caption><?php echo esc_html__('This user is mapped to a Salesforce object', 'object-sync-for-salesforce'); ?></caption>
8 8
 	<tbody>
9 9
 		<tr>
10
-			<th><?php echo esc_html__( 'Salesforce Id', 'object-sync-for-salesforce' ); ?></th>
11
-			<td><a href="<?php echo esc_url( $this->salesforce['sfapi']->get_instance_url() . '/' . $mapping['salesforce_id'] ); ?>"><?php echo esc_attr( $mapping['salesforce_id'] ); ?></a></td>
12
-			<td><a href="<?php echo esc_url( get_admin_url( null, 'user-edit.php?user_id=' . $user->ID ) . '&amp;edit_salesforce_mapping=true' ); ?>" class="edit-salesforce-mapping"><?php echo esc_html__( 'Edit', 'object-sync-for-salesforce' ); ?></a></td>
10
+			<th><?php echo esc_html__('Salesforce Id', 'object-sync-for-salesforce'); ?></th>
11
+			<td><a href="<?php echo esc_url($this->salesforce['sfapi']->get_instance_url() . '/' . $mapping['salesforce_id']); ?>"><?php echo esc_attr($mapping['salesforce_id']); ?></a></td>
12
+			<td><a href="<?php echo esc_url(get_admin_url(null, 'user-edit.php?user_id=' . $user->ID) . '&amp;edit_salesforce_mapping=true'); ?>" class="edit-salesforce-mapping"><?php echo esc_html__('Edit', 'object-sync-for-salesforce'); ?></a></td>
13 13
 		</tr>
14 14
 		<tr>
15
-			<th><?php echo esc_html__( 'Last Sync Message', 'object-sync-for-salesforce' ); ?></th>
16
-			<td class="last_sync_message"><?php echo isset( $mapping['last_sync_message'] ) ? esc_html( $mapping['last_sync_message'] ) : ''; ?></td>
15
+			<th><?php echo esc_html__('Last Sync Message', 'object-sync-for-salesforce'); ?></th>
16
+			<td class="last_sync_message"><?php echo isset($mapping['last_sync_message']) ? esc_html($mapping['last_sync_message']) : ''; ?></td>
17 17
 			<td>&nbsp;</td>
18 18
 		</tr>
19 19
 		<tr>
20
-			<th><?php echo esc_html__( 'Last Sync Action', 'object-sync-for-salesforce' ); ?></th>
21
-			<td class="last_sync_action"><?php echo isset( $mapping['last_sync_action'] ) ? esc_html( $mapping['last_sync_action'] ) : ''; ?></td>
20
+			<th><?php echo esc_html__('Last Sync Action', 'object-sync-for-salesforce'); ?></th>
21
+			<td class="last_sync_action"><?php echo isset($mapping['last_sync_action']) ? esc_html($mapping['last_sync_action']) : ''; ?></td>
22 22
 			<td>&nbsp;</td>
23 23
 		</tr>
24 24
 		<tr>
25
-			<th><?php echo esc_html__( 'Last Sync Status', 'object-sync-for-salesforce' ); ?></th>
26
-			<td class="last_sync_status"><?php echo ( isset( $mapping['last_sync_status'] ) && '1' === $mapping['last_sync_status'] ) ? esc_html__( 'success', 'object-sync-for-salesforce' ) : esc_html__( 'error', 'object-sync-for-salesforce' ); ?></td>
25
+			<th><?php echo esc_html__('Last Sync Status', 'object-sync-for-salesforce'); ?></th>
26
+			<td class="last_sync_status"><?php echo (isset($mapping['last_sync_status']) && '1' === $mapping['last_sync_status']) ? esc_html__('success', 'object-sync-for-salesforce') : esc_html__('error', 'object-sync-for-salesforce'); ?></td>
27 27
 			<td>&nbsp;</td>
28 28
 		</tr>
29 29
 		<tr>
30
-			<th><?php echo esc_html__( 'Last Sync', 'object-sync-for-salesforce' ); ?></th>
31
-			<td class="last_sync"><?php echo isset( $mapping['last_sync'] ) ? esc_html( $mapping['last_sync'] ) : ''; ?></td>
30
+			<th><?php echo esc_html__('Last Sync', 'object-sync-for-salesforce'); ?></th>
31
+			<td class="last_sync"><?php echo isset($mapping['last_sync']) ? esc_html($mapping['last_sync']) : ''; ?></td>
32 32
 			<td>&nbsp;</td>
33 33
 		</tr>
34 34
 		<tr>
35
-			<th><?php echo esc_html__( 'Actions', 'object-sync-for-salesforce' ); ?></th>
35
+			<th><?php echo esc_html__('Actions', 'object-sync-for-salesforce'); ?></th>
36 36
 			<td>
37
-				<a href="#" class="button button-secondary push_to_salesforce_button"><?php echo esc_html__( 'Push to Salesforce', 'object-sync-for-salesforce' ); ?></a>
38
-				<a href="#" class="button button-secondary pull_from_salesforce_button"><?php echo esc_html__( 'Pull from Salesforce', 'object-sync-for-salesforce' ); ?></a>
37
+				<a href="#" class="button button-secondary push_to_salesforce_button"><?php echo esc_html__('Push to Salesforce', 'object-sync-for-salesforce'); ?></a>
38
+				<a href="#" class="button button-secondary pull_from_salesforce_button"><?php echo esc_html__('Pull from Salesforce', 'object-sync-for-salesforce'); ?></a>
39 39
 			</td>
40 40
 		</tr>
41 41
 	</tbody>
Please login to merge, or discard this patch.
templates/admin/status.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1
-<h3><?php echo esc_html__( 'Salesforce Status', 'object-sync-for-salesforce' ); ?></h3>
1
+<h3><?php echo esc_html__('Salesforce Status', 'object-sync-for-salesforce'); ?></h3>
2 2
 <p>
3 3
 <?php
4 4
 	// translators: placeholder is for the version number of the Salesforce REST API
5
-	echo sprintf( esc_html__( 'Currently, we are using version %1$s of the Salesforce REST API. Available versions are displayed below.', 'object-sync-for-salesforce' ),
6
-		esc_html( $this->login_credentials['rest_api_version'] )
5
+	echo sprintf(esc_html__('Currently, we are using version %1$s of the Salesforce REST API. Available versions are displayed below.', 'object-sync-for-salesforce'),
6
+		esc_html($this->login_credentials['rest_api_version'])
7 7
 	);
8 8
 ?>
9 9
 </p>
@@ -13,23 +13,23 @@  discard block
 block discarded – undo
13 13
 			<h4><?php echo $versions_apicall_summary; ?></h4>
14 14
 		</summary>
15 15
 		<tr>
16
-			<th><?php echo esc_html__( 'Label', 'object-sync-for-salesforce' ); ?></th>
17
-			<th><?php echo esc_html__( 'URL', 'object-sync-for-salesforce' ); ?></th>
18
-			<th><?php echo esc_html__( 'Version', 'object-sync-for-salesforce' ); ?></th>
16
+			<th><?php echo esc_html__('Label', 'object-sync-for-salesforce'); ?></th>
17
+			<th><?php echo esc_html__('URL', 'object-sync-for-salesforce'); ?></th>
18
+			<th><?php echo esc_html__('Version', 'object-sync-for-salesforce'); ?></th>
19 19
 		</tr>
20 20
 	</thead>
21 21
 	<tbody>
22
-		<?php foreach ( $versions['data'] as $version ) { ?>
22
+		<?php foreach ($versions['data'] as $version) { ?>
23 23
 			<?php
24 24
 			$class = '';
25
-			if ( $version['version'] === $this->login_credentials['rest_api_version'] ) {
25
+			if ($version['version'] === $this->login_credentials['rest_api_version']) {
26 26
 				$class = ' class="current"';
27 27
 			}
28 28
 			?>
29
-			<tr<?php echo esc_attr( $class ); ?>>
30
-				<td><?php echo esc_html( $version['label'] ); ?></td>
31
-				<td><?php echo esc_html( $version['url'] ); ?></td>
32
-				<td><?php echo esc_html( $version['version'] ); ?></td>
29
+			<tr<?php echo esc_attr($class); ?>>
30
+				<td><?php echo esc_html($version['label']); ?></td>
31
+				<td><?php echo esc_html($version['url']); ?></td>
32
+				<td><?php echo esc_html($version['version']); ?></td>
33 33
 			</tr>
34 34
 		<?php } ?>
35 35
 	</tbody>
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
 			<h4><?php echo $contacts_apicall_summary; ?></h4>
42 42
 		</summary>
43 43
 		<tr>
44
-			<th><?php echo esc_html__( 'Contact ID' ); ?></th>
45
-			<th><?php echo esc_html__( 'Name' ); ?></th>
44
+			<th><?php echo esc_html__('Contact ID'); ?></th>
45
+			<th><?php echo esc_html__('Name'); ?></th>
46 46
 		</tr>
47 47
 	</thead>
48 48
 	<tbody>
49
-		<?php foreach ( $contacts['data']['records'] as $contact ) { ?>
49
+		<?php foreach ($contacts['data']['records'] as $contact) { ?>
50 50
 			<tr>
51
-				<td><?php echo esc_html( $contact['Id'] ); ?></td>
52
-				<td><?php echo esc_html( $contact['Name'] ); ?></td>
51
+				<td><?php echo esc_html($contact['Id']); ?></td>
52
+				<td><?php echo esc_html($contact['Name']); ?></td>
53 53
 			</tr>
54 54
 		<?php } ?>
55 55
 	</tbody>
Please login to merge, or discard this patch.