Completed
Push — develop ( bd6ad5...7b688d )
by Zack
04:29
created
includes/extensions/delete-entry/fields/delete_link.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,21 +4,21 @@
 block discarded – undo
4 4
 
5 5
 $view_id = $gravityview_view->getViewId();
6 6
 
7
-extract( $gravityview_view->getCurrentField() );
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
-$link_text = apply_filters( 'gravityview_entry_link', GravityView_API::replace_variables( $link_text, $form, $entry ) );
16
+$link_text = apply_filters('gravityview_entry_link', GravityView_API::replace_variables($link_text, $form, $entry));
17 17
 
18
-$href = GravityView_Delete_Entry::get_delete_link( $entry, $view_id );
18
+$href = GravityView_Delete_Entry::get_delete_link($entry, $view_id);
19 19
 
20 20
 $attributes = array(
21 21
 	'onclick' => GravityView_Delete_Entry::get_confirm_dialog()
22 22
 );
23 23
 
24
-echo gravityview_get_link( $href, $link_text, $attributes );
24
+echo gravityview_get_link($href, $link_text, $attributes);
Please login to merge, or discard this patch.
includes/extensions/edit-entry/fields/edit_link.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,19 +4,19 @@
 block discarded – undo
4 4
 
5 5
 $view_id = $gravityview_view->getViewId();
6 6
 
7
-extract( $gravityview_view->getCurrentField() );
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
-$output = apply_filters( 'gravityview_entry_link', GravityView_API::replace_variables( $link_text, $form, $entry ) );
18
+$output = apply_filters('gravityview_entry_link', GravityView_API::replace_variables($link_text, $form, $entry));
19 19
 
20
-$href = GravityView_Edit_Entry::get_edit_link( $entry, $view_id );
20
+$href = GravityView_Edit_Entry::get_edit_link($entry, $view_id);
21 21
 
22
-echo gravityview_get_link( $href, $output, $link_atts );
22
+echo gravityview_get_link($href, $output, $link_atts);
Please login to merge, or discard this patch.
includes/extensions/edit-entry/partials/form-buttons.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
 <div id="publishing-action">
8 8
 	<?php
9 9
 
10
-    /**
11
-     * @filter `gravityview/edit_entry/cancel_link` Modify the cancel button link URL
12
-     * @since 1.11.1
13
-     * @param string $back_link Existing URL of the Cancel link
14
-     * @param array $form The Gravity Forms form
15
-     * @param array $entry The Gravity Forms entry
16
-     * @param int $view_id The current View ID
17
-     */
18
-    $back_link = apply_filters( 'gravityview/edit_entry/cancel_link', remove_query_arg( array( 'page', 'view', 'edit' ) ), $object->form, $object->entry, $object->view_id );
10
+	/**
11
+	 * @filter `gravityview/edit_entry/cancel_link` Modify the cancel button link URL
12
+	 * @since 1.11.1
13
+	 * @param string $back_link Existing URL of the Cancel link
14
+	 * @param array $form The Gravity Forms form
15
+	 * @param array $entry The Gravity Forms entry
16
+	 * @param int $view_id The current View ID
17
+	 */
18
+	$back_link = apply_filters( 'gravityview/edit_entry/cancel_link', remove_query_arg( array( 'page', 'view', 'edit' ) ), $object->form, $object->entry, $object->view_id );
19 19
 
20 20
 	/**
21 21
 	 * @action `gravityview/edit-entry/publishing-action/before` Triggered before the submit buttons in the Edit Entry screen, inside the `<div id="publishing-action">` container.
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param array $entry The Gravity Forms entry
16 16
      * @param int $view_id The current View ID
17 17
      */
18
-    $back_link = apply_filters( 'gravityview/edit_entry/cancel_link', remove_query_arg( array( 'page', 'view', 'edit' ) ), $object->form, $object->entry, $object->view_id );
18
+    $back_link = apply_filters('gravityview/edit_entry/cancel_link', remove_query_arg(array('page', 'view', 'edit')), $object->form, $object->entry, $object->view_id);
19 19
 
20 20
 	/**
21 21
 	 * @action `gravityview/edit-entry/publishing-action/before` Triggered before the submit buttons in the Edit Entry screen, inside the `<div id="publishing-action">` container.
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
 	 * @param array $entry The Gravity Forms entry
25 25
 	 * @param int $view_id The current View ID
26 26
 	 */
