Completed
Push — develop ( 296358...a9eff4 )
by David
01:38 queued 16s
created
src/modules/gardening-kg/includes/Main_Entity/Gardening_Kg_Post_Stats.php 2 patches
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -8,43 +8,43 @@  discard block
 block discarded – undo
8 8
 
9 9
 class Gardening_Kg_Post_Stats {
10 10
 
11
-	public function register_hooks() {
12
-		add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
13
-	}
14
-
15
-	public function dashboard__stats__settings( $arr ) {
16
-
17
-		$data = $this->get_data();
18
-
19
-		$arr[] = new Stats_Settings(
20
-			__( 'Boosted Posts are the ones WordLift matched the main topic with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
-			__( 'Lifted Posts', 'wordlift' ),
22
-			__( 'Posts', 'wordlift' ),
23
-			'#00c48c',
24
-			'../posts',
25
-			(int) $data->total,
26
-			(int) $data->lifted
27
-		);
28
-
29
-		return $arr;
30
-	}
31
-
32
-	public function get_data() {
33
-		global $wpdb;
34
-		$post_types     = apply_filters(
35
-			'wl_dashboard__post_entity_match__post_types',
36
-			array(
37
-				'post',
38
-				'page',
39
-			)
40
-		);
41
-		$post_types_sql = Escape::sql_array( $post_types );
42
-
43
-		// $post_types_sql is already escaped using esc_sql.
44
-		// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
45
-		return $wpdb->get_row(
46
-			$wpdb->prepare(
47
-				"
11
+    public function register_hooks() {
12
+        add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
13
+    }
14
+
15
+    public function dashboard__stats__settings( $arr ) {
16
+
17
+        $data = $this->get_data();
18
+
19
+        $arr[] = new Stats_Settings(
20
+            __( 'Boosted Posts are the ones WordLift matched the main topic with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
+            __( 'Lifted Posts', 'wordlift' ),
22
+            __( 'Posts', 'wordlift' ),
23
+            '#00c48c',
24
+            '../posts',
25
+            (int) $data->total,
26
+            (int) $data->lifted
27
+        );
28
+
29
+        return $arr;
30
+    }
31
+
32
+    public function get_data() {
33
+        global $wpdb;
34
+        $post_types     = apply_filters(
35
+            'wl_dashboard__post_entity_match__post_types',
36
+            array(
37
+                'post',
38
+                'page',
39
+            )
40
+        );
41
+        $post_types_sql = Escape::sql_array( $post_types );
42
+
43
+        // $post_types_sql is already escaped using esc_sql.
44
+        // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
45
+        return $wpdb->get_row(
46
+            $wpdb->prepare(
47
+                "
48 48
 				SELECT COUNT(1) AS total, COUNT(e.about_jsonld) as lifted
49 49
 				FROM {$wpdb->prefix}posts p
50 50
 				LEFT JOIN {$wpdb->prefix}wl_entities e
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 						AND e.content_type = %d
53 53
 				WHERE p.post_type IN ({$post_types_sql})
54 54
 				",
55
-				Object_Type_Enum::POST
56
-			)
57
-		);
58
-		// phpcs:enable
59
-	}
55
+                Object_Type_Enum::POST
56
+            )
57
+        );
58
+        // phpcs:enable
59
+    }
60 60
 
61 61
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@  discard block
 block discarded – undo
9 9
 class Gardening_Kg_Post_Stats {
10 10
 
11 11
 	public function register_hooks() {
12
-		add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
12
+		add_filter('wl_dashboard__stats__settings', array($this, 'dashboard__stats__settings'));
13 13
 	}
14 14
 
15
-	public function dashboard__stats__settings( $arr ) {
15
+	public function dashboard__stats__settings($arr) {
16 16
 
17 17
 		$data = $this->get_data();
18 18
 
19 19
 		$arr[] = new Stats_Settings(
20
-			__( 'Boosted Posts are the ones WordLift matched the main topic with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
-			__( 'Lifted Posts', 'wordlift' ),
22
-			__( 'Posts', 'wordlift' ),
20
+			__('Boosted Posts are the ones WordLift matched the main topic with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift'),
21
+			__('Lifted Posts', 'wordlift'),
22
+			__('Posts', 'wordlift'),
23 23
 			'#00c48c',
24 24
 			'../posts',
25 25
 			(int) $data->total,
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 
32 32
 	public function get_data() {
33 33
 		global $wpdb;
34
-		$post_types     = apply_filters(
34
+		$post_types = apply_filters(
35 35
 			'wl_dashboard__post_entity_match__post_types',
36 36
 			array(
37 37
 				'post',
38 38
 				'page',
39 39
 			)
40 40
 		);
41
-		$post_types_sql = Escape::sql_array( $post_types );
41
+		$post_types_sql = Escape::sql_array($post_types);
42 42
 
43 43
 		// $post_types_sql is already escaped using esc_sql.
44 44
 		// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
Please login to merge, or discard this patch.
src/modules/gardening-kg/includes/Term_Entity/Gardening_Kg_Term_Stats.php 2 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -8,42 +8,42 @@  discard block
 block discarded – undo
8 8
 
9 9
 class Gardening_Kg_Term_Stats {
10 10
 
11
-	public function register_hooks() {
12
-		add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
13
-	}
14
-
15
-	public function dashboard__stats__settings( $arr ) {
16
-
17
-		$data = $this->get_data();
18
-
19
-		$arr[] = new Stats_Settings(
20
-			__( 'Boosted Terms are the ones WordLift matched with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
-			__( 'Lifted Terms', 'wordlift' ),
22
-			__( 'Terms', 'wordlift' ),
23
-			'#0076f6',
24
-			'../terms',
25
-			(int) $data->total,
26
-			(int) $data->lifted
27
-		);
28
-
29
-		return $arr;
30
-	}
31
-
32
-	public function get_data() {
33
-		global $wpdb;
34
-		$taxonomies     = apply_filters(
35
-			'wl_dashboard__post_entity_match__taxonomies',
36
-			array(
37
-				'post_tag',
38
-				'category',
39
-			)
40
-		);
41
-		$taxonomies_sql = Escape::sql_array( $taxonomies );
42
-		return $wpdb->get_row(
43
-		// $taxonomies_sql is already escaped using esc_sql.
44
-		// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
45
-			$wpdb->prepare(
46
-				"
11
+    public function register_hooks() {
12
+        add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
13
+    }
14
+
15
+    public function dashboard__stats__settings( $arr ) {
16
+
17
+        $data = $this->get_data();
18
+
19
+        $arr[] = new Stats_Settings(
20
+            __( 'Boosted Terms are the ones WordLift matched with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
+            __( 'Lifted Terms', 'wordlift' ),
22
+            __( 'Terms', 'wordlift' ),
23
+            '#0076f6',
24
+            '../terms',
25
+            (int) $data->total,
26
+            (int) $data->lifted
27
+        );
28
+
29
+        return $arr;
30
+    }
31
+
32
+    public function get_data() {
33
+        global $wpdb;
34
+        $taxonomies     = apply_filters(
35
+            'wl_dashboard__post_entity_match__taxonomies',
36
+            array(
37
+                'post_tag',
38
+                'category',
39
+            )
40
+        );
41
+        $taxonomies_sql = Escape::sql_array( $taxonomies );
42
+        return $wpdb->get_row(
43
+        // $taxonomies_sql is already escaped using esc_sql.
44
+        // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
45
+            $wpdb->prepare(
46
+                "
47 47
 				SELECT COUNT(1) as total, COUNT(e.about_jsonld) AS lifted
48 48
 			    FROM {$wpdb->prefix}terms t 
49 49
 			    INNER JOIN {$wpdb->prefix}term_taxonomy tt 
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 			    		AND e.content_type = %d 
54 54
 			    WHERE tt.taxonomy IN ( {$taxonomies_sql} )
55 55
 				",
56
-				Object_Type_Enum::TERM
57
-			)
58
-		);
59
-		// phpcs:enable
60
-	}
56
+                Object_Type_Enum::TERM
57
+            )
58
+        );
59
+        // phpcs:enable
60
+    }
61 61
 
62 62
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@  discard block
 block discarded – undo
9 9
 class Gardening_Kg_Term_Stats {
10 10
 
11 11
 	public function register_hooks() {
12
-		add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
12
+		add_filter('wl_dashboard__stats__settings', array($this, 'dashboard__stats__settings'));
13 13
 	}
14 14
 
15
-	public function dashboard__stats__settings( $arr ) {
15
+	public function dashboard__stats__settings($arr) {
16 16
 
17 17
 		$data = $this->get_data();
18 18
 
19 19
 		$arr[] = new Stats_Settings(
20
-			__( 'Boosted Terms are the ones WordLift matched with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
-			__( 'Lifted Terms', 'wordlift' ),
22
-			__( 'Terms', 'wordlift' ),
20
+			__('Boosted Terms are the ones WordLift matched with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift'),
21
+			__('Lifted Terms', 'wordlift'),
22
+			__('Terms', 'wordlift'),
23 23
 			'#0076f6',
24 24
 			'../terms',
25 25
 			(int) $data->total,
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 
32 32
 	public function get_data() {
33 33
 		global $wpdb;
34
-		$taxonomies     = apply_filters(
34
+		$taxonomies = apply_filters(
35 35
 			'wl_dashboard__post_entity_match__taxonomies',
36 36
 			array(
37 37
 				'post_tag',
38 38
 				'category',
39 39
 			)
40 40
 		);
41
-		$taxonomies_sql = Escape::sql_array( $taxonomies );
41
+		$taxonomies_sql = Escape::sql_array($taxonomies);
42 42
 		return $wpdb->get_row(
43 43
 		// $taxonomies_sql is already escaped using esc_sql.
44 44
 		// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
Please login to merge, or discard this patch.
src/modules/food-kg/includes/Main_Entity/Food_Kg_Recipe_Stats.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -8,33 +8,33 @@  discard block
 block discarded – undo
8 8
 
9 9
 class Food_Kg_Recipe_Stats {
10 10
 
11
-	public function register_hooks() {
12
-		add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
13
-	}
11
+    public function register_hooks() {
12
+        add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
13
+    }
14 14
 
15
-	public function dashboard__stats__settings( $arr ) {
15
+    public function dashboard__stats__settings( $arr ) {
16 16
 
17
-		$data = Recipe_Query::get_data(); // $this->get_data();
17
+        $data = Recipe_Query::get_data(); // $this->get_data();
18 18
 
19
-		$arr[] = new Stats_Settings(
20
-			__( 'Boosted Recipes are the ones WordLift matched the main ingredient with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
-			__( 'Lifted Recipes', 'wordlift' ),
22
-			__( 'Recipes', 'wordlift' ),
23
-			'#00c48c',
24
-			'../recipes',
25
-			(int) $data->total,
26
-			(int) $data->lifted
27
-		);
19
+        $arr[] = new Stats_Settings(
20
+            __( 'Boosted Recipes are the ones WordLift matched the main ingredient with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
+            __( 'Lifted Recipes', 'wordlift' ),
22
+            __( 'Recipes', 'wordlift' ),
23
+            '#00c48c',
24
+            '../recipes',
25
+            (int) $data->total,
26
+            (int) $data->lifted
27
+        );
28 28
 
29
-		return $arr;
30
-	}
29
+        return $arr;
30
+    }
31 31
 
32
-	public function get_data() {
33
-		global $wpdb;
32
+    public function get_data() {
33
+        global $wpdb;
34 34
 
35
-		return $wpdb->get_row(
36
-			$wpdb->prepare(
37
-				"
35
+        return $wpdb->get_row(
36
+            $wpdb->prepare(
37
+                "
38 38
 				SELECT COUNT(1) AS total, COUNT(e.about_jsonld) as lifted
39 39
 				FROM {$wpdb->prefix}posts p
40 40
 				LEFT JOIN {$wpdb->prefix}wl_entities e
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 						AND e.content_type = %d 
43 43
 				WHERE p.post_type = %s
44 44
 				",
45
-				Object_Type_Enum::POST,
46
-				'wprm_recipe'
47
-			)
48
-		);
49
-	}
45
+                Object_Type_Enum::POST,
46
+                'wprm_recipe'
47
+            )
48
+        );
49
+    }
50 50
 
51 51
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,17 +9,17 @@
 block discarded – undo
9 9
 class Food_Kg_Recipe_Stats {
10 10
 
11 11
 	public function register_hooks() {
12
-		add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
12
+		add_filter('wl_dashboard__stats__settings', array($this, 'dashboard__stats__settings'));
13 13
 	}
14 14
 
15
-	public function dashboard__stats__settings( $arr ) {
15
+	public function dashboard__stats__settings($arr) {
16 16
 
17 17
 		$data = Recipe_Query::get_data(); // $this->get_data();
18 18
 
19 19
 		$arr[] = new Stats_Settings(
20
-			__( 'Boosted Recipes are the ones WordLift matched the main ingredient with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
21
-			__( 'Lifted Recipes', 'wordlift' ),
22
-			__( 'Recipes', 'wordlift' ),
20
+			__('Boosted Recipes are the ones WordLift matched the main ingredient with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift'),
21
+			__('Lifted Recipes', 'wordlift'),
22
+			__('Recipes', 'wordlift'),
23 23
 			'#00c48c',
24 24
 			'../recipes',
25 25
 			(int) $data->total,
Please login to merge, or discard this patch.
src/modules/food-kg/includes/Term_Entity/Food_Kg_Ingredient_Stats.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -7,33 +7,33 @@  discard block
 block discarded – undo
7 7
 
8 8
 class Food_Kg_Ingredient_Stats {
9 9
 
10
-	public function register_hooks() {
11
-		add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
12
-	}
10
+    public function register_hooks() {
11
+        add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
12
+    }
13 13
 
14
-	public function dashboard__stats__settings( $arr ) {
14
+    public function dashboard__stats__settings( $arr ) {
15 15
 
16
-		$data = $this->get_data();
16
+        $data = $this->get_data();
17 17
 
18
-		$arr[] = new Stats_Settings(
19
-			__( 'Boosted Ingredients are the ones WordLift matched with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
20
-			__( 'Lifted Ingredients', 'wordlift' ),
21
-			__( 'Ingredients', 'wordlift' ),
22
-			'#0076f6',
23
-			'../ingredients',
24
-			(int) $data->total,
25
-			(int) $data->lifted
26
-		);
18
+        $arr[] = new Stats_Settings(
19
+            __( 'Boosted Ingredients are the ones WordLift matched with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
20
+            __( 'Lifted Ingredients', 'wordlift' ),
21
+            __( 'Ingredients', 'wordlift' ),
22
+            '#0076f6',
23
+            '../ingredients',
24
+            (int) $data->total,
25
+            (int) $data->lifted
26
+        );
27 27
 
28
-		return $arr;
29
-	}
28
+        return $arr;
29
+    }
30 30
 
31
-	public function get_data() {
32
-		global $wpdb;
31
+    public function get_data() {
32
+        global $wpdb;
33 33
 
34
-		return $wpdb->get_row(
35
-			$wpdb->prepare(
36
-				"
34
+        return $wpdb->get_row(
35
+            $wpdb->prepare(
36
+                "
37 37
 				SELECT COUNT(1) as total, COUNT(e.about_jsonld) AS lifted
38 38
 			    FROM {$wpdb->prefix}terms t 
39 39
 			    INNER JOIN {$wpdb->prefix}term_taxonomy tt 
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 						AND e.content_type = %d
44 44
 				WHERE tt.taxonomy = %s
45 45
 				",
46
-				Object_Type_Enum::TERM,
47
-				'wprm_ingredient'
48
-			)
49
-		);
50
-	}
46
+                Object_Type_Enum::TERM,
47
+                'wprm_ingredient'
48
+            )
49
+        );
50
+    }
51 51
 
52 52
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
8 8
 class Food_Kg_Ingredient_Stats {
9 9
 
10 10
 	public function register_hooks() {
11
-		add_filter( 'wl_dashboard__stats__settings', array( $this, 'dashboard__stats__settings' ) );
11
+		add_filter('wl_dashboard__stats__settings', array($this, 'dashboard__stats__settings'));
12 12
 	}
13 13
 
14
-	public function dashboard__stats__settings( $arr ) {
14
+	public function dashboard__stats__settings($arr) {
15 15
 
16 16
 		$data = $this->get_data();
17 17
 
18 18
 		$arr[] = new Stats_Settings(
19
-			__( 'Boosted Ingredients are the ones WordLift matched with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift' ),
20
-			__( 'Lifted Ingredients', 'wordlift' ),
21
-			__( 'Ingredients', 'wordlift' ),
19
+			__('Boosted Ingredients are the ones WordLift matched with the Knowledge Graph. This helps Search Engines understand your content better and boost your rankings.', 'wordlift'),
20
+			__('Lifted Ingredients', 'wordlift'),
21
+			__('Ingredients', 'wordlift'),
22 22
 			'#0076f6',
23 23
 			'../ingredients',
24 24
 			(int) $data->total,
Please login to merge, or discard this patch.