Completed
Branch master (3ac4b1)
by Zack
04:30
created
plugin-and-theme-hooks/abstract-gravityview-plugin-and-theme-hooks.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 	 * @return void
90 90
 	 */
91 91
 	private function maybe_add_hooks() {
92
-		$class_exists = ! $this->class_name || ( $this->class_name && class_exists( $this->class_name ) );
93
-		$function_exists = ! $this->function_name || ( $this->function_name && function_exists( $this->function_name ) );
94
-		$constant_defined = ! $this->constant_name || ( $this->constant_name && defined( $this->constant_name ) );
92
+		$class_exists = !$this->class_name || ($this->class_name && class_exists($this->class_name));
93
+		$function_exists = !$this->function_name || ($this->function_name && function_exists($this->function_name));
94
+		$constant_defined = !$this->constant_name || ($this->constant_name && defined($this->constant_name));
95 95
 
96
-		if( $class_exists || $function_exists || $constant_defined ) {
96
+		if ($class_exists || $function_exists || $constant_defined) {
97 97
 			$this->add_hooks();
98 98
 		}
99 99
 	}
@@ -104,20 +104,20 @@  discard block
 block discarded – undo
104 104
 	 * @return void
105 105
 	 */
106 106
 	protected function add_hooks() {
107
-		if( $this->content_meta_keys ) {
108
-			add_filter( 'gravityview/data/parse/meta_keys', array( $this, 'merge_content_meta_keys' ), 10, 2 );
107
+		if ($this->content_meta_keys) {
108
+			add_filter('gravityview/data/parse/meta_keys', array($this, 'merge_content_meta_keys'), 10, 2);
109 109
 		}
110 110
 
111
-		if( $this->script_handles ) {
112
-			add_filter( 'gravityview_noconflict_scripts', array( $this, 'merge_noconflict_scripts' ) );
111
+		if ($this->script_handles) {
112
+			add_filter('gravityview_noconflict_scripts', array($this, 'merge_noconflict_scripts'));
113 113
 		}
114 114
 
115
-		if( $this->style_handles ) {
116
-			add_filter( 'gravityview_noconflict_styles', array( $this, 'merge_noconflict_styles' ) );
115
+		if ($this->style_handles) {
116
+			add_filter('gravityview_noconflict_styles', array($this, 'merge_noconflict_styles'));
117 117
 		}
118 118
 
119
-		if( $this->post_type_support ) {
120
-			add_filter( 'gravityview_post_type_support', array( $this, 'merge_post_type_support' ), 10, 2 );
119
+		if ($this->post_type_support) {
120
+			add_filter('gravityview_post_type_support', array($this, 'merge_post_type_support'), 10, 2);
121 121
 		}
122 122
 	}
123 123
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 	 *
132 132
 	 * @return array Array of features associated with a functional area of the edit screen, merged with existing values
133 133
 	 */
134
-	public function merge_post_type_support( $supports = array(), $is_hierarchical = false ) {
135
-		$supports = array_merge( $this->post_type_support, $supports );
134
+	public function merge_post_type_support($supports = array(), $is_hierarchical = false) {
135
+		$supports = array_merge($this->post_type_support, $supports);
136 136
 		return $supports;
137 137
 	}
138 138
 
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
 	 *
146 146
 	 * @return array Handles, merged with existing styles
147 147
 	 */
148
-	public function merge_noconflict_styles( $handles ) {
149
-		$handles = array_merge( $this->style_handles, $handles );
148
+	public function merge_noconflict_styles($handles) {
149
+		$handles = array_merge($this->style_handles, $handles);
150 150
 		return $handles;
151 151
 	}
152 152
 
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
 	 *
160 160
 	 * @return array Handles, merged with existing scripts
161 161
 	 */
162
-	public function merge_noconflict_scripts( $handles ) {
163
-		$handles = array_merge( $this->script_handles, $handles );
162
+	public function merge_noconflict_scripts($handles) {
163
+		$handles = array_merge($this->script_handles, $handles);
164 164
 		return $handles;
165 165
 	}
166 166
 
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
 	 *
175 175
 	 * @return array Meta key array, merged with existing meta keys
176 176
 	 */
177
-	public function merge_content_meta_keys( $meta_keys = array(), $post_id = 0 ) {
178
-		return array_merge( $this->content_meta_keys, $meta_keys );
177
+	public function merge_content_meta_keys($meta_keys = array(), $post_id = 0) {
178
+		return array_merge($this->content_meta_keys, $meta_keys);
179 179
 	}
180 180
 
181 181
 }
182 182
\ 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.
presets/business-listings/class-gravityview-preset-business-listings.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'          => 'list',
23 23
 			'type'          => 'preset',
24
-			'label'         => __( 'Business Listings', 'gravityview' ),
25
-			'description'   => __( 'Display business profiles.', 'gravityview' ),
26
-			'logo'          => plugins_url( 'includes/presets/business-listings/logo-business-listings.png', GRAVITYVIEW_FILE ),
24
+			'label'         => __('Business Listings', 'gravityview'),
25
+			'description'   => __('Display business profiles.', 'gravityview'),
26
+			'logo'          => plugins_url('includes/presets/business-listings/logo-business-listings.png', GRAVITYVIEW_FILE),
27 27
 			'preview'       => 'http://demo.gravityview.co/blog/view/business-listings/',
28
-			'preset_form'   => GRAVITYVIEW_DIR . 'includes/presets/business-listings/form-business-listings.xml',
29
-			'preset_fields' => GRAVITYVIEW_DIR . 'includes/presets/business-listings/fields-business-listings.xml'
28
+			'preset_form'   => GRAVITYVIEW_DIR.'includes/presets/business-listings/form-business-listings.xml',
29
+			'preset_fields' => GRAVITYVIEW_DIR.'includes/presets/business-listings/fields-business-listings.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.
includes/presets/default-edit/class-gravityview-default-template-edit.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class GravityView_Default_Template_Edit extends GravityView_Template {
20 20
 
21
-	function __construct( $id = 'default_table_edit', $settings = array(), $field_options = array(), $areas = array() ) {
21
+	function __construct($id = 'default_table_edit', $settings = array(), $field_options = array(), $areas = array()) {
22 22
 
23 23
 		$edit_settings = array(
24 24
 			'slug' => 'edit',
25 25
 			'type' => 'internal',
26
-			'label' =>  __( 'Edit Table', 'gravityview' ),
26
+			'label' =>  __('Edit Table', 'gravityview'),
27 27
 			'description' => __('Display items in a table view.', 'gravityview'),
28 28
 			'logo' => plugins_url('includes/presets/default-table/logo-default-table.png', GRAVITYVIEW_FILE),
29 29
 			'css_source' => plugins_url('templates/css/table-view.css', GRAVITYVIEW_FILE),
30 30
 		);
31 31
 
32
-		$settings = wp_parse_args( $settings, $edit_settings );
32
+		$settings = wp_parse_args($settings, $edit_settings);
33 33
 
34 34
 		/**
35 35
 		 * @see  GravityView_Admin_Views::get_default_field_options() for Generic Field Options
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 				'1-1' => array(
43 43
 					array(
44 44
 						'areaid' => 'edit-fields',
45
-						'title' => __('Visible Edit Fields', 'gravityview' )
45
+						'title' => __('Visible Edit Fields', 'gravityview')
46 46
 					)
47 47
 				)
48 48
 			)
49 49
 		);
50 50
 
51 51
 
52
-		parent::__construct( $id, $settings, $field_options, $areas );
52
+		parent::__construct($id, $settings, $field_options, $areas);
53 53
 
54 54
 	}
55 55
 
Please login to merge, or discard this patch.
includes/presets/default-list/class-gravityview-default-template-list.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -6,23 +6,23 @@  discard block
 block discarded – undo
6 6
  */
7 7
 class GravityView_Default_Template_List extends GravityView_Template {
8 8
 
9
-	function __construct( $id = 'default_list', $settings = array(), $field_options = array(), $areas = array() ) {
9
+	function __construct($id = 'default_list', $settings = array(), $field_options = array(), $areas = array()) {
10 10
 
11 11
 		$list_settings = array(
12 12
 			'slug'        => 'list',
13 13
 			'type'        => 'custom',
14
-			'label'       => __( 'List (default)', 'gravityview' ),
15
-			'description' => __( 'Display items in a listing view.', 'gravityview' ),
16
-			'logo'        => plugins_url( 'includes/presets/default-list/logo-default-list.png', GRAVITYVIEW_FILE ),
17
-			'css_source'  => plugins_url( 'templates/css/list-view.css', GRAVITYVIEW_FILE ),
14
+			'label'       => __('List (default)', 'gravityview'),
15
+			'description' => __('Display items in a listing view.', 'gravityview'),
16
+			'logo'        => plugins_url('includes/presets/default-list/logo-default-list.png', GRAVITYVIEW_FILE),
17
+			'css_source'  => plugins_url('templates/css/list-view.css', GRAVITYVIEW_FILE),
18 18
 		);
19 19
 
20
-		$settings = wp_parse_args( $settings, $list_settings );
20
+		$settings = wp_parse_args($settings, $list_settings);
21 21
 
22 22
 		$field_options = array(
23 23
 			'show_as_link' => array(
24 24
 				'type'    => 'checkbox',
25
-				'label'   => __( 'Link to single entry', 'gravityview' ),
25
+				'label'   => __('Link to single entry', 'gravityview'),
26 26
 				'value'   => false,
27 27
 				'context' => 'directory'
28 28
 			),
@@ -33,27 +33,27 @@  discard block
 block discarded – undo
33 33
 				'1-1' => array(
34 34
 					array(
35 35
 						'areaid'   => 'list-title',
36
-						'title'    => __( 'Listing Title', 'gravityview' ),
36
+						'title'    => __('Listing Title', 'gravityview'),
37 37
 						'subtitle' => ''
38 38
 					),
39 39
 					array(
40 40
 						'areaid'   => 'list-subtitle',
41
-						'title'    => __( 'Subheading', 'gravityview' ),
42
-						'subtitle' => __( 'Data placed here will be bold.', 'gravityview' ),
41
+						'title'    => __('Subheading', 'gravityview'),
42
+						'subtitle' => __('Data placed here will be bold.', 'gravityview'),
43 43
 					),
44 44
 				),
45 45
 				'1-3' => array(
46 46
 					array(
47 47
 						'areaid'   => 'list-image',
48
-						'title'    => __( 'Image', 'gravityview' ),
49
-						'subtitle' => __( 'Leave empty to remove.', 'gravityview' ),
48
+						'title'    => __('Image', 'gravityview'),
49
+						'subtitle' => __('Leave empty to remove.', 'gravityview'),
50 50
 					)
51 51
 				),
52 52
 				'2-3' => array(
53 53
 					array(
54 54
 						'areaid'   => 'list-description',
55
-						'title'    => __( 'Other Fields', 'gravityview' ),
56
-						'subtitle' => __( 'Below the subheading, a good place for description and other data.', 'gravityview' ),
55
+						'title'    => __('Other Fields', 'gravityview'),
56
+						'subtitle' => __('Below the subheading, a good place for description and other data.', 'gravityview'),
57 57
 					)
58 58
 				)
59 59
 			),
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
 				'1-2' => array(
62 62
 					array(
63 63
 						'areaid'   => 'list-footer-left',
64
-						'title'    => __( 'Footer Left', 'gravityview' ),
64
+						'title'    => __('Footer Left', 'gravityview'),
65 65
 						'subtitle' => ''
66 66
 					)
67 67
 				),
68 68
 				'2-2' => array(
69 69
 					array(
70 70
 						'areaid'   => 'list-footer-right',
71
-						'title'    => __( 'Footer Right', 'gravityview' ),
71
+						'title'    => __('Footer Right', 'gravityview'),
72 72
 						'subtitle' => ''
73 73
 					)
74 74
 				)
75 75
 			)
76 76
 		);
77 77
 
78
-		parent::__construct( $id, $settings, $field_options, $areas );
78
+		parent::__construct($id, $settings, $field_options, $areas);
79 79
 
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.
includes/presets/default-table/class-gravityview-default-template-table.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@  discard block
 block discarded – undo
6 6
  */
7 7
 class GravityView_Default_Template_Table extends GravityView_Template {
8 8
 
9
-	function __construct( $id = 'default_table', $settings = array(), $field_options = array(), $areas = array() ) {
9
+	function __construct($id = 'default_table', $settings = array(), $field_options = array(), $areas = array()) {
10 10
 
11 11
 		$table_settings = array(
12 12
 			'slug'        => 'table',
13 13
 			'type'        => 'custom',
14
-			'label'       => __( 'Table (default)', 'gravityview' ),
15
-			'description' => __( 'Display items in a table view.', 'gravityview' ),
16
-			'logo'        => plugins_url( 'includes/presets/default-table/logo-default-table.png', GRAVITYVIEW_FILE ),
17
-			'css_source'  => plugins_url( 'templates/css/table-view.css', GRAVITYVIEW_FILE ),
14
+			'label'       => __('Table (default)', 'gravityview'),
15
+			'description' => __('Display items in a table view.', 'gravityview'),
16
+			'logo'        => plugins_url('includes/presets/default-table/logo-default-table.png', GRAVITYVIEW_FILE),
17
+			'css_source'  => plugins_url('templates/css/table-view.css', GRAVITYVIEW_FILE),
18 18
 		);
19 19
 
20
-		$settings = wp_parse_args( $settings, $table_settings );
20
+		$settings = wp_parse_args($settings, $table_settings);
21 21
 
22 22
 		/**
23 23
 		 * @see  GravityView_Admin_Views::get_default_field_options() for Generic Field Options
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		$field_options = array(
27 27
 			'show_as_link' => array(
28 28
 				'type'    => 'checkbox',
29
-				'label'   => __( 'Link to single entry', 'gravityview' ),
29
+				'label'   => __('Link to single entry', 'gravityview'),
30 30
 				'value'   => false,
31 31
 				'context' => 'directory'
32 32
 			),
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
 				'1-1' => array(
38 38
 					array(
39 39
 						'areaid'   => 'table-columns',
40
-						'title'    => __( 'Visible Table Columns', 'gravityview' ),
41
-						'subtitle' => __( 'Each field will be displayed as a column in the table.', 'gravityview' ),
40
+						'title'    => __('Visible Table Columns', 'gravityview'),
41
+						'subtitle' => __('Each field will be displayed as a column in the table.', 'gravityview'),
42 42
 					)
43 43
 				)
44 44
 			)
45 45
 		);
46 46
 
47 47
 
48
-		parent::__construct( $id, $settings, $field_options, $areas );
48
+		parent::__construct($id, $settings, $field_options, $areas);
49 49
 
50 50
 	}
51 51
 }
Please login to merge, or discard this patch.
includes/presets/event-listings/class-gravityview-preset-event-listings.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'          => 'list',
23 23
 			'type'          => 'preset',
24
-			'label'         => __( 'Event Listings', 'gravityview' ),
25
-			'description'   => __( 'Present a list of your events.', 'gravityview' ),
26
-			'logo'          => plugins_url( 'includes/presets/event-listings/logo-event-listings.png', GRAVITYVIEW_FILE ),
24
+			'label'         => __('Event Listings', 'gravityview'),
25
+			'description'   => __('Present a list of your events.', 'gravityview'),
26
+			'logo'          => plugins_url('includes/presets/event-listings/logo-event-listings.png', GRAVITYVIEW_FILE),
27 27
 			'preview'       => 'http://demo.gravityview.co/blog/view/event-listings/',
28
-			'preset_form'   => GRAVITYVIEW_DIR . 'includes/presets/event-listings/form-event-listings.xml',
29
-			'preset_fields' => GRAVITYVIEW_DIR . 'includes/presets/event-listings/fields-event-listings.xml'
28
+			'preset_form'   => GRAVITYVIEW_DIR.'includes/presets/event-listings/form-event-listings.xml',
29
+			'preset_fields' => GRAVITYVIEW_DIR.'includes/presets/event-listings/fields-event-listings.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.