27
-	do_action( 'gravityview/edit-entry/publishing-action/before', $object->form, $object->entry, $object->view_id );
27
+	do_action('gravityview/edit-entry/publishing-action/before', $object->form, $object->entry, $object->view_id);
28 28
 
29 29
 	?>
30
-	<input id="gform_submit_button_<?php echo esc_attr( $object->form['id'] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-update" type="submit" tabindex="4" value="<?php esc_attr_e( 'Update', 'gravityview'); ?>" name="save" />
30
+	<input id="gform_submit_button_<?php echo esc_attr($object->form['id']); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-update" type="submit" tabindex="4" value="<?php esc_attr_e('Update', 'gravityview'); ?>" name="save" />
31 31
 
32
-	<a class="btn btn-sm button button-small gv-button-cancel" tabindex="5" href="<?php echo esc_url( $back_link ); ?>"><?php esc_attr_e( 'Cancel', 'gravityview' ); ?></a>
32
+	<a class="btn btn-sm button button-small gv-button-cancel" tabindex="5" href="<?php echo esc_url($back_link); ?>"><?php esc_attr_e('Cancel', 'gravityview'); ?></a>
33 33
 	<?php
34 34
 
35 35
 	/**
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	 * @param array $entry The Gravity Forms entry
40 40
 	 * @param int $view_id The current View ID
41 41
 	 */
42
-	do_action( 'gravityview/edit-entry/publishing-action/after', $object->form, $object->entry, $object->view_id );
42
+	do_action('gravityview/edit-entry/publishing-action/after', $object->form, $object->entry, $object->view_id);
43 43
 
44 44
 	?>
45 45
 	<input type="hidden" name="action" value="update" />
46
-	<input type="hidden" name="lid" value="<?php echo esc_attr( $object->entry['id'] ); ?>" />
46
+	<input type="hidden" name="lid" value="<?php echo esc_attr($object->entry['id']); ?>" />
47 47
 </div>
Please login to merge, or discard this patch.
includes/extensions/edit-entry/partials/inline-javascript.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 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 11
 			var mysack = new sack("<?php echo admin_url("admin-ajax.php")?>");
12 12
 			mysack.execute = 1;
Please login to merge, or discard this patch.
includes/lib/class-gamajo-template-loader.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
 	 *
77 77
 	 * @return string
78 78
 	 */
