Completed
Pull Request — master (#874)
by Zack
12:42 queued 08:41
created
includes/plugin-and-theme-hooks/class-gravityview-theme-hooks-wpml.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 		add_filter( 'icl_ls_languages', array( $this, 'wpml_ls_filter' ) );
64 64
 
65
-		add_filter( 'gravityview_directory_link', array( $this, 'filter_gravityview_back_link') );
65
+		add_filter( 'gravityview_directory_link', array( $this, 'filter_gravityview_back_link' ) );
66 66
 	}
67 67
 
68 68
 	/**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	function filter_gravityview_back_link( $link ) {
83 83
 		global $wpml_url_filters;
84 84
 
85
-		if( $wpml_url_filters ) {
85
+		if ( $wpml_url_filters ) {
86 86
 			$link = $wpml_url_filters->permalink_filter( $link, GravityView_frontend::getInstance()->getPostId() );
87 87
 		}
88 88
 
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
 	private function remove_url_hooks() {
100 100
 		global $wpml_url_filters;
101 101
 
102
-		if( ! $wpml_url_filters ) {
102
+		if ( ! $wpml_url_filters ) {
103 103
 			return;
104 104
 		}
105 105
 
106
-		if( method_exists( $wpml_url_filters, 'remove_global_hooks' ) ) {
106
+		if ( method_exists( $wpml_url_filters, 'remove_global_hooks' ) ) {
107 107
 			$wpml_url_filters->remove_global_hooks();
108 108
 		}
109 109
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	private function add_url_hooks() {
125 125
 		global $wpml_url_filters;
126 126
 
127
-		if( ! $wpml_url_filters ) {
127
+		if ( ! $wpml_url_filters ) {
128 128
 			return;
129 129
 		}
130 130
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
 			$this->remove_url_hooks();
165 165
 
166
-			if( $translations ) {
166
+			if ( $translations ) {
167 167
 				foreach ( $languages as $lang_code => $language ) {
168 168
 
169 169
 					$lang_post_id = $translations[ $lang_code ]->element_id;
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 							break;
197 197
 					}
198 198
 
199
-					$languages[ $lang_code ]['url'] = $entry_link;
199
+					$languages[ $lang_code ][ 'url' ] = $entry_link;
200 200
 				}
201 201
 			}
202 202
 
Please login to merge, or discard this patch.