Completed
Pull Request — develop (#1487)
by Gennady
07:21
created
includes/admin/entry-list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 		add_action( 'gform_entries_first_column_actions', array( $this, 'add_edit_link' ), 10, 5 );
12 12
 
13 13
 		// Add script to enable edit link
14
-		add_action( 'admin_head-forms_page_gf_entries', array( $this, 'add_edit_script') );
14
+		add_action( 'admin_head-forms_page_gf_entries', array( $this, 'add_edit_script' ) );
15 15
 
16 16
 	}
17 17
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	public function add_edit_script() {
27 27
 
28 28
 		// We're on a single entry page, or at least not the Entries page.
29
-		if( !empty( $_GET['view'] ) && $_GET['view'] !== 'entries' ) { return; }
29
+		if ( ! empty( $_GET[ 'view' ] ) && $_GET[ 'view' ] !== 'entries' ) { return; }
30 30
 	?>
31 31
 		<script>
32 32
 		jQuery( document ).ready( function( $ ) {
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
 			'page' => 'gf_entries',
57 57
 			'view' => 'entry',
58 58
 			'id'	=> (int)$form_id,
59
-			'lid'	=>	(int)$lead["id"],
59
+			'lid'	=>	(int)$lead[ "id" ],
60 60
 			'screen_mode'	=> 'edit',
61 61
 		);
62 62
 		?>
63 63
 
64 64
 		<span class="edit edit_entry">
65 65
 			|
66
-		    <a title="<?php esc_attr_e( 'Edit this entry', 'gravityview'); ?>" href="<?php echo esc_url( add_query_arg( $params, admin_url( 'admin.php?page='.$query_string ) ) ); ?>"><?php esc_html_e( 'Edit', 'gravityview' ); ?></a>
66
+		    <a title="<?php esc_attr_e( 'Edit this entry', 'gravityview' ); ?>" href="<?php echo esc_url( add_query_arg( $params, admin_url( 'admin.php?page=' . $query_string ) ) ); ?>"><?php esc_html_e( 'Edit', 'gravityview' ); ?></a>
67 67
 		</span>
68 68
 		<?php
69 69
 	}
Please login to merge, or discard this patch.
includes/extensions/edit-entry/partials/inline-javascript.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
 ?><script type="text/javascript">
7 7
 
8 8
 	function DeleteFile(leadId, fieldId, deleteButton){
9
-		if(confirm('<?php echo esc_js( __("Would you like to permanently delete this file? 'Cancel' to stop. 'OK' to delete", 'gravityview') ); ?>')){
9
+		if(confirm('<?php echo esc_js( __( "Would you like to permanently delete this file? 'Cancel' to stop. 'OK' to delete", 'gravityview' ) ); ?>')){
10 10
 			var fileIndex = jQuery(deleteButton).parent().index();
11
-			var mysack = new sack("<?php echo admin_url("admin-ajax.php")?>");
11
+			var mysack = new sack("<?php echo admin_url( "admin-ajax.php" )?>");
12 12
 			mysack.execute = 1;
13 13
 			mysack.method = 'POST';
14 14
 			mysack.setVar( "action", "rg_delete_file" );
15
-			mysack.setVar( "rg_delete_file", "<?php echo wp_create_nonce("rg_delete_file") ?>" );
15
+			mysack.setVar( "rg_delete_file", "<?php echo wp_create_nonce( "rg_delete_file" ) ?>" );
16 16
 			mysack.setVar( "lead_id", leadId );
17 17
 			mysack.setVar( "field_id", fieldId );
18 18
 			mysack.setVar( "file_index", fileIndex );
19
-			mysack.onError = function() { alert('<?php echo esc_js(__('Ajax error while deleting field.', 'gravityview')) ?>' )};
19
+			mysack.onError = function() { alert('<?php echo esc_js( __( 'Ajax error while deleting field.', 'gravityview' ) ) ?>' )};
20 20
 			mysack.runAJAX();
21 21
 
22 22
 			return true;
Please login to merge, or discard this patch.
includes/extensions/edit-entry/fields/edit_link.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 extract( $gravityview_view->getCurrentField() );
8 8
 
9 9
 // Only show the link to logged-in users.
10
-if( !GravityView_Edit_Entry::check_user_cap_edit_entry( $entry ) ) {
10
+if ( ! GravityView_Edit_Entry::check_user_cap_edit_entry( $entry ) ) {
11 11
 	return;
12 12
 }
13 13
 
14
-$link_text = empty( $field_settings['edit_link'] ) ? __('Edit Entry', 'gravityview') : $field_settings['edit_link'];
14
+$link_text = empty( $field_settings[ 'edit_link' ] ) ? __( 'Edit Entry', 'gravityview' ) : $field_settings[ 'edit_link' ];
15 15
 
16
-$link_atts = empty( $field_settings['new_window'] ) ? '' : 'target="_blank"';
16
+$link_atts = empty( $field_settings[ 'new_window' ] ) ? '' : 'target="_blank"';
17 17
 
18 18
 $output = apply_filters( 'gravityview_entry_link', GravityView_API::replace_variables( $link_text, $form, $entry ) );
19 19
 
Please login to merge, or discard this patch.
includes/extensions/delete-entry/fields/delete_link.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 block discarded – undo
7 7
 extract( $gravityview_view->getCurrentField() );
8 8
 
9 9
 // Only show the link to logged-in users with the rigth caps.
10
-if( !GravityView_Delete_Entry::check_user_cap_delete_entry( $entry, $field_settings ) ) {
10
+if ( ! GravityView_Delete_Entry::check_user_cap_delete_entry( $entry, $field_settings ) ) {
11 11
 	return;
12 12
 }
13 13
 
14
-$link_text = empty( $field_settings['delete_link'] ) ? __('Delete Entry', 'gravityview') : $field_settings['delete_link'];
14
+$link_text = empty( $field_settings[ 'delete_link' ] ) ? __( 'Delete Entry', 'gravityview' ) : $field_settings[ 'delete_link' ];
15 15
 
16 16
 $link_text = apply_filters( 'gravityview_entry_link', GravityView_API::replace_variables( $link_text, $form, $entry ) );
17 17
 
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-hidden.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,4 +7,4 @@
 block discarded – undo
7 7
 
8 8
 $gravityview_view = GravityView_View::getInstance();
9 9
 $search_field = $gravityview_view->search_field;
10
-?><div><input type="hidden" name="<?php echo esc_attr( $search_field['name'] ); ?>" value="<?php echo esc_attr( $search_field['value'] ); ?>"></div>
11 10
\ No newline at end of file
11
+?><div><input type="hidden" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $search_field[ 'value' ] ); ?>"></div>
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/class-gravityview-widget-pagination-info.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 	function __construct() {
18 18
 
19
-		$this->widget_description = __('Summary of the number of visible entries out of the total results.', 'gravityview' );
19
+		$this->widget_description = __( 'Summary of the number of visible entries out of the total results.', 'gravityview' );
20 20
 
21 21
 		$default_values = array(
22 22
 			'header' => 1,
@@ -25,18 +25,18 @@  discard block
 block discarded – undo
25 25
 
26 26
 		$settings = array();
27 27
 
28
-		parent::__construct( __( 'Show Pagination Info', 'gravityview' ) , 'page_info', $default_values, $settings );
28
+		parent::__construct( __( 'Show Pagination Info', 'gravityview' ), 'page_info', $default_values, $settings );
29 29
 	}
30 30
 
31
-	public function render_frontend( $widget_args, $content = '', $context = '') {
31
+	public function render_frontend( $widget_args, $content = '', $context = '' ) {
32 32
 		$gravityview_view = GravityView_View::getInstance();
33 33
 
34
-		if( !$this->pre_render_frontend() ) {
34
+		if ( ! $this->pre_render_frontend() ) {
35 35
 			return;
36 36
 		}
37 37
 
38
-		if( !empty( $widget_args['title'] ) ) {
39
-			echo $widget_args['title'];
38
+		if ( ! empty( $widget_args[ 'title' ] ) ) {
39
+			echo $widget_args[ 'title' ];
40 40
 		}
41 41
 
42 42
 		$pagination_counts = $gravityview_view->getPaginationCounts();
@@ -45,16 +45,16 @@  discard block
 block discarded – undo
45 45
 
46 46
 		$output = '';
47 47
 
48
-		if( ! empty( $pagination_counts ) ) {
48
+		if ( ! empty( $pagination_counts ) ) {
49 49
 
50
-			$first = $pagination_counts['first'];
51
-			$last = $pagination_counts['last'];
52
-			$total = $pagination_counts['total'];
50
+			$first = $pagination_counts[ 'first' ];
51
+			$last = $pagination_counts[ 'last' ];
52
+			$total = $pagination_counts[ 'total' ];
53 53
 
54
-			$class = !empty( $widget_args['custom_class'] ) ? $widget_args['custom_class'] : '';
54
+			$class = ! empty( $widget_args[ 'custom_class' ] ) ? $widget_args[ 'custom_class' ] : '';
55 55
 			$class = gravityview_sanitize_html_class( $class );
56 56
 
57
-			$output = '<div class="gv-widget-pagination '.$class.'"><p>'. sprintf(__( 'Displaying %1$s - %2$s of %3$s', 'gravityview' ), number_format_i18n( $first ), number_format_i18n( $last ), number_format_i18n( $total ) ) . '</p></div>';
57
+			$output = '<div class="gv-widget-pagination ' . $class . '"><p>' . sprintf( __( 'Displaying %1$s - %2$s of %3$s', 'gravityview' ), number_format_i18n( $first ), number_format_i18n( $last ), number_format_i18n( $total ) ) . '</p></div>';
58 58
 		}
59 59
 
60 60
 		/**
Please login to merge, or discard this patch.
includes/fields/class-gravityview-fields.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 	 * @return GravityView_Field | bool
43 43
 	 */
44 44
 	public static function create( $properties ) {
45
-		$type = isset( $properties['type'] ) ? $properties['type'] : '';
46
-		$type = empty( $properties['inputType'] ) ? $type : $properties['inputType'];
45
+		$type = isset( $properties[ 'type' ] ) ? $properties[ 'type' ] : '';
46
+		$type = empty( $properties[ 'inputType' ] ) ? $type : $properties[ 'inputType' ];
47 47
 		if ( empty( $type ) || ! isset( self::$_fields[ $type ] ) ) {
48 48
 			return new GravityView_Field( $properties );
49 49
 		}
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @return bool True: yes, it exists; False: nope
63 63
 	 */
64 64
 	public static function exists( $field_name ) {
65
-		return isset( self::$_fields["{$field_name}"] );
65
+		return isset( self::$_fields[ "{$field_name}" ] );
66 66
 	}
67 67
 
68 68
 	/**
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 
97 97
 		$field_type = is_a( $gf_field, 'GF_Field' ) ? get_class( $gf_field ) : $gf_field;
98 98
 
99
-		foreach( self::$_fields as $field ) {
100
-			if( $field_type === $field->_gf_field_class_name ) {
99
+		foreach ( self::$_fields as $field ) {
100
+			if ( $field_type === $field->_gf_field_class_name ) {
101 101
 				return $field;
102 102
 			}
103 103
 		}
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public static function get_all( $group = '' ) {
118 118
 
119
-		if( '' !== $group ) {
119
+		if ( '' !== $group ) {
120 120
 			$return_fields = self::$_fields;
121 121
 			foreach ( $return_fields as $key => $field ) {
122
-				if( $group !== $field->group ) {
122
+				if ( $group !== $field->group ) {
123 123
 					unset( $return_fields[ $key ] );
124 124
 				}
125 125
 			}
Please login to merge, or discard this patch.
includes/extensions/entry-notes/partials/note-add-note.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@
 block discarded – undo
21 21
 		{email_fields}
22 22
 
23 23
 		<div class="gv-note-content-container">
24
-			<label for="gv-note-content-{entry_slug}" class="screen-reader-text"><?php echo GravityView_Field_Notes::strings('content-label'); ?></label>
24
+			<label for="gv-note-content-{entry_slug}" class="screen-reader-text"><?php echo GravityView_Field_Notes::strings( 'content-label' ); ?></label>
25 25
 			<textarea name="gv-note-content" id="gv-note-content-{entry_slug}"></textarea>
26 26
 		</div>
27 27
 
28
-		<button type="submit" class="button gv-add-note-submit"><?php echo GravityView_Field_Notes::strings('add-note'); ?></button>
28
+		<button type="submit" class="button gv-add-note-submit"><?php echo GravityView_Field_Notes::strings( 'add-note' ); ?></button>
29 29
 	</div>
30 30
 </form>
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
includes/admin/field-types/type_html.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	 * @return string
22 22
 	 */
23 23
 	function get_field_desc() {
24
-		return !empty( $this->field['desc'] ) ? $this->field['desc'] : '';
24
+		return ! empty( $this->field[ 'desc' ] ) ? $this->field[ 'desc' ] : '';
25 25
 	}
26 26
 
27 27
 }
Please login to merge, or discard this patch.