79
-	public function get_template_part( $slug, $name = null, $load = true ) {
79
+	public function get_template_part($slug, $name = null, $load = true) {
80 80
 		// Execute code for this part
81
-		do_action( 'get_template_part_' . $slug, $slug, $name );
81
+		do_action('get_template_part_'.$slug, $slug, $name);
82 82
 
83 83
 		// Get files names of templates, for given slug and name.
84
-		$templates = $this->get_template_file_names( $slug, $name );
84
+		$templates = $this->get_template_file_names($slug, $name);
85 85
 
86 86
 		// Return the part that is found
87
-		return $this->locate_template( $templates, $load, false );
87
+		return $this->locate_template($templates, $load, false);
88 88
 	}
89 89
 
90 90
 	/**
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 	 *
98 98
 	 * @return array
99 99
 	 */
100
-	protected function get_template_file_names( $slug, $name ) {
100
+	protected function get_template_file_names($slug, $name) {
101 101
 		$templates = array();
102
-		if ( isset( $name ) ) {
103
-			$templates[] = $slug . '-' . $name . '.php';
102
+		if (isset($name)) {
103
+			$templates[] = $slug.'-'.$name.'.php';
104 104
 		}
105
-		$templates[] = $slug . '.php';
105
+		$templates[] = $slug.'.php';
106 106
 
107 107
 		/**
108 108
 		 * Allow template choices to be filtered.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 		 * @param string $slug Template slug.
117 117
 		 * @param string $name Template name.
118 118
 		 */
119
-		return apply_filters( $this->filter_prefix . '_get_template_part', $templates, $slug, $name );
119
+		return apply_filters($this->filter_prefix.'_get_template_part', $templates, $slug, $name);
120 120
 	}
121 121
 
122 122
 	/**
@@ -137,30 +137,30 @@  discard block
 block discarded – undo
137 137
 	 *
138 138
 	 * @return string The template filename if one is located.
139 139
 	 */
140
-	public function locate_template( $template_names, $load = false, $require_once = true ) {
140
+	public function locate_template($template_names, $load = false, $require_once = true) {
141 141
 		// No file found yet
142 142
 		$located = false;
143 143
 
144 144
 		// Remove empty entries
145
-		$template_names = array_filter( (array) $template_names );
145
+		$template_names = array_filter((array)$template_names);
146 146
 		$template_paths = $this->get_template_paths();
147 147
 
148 148
 		// Try to find a template file
149
-		foreach ( $template_names as $template_name ) {
149
+		foreach ($template_names as $template_name) {
150 150
 			// Trim off any slashes from the template name
151
-			$template_name = ltrim( $template_name, '/' );
151
+			$template_name = ltrim($template_name, '/');
152 152
 
153 153
 			// Try locating this template file by looping through the template paths
154
-			foreach ( $template_paths as $template_path ) {
155
-				if ( file_exists( $template_path . $template_name ) ) {
156
-					$located = $template_path . $template_name;
154
+			foreach ($template_paths as $template_path) {
155
+				if (file_exists($template_path.$template_name)) {
156
+					$located = $template_path.$template_name;
157 157
 					break 2;
158 158
 				}
159 159
 			}
160 160
 		}
161 161
 
162
-		if ( $load && $located ) {
163
-			load_template( $located, $require_once );
162
+		if ($load && $located) {
163
+			load_template($located, $require_once);
164 164
 		}
165 165
 
166 166
 		return $located;
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
 	 * @return mixed|void
179 179
 	 */
180 180
 	protected function get_template_paths() {
181
-		$theme_directory = trailingslashit( $this->theme_template_directory );
181
+		$theme_directory = trailingslashit($this->theme_template_directory);
182 182
 
183 183
 		$file_paths = array(
184
-			10  => trailingslashit( get_template_directory() ) . $theme_directory,
184
+			10  => trailingslashit(get_template_directory()).$theme_directory,
185 185
 			100 => $this->get_templates_dir()
186 186
 		);
187 187
 
188 188
 		// Only add this conditionally, so non-child themes don't redundantly check active theme twice.
189
-		if ( is_child_theme() ) {
190
-			$file_paths[1] = trailingslashit( get_stylesheet_directory() ) . $theme_directory;
189
+		if (is_child_theme()) {
190
+			$file_paths[1] = trailingslashit(get_stylesheet_directory()).$theme_directory;
191 191
 		}
192 192
 
193 193
 		/**
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
 		 *
198 198
 		 * @param array $var Default is directory in child theme at index 1, parent theme at 10, and plugin at 100.
199 199
 		 */
200
-		$file_paths = apply_filters( $this->filter_prefix . '_template_paths', $file_paths );
200
+		$file_paths = apply_filters($this->filter_prefix.'_template_paths', $file_paths);
201 201
 
202 202
 		// sort the file paths based on priority
203
-		ksort( $file_paths, SORT_NUMERIC );
203
+		ksort($file_paths, SORT_NUMERIC);
204 204
 
205
-		return array_map( 'trailingslashit', $file_paths );
205
+		return array_map('trailingslashit', $file_paths);
206 206
 	}
207 207
 
208 208
 	/**
@@ -215,6 +215,6 @@  discard block
 block discarded – undo
215 215
 	 * @return string
216 216
 	 */
217 217
 	protected function get_templates_dir() {
218
-		return trailingslashit( $this->plugin_directory ) . $this->plugin_template_directory;
218
+		return trailingslashit($this->plugin_directory).$this->plugin_template_directory;
219 219
 	}
220 220
 }
Please login to merge, or discard this patch.
includes/load-plugin-and-theme-hooks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@
 block discarded – undo
14 14
 
15 15
 
16 16
 /** @define "GRAVITYVIEW_DIR" "../" */
17
-$include_path = GRAVITYVIEW_DIR . 'includes/plugin-and-theme-hooks/';
17
+$include_path = GRAVITYVIEW_DIR.'includes/plugin-and-theme-hooks/';
18 18
 
19 19
 // Abstract class
20
-require $include_path . 'abstract-gravityview-plugin-and-theme-hooks.php';
20
+require $include_path.'abstract-gravityview-plugin-and-theme-hooks.php';
21 21
 
22 22
 // Load all plugin and theme files automatically
23
-foreach ( glob( $include_path . 'class-gravityview-{plugin,theme}-hooks-*.php', GLOB_BRACE ) as $gv_hooks_filename ) {
23
+foreach (glob($include_path.'class-gravityview-{plugin,theme}-hooks-*.php', GLOB_BRACE) as $gv_hooks_filename) {
24 24
 	include $gv_hooks_filename;
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
plugin-and-theme-hooks/class-gravityview-plugin-hooks-yoast-seo.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,16 +56,16 @@  discard block
 block discarded – undo
56 56
 
57 57
 		parent::add_hooks();
58 58
 
59
-		if( gravityview_is_admin_page() ) {
59
+		if (gravityview_is_admin_page()) {
60 60
 
61 61
 				// Make Yoast metabox go down to the bottom please.
62
-			add_filter( 'wpseo_metabox_prio', array( $this, '__return_low' ) );
62
+			add_filter('wpseo_metabox_prio', array($this, '__return_low'));
63 63
 
64 64
 			// Prevent the SEO from being checked. Eesh.
65
-			add_filter( 'wpseo_use_page_analysis', '__return_false' );
65
+			add_filter('wpseo_use_page_analysis', '__return_false');
66 66
 
67 67
 			// WordPress SEO Plugin
68
-			add_filter( 'option_wpseo_titles', array( $this, 'hide_wordpress_seo_metabox' ) );
68
+			add_filter('option_wpseo_titles', array($this, 'hide_wordpress_seo_metabox'));
69 69
 		}
70 70
 	}
71 71
 
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 	 * @param  array       $options WP SEO options array
80 80
 	 * @return array               Modified array if on post-new.php
81 81
 	 */
82
-	function hide_wordpress_seo_metabox( $options = array() ) {
82
+	function hide_wordpress_seo_metabox($options = array()) {
83 83
 		global $pagenow;
84 84
 
85 85
 		// New View page
86
-		if( $pagenow === 'post-new.php' ) {
86
+		if ($pagenow === 'post-new.php') {
87 87
 			$options['hideeditbox-gravityview'] = true;
88 88
 		}
89 89
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @param string $existing Existing priority. Default: `high`
100 100
 	 * @return string Returns 'low'
101 101
 	 */
102
-	function __return_low( $existing = 'high' ) {
102
+	function __return_low($existing = 'high') {
103 103
 		return 'low';
104 104
 	}
105 105
 }
Please login to merge, or discard this patch.
includes/plugin-and-theme-hooks/class-gravityview-theme-hooks-woothemes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 		parent::add_hooks();
67 67
 
68
-		add_action( 'admin_menu', array( $this, 'remove_meta_box' ), 11 );
68
+		add_action('admin_menu', array($this, 'remove_meta_box'), 11);
69 69
 	}
70 70
 
71 71
 	/**
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
 	function remove_meta_box() {
76 76
 		global $pagenow;
77 77
 
78
-		$gv_page = gravityview_is_admin_page( '', 'single' );
78
+		$gv_page = gravityview_is_admin_page('', 'single');
79 79
 
80 80
 		// New View or Edit View page
81
-		if( $gv_page && $pagenow === 'post-new.php' ) {
82
-			remove_meta_box( 'woothemes-settings', 'gravityview', 'normal' );
81
+		if ($gv_page && $pagenow === 'post-new.php') {
82
+			remove_meta_box('woothemes-settings', 'gravityview', 'normal');
83 83
 		}
84 84
 	}
85 85
 
Please login to merge, or discard this patch.
includes/presets/business-data/class-gravityview-preset-business-data.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@
 block discarded – undo
21 21
 		$settings = array(
22 22
 			'slug'          => 'table',
23 23
 			'type'          => 'preset',
24
-			'label'         => __( 'Business Data', 'gravityview' ),
25
-			'description'   => __( 'Display business information in a table.', 'gravityview' ),
26
-			'logo'          => plugins_url( 'includes/presets/business-data/logo-business-data.png', GRAVITYVIEW_FILE ),
24
+			'label'         => __('Business Data', 'gravityview'),
25
+			'description'   => __('Display business information in a table.', 'gravityview'),
26
+			'logo'          => plugins_url('includes/presets/business-data/logo-business-data.png', GRAVITYVIEW_FILE),
27 27
 			'preview'       => 'http://demo.gravityview.co/blog/view/business-table/',
28
-			'preset_form'   => GRAVITYVIEW_DIR . 'includes/presets/business-data/form-business-data.xml',
29
-			'preset_fields' => GRAVITYVIEW_DIR . 'includes/presets/business-data/fields-business-data.xml'
28
+			'preset_form'   => GRAVITYVIEW_DIR.'includes/presets/business-data/form-business-data.xml',
29
+			'preset_fields' => GRAVITYVIEW_DIR.'includes/presets/business-data/fields-business-data.xml'
30 30
 		);
31 31
 
32
-		parent::__construct( $id, $settings );
32
+		parent::__construct($id, $settings);
33 33
 	}
34 34
 }
35 35
 
Please login to merge, or discard this patch.