Completed
Push — develop ( 011379...ab6545 )
by
unknown
06:10 queued 02:48
created
src/wordlift/dataset/class-sync-hooks-wordpress-ontology.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -6,49 +6,49 @@
 block discarded – undo
6 6
 
7 7
 class Sync_Hooks_Wordpress_Ontology {
8 8
 
9
-	const HTTP_PURL_ORG_WORDPRESS_1_0 = 'http://purl.org/wordpress/1.0/';
9
+    const HTTP_PURL_ORG_WORDPRESS_1_0 = 'http://purl.org/wordpress/1.0/';
10 10
 
11
-	public function __construct() {
12
-		add_filter( 'wl_dataset__sync_service__sync_item__jsonld', array( $this, 'jsonld' ), 10, 3 );
13
-	}
11
+    public function __construct() {
12
+        add_filter( 'wl_dataset__sync_service__sync_item__jsonld', array( $this, 'jsonld' ), 10, 3 );
13
+    }
14 14
 
15
-	public function jsonld( $jsonld, $type, $object_id ) {
15
+    public function jsonld( $jsonld, $type, $object_id ) {
16 16
 
17
-		$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'id' ] = $object_id;
17
+        $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'id' ] = $object_id;
18 18
 
19
-		switch ( $type ) {
19
+        switch ( $type ) {
20 20
 
21
-			case Object_Type_Enum::TERM:
22
-				$term = get_term( $object_id );
21
+            case Object_Type_Enum::TERM:
22
+                $term = get_term( $object_id );
23 23
 
24
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]        = 'term';
25
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'name' ]        = $term->name;
26
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'description' ] = $term->description;
27
-				break;
24
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]        = 'term';
25
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'name' ]        = $term->name;
26
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'description' ] = $term->description;
27
+                break;
28 28
 
29
-			case Object_Type_Enum::USER:
30
-				$user = get_userdata( $object_id );
29
+            case Object_Type_Enum::USER:
30
+                $user = get_userdata( $object_id );
31 31
 
32
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]        = 'user';
33
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'displayName' ] = $user->display_name;
34
-				break;
32
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]        = 'user';
33
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'displayName' ] = $user->display_name;
34
+                break;
35 35
 
36
-			case Object_Type_Enum::POST:
37
-				$post = get_post( $object_id );
36
+            case Object_Type_Enum::POST:
37
+                $post = get_post( $object_id );
38 38
 
39
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]       = 'post';
40
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'customType' ] = $post->post_type;
41
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'title' ]      = $post->post_title;
42
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'status' ]     = $post->post_status;
43
-				$content   = has_blocks( $post ) ? do_blocks( $post->post_content ) : do_shortcode( $post->post_content );
44
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'content' ]    = $content;
45
-				break;
39
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]       = 'post';
40
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'customType' ] = $post->post_type;
41
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'title' ]      = $post->post_title;
42
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'status' ]     = $post->post_status;
43
+                $content   = has_blocks( $post ) ? do_blocks( $post->post_content ) : do_shortcode( $post->post_content );
44
+                $jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'content' ]    = $content;
45
+                break;
46 46
 
47
-			default:
47
+            default:
48 48
 
49
-		}
49
+        }
50 50
 
51
-		return $jsonld;
52
-	}
51
+        return $jsonld;
52
+    }
53 53
 
54 54
 }
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -9,39 +9,39 @@
 block discarded – undo
9 9
 	const HTTP_PURL_ORG_WORDPRESS_1_0 = 'http://purl.org/wordpress/1.0/';
10 10
 
11 11
 	public function __construct() {
12
-		add_filter( 'wl_dataset__sync_service__sync_item__jsonld', array( $this, 'jsonld' ), 10, 3 );
12
+		add_filter('wl_dataset__sync_service__sync_item__jsonld', array($this, 'jsonld'), 10, 3);
13 13
 	}
14 14
 
15
-	public function jsonld( $jsonld, $type, $object_id ) {
15
+	public function jsonld($jsonld, $type, $object_id) {
16 16
 
17
-		$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'id' ] = $object_id;
17
+		$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'id'] = $object_id;
18 18
 
19
-		switch ( $type ) {
19
+		switch ($type) {
20 20
 
21 21
 			case Object_Type_Enum::TERM:
22
-				$term = get_term( $object_id );
22
+				$term = get_term($object_id);
23 23
 
24
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]        = 'term';
25
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'name' ]        = $term->name;
26
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'description' ] = $term->description;
24
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'type']        = 'term';
25
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'name']        = $term->name;
26
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'description'] = $term->description;
27 27
 				break;
28 28
 
29 29
 			case Object_Type_Enum::USER:
30
-				$user = get_userdata( $object_id );
30
+				$user = get_userdata($object_id);
31 31
 
32
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]        = 'user';
33
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'displayName' ] = $user->display_name;
32
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'type']        = 'user';
33
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'displayName'] = $user->display_name;
34 34
 				break;
35 35
 
36 36
 			case Object_Type_Enum::POST:
37
-				$post = get_post( $object_id );
38
-
39
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'type' ]       = 'post';
40
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'customType' ] = $post->post_type;
41
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'title' ]      = $post->post_title;
42
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'status' ]     = $post->post_status;
43
-				$content   = has_blocks( $post ) ? do_blocks( $post->post_content ) : do_shortcode( $post->post_content );
44
-				$jsonld[0][ self::HTTP_PURL_ORG_WORDPRESS_1_0 . 'content' ]    = $content;
37
+				$post = get_post($object_id);
38
+
39
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'type']       = 'post';
40
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'customType'] = $post->post_type;
41
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'title']      = $post->post_title;
42
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'status']     = $post->post_status;
43
+				$content = has_blocks($post) ? do_blocks($post->post_content) : do_shortcode($post->post_content);
44
+				$jsonld[0][self::HTTP_PURL_ORG_WORDPRESS_1_0.'content']    = $content;
45 45
 				break;
46 46
 
47 47
 			default:
Please login to merge, or discard this patch.
src/admin/WL_Metabox/class-wl-metabox-field-sameas.php 2 patches
Indentation   +154 added lines, -154 removed lines patch added patch discarded remove patch
@@ -16,142 +16,142 @@  discard block
 block discarded – undo
16 16
  */
17 17
 class WL_Metabox_Field_sameas extends WL_Metabox_Field {
18 18
 
19
-	/**
20
-	 * @inheritdoc
21
-	 */
22
-	public function __construct( $args ) {
23
-		parent::__construct( $args['sameas'] );
24
-	}
25
-
26
-	/**
27
-	 * @inheritdoc
28
-	 */
29
-	public function save_data( $values ) {
30
-		// The autocomplete select may send JSON arrays in input values.
31
-
32
-		// Only use mb_* functions when mbstring is available.
33
-		//
34
-		// See https://github.com/insideout10/wordlift-plugin/issues/693.
35
-		if ( extension_loaded( 'mbstring' ) ) {
36
-			mb_regex_encoding( 'UTF-8' );
37
-
38
-			$merged = array_reduce( (array) $values, function ( $carry, $item ) {
39
-				return array_merge( $carry, mb_split( "\x{2063}", wp_unslash( $item ) ) );
40
-			}, array() );
41
-		} else {
42
-			$merged = array_reduce( (array) $values, function ( $carry, $item ) {
43
-				return array_merge( $carry, preg_split( "/\x{2063}/u", wp_unslash( $item ) ) );
44
-			}, array() );
45
-		}
46
-
47
-		// Convert all escaped special characters to their original.
48
-		$merged = array_map( 'urldecode', $merged );
49
-
50
-		$merged = $this->filter_urls( $merged );
51
-
52
-		parent::save_data( $merged );
53
-	}
54
-
55
-	/**
56
-	 * @inheritdoc
57
-	 */
58
-	public function sanitize_data_filter( $value ) {
59
-
60
-		// Call our sanitizer helper.
61
-		return Wordlift_Sanitizer::sanitize_url( $value );
62
-	}
63
-
64
-	/**
65
-	 * @inheritdoc
66
-	 */
67
-	protected function get_heading_html() {
68
-
69
-		// Add the select html fragment after the heading.
70
-		return parent::get_heading_html()
71
-		       . $this->get_select_html();
72
-	}
73
-
74
-	/**
75
-	 * Get the select html fragment.
76
-	 *
77
-	 * @return string The html fragment.
78
-	 * @since 3.15.0
79
-	 */
80
-	private function get_select_html() {
81
-		// Return an element where the new Autocomplete Select will attach to.
82
-		return '<p>'
83
-		       . esc_html__( 'Use the search below to link this entity with equivalent entities in the linked data cloud.', 'wordlift' )
84
-		       . '<div id="wl-metabox-field-sameas"></div></p>';
85
-	}
86
-
87
-	/**
88
-	 * @inheritdoc
89
-	 */
90
-	protected function get_add_button_html( $count ) {
91
-
92
-		$placeholder = esc_attr_x( 'Type here the URL of an equivalent entity from another dataset.', 'sameAs metabox input', 'wordlift' );
93
-
94
-		return
95
-  		'<button type="button" class="wl-add-input wl-add-input--link">'.esc_html__( 'Click here to manually add URLs', 'wordlift' ).'</button>'
19
+    /**
20
+     * @inheritdoc
21
+     */
22
+    public function __construct( $args ) {
23
+        parent::__construct( $args['sameas'] );
24
+    }
25
+
26
+    /**
27
+     * @inheritdoc
28
+     */
29
+    public function save_data( $values ) {
30
+        // The autocomplete select may send JSON arrays in input values.
31
+
32
+        // Only use mb_* functions when mbstring is available.
33
+        //
34
+        // See https://github.com/insideout10/wordlift-plugin/issues/693.
35
+        if ( extension_loaded( 'mbstring' ) ) {
36
+            mb_regex_encoding( 'UTF-8' );
37
+
38
+            $merged = array_reduce( (array) $values, function ( $carry, $item ) {
39
+                return array_merge( $carry, mb_split( "\x{2063}", wp_unslash( $item ) ) );
40
+            }, array() );
41
+        } else {
42
+            $merged = array_reduce( (array) $values, function ( $carry, $item ) {
43
+                return array_merge( $carry, preg_split( "/\x{2063}/u", wp_unslash( $item ) ) );
44
+            }, array() );
45
+        }
46
+
47
+        // Convert all escaped special characters to their original.
48
+        $merged = array_map( 'urldecode', $merged );
49
+
50
+        $merged = $this->filter_urls( $merged );
51
+
52
+        parent::save_data( $merged );
53
+    }
54
+
55
+    /**
56
+     * @inheritdoc
57
+     */
58
+    public function sanitize_data_filter( $value ) {
59
+
60
+        // Call our sanitizer helper.
61
+        return Wordlift_Sanitizer::sanitize_url( $value );
62
+    }
63
+
64
+    /**
65
+     * @inheritdoc
66
+     */
67
+    protected function get_heading_html() {
68
+
69
+        // Add the select html fragment after the heading.
70
+        return parent::get_heading_html()
71
+                . $this->get_select_html();
72
+    }
73
+
74
+    /**
75
+     * Get the select html fragment.
76
+     *
77
+     * @return string The html fragment.
78
+     * @since 3.15.0
79
+     */
80
+    private function get_select_html() {
81
+        // Return an element where the new Autocomplete Select will attach to.
82
+        return '<p>'
83
+                . esc_html__( 'Use the search below to link this entity with equivalent entities in the linked data cloud.', 'wordlift' )
84
+                . '<div id="wl-metabox-field-sameas"></div></p>';
85
+    }
86
+
87
+    /**
88
+     * @inheritdoc
89
+     */
90
+    protected function get_add_button_html( $count ) {
91
+
92
+        $placeholder = esc_attr_x( 'Type here the URL of an equivalent entity from another dataset.', 'sameAs metabox input', 'wordlift' );
93
+
94
+        return
95
+            '<button type="button" class="wl-add-input wl-add-input--link">'.esc_html__( 'Click here to manually add URLs', 'wordlift' ).'</button>'
96 96
         .'<div style="display: none;"><div class="wl-input-wrapper">'
97 97
         ."<input type='text' id='$this->meta_name' name='wl_metaboxes[$this->meta_name][]' placeholder='$placeholder' />"
98 98
         .'<button type="button" class="wl-remove-input wl-remove-input--sameas"></button>'
99 99
         .'</div></div>'
100 100
         . '<fieldset id="wl-input-container">'.$this->get_stored_values_html( $count ).'</fieldset>'
101 101
         .parent::get_add_custom_button_html( $count, 'Add Another URL', 'hide' );
102
-	}
103
-
104
-	/**
105
-	 * @inheritdoc
106
-	 */
107
-	protected function get_stored_values_html( &$count ) {
108
-
109
-		return  parent::get_stored_values_html( $count );
110
-	}
111
-
112
-	/**
113
-	 * @inheritdoc
114
-	 */
115
-	public function html() {
116
-
117
-		/**
118
-		 * Filter: wl_feature__enable__metabox-sameas.
119
-		 *
120
-		 * @param bool whether the sameAs metabox should be shown, defaults to true.
121
-		 *
122
-		 * @return bool
123
-		 * @since 3.29.1
124
-		 */
125
-		if ( apply_filters( 'wl_feature__enable__metabox-sameas', true ) ) {
126
-
127
-			// Open main <div> for the Field.
128
-			$html = $this->html_wrapper_open();
129
-
130
-			// Label.
131
-			$html .= $this->get_heading_html();
132
-
133
-			// print nonce.
134
-			$html .= $this->html_nonce();
135
-
136
-			// print data loaded from DB.
137
-			$count = 0;
138
-
139
-			// If cardinality allows it, print button to add new values.
140
-			$html .= $this->get_add_button_html( $count );
141
-
142
-			// Close the HTML wrapper.
143
-			$html .= $this->html_wrapper_close();
144
-
145
-			return $html;
146
-		}
147
-	}
148
-
149
-	/**
150
-	 * @inheritdoc
151
-	 */
152
-	public function html_input( $value ) {
153
-		@ob_start();
154
-		?>
102
+    }
103
+
104
+    /**
105
+     * @inheritdoc
106
+     */
107
+    protected function get_stored_values_html( &$count ) {
108
+
109
+        return  parent::get_stored_values_html( $count );
110
+    }
111
+
112
+    /**
113
+     * @inheritdoc
114
+     */
115
+    public function html() {
116
+
117
+        /**
118
+         * Filter: wl_feature__enable__metabox-sameas.
119
+         *
120
+         * @param bool whether the sameAs metabox should be shown, defaults to true.
121
+         *
122
+         * @return bool
123
+         * @since 3.29.1
124
+         */
125
+        if ( apply_filters( 'wl_feature__enable__metabox-sameas', true ) ) {
126
+
127
+            // Open main <div> for the Field.
128
+            $html = $this->html_wrapper_open();
129
+
130
+            // Label.
131
+            $html .= $this->get_heading_html();
132
+
133
+            // print nonce.
134
+            $html .= $this->html_nonce();
135
+
136
+            // print data loaded from DB.
137
+            $count = 0;
138
+
139
+            // If cardinality allows it, print button to add new values.
140
+            $html .= $this->get_add_button_html( $count );
141
+
142
+            // Close the HTML wrapper.
143
+            $html .= $this->html_wrapper_close();
144
+
145
+            return $html;
146
+        }
147
+    }
148
+
149
+    /**
150
+     * @inheritdoc
151
+     */
152
+    public function html_input( $value ) {
153
+        @ob_start();
154
+        ?>
155 155
         <div class="wl-input-wrapper wl-input-wrapper-readonly">
156 156
             <input
157 157
                     type="text"
@@ -165,29 +165,29 @@  discard block
 block discarded – undo
165 165
         </div>
166 166
 		<?php
167 167
 
168
-		$html = ob_get_clean();
169
-
170
-		return $html;
171
-	}
172
-
173
-	/**
174
-	 * @param array $urls
175
-	 *
176
-	 * @return array
177
-	 */
178
-	private function filter_urls( $urls ) {
179
-		$configuration_service = Wordlift_Configuration_Service::get_instance();
180
-		$dataset_uri           = $configuration_service->get_dataset_uri();
181
-
182
-		return array_filter( $urls, function ( $url ) use ( $dataset_uri ) {
183
-			$url_validation = filter_var( $url, FILTER_VALIDATE_URL );
184
-			if ( null === $dataset_uri ) {
185
-				return $url_validation;
186
-			}
187
-
188
-			// URLs should not start with local dataset uri.
189
-			return $url_validation && ( strpos( $url, $dataset_uri, 0 ) === false );
190
-		} );
191
-	}
168
+        $html = ob_get_clean();
169
+
170
+        return $html;
171
+    }
172
+
173
+    /**
174
+     * @param array $urls
175
+     *
176
+     * @return array
177
+     */
178
+    private function filter_urls( $urls ) {
179
+        $configuration_service = Wordlift_Configuration_Service::get_instance();
180
+        $dataset_uri           = $configuration_service->get_dataset_uri();
181
+
182
+        return array_filter( $urls, function ( $url ) use ( $dataset_uri ) {
183
+            $url_validation = filter_var( $url, FILTER_VALIDATE_URL );
184
+            if ( null === $dataset_uri ) {
185
+                return $url_validation;
186
+            }
187
+
188
+            // URLs should not start with local dataset uri.
189
+            return $url_validation && ( strpos( $url, $dataset_uri, 0 ) === false );
190
+        } );
191
+    }
192 192
 
193 193
 }
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -19,46 +19,46 @@  discard block
 block discarded – undo
19 19
 	/**
20 20
 	 * @inheritdoc
21 21
 	 */
22
-	public function __construct( $args ) {
23
-		parent::__construct( $args['sameas'] );
22
+	public function __construct($args) {
23
+		parent::__construct($args['sameas']);
24 24
 	}
25 25
 
26 26
 	/**
27 27
 	 * @inheritdoc
28 28
 	 */
29
-	public function save_data( $values ) {
29
+	public function save_data($values) {
30 30
 		// The autocomplete select may send JSON arrays in input values.
31 31
 
32 32
 		// Only use mb_* functions when mbstring is available.
33 33
 		//
34 34
 		// See https://github.com/insideout10/wordlift-plugin/issues/693.
35
-		if ( extension_loaded( 'mbstring' ) ) {
36
-			mb_regex_encoding( 'UTF-8' );
35
+		if (extension_loaded('mbstring')) {
36
+			mb_regex_encoding('UTF-8');
37 37
 
38
-			$merged = array_reduce( (array) $values, function ( $carry, $item ) {
39
-				return array_merge( $carry, mb_split( "\x{2063}", wp_unslash( $item ) ) );
40
-			}, array() );
38
+			$merged = array_reduce((array) $values, function($carry, $item) {
39
+				return array_merge($carry, mb_split("\x{2063}", wp_unslash($item)));
40
+			}, array());
41 41
 		} else {
42
-			$merged = array_reduce( (array) $values, function ( $carry, $item ) {
43
-				return array_merge( $carry, preg_split( "/\x{2063}/u", wp_unslash( $item ) ) );
44
-			}, array() );
42
+			$merged = array_reduce((array) $values, function($carry, $item) {
43
+				return array_merge($carry, preg_split("/\x{2063}/u", wp_unslash($item)));
44
+			}, array());
45 45
 		}
46 46
 
47 47
 		// Convert all escaped special characters to their original.
48
-		$merged = array_map( 'urldecode', $merged );
48
+		$merged = array_map('urldecode', $merged);
49 49
 
50
-		$merged = $this->filter_urls( $merged );
50
+		$merged = $this->filter_urls($merged);
51 51
 
52
-		parent::save_data( $merged );
52
+		parent::save_data($merged);
53 53
 	}
54 54
 
55 55
 	/**
56 56
 	 * @inheritdoc
57 57
 	 */
58
-	public function sanitize_data_filter( $value ) {
58
+	public function sanitize_data_filter($value) {
59 59
 
60 60
 		// Call our sanitizer helper.
61
-		return Wordlift_Sanitizer::sanitize_url( $value );
61
+		return Wordlift_Sanitizer::sanitize_url($value);
62 62
 	}
63 63
 
64 64
 	/**
@@ -80,33 +80,33 @@  discard block
 block discarded – undo
80 80
 	private function get_select_html() {
81 81
 		// Return an element where the new Autocomplete Select will attach to.
82 82
 		return '<p>'
83
-		       . esc_html__( 'Use the search below to link this entity with equivalent entities in the linked data cloud.', 'wordlift' )
83
+		       . esc_html__('Use the search below to link this entity with equivalent entities in the linked data cloud.', 'wordlift')
84 84
 		       . '<div id="wl-metabox-field-sameas"></div></p>';
85 85
 	}
86 86
 
87 87
 	/**
88 88
 	 * @inheritdoc
89 89
 	 */
90
-	protected function get_add_button_html( $count ) {
90
+	protected function get_add_button_html($count) {
91 91
 
92
-		$placeholder = esc_attr_x( 'Type here the URL of an equivalent entity from another dataset.', 'sameAs metabox input', 'wordlift' );
92
+		$placeholder = esc_attr_x('Type here the URL of an equivalent entity from another dataset.', 'sameAs metabox input', 'wordlift');
93 93
 
94 94
 		return
95
-  		'<button type="button" class="wl-add-input wl-add-input--link">'.esc_html__( 'Click here to manually add URLs', 'wordlift' ).'</button>'
95
+  		'<button type="button" class="wl-add-input wl-add-input--link">'.esc_html__('Click here to manually add URLs', 'wordlift').'</button>'
96 96
         .'<div style="display: none;"><div class="wl-input-wrapper">'
97 97
         ."<input type='text' id='$this->meta_name' name='wl_metaboxes[$this->meta_name][]' placeholder='$placeholder' />"
98 98
         .'<button type="button" class="wl-remove-input wl-remove-input--sameas"></button>'
99 99
         .'</div></div>'
100
-        . '<fieldset id="wl-input-container">'.$this->get_stored_values_html( $count ).'</fieldset>'
101
-        .parent::get_add_custom_button_html( $count, 'Add Another URL', 'hide' );
100
+        . '<fieldset id="wl-input-container">'.$this->get_stored_values_html($count).'</fieldset>'
101
+        .parent::get_add_custom_button_html($count, 'Add Another URL', 'hide');
102 102
 	}
103 103
 
104 104
 	/**
105 105
 	 * @inheritdoc
106 106
 	 */
107
-	protected function get_stored_values_html( &$count ) {
107
+	protected function get_stored_values_html(&$count) {
108 108
 
109
-		return  parent::get_stored_values_html( $count );
109
+		return  parent::get_stored_values_html($count);
110 110
 	}
111 111
 
112 112
 	/**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		 * @return bool
123 123
 		 * @since 3.29.1
124 124
 		 */
125
-		if ( apply_filters( 'wl_feature__enable__metabox-sameas', true ) ) {
125
+		if (apply_filters('wl_feature__enable__metabox-sameas', true)) {
126 126
 
127 127
 			// Open main <div> for the Field.
128 128
 			$html = $this->html_wrapper_open();
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 			$count = 0;
138 138
 
139 139
 			// If cardinality allows it, print button to add new values.
140
-			$html .= $this->get_add_button_html( $count );
140
+			$html .= $this->get_add_button_html($count);
141 141
 
142 142
 			// Close the HTML wrapper.
143 143
 			$html .= $this->html_wrapper_close();
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	/**
150 150
 	 * @inheritdoc
151 151
 	 */
152
-	public function html_input( $value ) {
152
+	public function html_input($value) {
153 153
 		@ob_start();
154 154
 		?>
155 155
         <div class="wl-input-wrapper wl-input-wrapper-readonly">
@@ -175,18 +175,18 @@  discard block
 block discarded – undo
175 175
 	 *
176 176
 	 * @return array
177 177
 	 */
178
-	private function filter_urls( $urls ) {
178
+	private function filter_urls($urls) {
179 179
 		$configuration_service = Wordlift_Configuration_Service::get_instance();
180 180
 		$dataset_uri           = $configuration_service->get_dataset_uri();
181 181
 
182
-		return array_filter( $urls, function ( $url ) use ( $dataset_uri ) {
183
-			$url_validation = filter_var( $url, FILTER_VALIDATE_URL );
184
-			if ( null === $dataset_uri ) {
182
+		return array_filter($urls, function($url) use ($dataset_uri) {
183
+			$url_validation = filter_var($url, FILTER_VALIDATE_URL);
184
+			if (null === $dataset_uri) {
185 185
 				return $url_validation;
186 186
 			}
187 187
 
188 188
 			// URLs should not start with local dataset uri.
189
-			return $url_validation && ( strpos( $url, $dataset_uri, 0 ) === false );
189
+			return $url_validation && (strpos($url, $dataset_uri, 0) === false);
190 190
 		} );
191 191
 	}
192 192
 
Please login to merge, or discard this patch.
src/wordlift/post-excerpt/class-post-excerpt-meta-box-adapter.php 2 patches
Indentation   +156 added lines, -156 removed lines patch added patch discarded remove patch
@@ -16,161 +16,161 @@
 block discarded – undo
16 16
 
17 17
 final class Post_Excerpt_Meta_Box_Adapter {
18 18
 
19
-	/**
20
-	 * Key used by wordpress to add the excerpt meta box in
21
-	 * the $wp_meta_boxes global variable.
22
-	 */
23
-	const POST_EXCERPT_META_BOX_KEY = 'postexcerpt';
24
-
25
-	/**
26
-	 * Div id used for adding the additional content
27
-	 * to the wordpress excerpt meta box.
28
-	 */
29
-	const WORDLIFT_EXCERPT_DIV_ID = 'wl-custom-excerpt-wrapper';
30
-
31
-	/**
32
-	 * @var callable|null The default callback used by wordpress to
33
-	 * echo the post_excerpt contents, defaults to null.
34
-	 */
35
-	public $wordpress_excerpt_callback = null;
36
-
37
-	/**
38
-	 * Invokes the default callback inside our custom template callback
39
-	 *
40
-	 * @param $post array The post array.
41
-	 */
42
-	public function print_wordlift_custom_post_excerpt_box( $post ) {
43
-		call_user_func( $this->wordpress_excerpt_callback, $post );
44
-		// Invoke our call back to add additional html, the react script will find this id and render the component there.
45
-		echo "<div id='" . self::WORDLIFT_EXCERPT_DIV_ID . "'></div>";
46
-	}
47
-
48
-	/**
49
-	 * Replaces the default post excerpt meta box with custom post excerpt meta box.
50
-	 */
51
-	public function replace_post_excerpt_meta_box() {
52
-		global $wp_meta_boxes;
53
-		$post_type             = get_post_type();
54
-
55
-		// Bail out if feature is turned off
56
-		if ( ! apply_filters( 'wl_feature__enable__post-excerpt', true ) ) {
57
-			return;
58
-		}
59
-
60
-		/**
61
-		 * @since 3.27.6
62
-		 *
63
-		 * @see https://github.com/insideout10/wordlift-plugin/issues/1188
64
-		 */
65
-		if ( ! isset( $wp_meta_boxes[ $post_type ] ) ) {
66
-			return;
67
-		}
68
-
69
-		$core_meta_boxes       = $wp_meta_boxes[ $post_type ]["normal"]["core"];
70
-
71
-		if ( ! isset( $core_meta_boxes[ self::POST_EXCERPT_META_BOX_KEY ] ) ) {
72
-			return;
73
-		}
74
-
75
-		$post_excerpt_meta_box = $core_meta_boxes[ self::POST_EXCERPT_META_BOX_KEY ];
76
-		$callback              = $post_excerpt_meta_box['callback'];
77
-		/**
78
-		 * do_meta_boxes action is called 3 times by wordpress for
79
-		 * different set of metaboxes, so to prevent overwriting our
80
-		 * callback with null, this check is necessary.
81
-		 */
82
-		if ( $callback !== null && $callback !== array( $this, 'print_wordlift_custom_post_excerpt_box' ) ) {
83
-			$this->wordpress_excerpt_callback = $callback;
84
-			$this->remove_default_post_excerpt_meta_box();
85
-			$this->add_custom_post_excerpt_meta_box();
86
-			$this->enqueue_post_excerpt_scripts();
87
-		}
88
-	}
89
-
90
-	/**
91
-	 * Removes the registered post excerpt metabox.
92
-	 */
93
-	private function remove_default_post_excerpt_meta_box() {
94
-
95
-		remove_meta_box( self::POST_EXCERPT_META_BOX_KEY, get_current_screen(), 'normal' );
96
-
97
-	}
98
-
99
-	/**
100
-	 * Deserializes the string, and rewrite the order for post excerpt.
101
-	 *
102
-	 * @param $order array
103
-	 *
104
-	 * @return array
105
-	 */
106
-	private function deserialize_and_rewrite_order( $order ) {
107
-		$side         = explode( ',', $order['side'] );
108
-		$normal       = explode( ',', $order['normal'] );
109
-		$advanced     = explode( ',', $order['advanced'] );
110
-		$remove_array = array( self::POST_EXCERPT_META_BOX_KEY );
111
-
112
-		// We first remove from the side category if it is previously present.
113
-		$side = array_diff( $side, $remove_array );
114
-		if ( count( $side ) === 0 ) {
115
-			// No boxes present, so add our excerpt box at o th position.
116
-			array_push( $side, self::POST_EXCERPT_META_BOX_KEY );
117
-		} else {
118
-			// Add custom excerpt metabox at second position
119
-			array_splice( $side, 1, 0, $remove_array );
120
-		}
121
-
122
-		// We remove postexcerpt from all other metaboxes category.
123
-		$normal   = array_diff( $normal, $remove_array );
124
-		$advanced = array_diff( $advanced, $remove_array );
125
-
126
-		return array(
127
-			'normal'   => $normal,
128
-			'side'     => $side,
129
-			'advanced' => $advanced
130
-		);
131
-	}
132
-
133
-	/**
134
-	 * Adds the custom post excerpt metabox.
135
-	 */
136
-	private function add_custom_post_excerpt_meta_box() {
137
-		add_meta_box(
138
-			self::POST_EXCERPT_META_BOX_KEY,
139
-			__( 'Excerpt' ),
140
-			array( $this, 'print_wordlift_custom_post_excerpt_box' ),
141
-			// Mimic the settings of the default metabox.
142
-			null,
143
-			'normal',
144
-			'high'
145
-		);
146
-	}
147
-
148
-	private function enqueue_post_excerpt_scripts() {
149
-		Scripts_Helper::enqueue_based_on_wordpress_version(
150
-			'wl-post-excerpt',
151
-			plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'js/dist/post-excerpt',
152
-			array( 'react', 'react-dom', 'wp-polyfill' ),
153
-			true
154
-		);
155
-		wp_enqueue_style(
156
-			'wl-post-excerpt',
157
-			plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'js/dist/post-excerpt.css',
158
-			array()
159
-		);
160
-		wp_localize_script( 'wl-post-excerpt',
161
-			'_wlExcerptSettings',
162
-			$this->get_post_excerpt_translations() );
163
-	}
164
-
165
-	public function get_post_excerpt_translations() {
166
-
167
-		return array(
168
-			'orText'         => __( 'Or use WordLift suggested post excerpt:', 'wordlift' ),
169
-			'generatingText' => __( 'Generating excerpt...', 'wordlift' ),
170
-			'restUrl'        => get_rest_url( null, WL_REST_ROUTE_DEFAULT_NAMESPACE . '/post-excerpt' ),
171
-			'nonce'          => wp_create_nonce( 'wp_rest' ),
172
-			'postId'         => get_the_ID(),
173
-		);
174
-	}
19
+    /**
20
+     * Key used by wordpress to add the excerpt meta box in
21
+     * the $wp_meta_boxes global variable.
22
+     */
23
+    const POST_EXCERPT_META_BOX_KEY = 'postexcerpt';
24
+
25
+    /**
26
+     * Div id used for adding the additional content
27
+     * to the wordpress excerpt meta box.
28
+     */
29
+    const WORDLIFT_EXCERPT_DIV_ID = 'wl-custom-excerpt-wrapper';
30
+
31
+    /**
32
+     * @var callable|null The default callback used by wordpress to
33
+     * echo the post_excerpt contents, defaults to null.
34
+     */
35
+    public $wordpress_excerpt_callback = null;
36
+
37
+    /**
38
+     * Invokes the default callback inside our custom template callback
39
+     *
40
+     * @param $post array The post array.
41
+     */
42
+    public function print_wordlift_custom_post_excerpt_box( $post ) {
43
+        call_user_func( $this->wordpress_excerpt_callback, $post );
44
+        // Invoke our call back to add additional html, the react script will find this id and render the component there.
45
+        echo "<div id='" . self::WORDLIFT_EXCERPT_DIV_ID . "'></div>";
46
+    }
47
+
48
+    /**
49
+     * Replaces the default post excerpt meta box with custom post excerpt meta box.
50
+     */
51
+    public function replace_post_excerpt_meta_box() {
52
+        global $wp_meta_boxes;
53
+        $post_type             = get_post_type();
54
+
55
+        // Bail out if feature is turned off
56
+        if ( ! apply_filters( 'wl_feature__enable__post-excerpt', true ) ) {
57
+            return;
58
+        }
59
+
60
+        /**
61
+         * @since 3.27.6
62
+         *
63
+         * @see https://github.com/insideout10/wordlift-plugin/issues/1188
64
+         */
65
+        if ( ! isset( $wp_meta_boxes[ $post_type ] ) ) {
66
+            return;
67
+        }
68
+
69
+        $core_meta_boxes       = $wp_meta_boxes[ $post_type ]["normal"]["core"];
70
+
71
+        if ( ! isset( $core_meta_boxes[ self::POST_EXCERPT_META_BOX_KEY ] ) ) {
72
+            return;
73
+        }
74
+
75
+        $post_excerpt_meta_box = $core_meta_boxes[ self::POST_EXCERPT_META_BOX_KEY ];
76
+        $callback              = $post_excerpt_meta_box['callback'];
77
+        /**
78
+         * do_meta_boxes action is called 3 times by wordpress for
79
+         * different set of metaboxes, so to prevent overwriting our
80
+         * callback with null, this check is necessary.
81
+         */
82
+        if ( $callback !== null && $callback !== array( $this, 'print_wordlift_custom_post_excerpt_box' ) ) {
83
+            $this->wordpress_excerpt_callback = $callback;
84
+            $this->remove_default_post_excerpt_meta_box();
85
+            $this->add_custom_post_excerpt_meta_box();
86
+            $this->enqueue_post_excerpt_scripts();
87
+        }
88
+    }
89
+
90
+    /**
91
+     * Removes the registered post excerpt metabox.
92
+     */
93
+    private function remove_default_post_excerpt_meta_box() {
94
+
95
+        remove_meta_box( self::POST_EXCERPT_META_BOX_KEY, get_current_screen(), 'normal' );
96
+
97
+    }
98
+
99
+    /**
100
+     * Deserializes the string, and rewrite the order for post excerpt.
101
+     *
102
+     * @param $order array
103
+     *
104
+     * @return array
105
+     */
106
+    private function deserialize_and_rewrite_order( $order ) {
107
+        $side         = explode( ',', $order['side'] );
108
+        $normal       = explode( ',', $order['normal'] );
109
+        $advanced     = explode( ',', $order['advanced'] );
110
+        $remove_array = array( self::POST_EXCERPT_META_BOX_KEY );
111
+
112
+        // We first remove from the side category if it is previously present.
113
+        $side = array_diff( $side, $remove_array );
114
+        if ( count( $side ) === 0 ) {
115
+            // No boxes present, so add our excerpt box at o th position.
116
+            array_push( $side, self::POST_EXCERPT_META_BOX_KEY );
117
+        } else {
118
+            // Add custom excerpt metabox at second position
119
+            array_splice( $side, 1, 0, $remove_array );
120
+        }
121
+
122
+        // We remove postexcerpt from all other metaboxes category.
123
+        $normal   = array_diff( $normal, $remove_array );
124
+        $advanced = array_diff( $advanced, $remove_array );
125
+
126
+        return array(
127
+            'normal'   => $normal,
128
+            'side'     => $side,
129
+            'advanced' => $advanced
130
+        );
131
+    }
132
+
133
+    /**
134
+     * Adds the custom post excerpt metabox.
135
+     */
136
+    private function add_custom_post_excerpt_meta_box() {
137
+        add_meta_box(
138
+            self::POST_EXCERPT_META_BOX_KEY,
139
+            __( 'Excerpt' ),
140
+            array( $this, 'print_wordlift_custom_post_excerpt_box' ),
141
+            // Mimic the settings of the default metabox.
142
+            null,
143
+            'normal',
144
+            'high'
145
+        );
146
+    }
147
+
148
+    private function enqueue_post_excerpt_scripts() {
149
+        Scripts_Helper::enqueue_based_on_wordpress_version(
150
+            'wl-post-excerpt',
151
+            plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'js/dist/post-excerpt',
152
+            array( 'react', 'react-dom', 'wp-polyfill' ),
153
+            true
154
+        );
155
+        wp_enqueue_style(
156
+            'wl-post-excerpt',
157
+            plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'js/dist/post-excerpt.css',
158
+            array()
159
+        );
160
+        wp_localize_script( 'wl-post-excerpt',
161
+            '_wlExcerptSettings',
162
+            $this->get_post_excerpt_translations() );
163
+    }
164
+
165
+    public function get_post_excerpt_translations() {
166
+
167
+        return array(
168
+            'orText'         => __( 'Or use WordLift suggested post excerpt:', 'wordlift' ),
169
+            'generatingText' => __( 'Generating excerpt...', 'wordlift' ),
170
+            'restUrl'        => get_rest_url( null, WL_REST_ROUTE_DEFAULT_NAMESPACE . '/post-excerpt' ),
171
+            'nonce'          => wp_create_nonce( 'wp_rest' ),
172
+            'postId'         => get_the_ID(),
173
+        );
174
+    }
175 175
 
176 176
 }
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @param $post array The post array.
41 41
 	 */
42
-	public function print_wordlift_custom_post_excerpt_box( $post ) {
43
-		call_user_func( $this->wordpress_excerpt_callback, $post );
42
+	public function print_wordlift_custom_post_excerpt_box($post) {
43
+		call_user_func($this->wordpress_excerpt_callback, $post);
44 44
 		// Invoke our call back to add additional html, the react script will find this id and render the component there.
45
-		echo "<div id='" . self::WORDLIFT_EXCERPT_DIV_ID . "'></div>";
45
+		echo "<div id='".self::WORDLIFT_EXCERPT_DIV_ID."'></div>";
46 46
 	}
47 47
 
48 48
 	/**
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function replace_post_excerpt_meta_box() {
52 52
 		global $wp_meta_boxes;
53
-		$post_type             = get_post_type();
53
+		$post_type = get_post_type();
54 54
 
55 55
 		// Bail out if feature is turned off
56
-		if ( ! apply_filters( 'wl_feature__enable__post-excerpt', true ) ) {
56
+		if ( ! apply_filters('wl_feature__enable__post-excerpt', true)) {
57 57
 			return;
58 58
 		}
59 59
 
@@ -62,24 +62,24 @@  discard block
 block discarded – undo
62 62
 		 *
63 63
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/1188
64 64
 		 */
65
-		if ( ! isset( $wp_meta_boxes[ $post_type ] ) ) {
65
+		if ( ! isset($wp_meta_boxes[$post_type])) {
66 66
 			return;
67 67
 		}
68 68
 
69
-		$core_meta_boxes       = $wp_meta_boxes[ $post_type ]["normal"]["core"];
69
+		$core_meta_boxes = $wp_meta_boxes[$post_type]["normal"]["core"];
70 70
 
71
-		if ( ! isset( $core_meta_boxes[ self::POST_EXCERPT_META_BOX_KEY ] ) ) {
71
+		if ( ! isset($core_meta_boxes[self::POST_EXCERPT_META_BOX_KEY])) {
72 72
 			return;
73 73
 		}
74 74
 
75
-		$post_excerpt_meta_box = $core_meta_boxes[ self::POST_EXCERPT_META_BOX_KEY ];
75
+		$post_excerpt_meta_box = $core_meta_boxes[self::POST_EXCERPT_META_BOX_KEY];
76 76
 		$callback              = $post_excerpt_meta_box['callback'];
77 77
 		/**
78 78
 		 * do_meta_boxes action is called 3 times by wordpress for
79 79
 		 * different set of metaboxes, so to prevent overwriting our
80 80
 		 * callback with null, this check is necessary.
81 81
 		 */
82
-		if ( $callback !== null && $callback !== array( $this, 'print_wordlift_custom_post_excerpt_box' ) ) {
82
+		if ($callback !== null && $callback !== array($this, 'print_wordlift_custom_post_excerpt_box')) {
83 83
 			$this->wordpress_excerpt_callback = $callback;
84 84
 			$this->remove_default_post_excerpt_meta_box();
85 85
 			$this->add_custom_post_excerpt_meta_box();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 */
93 93
 	private function remove_default_post_excerpt_meta_box() {
94 94
 
95
-		remove_meta_box( self::POST_EXCERPT_META_BOX_KEY, get_current_screen(), 'normal' );
95
+		remove_meta_box(self::POST_EXCERPT_META_BOX_KEY, get_current_screen(), 'normal');
96 96
 
97 97
 	}
98 98
 
@@ -103,25 +103,25 @@  discard block
 block discarded – undo
103 103
 	 *
104 104
 	 * @return array
105 105
 	 */
106
-	private function deserialize_and_rewrite_order( $order ) {
107
-		$side         = explode( ',', $order['side'] );
108
-		$normal       = explode( ',', $order['normal'] );
109
-		$advanced     = explode( ',', $order['advanced'] );
110
-		$remove_array = array( self::POST_EXCERPT_META_BOX_KEY );
106
+	private function deserialize_and_rewrite_order($order) {
107
+		$side         = explode(',', $order['side']);
108
+		$normal       = explode(',', $order['normal']);
109
+		$advanced     = explode(',', $order['advanced']);
110
+		$remove_array = array(self::POST_EXCERPT_META_BOX_KEY);
111 111
 
112 112
 		// We first remove from the side category if it is previously present.
113
-		$side = array_diff( $side, $remove_array );
114
-		if ( count( $side ) === 0 ) {
113
+		$side = array_diff($side, $remove_array);
114
+		if (count($side) === 0) {
115 115
 			// No boxes present, so add our excerpt box at o th position.
116
-			array_push( $side, self::POST_EXCERPT_META_BOX_KEY );
116
+			array_push($side, self::POST_EXCERPT_META_BOX_KEY);
117 117
 		} else {
118 118
 			// Add custom excerpt metabox at second position
119
-			array_splice( $side, 1, 0, $remove_array );
119
+			array_splice($side, 1, 0, $remove_array);
120 120
 		}
121 121
 
122 122
 		// We remove postexcerpt from all other metaboxes category.
123
-		$normal   = array_diff( $normal, $remove_array );
124
-		$advanced = array_diff( $advanced, $remove_array );
123
+		$normal   = array_diff($normal, $remove_array);
124
+		$advanced = array_diff($advanced, $remove_array);
125 125
 
126 126
 		return array(
127 127
 			'normal'   => $normal,
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
 	private function add_custom_post_excerpt_meta_box() {
137 137
 		add_meta_box(
138 138
 			self::POST_EXCERPT_META_BOX_KEY,
139
-			__( 'Excerpt' ),
140
-			array( $this, 'print_wordlift_custom_post_excerpt_box' ),
139
+			__('Excerpt'),
140
+			array($this, 'print_wordlift_custom_post_excerpt_box'),
141 141
 			// Mimic the settings of the default metabox.
142 142
 			null,
143 143
 			'normal',
@@ -148,27 +148,27 @@  discard block
 block discarded – undo
148 148
 	private function enqueue_post_excerpt_scripts() {
149 149
 		Scripts_Helper::enqueue_based_on_wordpress_version(
150 150
 			'wl-post-excerpt',
151
-			plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'js/dist/post-excerpt',
152
-			array( 'react', 'react-dom', 'wp-polyfill' ),
151
+			plugin_dir_url(dirname(dirname(__FILE__))).'js/dist/post-excerpt',
152
+			array('react', 'react-dom', 'wp-polyfill'),
153 153
 			true
154 154
 		);
155 155
 		wp_enqueue_style(
156 156
 			'wl-post-excerpt',
157
-			plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'js/dist/post-excerpt.css',
157
+			plugin_dir_url(dirname(dirname(__FILE__))).'js/dist/post-excerpt.css',
158 158
 			array()
159 159
 		);
160
-		wp_localize_script( 'wl-post-excerpt',
160
+		wp_localize_script('wl-post-excerpt',
161 161
 			'_wlExcerptSettings',
162
-			$this->get_post_excerpt_translations() );
162
+			$this->get_post_excerpt_translations());
163 163
 	}
164 164
 
165 165
 	public function get_post_excerpt_translations() {
166 166
 
167 167
 		return array(
168
-			'orText'         => __( 'Or use WordLift suggested post excerpt:', 'wordlift' ),
169
-			'generatingText' => __( 'Generating excerpt...', 'wordlift' ),
170
-			'restUrl'        => get_rest_url( null, WL_REST_ROUTE_DEFAULT_NAMESPACE . '/post-excerpt' ),
171
-			'nonce'          => wp_create_nonce( 'wp_rest' ),
168
+			'orText'         => __('Or use WordLift suggested post excerpt:', 'wordlift'),
169
+			'generatingText' => __('Generating excerpt...', 'wordlift'),
170
+			'restUrl'        => get_rest_url(null, WL_REST_ROUTE_DEFAULT_NAMESPACE.'/post-excerpt'),
171
+			'nonce'          => wp_create_nonce('wp_rest'),
172 172
 			'postId'         => get_the_ID(),
173 173
 		);
174 174
 	}
Please login to merge, or discard this patch.
src/wordlift/vocabulary/pages/class-match-terms.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -12,55 +12,55 @@
 block discarded – undo
12 12
  * @author Naveen Muthusamy <[email protected]>
13 13
  */
14 14
 class Match_Terms {
15
-	/**
16
-	 * @var Term_Count
17
-	 */
18
-	private $term_count;
15
+    /**
16
+     * @var Term_Count
17
+     */
18
+    private $term_count;
19 19
 
20
-	/**
21
-	 * Match_Terms constructor.
22
-	 *
23
-	 * @param $term_count Term_Count
24
-	 */
25
-	public function __construct( $term_count ) {
20
+    /**
21
+     * Match_Terms constructor.
22
+     *
23
+     * @param $term_count Term_Count
24
+     */
25
+    public function __construct( $term_count ) {
26 26
 
27
-		$this->term_count = $term_count;
28
-		add_action( 'admin_menu', array( $this, 'admin_menu', ) );
27
+        $this->term_count = $term_count;
28
+        add_action( 'admin_menu', array( $this, 'admin_menu', ) );
29 29
 
30
-	}
30
+    }
31 31
 
32
-	public function admin_menu() {
33
-		$number = $this->term_count->get_term_count();
34
-		add_submenu_page(
35
-			'wl_admin_menu',
36
-			__( 'Match Terms', 'wordlift' ),
37
-			__( 'Match Terms', 'wordlift' ) . " " . Badge_Generator::generate_html($number),
38
-			'manage_options',
39
-			'wl-vocabulary-match-terms',
40
-			array( $this, 'submenu_page_callback' )
41
-		);
42
-		remove_submenu_page( 'wl_admin_menu', 'wl_admin_menu' );
43
-	}
32
+    public function admin_menu() {
33
+        $number = $this->term_count->get_term_count();
34
+        add_submenu_page(
35
+            'wl_admin_menu',
36
+            __( 'Match Terms', 'wordlift' ),
37
+            __( 'Match Terms', 'wordlift' ) . " " . Badge_Generator::generate_html($number),
38
+            'manage_options',
39
+            'wl-vocabulary-match-terms',
40
+            array( $this, 'submenu_page_callback' )
41
+        );
42
+        remove_submenu_page( 'wl_admin_menu', 'wl_admin_menu' );
43
+    }
44 44
 
45 45
 
46 46
 
47 47
 
48 48
 
49
-	public function submenu_page_callback() {
49
+    public function submenu_page_callback() {
50 50
 
51
-		Scripts_Helper::enqueue_based_on_wordpress_version(
52
-			'wl-vocabulary-reconcile-script',
53
-			plugin_dir_url( dirname( dirname( __DIR__ ) ) ) . 'js/dist/vocabulary',
54
-			array( 'react', 'react-dom', 'wp-polyfill' ),
55
-			true
56
-		);
51
+        Scripts_Helper::enqueue_based_on_wordpress_version(
52
+            'wl-vocabulary-reconcile-script',
53
+            plugin_dir_url( dirname( dirname( __DIR__ ) ) ) . 'js/dist/vocabulary',
54
+            array( 'react', 'react-dom', 'wp-polyfill' ),
55
+            true
56
+        );
57 57
 
58 58
 
59
-		wp_enqueue_style( 'wl-vocabulary-reconcile-script',
60
-			plugin_dir_url( dirname( dirname( __DIR__ ) ) ) . "js/dist/vocabulary.full.css" );
61
-		wp_localize_script( 'wl-vocabulary-reconcile-script', '_wlVocabularyMatchTermsConfig', Api_Config::get_api_config() );
62
-		echo "<div id='wl_cmkg_reconcile_progress' class='wrap'></div>";
63
-		echo "<div id='wl_cmkg_table' class='wrap'></div>";
64
-	}
59
+        wp_enqueue_style( 'wl-vocabulary-reconcile-script',
60
+            plugin_dir_url( dirname( dirname( __DIR__ ) ) ) . "js/dist/vocabulary.full.css" );
61
+        wp_localize_script( 'wl-vocabulary-reconcile-script', '_wlVocabularyMatchTermsConfig', Api_Config::get_api_config() );
62
+        echo "<div id='wl_cmkg_reconcile_progress' class='wrap'></div>";
63
+        echo "<div id='wl_cmkg_table' class='wrap'></div>";
64
+    }
65 65
 
66 66
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 	 *
23 23
 	 * @param $term_count Term_Count
24 24
 	 */
25
-	public function __construct( $term_count ) {
25
+	public function __construct($term_count) {
26 26
 
27 27
 		$this->term_count = $term_count;
28
-		add_action( 'admin_menu', array( $this, 'admin_menu', ) );
28
+		add_action('admin_menu', array($this, 'admin_menu',));
29 29
 
30 30
 	}
31 31
 
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 		$number = $this->term_count->get_term_count();
34 34
 		add_submenu_page(
35 35
 			'wl_admin_menu',
36
-			__( 'Match Terms', 'wordlift' ),
37
-			__( 'Match Terms', 'wordlift' ) . " " . Badge_Generator::generate_html($number),
36
+			__('Match Terms', 'wordlift'),
37
+			__('Match Terms', 'wordlift')." ".Badge_Generator::generate_html($number),
38 38
 			'manage_options',
39 39
 			'wl-vocabulary-match-terms',
40
-			array( $this, 'submenu_page_callback' )
40
+			array($this, 'submenu_page_callback')
41 41
 		);
42
-		remove_submenu_page( 'wl_admin_menu', 'wl_admin_menu' );
42
+		remove_submenu_page('wl_admin_menu', 'wl_admin_menu');
43 43
 	}
44 44
 
45 45
 
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
 
51 51
 		Scripts_Helper::enqueue_based_on_wordpress_version(
52 52
 			'wl-vocabulary-reconcile-script',
53
-			plugin_dir_url( dirname( dirname( __DIR__ ) ) ) . 'js/dist/vocabulary',
54
-			array( 'react', 'react-dom', 'wp-polyfill' ),
53
+			plugin_dir_url(dirname(dirname(__DIR__))).'js/dist/vocabulary',
54
+			array('react', 'react-dom', 'wp-polyfill'),
55 55
 			true
56 56
 		);
57 57
 
58 58
 
59
-		wp_enqueue_style( 'wl-vocabulary-reconcile-script',
60
-			plugin_dir_url( dirname( dirname( __DIR__ ) ) ) . "js/dist/vocabulary.full.css" );
61
-		wp_localize_script( 'wl-vocabulary-reconcile-script', '_wlVocabularyMatchTermsConfig', Api_Config::get_api_config() );
59
+		wp_enqueue_style('wl-vocabulary-reconcile-script',
60
+			plugin_dir_url(dirname(dirname(__DIR__)))."js/dist/vocabulary.full.css");
61
+		wp_localize_script('wl-vocabulary-reconcile-script', '_wlVocabularyMatchTermsConfig', Api_Config::get_api_config());
62 62
 		echo "<div id='wl_cmkg_reconcile_progress' class='wrap'></div>";
63 63
 		echo "<div id='wl_cmkg_table' class='wrap'></div>";
64 64
 	}
Please login to merge, or discard this patch.
src/includes/class-wordlift.php 2 patches
Spacing   +351 added lines, -351 removed lines patch added patch discarded remove patch
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
 		$this->define_public_hooks();
773 773
 
774 774
 		// If we're in `WP_CLI` load the related files.
775
-		if ( class_exists( 'WP_CLI' ) ) {
775
+		if (class_exists('WP_CLI')) {
776 776
 			$this->load_cli_dependencies();
777 777
 		}
778 778
 
@@ -813,381 +813,381 @@  discard block
 block discarded – undo
813 813
 		 * The class responsible for orchestrating the actions and filters of the
814 814
 		 * core plugin.
815 815
 		 */
816
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
816
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-loader.php';
817 817
 
818 818
 		// The class responsible for plugin uninstall.
819
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-deactivator-feedback.php';
819
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-deactivator-feedback.php';
820 820
 
821 821
 		/**
822 822
 		 * The class responsible for defining internationalization functionality
823 823
 		 * of the plugin.
824 824
 		 */
825
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
825
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-i18n.php';
826 826
 
827 827
 		/**
828 828
 		 * WordLift's supported languages.
829 829
 		 */
830
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
830
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-languages.php';
831 831
 
832 832
 		/**
833 833
 		 * WordLift's supported countries.
834 834
 		 */
835
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-countries.php';
835
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-countries.php';
836 836
 
837 837
 		/**
838 838
 		 * Provide support functions to sanitize data.
839 839
 		 */
840
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
840
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sanitizer.php';
841 841
 
842 842
 		/** Services. */
843
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
844
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-http-api.php';
845
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
846
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
847
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
848
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
849
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
850
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-linked-data-service.php';
851
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-service.php';
852
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-image-service.php';
843
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-log-service.php';
844
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-http-api.php';
845
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-redirect-service.php';
846
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-configuration-service.php';
847
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-post-type-service.php';
848
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-type-service.php';
849
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-link-service.php';
850
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-linked-data-service.php';
851
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-relation-service.php';
852
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-image-service.php';
853 853
 
854 854
 		/**
855 855
 		 * The Query builder.
856 856
 		 */
857
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
857
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-query-builder.php';
858 858
 
859 859
 		/**
860 860
 		 * The Schema service.
861 861
 		 */
862
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
862
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-schema-service.php';
863 863
 
864 864
 		/**
865 865
 		 * The schema:url property service.
866 866
 		 */
867
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
868
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
867
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-property-service.php';
868
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-schema-url-property-service.php';
869 869
 
870 870
 		/**
871 871
 		 * The UI service.
872 872
 		 */
873
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
873
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-ui-service.php';
874 874
 
875 875
 		/**
876 876
 		 * The Thumbnail service.
877 877
 		 */
878
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
878
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-thumbnail-service.php';
879 879
 
880 880
 		/**
881 881
 		 * The Entity Types Taxonomy service.
882 882
 		 */
883
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-taxonomy-service.php';
883
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-type-taxonomy-service.php';
884 884
 
885 885
 		/**
886 886
 		 * The Entity service.
887 887
 		 */
888
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-service.php';
889
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
888
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-uri-service.php';
889
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-service.php';
890 890
 
891 891
 		// Add the entity rating service.
892
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
892
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-rating-service.php';
893 893
 
894 894
 		/**
895 895
 		 * The User service.
896 896
 		 */
897
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
897
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-user-service.php';
898 898
 
899 899
 		/**
900 900
 		 * The Timeline service.
901 901
 		 */
902
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
902
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-timeline-service.php';
903 903
 
904 904
 		/**
905 905
 		 * The Topic Taxonomy service.
906 906
 		 */
907
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
907
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-topic-taxonomy-service.php';
908 908
 
909 909
 		/**
910 910
 		 * The SPARQL service.
911 911
 		 */
912
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
912
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sparql-service.php';
913 913
 
914 914
 		/**
915 915
 		 * The WordLift import service.
916 916
 		 */
917
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
917
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-import-service.php';
918 918
 
919 919
 		/**
920 920
 		 * The WordLift URI service.
921 921
 		 */
922
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
923
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
924
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
922
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-uri-service.php';
923
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-property-factory.php';
924
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sample-data-service.php';
925 925
 
926 926
 		/**
927 927
 		 * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
928 928
 		 */
929
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-listable.php';
930
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-rebuild-service.php';
931
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-reference-rebuild-service.php';
932
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-service.php';
933
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-adapter.php';
929
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/rebuild/class-wordlift-listable.php';
930
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/rebuild/class-wordlift-rebuild-service.php';
931
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/rebuild/class-wordlift-reference-rebuild-service.php';
932
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/rebuild/class-wordlift-relation-rebuild-service.php';
933
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/rebuild/class-wordlift-relation-rebuild-adapter.php';
934 934
 
935
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
936
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
935
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/properties/class-wordlift-property-getter-factory.php';
936
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-attachment-service.php';
937 937
 
938 938
 		/**
939 939
 		 * Load the converters.
940 940
 		 */
941
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
942
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
943
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
944
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
945
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
946
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
941
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/intf-wordlift-post-converter.php';
942
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
943
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-postid-to-jsonld-converter.php';
944
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-post-to-jsonld-converter.php';
945
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-to-jsonld-converter.php';
946
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-jsonld-website-converter.php';
947 947
 
948 948
 		/**
949 949
 		 * Load cache-related files.
950 950
 		 */
951
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/cache/require.php';
951
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/cache/require.php';
952 952
 
953 953
 		/**
954 954
 		 * Load the content filter.
955 955
 		 */
956
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
956
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-content-filter-service.php';
957 957
 
958 958
 		/*
959 959
 		 * Load the excerpt helper.
960 960
 		 */
961
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
961
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-excerpt-helper.php';
962 962
 
963 963
 		/**
964 964
 		 * Load the JSON-LD service to publish entities using JSON-LD.s
965 965
 		 *
966 966
 		 * @since 3.8.0
967 967
 		 */
968
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
968
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-jsonld-service.php';
969 969
 
970 970
 		// The Publisher Service and the AJAX adapter.
971
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
972
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
971
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-publisher-service.php';
972
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-publisher-ajax-adapter.php';
973 973
 
974
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
974
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-adapter.php';
975 975
 
976 976
 		/**
977 977
 		 * Load the WordLift key validation service.
978 978
 		 */
979
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
979
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-key-validation-service.php';
980 980
 
981 981
 		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
982
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
982
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-category-taxonomy-service.php';
983 983
 
984 984
 		// Load the `Wordlift_Entity_Page_Service` class definition.
985
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-page-service.php';
985
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-page-service.php';
986 986
 
987 987
 		/** Linked Data. */
988
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage.php';
989
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
990
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php';
991
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
992
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
993
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php';
994
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
995
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php';
996
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php';
997
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php';
998
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php';
988
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-storage.php';
989
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
990
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-property-storage.php';
991
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
992
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
993
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-author-storage.php';
994
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
995
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-image-storage.php';
996
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-related-storage.php';
997
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-url-property-storage.php';
998
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-storage-factory.php';
999 999
 
1000 1000
 		/** Linked Data Rendition. */
1001
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/intf-wordlift-sparql-tuple-rendition.php';
1002
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-default-sparql-tuple-rendition.php';
1003
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-address-sparql-tuple-rendition.php';
1004
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-sparql-tuple-rendition-factory.php';
1001
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/rendition/intf-wordlift-sparql-tuple-rendition.php';
1002
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/rendition/class-wordlift-default-sparql-tuple-rendition.php';
1003
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/rendition/class-wordlift-address-sparql-tuple-rendition.php';
1004
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/rendition/class-wordlift-sparql-tuple-rendition-factory.php';
1005 1005
 
1006 1006
 		/** Services. */
1007
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-google-analytics-export-service.php';
1008
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-api-service.php';
1007
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-google-analytics-export-service.php';
1008
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-api-service.php';
1009 1009
 
1010 1010
 		/** Adapters. */
1011
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
1012
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
1013
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
1014
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-adapter.php';
1015
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-wprocket-adapter.php';
1011
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-tinymce-adapter.php';
1012
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-newrelic-adapter.php';
1013
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sample-data-ajax-adapter.php';
1014
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-type-adapter.php';
1015
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-wprocket-adapter.php';
1016 1016
 
1017 1017
 		/** Async Tasks. */
1018
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-async-task.php';
1019
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
1020
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-push-references-async-task.php';
1018
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/wp-async-task/class-wordlift-async-task.php';
1019
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
1020
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/wp-async-task/class-wordlift-push-references-async-task.php';
1021 1021
 
1022 1022
 		/** Autocomplete. */
1023
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-autocomplete-adapter.php';
1023
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-autocomplete-adapter.php';
1024 1024
 
1025
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-remote-image-service.php';
1025
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-remote-image-service.php';
1026 1026
 
1027 1027
 		/** Analytics */
1028
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/analytics/class-wordlift-analytics-connect.php';
1028
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/analytics/class-wordlift-analytics-connect.php';
1029 1029
 
1030 1030
 		/**
1031 1031
 		 * The class responsible for defining all actions that occur in the admin area.
1032 1032
 		 */
1033
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
1033
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin.php';
1034 1034
 
1035 1035
 		/**
1036 1036
 		 * The class to customize the entity list admin page.
1037 1037
 		 */
1038
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
1038
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-entity-list.php';
1039 1039
 
1040 1040
 		/**
1041 1041
 		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
1042 1042
 		 */
1043 1043
 		global $wp_version;
1044
-		if ( version_compare( $wp_version, '5.3', '<' ) ) {
1045
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
1044
+		if (version_compare($wp_version, '5.3', '<')) {
1045
+			require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-types-taxonomy-walker.php';
1046 1046
 		} else {
1047
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
1047
+			require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
1048 1048
 		}
1049 1049
 
1050 1050
 		/**
1051 1051
 		 * The Notice service.
1052 1052
 		 */
1053
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
1053
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-notice-service.php';
1054 1054
 
1055 1055
 		/**
1056 1056
 		 * The PrimaShop adapter.
1057 1057
 		 */
1058
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
1058
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-primashop-adapter.php';
1059 1059
 
1060 1060
 		/**
1061 1061
 		 * The WordLift Dashboard service.
1062 1062
 		 */
1063
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
1063
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-dashboard.php';
1064 1064
 
1065 1065
 		/**
1066 1066
 		 * The admin 'Install wizard' page.
1067 1067
 		 */
1068
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
1068
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-setup.php';
1069 1069
 
1070 1070
 		/**
1071 1071
 		 * The WordLift entity type list admin page controller.
1072 1072
 		 */
1073
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
1073
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
1074 1074
 
1075 1075
 		/**
1076 1076
 		 * The WordLift entity type settings admin page controller.
1077 1077
 		 */
1078
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
1078
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-type-settings.php';
1079 1079
 
1080 1080
 		/**
1081 1081
 		 * The admin 'Download Your Data' page.
1082 1082
 		 */
1083
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
1083
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-download-your-data-page.php';
1084 1084
 
1085 1085
 		/**
1086 1086
 		 * The admin 'WordLift Settings' page.
1087 1087
 		 */
1088
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/intf-wordlift-admin-element.php';
1089
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-element.php';
1090
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-radio-element.php';
1091
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select-element.php';
1092
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select2-element.php';
1093
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-language-select-element.php';
1094
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-country-select-element.php';
1095
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-tabs-element.php';
1096
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-author-element.php';
1097
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-publisher-element.php';
1098
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
1099
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
1100
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page.php';
1101
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
1102
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
1088
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/intf-wordlift-admin-element.php';
1089
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-input-element.php';
1090
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-input-radio-element.php';
1091
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-select-element.php';
1092
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-select2-element.php';
1093
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-language-select-element.php';
1094
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-country-select-element.php';
1095
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-tabs-element.php';
1096
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-author-element.php';
1097
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-publisher-element.php';
1098
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-page.php';
1099
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-page.php';
1100
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-analytics-page.php';
1101
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-page-action-link.php';
1102
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
1103 1103
 
1104 1104
 		/** Admin Pages */
1105
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
1106
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
1107
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-search-rankings-page.php';
1108
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-admin-service.php';
1105
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-user-profile-page.php';
1106
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-status-page.php';
1107
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-search-rankings-page.php';
1108
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-type-admin-service.php';
1109 1109
 
1110 1110
 		/**
1111 1111
 		 * The class responsible for defining all actions that occur in the public-facing
1112 1112
 		 * side of the site.
1113 1113
 		 */
1114
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
1114
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-public.php';
1115 1115
 
1116 1116
 		/**
1117 1117
 		 * The shortcode abstract class.
1118 1118
 		 */
1119
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
1119
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-shortcode.php';
1120 1120
 
1121 1121
 		/**
1122 1122
 		 * The Timeline shortcode.
1123 1123
 		 */
1124
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
1124
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-timeline-shortcode.php';
1125 1125
 
1126 1126
 		/**
1127 1127
 		 * The Navigator shortcode.
1128 1128
 		 */
1129
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
1129
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-navigator-shortcode.php';
1130 1130
 
1131 1131
 		/**
1132 1132
 		 * The Products Navigator shortcode.
1133 1133
 		 */
1134
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-products-navigator-shortcode.php';
1134
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-products-navigator-shortcode.php';
1135 1135
 
1136 1136
 		/**
1137 1137
 		 * The chord shortcode.
1138 1138
 		 */
1139
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
1139
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-chord-shortcode.php';
1140 1140
 
1141 1141
 		/**
1142 1142
 		 * The geomap shortcode.
1143 1143
 		 */
1144
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
1144
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-geomap-shortcode.php';
1145 1145
 
1146 1146
 		/**
1147 1147
 		 * The entity cloud shortcode.
1148 1148
 		 */
1149
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
1149
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-related-entities-cloud-shortcode.php';
1150 1150
 
1151 1151
 		/**
1152 1152
 		 * The entity glossary shortcode.
1153 1153
 		 */
1154
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-alphabet-service.php';
1155
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-vocabulary-shortcode.php';
1154
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-alphabet-service.php';
1155
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-vocabulary-shortcode.php';
1156 1156
 
1157 1157
 		/**
1158 1158
 		 * Faceted Search shortcode.
1159 1159
 		 */
1160
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-faceted-search-shortcode.php';
1160
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-faceted-search-shortcode.php';
1161 1161
 
1162 1162
 		/**
1163 1163
 		 * The ShareThis service.
1164 1164
 		 */
1165
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
1165
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-sharethis-service.php';
1166 1166
 
1167 1167
 		/**
1168 1168
 		 * The SEO service.
1169 1169
 		 */
1170
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
1170
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-seo-service.php';
1171 1171
 
1172 1172
 		/**
1173 1173
 		 * The AMP service.
1174 1174
 		 */
1175
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
1175
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-amp-service.php';
1176 1176
 
1177 1177
 		/** Widgets */
1178
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
1179
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
1180
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-context-cards.php';
1178
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-widget.php';
1179
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-related-entities-cloud-widget.php';
1180
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-context-cards.php';
1181 1181
 
1182 1182
 		/*
1183 1183
 		 * Schema.org Services.
1184 1184
 		 *
1185 1185
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1186 1186
 		 */
1187
-		if ( WL_ALL_ENTITY_TYPES ) {
1188
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1189
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1190
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1187
+		if (WL_ALL_ENTITY_TYPES) {
1188
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1189
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1190
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1191 1191
 			new Wordlift_Schemaorg_Sync_Service();
1192 1192
 			$schemaorg_property_service = new Wordlift_Schemaorg_Property_Service();
1193 1193
 			new Wordlift_Schemaorg_Class_Service();
@@ -1203,25 +1203,25 @@  discard block
 block discarded – undo
1203 1203
 
1204 1204
 		// Instantiate a global logger.
1205 1205
 		global $wl_logger;
1206
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
1206
+		$wl_logger = Wordlift_Log_Service::get_logger('WordLift');
1207 1207
 
1208 1208
 		// Load the `wl-api` end-point.
1209 1209
 		new Wordlift_Http_Api();
1210 1210
 
1211 1211
 		// Load the Install Service.
1212
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'install/class-wordlift-install-service.php';
1212
+		require_once plugin_dir_path(dirname(__FILE__)).'install/class-wordlift-install-service.php';
1213 1213
 		$this->install_service = new Wordlift_Install_Service();
1214 1214
 
1215 1215
 		/** Services. */
1216 1216
 		// Create the configuration service.
1217 1217
 		$this->configuration_service = new Wordlift_Configuration_Service();
1218
-		$api_service                 = new Wordlift_Api_Service( $this->configuration_service );
1218
+		$api_service                 = new Wordlift_Api_Service($this->configuration_service);
1219 1219
 
1220 1220
 		// Create an entity type service instance. It'll be later bound to the init action.
1221
-		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
1221
+		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service(Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path());
1222 1222
 
1223 1223
 		// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
1224
-		$this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
1224
+		$this->entity_link_service = new Wordlift_Entity_Link_Service($this->entity_post_type_service, $this->configuration_service->get_entity_base_path());
1225 1225
 
1226 1226
 		// Create an instance of the UI service.
1227 1227
 		$this->ui_service = new Wordlift_UI_Service();
@@ -1230,30 +1230,30 @@  discard block
 block discarded – undo
1230 1230
 		$this->thumbnail_service = new Wordlift_Thumbnail_Service();
1231 1231
 
1232 1232
 		$this->sparql_service        = new Wordlift_Sparql_Service();
1233
-		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
1233
+		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service($this->sparql_service);
1234 1234
 		$this->notice_service        = new Wordlift_Notice_Service();
1235 1235
 		$this->relation_service      = new Wordlift_Relation_Service();
1236 1236
 
1237
-		$entity_uri_cache_service = new Wordlift_File_Cache_Service( WL_TEMP_DIR . 'entity_uri/' );
1238
-		$this->entity_uri_service = new Wordlift_Cached_Entity_Uri_Service( $this->configuration_service, $entity_uri_cache_service );
1239
-		$this->entity_service     = new Wordlift_Entity_Service( $this->ui_service, $this->relation_service, $this->entity_uri_service );
1240
-		$this->user_service       = new Wordlift_User_Service( $this->sparql_service, $this->entity_service );
1237
+		$entity_uri_cache_service = new Wordlift_File_Cache_Service(WL_TEMP_DIR.'entity_uri/');
1238
+		$this->entity_uri_service = new Wordlift_Cached_Entity_Uri_Service($this->configuration_service, $entity_uri_cache_service);
1239
+		$this->entity_service     = new Wordlift_Entity_Service($this->ui_service, $this->relation_service, $this->entity_uri_service);
1240
+		$this->user_service       = new Wordlift_User_Service($this->sparql_service, $this->entity_service);
1241 1241
 
1242 1242
 		// Instantiate the JSON-LD service.
1243
-		$property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1243
+		$property_getter = Wordlift_Property_Getter_Factory::create($this->entity_service);
1244 1244
 
1245 1245
 		/** Linked Data. */
1246
-		$this->storage_factory   = new Wordlift_Storage_Factory( $this->entity_service, $this->user_service, $property_getter );
1247
-		$this->rendition_factory = new Wordlift_Sparql_Tuple_Rendition_Factory( $this->entity_service );
1246
+		$this->storage_factory   = new Wordlift_Storage_Factory($this->entity_service, $this->user_service, $property_getter);
1247
+		$this->rendition_factory = new Wordlift_Sparql_Tuple_Rendition_Factory($this->entity_service);
1248 1248
 
1249
-		$this->schema_service = new Wordlift_Schema_Service( $this->storage_factory, $this->rendition_factory, $this->configuration_service );
1249
+		$this->schema_service = new Wordlift_Schema_Service($this->storage_factory, $this->rendition_factory, $this->configuration_service);
1250 1250
 
1251 1251
 		// Create a new instance of the Redirect service.
1252
-		$this->redirect_service    = new Wordlift_Redirect_Service( $this->entity_uri_service );
1253
-		$this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
1252
+		$this->redirect_service    = new Wordlift_Redirect_Service($this->entity_uri_service);
1253
+		$this->entity_type_service = new Wordlift_Entity_Type_Service($this->schema_service);
1254 1254
 
1255 1255
 		// Create a new instance of the Timeline service and Timeline shortcode.
1256
-		$this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service, $this->entity_type_service );
1256
+		$this->timeline_service = new Wordlift_Timeline_Service($this->entity_service, $this->entity_type_service);
1257 1257
 
1258 1258
 		$this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
1259 1259
 
@@ -1267,36 +1267,36 @@  discard block
 block discarded – undo
1267 1267
 		$this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
1268 1268
 
1269 1269
 		// Create an import service instance to hook later to WP's import function.
1270
-		$this->import_service = new Wordlift_Import_Service( $this->entity_post_type_service, $this->entity_service, $this->schema_service, $this->sparql_service, $this->configuration_service->get_dataset_uri() );
1270
+		$this->import_service = new Wordlift_Import_Service($this->entity_post_type_service, $this->entity_service, $this->schema_service, $this->sparql_service, $this->configuration_service->get_dataset_uri());
1271 1271
 
1272
-		$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
1272
+		$uri_service = new Wordlift_Uri_Service($GLOBALS['wpdb']);
1273 1273
 
1274 1274
 		// Create the entity rating service.
1275
-		$this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
1275
+		$this->rating_service = new Wordlift_Rating_Service($this->entity_service, $this->entity_type_service, $this->notice_service);
1276 1276
 
1277 1277
 		// Create entity list customization (wp-admin/edit.php).
1278
-		$this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
1278
+		$this->entity_list_service = new Wordlift_Entity_List_Service($this->rating_service);
1279 1279
 
1280 1280
 		// Create a new instance of the Redirect service.
1281
-		$this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service, $this->entity_service );
1281
+		$this->dashboard_service = new Wordlift_Dashboard_Service($this->rating_service, $this->entity_service);
1282 1282
 
1283 1283
 		// Create an instance of the Publisher Service and the AJAX Adapter.
1284
-		$this->publisher_service = new Wordlift_Publisher_Service( $this->configuration_service );
1285
-		$this->property_factory  = new Wordlift_Property_Factory( $schema_url_property_service );
1286
-		$this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1284
+		$this->publisher_service = new Wordlift_Publisher_Service($this->configuration_service);
1285
+		$this->property_factory  = new Wordlift_Property_Factory($schema_url_property_service);
1286
+		$this->property_factory->register(Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service);
1287 1287
 
1288 1288
 		$attachment_service = new Wordlift_Attachment_Service();
1289 1289
 
1290 1290
 		// Instantiate the JSON-LD service.
1291
-		$property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1292
-		$this->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service );
1293
-		$this->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $this->post_to_jsonld_converter );
1294
-		$this->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter( $this->entity_service, $this->entity_post_to_jsonld_converter, $this->post_to_jsonld_converter );
1295
-		$this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service );
1291
+		$property_getter                       = Wordlift_Property_Getter_Factory::create($this->entity_service);
1292
+		$this->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter($this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service);
1293
+		$this->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter($this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $this->post_to_jsonld_converter);
1294
+		$this->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter($this->entity_service, $this->entity_post_to_jsonld_converter, $this->post_to_jsonld_converter);
1295
+		$this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter($this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service);
1296 1296
 
1297
-		$jsonld_cache                            = new Ttl_Cache( 'jsonld', 86400 );
1298
-		$this->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $this->postid_to_jsonld_converter, $this->configuration_service, $jsonld_cache );
1299
-		$this->jsonld_service                    = new Wordlift_Jsonld_Service( $this->entity_service, $this->cached_postid_to_jsonld_converter, $this->jsonld_website_converter );
1297
+		$jsonld_cache                            = new Ttl_Cache('jsonld', 86400);
1298
+		$this->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter($this->postid_to_jsonld_converter, $this->configuration_service, $jsonld_cache);
1299
+		$this->jsonld_service                    = new Wordlift_Jsonld_Service($this->entity_service, $this->cached_postid_to_jsonld_converter, $this->jsonld_website_converter);
1300 1300
 
1301 1301
 		/*
1302 1302
 		 * Load the `Wordlift_Term_JsonLd_Adapter`.
@@ -1305,30 +1305,30 @@  discard block
 block discarded – undo
1305 1305
 		 *
1306 1306
 		 * @since 3.20.0
1307 1307
 		 */
1308
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-term-jsonld-adapter.php';
1309
-		$term_jsonld_adapter = new Wordlift_Term_JsonLd_Adapter( $this->entity_uri_service, $this->jsonld_service );
1308
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-term-jsonld-adapter.php';
1309
+		$term_jsonld_adapter = new Wordlift_Term_JsonLd_Adapter($this->entity_uri_service, $this->jsonld_service);
1310 1310
 		$jsonld_service      = new Jsonld_Service(
1311 1311
 			$this->jsonld_service,
1312 1312
 			$term_jsonld_adapter,
1313
-			new Jsonld_User_Service( $this->user_service ) );
1314
-		new Jsonld_Endpoint( $jsonld_service, $this->entity_uri_service );
1313
+			new Jsonld_User_Service($this->user_service) );
1314
+		new Jsonld_Endpoint($jsonld_service, $this->entity_uri_service);
1315 1315
 
1316 1316
 		// Prints the JSON-LD in the head.
1317
-		new Jsonld_Adapter( $this->jsonld_service );
1317
+		new Jsonld_Adapter($this->jsonld_service);
1318 1318
 
1319
-		new Jsonld_By_Id_Endpoint( $this->jsonld_service, $this->entity_uri_service );
1319
+		new Jsonld_By_Id_Endpoint($this->jsonld_service, $this->entity_uri_service);
1320 1320
 
1321
-		$this->key_validation_service = new Wordlift_Key_Validation_Service( $this->configuration_service );
1322
-		$this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service, $this->entity_uri_service );
1321
+		$this->key_validation_service = new Wordlift_Key_Validation_Service($this->configuration_service);
1322
+		$this->content_filter_service = new Wordlift_Content_Filter_Service($this->entity_service, $this->configuration_service, $this->entity_uri_service);
1323 1323
 		// Creating Faq Content filter service.
1324 1324
 		$this->faq_content_filter_service = new Faq_Content_Filter();
1325
-		$this->relation_rebuild_service   = new Wordlift_Relation_Rebuild_Service( $this->content_filter_service, $this->entity_service );
1326
-		$this->sample_data_service        = new Wordlift_Sample_Data_Service( $this->entity_type_service, $this->configuration_service, $this->user_service );
1327
-		$this->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter( $this->sample_data_service );
1328
-		$this->reference_rebuild_service  = new Wordlift_Reference_Rebuild_Service( $this->entity_service );
1325
+		$this->relation_rebuild_service   = new Wordlift_Relation_Rebuild_Service($this->content_filter_service, $this->entity_service);
1326
+		$this->sample_data_service        = new Wordlift_Sample_Data_Service($this->entity_type_service, $this->configuration_service, $this->user_service);
1327
+		$this->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter($this->sample_data_service);
1328
+		$this->reference_rebuild_service  = new Wordlift_Reference_Rebuild_Service($this->entity_service);
1329 1329
 
1330
-		$this->loader->add_action( 'enqueue_block_editor_assets', $this, 'add_wl_enabled_blocks' );
1331
-		$this->loader->add_action( 'admin_enqueue_scripts', $this, 'add_wl_enabled_blocks' );
1330
+		$this->loader->add_action('enqueue_block_editor_assets', $this, 'add_wl_enabled_blocks');
1331
+		$this->loader->add_action('admin_enqueue_scripts', $this, 'add_wl_enabled_blocks');
1332 1332
 
1333 1333
 		/**
1334 1334
 		 * Filter: wl_feature__enable__blocks.
@@ -1338,15 +1338,15 @@  discard block
 block discarded – undo
1338 1338
 		 * @return bool
1339 1339
 		 * @since 3.27.6
1340 1340
 		 */
1341
-		if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1341
+		if (apply_filters('wl_feature__enable__blocks', true)) {
1342 1342
 			// Initialize the short-codes.
1343
-			new Async_Template_Decorator( new Wordlift_Navigator_Shortcode() );
1343
+			new Async_Template_Decorator(new Wordlift_Navigator_Shortcode());
1344 1344
 			new Wordlift_Chord_Shortcode();
1345 1345
 			new Wordlift_Geomap_Shortcode();
1346 1346
 			new Wordlift_Timeline_Shortcode();
1347
-			new Wordlift_Related_Entities_Cloud_Shortcode( $this->relation_service );
1348
-			new Wordlift_Vocabulary_Shortcode( $this->configuration_service );
1349
-			new Async_Template_Decorator( new Wordlift_Faceted_Search_Shortcode() );
1347
+			new Wordlift_Related_Entities_Cloud_Shortcode($this->relation_service);
1348
+			new Wordlift_Vocabulary_Shortcode($this->configuration_service);
1349
+			new Async_Template_Decorator(new Wordlift_Faceted_Search_Shortcode());
1350 1350
 		}
1351 1351
 
1352 1352
 		new Wordlift_Products_Navigator_Shortcode();
@@ -1359,18 +1359,18 @@  discard block
 block discarded – undo
1359 1359
 		new Wordlift_Seo_Service();
1360 1360
 
1361 1361
 		// Initialize the AMP service.
1362
-		new Wordlift_AMP_Service( $this->jsonld_service );
1362
+		new Wordlift_AMP_Service($this->jsonld_service);
1363 1363
 
1364 1364
 		/** Services. */
1365 1365
 		$this->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service();
1366 1366
 		new Wordlift_Image_Service();
1367 1367
 
1368 1368
 		/** Adapters. */
1369
-		$this->entity_type_adapter    = new Wordlift_Entity_Type_Adapter( $this->entity_type_service );
1370
-		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $this->publisher_service );
1371
-		$this->tinymce_adapter        = new Wordlift_Tinymce_Adapter( $this );
1369
+		$this->entity_type_adapter    = new Wordlift_Entity_Type_Adapter($this->entity_type_service);
1370
+		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter($this->publisher_service);
1371
+		$this->tinymce_adapter        = new Wordlift_Tinymce_Adapter($this);
1372 1372
 		//$this->faq_tinymce_adapter      = new Faq_Tinymce_Adapter();
1373
-		$this->relation_rebuild_adapter = new Wordlift_Relation_Rebuild_Adapter( $this->relation_rebuild_service );
1373
+		$this->relation_rebuild_adapter = new Wordlift_Relation_Rebuild_Adapter($this->relation_rebuild_service);
1374 1374
 
1375 1375
 		/*
1376 1376
 		 * Exclude our public js from WP-Rocket.
@@ -1388,9 +1388,9 @@  discard block
 block discarded – undo
1388 1388
 		);
1389 1389
 
1390 1390
 		$that = $this;
1391
-		add_action( 'plugins_loaded', function () use ( $that ) {
1392
-			if ( ! apply_filters( 'wl_feature__enable__dataset-ng', false ) ) {
1393
-				new Wordlift_Linked_Data_Service( $that->entity_service, $that->entity_type_service, $that->schema_service, $that->sparql_service );
1391
+		add_action('plugins_loaded', function() use ($that) {
1392
+			if ( ! apply_filters('wl_feature__enable__dataset-ng', false)) {
1393
+				new Wordlift_Linked_Data_Service($that->entity_service, $that->entity_type_service, $that->schema_service, $that->sparql_service);
1394 1394
 				new Wordlift_Sparql_Query_Async_Task();
1395 1395
 				new Wordlift_Push_References_Async_Task();
1396 1396
 			}
@@ -1405,14 +1405,14 @@  discard block
 block discarded – undo
1405 1405
 		$this->language_select_element = new Wordlift_Admin_Language_Select_Element();
1406 1406
 		$this->country_select_element  = new Wordlift_Admin_Country_Select_Element();
1407 1407
 		$tabs_element                  = new Wordlift_Admin_Tabs_Element();
1408
-		$this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $this->publisher_service, $tabs_element, $this->select2_element );
1409
-		$this->author_element          = new Wordlift_Admin_Author_Element( $this->publisher_service, $this->select2_element );
1408
+		$this->publisher_element       = new Wordlift_Admin_Publisher_Element($this->configuration_service, $this->publisher_service, $tabs_element, $this->select2_element);
1409
+		$this->author_element          = new Wordlift_Admin_Author_Element($this->publisher_service, $this->select2_element);
1410 1410
 
1411
-		$this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->country_select_element, $this->publisher_element, $this->radio_input_element );
1412
-		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
1411
+		$this->settings_page             = new Wordlift_Admin_Settings_Page($this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->country_select_element, $this->publisher_element, $this->radio_input_element);
1412
+		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link($this->settings_page);
1413 1413
 
1414
-		$this->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page( $this->configuration_service, $this->input_element, $this->radio_input_element );
1415
-		$this->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $this->analytics_settings_page );
1414
+		$this->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page($this->configuration_service, $this->input_element, $this->radio_input_element);
1415
+		$this->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link($this->analytics_settings_page);
1416 1416
 		$this->analytics_connect                   = new Wordlift_Analytics_Connect();
1417 1417
 
1418 1418
 		// Pages.
@@ -1423,9 +1423,9 @@  discard block
 block discarded – undo
1423 1423
 		 *
1424 1424
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/914
1425 1425
 		 */
1426
-		if ( apply_filters( 'wl_can_see_classification_box', true ) ) {
1427
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
1428
-			new Wordlift_Admin_Post_Edit_Page( $this );
1426
+		if (apply_filters('wl_can_see_classification_box', true)) {
1427
+			require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-post-edit-page.php';
1428
+			new Wordlift_Admin_Post_Edit_Page($this);
1429 1429
 		}
1430 1430
 		new Wordlift_Entity_Type_Admin_Service();
1431 1431
 
@@ -1439,23 +1439,23 @@  discard block
 block discarded – undo
1439 1439
 		$this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1440 1440
 
1441 1441
 		/* WordPress Admin. */
1442
-		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1443
-		$this->status_page             = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service );
1442
+		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page($this->configuration_service);
1443
+		$this->status_page             = new Wordlift_Admin_Status_Page($this->entity_service, $this->sparql_service);
1444 1444
 
1445 1445
 		// Create an instance of the install wizard.
1446
-		$this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service, $this->language_select_element, $this->country_select_element );
1446
+		$this->admin_setup = new Wordlift_Admin_Setup($this->configuration_service, $this->key_validation_service, $this->entity_service, $this->language_select_element, $this->country_select_element);
1447 1447
 
1448
-		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
1448
+		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service($this->entity_post_type_service);
1449 1449
 
1450 1450
 		// User Profile.
1451
-		new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service );
1451
+		new Wordlift_Admin_User_Profile_Page($this->author_element, $this->user_service);
1452 1452
 
1453 1453
 		$this->entity_page_service = new Wordlift_Entity_Page_Service();
1454 1454
 
1455 1455
 		// Load the debug service if WP is in debug mode.
1456
-		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1457
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1458
-			new Wordlift_Debug_Service( $this->entity_service, $uri_service );
1456
+		if (defined('WP_DEBUG') && WP_DEBUG) {
1457
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-debug-service.php';
1458
+			new Wordlift_Debug_Service($this->entity_service, $uri_service);
1459 1459
 		}
1460 1460
 
1461 1461
 		// Remote Image Service.
@@ -1468,12 +1468,12 @@  discard block
 block discarded – undo
1468 1468
 		 *
1469 1469
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/852.
1470 1470
 		 */
1471
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-action.php';
1472
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-service.php';
1473
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1471
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-batch-action.php';
1472
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/mapping/class-wordlift-mapping-service.php';
1473
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1474 1474
 
1475 1475
 		// Create an instance of the Mapping Service and assign it to the Ajax Adapter.
1476
-		new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) );
1476
+		new Wordlift_Mapping_Ajax_Adapter(new Wordlift_Mapping_Service(Wordlift_Entity_Type_Service::get_instance()));
1477 1477
 
1478 1478
 		/*
1479 1479
 		 * Batch Operations. They're similar to Batch Actions but do not require working on post types.
@@ -1482,8 +1482,8 @@  discard block
 block discarded – undo
1482 1482
 		 *
1483 1483
 		 * @since 3.20.0
1484 1484
 		 */
1485
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/intf-wordlift-batch-operation.php';
1486
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1485
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/batch/intf-wordlift-batch-operation.php';
1486
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1487 1487
 
1488 1488
 		/*
1489 1489
 		 * Add the Search Keywords taxonomy to manage the Search Keywords on WLS.
@@ -1492,8 +1492,8 @@  discard block
 block discarded – undo
1492 1492
 		 *
1493 1493
 		 * @since 3.20.0
1494 1494
 		 */
1495
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/search-keywords/class-wordlift-search-keyword-taxonomy.php';
1496
-		new Wordlift_Search_Keyword_Taxonomy( $api_service );
1495
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/search-keywords/class-wordlift-search-keyword-taxonomy.php';
1496
+		new Wordlift_Search_Keyword_Taxonomy($api_service);
1497 1497
 
1498 1498
 		/*
1499 1499
 		 * Load the Mappings JSON-LD post processing.
@@ -1507,11 +1507,11 @@  discard block
 block discarded – undo
1507 1507
 		// Taxonomy term rule validator for validating rules for term pages.
1508 1508
 		new Taxonomy_Term_Rule_Validator();
1509 1509
 		new Post_Taxonomy_Term_Rule_Validator();
1510
-		$rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator );
1511
-		$rule_groups_validator    = new Rule_Groups_Validator( $rule_validators_registry );
1512
-		$mappings_validator       = new Mappings_Validator( $mappings_dbo, $rule_groups_validator );
1510
+		$rule_validators_registry = new Rule_Validators_Registry($default_rule_validator);
1511
+		$rule_groups_validator    = new Rule_Groups_Validator($rule_validators_registry);
1512
+		$mappings_validator       = new Mappings_Validator($mappings_dbo, $rule_groups_validator);
1513 1513
 
1514
-		new Url_To_Entity_Transform_Function( $this->entity_uri_service );
1514
+		new Url_To_Entity_Transform_Function($this->entity_uri_service);
1515 1515
 		new Taxonomy_To_Terms_Transform_Function();
1516 1516
 		new Post_Id_To_Entity_Transform_Function();
1517 1517
 		$mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry();
@@ -1521,7 +1521,7 @@  discard block
 block discarded – undo
1521 1521
 		 * Intiailize the acf group data formatter.
1522 1522
 		 */
1523 1523
 		new Acf_Group_Formatter();
1524
-		new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry );
1524
+		new Jsonld_Converter($mappings_validator, $mappings_transform_functions_registry);
1525 1525
 
1526 1526
 		/**
1527 1527
 		 * @since 3.26.0
@@ -1542,7 +1542,7 @@  discard block
 block discarded – undo
1542 1542
 		/*
1543 1543
 		 * Create a singleton for the Analysis_Response_Ops_Factory.
1544 1544
 		 */
1545
-		$entity_helper = new Entity_Helper( $this->entity_uri_service, $this->entity_service );
1545
+		$entity_helper = new Entity_Helper($this->entity_uri_service, $this->entity_service);
1546 1546
 		new Analysis_Response_Ops_Factory(
1547 1547
 			$this->entity_uri_service,
1548 1548
 			$this->entity_service,
@@ -1552,11 +1552,11 @@  discard block
 block discarded – undo
1552 1552
 		);
1553 1553
 
1554 1554
 		/** WL Autocomplete. */
1555
-		$autocomplete_service       = new All_Autocomplete_Service( array(
1555
+		$autocomplete_service = new All_Autocomplete_Service(array(
1556 1556
 			new Local_Autocomplete_Service(),
1557
-			new Linked_Data_Autocomplete_Service( $this->configuration_service, $entity_helper, $this->entity_uri_service, $this->entity_service ),
1558
-		) );
1559
-		$this->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service );
1557
+			new Linked_Data_Autocomplete_Service($this->configuration_service, $entity_helper, $this->entity_uri_service, $this->entity_service),
1558
+		));
1559
+		$this->autocomplete_adapter = new Wordlift_Autocomplete_Adapter($autocomplete_service);
1560 1560
 
1561 1561
 		/**
1562 1562
 		 * @since 3.27.2
@@ -1565,10 +1565,10 @@  discard block
 block discarded – undo
1565 1565
 		 */
1566 1566
 		new Recipe_Maker_Post_Type_Hook();
1567 1567
 		$recipe_maker_validation_service = new Recipe_Maker_Validation_Service();
1568
-		new Recipe_Maker_Jsonld_Hook( $attachment_service, $recipe_maker_validation_service );
1569
-		new Recipe_Maker_After_Get_Jsonld_Hook( $recipe_maker_validation_service );
1570
-		new Recipe_Maker_Warning( $recipe_maker_validation_service );
1571
-		new Yoast_Jsonld( $recipe_maker_validation_service );
1568
+		new Recipe_Maker_Jsonld_Hook($attachment_service, $recipe_maker_validation_service);
1569
+		new Recipe_Maker_After_Get_Jsonld_Hook($recipe_maker_validation_service);
1570
+		new Recipe_Maker_Warning($recipe_maker_validation_service);
1571
+		new Yoast_Jsonld($recipe_maker_validation_service);
1572 1572
 
1573 1573
 		/**
1574 1574
 		 * @since 3.27.4
@@ -1579,7 +1579,7 @@  discard block
 block discarded – undo
1579 1579
 		 * @since 3.27.8
1580 1580
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/1248
1581 1581
 		 */
1582
-		new Key_Validation_Notice( $this->key_validation_service, $this->configuration_service );
1582
+		new Key_Validation_Notice($this->key_validation_service, $this->configuration_service);
1583 1583
 		/**
1584 1584
 
1585 1585
 		 * @since 3.28.0
@@ -1591,7 +1591,7 @@  discard block
 block discarded – undo
1591 1591
 		 * @since 3.29.0
1592 1592
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/1304
1593 1593
 		 */
1594
-		new Entity_Rest_Service( $this->entity_type_service );
1594
+		new Entity_Rest_Service($this->entity_type_service);
1595 1595
 
1596 1596
 		/**
1597 1597
 		 * Expand author in to references.
@@ -1599,13 +1599,13 @@  discard block
 block discarded – undo
1599 1599
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/1318
1600 1600
 		 */
1601 1601
 
1602
-		add_action( 'plugins_loaded', function () use ( $that ) {
1602
+		add_action('plugins_loaded', function() use ($that) {
1603 1603
 
1604
-			if ( apply_filters( 'wl_feature__enable__article-wrapper', false ) ) {
1605
-				new Jsonld_Article_Wrapper( Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter );
1604
+			if (apply_filters('wl_feature__enable__article-wrapper', false)) {
1605
+				new Jsonld_Article_Wrapper(Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter);
1606 1606
 			}
1607 1607
 
1608
-			if ( apply_filters( 'wl_feature__enable__match-terms', false ) ) {
1608
+			if (apply_filters('wl_feature__enable__match-terms', false)) {
1609 1609
 				$vocabulary_loader = new Vocabulary_Loader();
1610 1610
 				$vocabulary_loader->init_vocabulary();
1611 1611
 			}
@@ -1633,9 +1633,9 @@  discard block
 block discarded – undo
1633 1633
 	private function set_locale() {
1634 1634
 
1635 1635
 		$plugin_i18n = new Wordlift_i18n();
1636
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
1636
+		$plugin_i18n->set_domain($this->get_plugin_name());
1637 1637
 
1638
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1638
+		$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
1639 1639
 
1640 1640
 	}
1641 1641
 
@@ -1656,29 +1656,29 @@  discard block
 block discarded – undo
1656 1656
 			$this->user_service
1657 1657
 		);
1658 1658
 
1659
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1660
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 );
1659
+		$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
1660
+		$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11);
1661 1661
 
1662 1662
 		// Hook the init action to taxonomy services.
1663
-		$this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
1664
-		$this->loader->add_action( 'init', $this->entity_types_taxonomy_service, 'init', 0 );
1663
+		$this->loader->add_action('init', $this->topic_taxonomy_service, 'init', 0);
1664
+		$this->loader->add_action('init', $this->entity_types_taxonomy_service, 'init', 0);
1665 1665
 
1666 1666
 		// Hook the deleted_post_meta action to the Thumbnail service.
1667
-		$this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
1667
+		$this->loader->add_action('deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4);
1668 1668
 
1669 1669
 		// Hook the added_post_meta action to the Thumbnail service.
1670
-		$this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1670
+		$this->loader->add_action('added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4);
1671 1671
 
1672 1672
 		// Hook the updated_post_meta action to the Thumbnail service.
1673
-		$this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1673
+		$this->loader->add_action('updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4);
1674 1674
 
1675 1675
 		// Hook the AJAX wl_timeline action to the Timeline service.
1676
-		$this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1676
+		$this->loader->add_action('wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline');
1677 1677
 
1678 1678
 		// Register custom allowed redirect hosts.
1679
-		$this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1679
+		$this->loader->add_filter('allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts');
1680 1680
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1681
-		$this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1681
+		$this->loader->add_action('wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect');
1682 1682
 
1683 1683
 		/*
1684 1684
 		 * The old dashboard is replaced with dashboard v2.
@@ -1696,46 +1696,46 @@  discard block
 block discarded – undo
1696 1696
 
1697 1697
 		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1698 1698
 		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1699
-		$this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1700
-		$this->loader->add_action( 'save_post', $this->rating_service, 'set_rating_for', 20, 1 );
1699
+		$this->loader->add_action('save_post', $this->entity_service, 'save_post', 9, 3);
1700
+		$this->loader->add_action('save_post', $this->rating_service, 'set_rating_for', 20, 1);
1701 1701
 
1702
-		$this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1703
-		$this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1702
+		$this->loader->add_action('edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1);
1703
+		$this->loader->add_action('in_admin_header', $this->rating_service, 'in_admin_header');
1704 1704
 
1705 1705
 		// Entity listing customization (wp-admin/edit.php)
1706 1706
 		// Add custom columns.
1707
-		$this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1707
+		$this->loader->add_filter('manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns');
1708 1708
 		// no explicit entity as it prevents handling of other post types.
1709
-		$this->loader->add_filter( 'manage_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1709
+		$this->loader->add_filter('manage_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2);
1710 1710
 		// Add 4W selection.
1711
-		$this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1712
-		$this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1713
-		$this->loader->add_action( 'pre_get_posts', $this->entity_list_service, 'pre_get_posts' );
1714
-		$this->loader->add_action( 'load-edit.php', $this->entity_list_service, 'load_edit' );
1711
+		$this->loader->add_action('restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope');
1712
+		$this->loader->add_filter('posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope');
1713
+		$this->loader->add_action('pre_get_posts', $this->entity_list_service, 'pre_get_posts');
1714
+		$this->loader->add_action('load-edit.php', $this->entity_list_service, 'load_edit');
1715 1715
 
1716 1716
 		/*
1717 1717
 		 * If `All Entity Types` is disable, use the radio button Walker.
1718 1718
 		 *
1719 1719
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1720 1720
 		 */
1721
-		if ( ! WL_ALL_ENTITY_TYPES ) {
1722
-			$this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1721
+		if ( ! WL_ALL_ENTITY_TYPES) {
1722
+			$this->loader->add_filter('wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args');
1723 1723
 		}
1724 1724
 
1725 1725
 		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1726 1726
 		// entities.
1727
-		$this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1727
+		$this->loader->add_filter('prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2);
1728 1728
 
1729 1729
 		// Filter imported post meta.
1730
-		$this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1730
+		$this->loader->add_filter('wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3);
1731 1731
 
1732 1732
 		// Notify the import service when an import starts and ends.
1733
-		$this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1734
-		$this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1733
+		$this->loader->add_action('import_start', $this->import_service, 'import_start', 10, 0);
1734
+		$this->loader->add_action('import_end', $this->import_service, 'import_end', 10, 0);
1735 1735
 
1736 1736
 		// Hook the AJAX wl_rebuild action to the Rebuild Service.
1737
-		$this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1738
-		$this->loader->add_action( 'wp_ajax_wl_rebuild_references', $this->reference_rebuild_service, 'rebuild' );
1737
+		$this->loader->add_action('wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild');
1738
+		$this->loader->add_action('wp_ajax_wl_rebuild_references', $this->reference_rebuild_service, 'rebuild');
1739 1739
 
1740 1740
 		/**
1741 1741
 		 * Filter: wl_feature__enable__settings-download.
@@ -1745,31 +1745,31 @@  discard block
 block discarded – undo
1745 1745
 		 * @return bool
1746 1746
 		 * @since 3.27.6
1747 1747
 		 */
1748
-		$this->features_registry->register_feature_from_slug( 'settings-download', true, array( $this, 'register_screens' ) );
1748
+		$this->features_registry->register_feature_from_slug('settings-download', true, array($this, 'register_screens'));
1749 1749
 
1750 1750
 
1751 1751
 		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1752
-		$this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1752
+		$this->loader->add_action('wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10);
1753 1753
 
1754 1754
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1755
-		$this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1756
-		$this->loader->add_action( 'admin_post_wl_jsonld', $this->jsonld_service, 'get' );
1757
-		$this->loader->add_action( 'admin_post_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1755
+		$this->loader->add_action('wp_ajax_wl_jsonld', $this->jsonld_service, 'get');
1756
+		$this->loader->add_action('admin_post_wl_jsonld', $this->jsonld_service, 'get');
1757
+		$this->loader->add_action('admin_post_nopriv_wl_jsonld', $this->jsonld_service, 'get');
1758 1758
 
1759 1759
 		// Hook the AJAX wl_validate_key action to the Key Validation service.
1760
-		$this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1760
+		$this->loader->add_action('wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key');
1761 1761
 
1762 1762
 		// Hook the AJAX wl_update_country_options action to the countries.
1763
-		$this->loader->add_action( 'wp_ajax_wl_update_country_options', $this->country_select_element, 'get_options_html' );
1763
+		$this->loader->add_action('wp_ajax_wl_update_country_options', $this->country_select_element, 'get_options_html');
1764 1764
 
1765 1765
 		// Hook the `admin_init` function to the Admin Setup.
1766
-		$this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1766
+		$this->loader->add_action('admin_init', $this->admin_setup, 'admin_init');
1767 1767
 
1768 1768
 		// Hook the admin_init to the settings page.
1769
-		$this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1770
-		$this->loader->add_action( 'admin_init', $this->analytics_settings_page, 'admin_init' );
1769
+		$this->loader->add_action('admin_init', $this->settings_page, 'admin_init');
1770
+		$this->loader->add_action('admin_init', $this->analytics_settings_page, 'admin_init');
1771 1771
 
1772
-		$this->loader->add_filter( 'admin_post_thumbnail_html', $this->publisher_service, 'add_featured_image_instruction' );
1772
+		$this->loader->add_filter('admin_post_thumbnail_html', $this->publisher_service, 'add_featured_image_instruction');
1773 1773
 
1774 1774
 		// Hook the menu creation on the general wordlift menu creation.
1775 1775
 		/**
@@ -1782,18 +1782,18 @@  discard block
 block discarded – undo
1782 1782
 		 *
1783 1783
 		 * Since 3.30.0 this feature is registered using registry.
1784 1784
 		 */
1785
-		add_action( 'plugins_loaded', function () use ( $that ) {
1786
-			if ( apply_filters( 'wl_feature__enable__settings-screen', true ) || Admin_User_Option::is_wordlift_admin() ) {
1787
-				add_action( 'wl_admin_menu', array( $that->settings_page, 'admin_menu' ), 10, 2 );
1785
+		add_action('plugins_loaded', function() use ($that) {
1786
+			if (apply_filters('wl_feature__enable__settings-screen', true) || Admin_User_Option::is_wordlift_admin()) {
1787
+				add_action('wl_admin_menu', array($that->settings_page, 'admin_menu'), 10, 2);
1788 1788
 			}
1789 1789
 		} );
1790 1790
 
1791 1791
 		// Hook key update.
1792
-		$this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 );
1793
-		$this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1792
+		$this->loader->add_action('pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2);
1793
+		$this->loader->add_action('update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2);
1794 1794
 
1795 1795
 		// Add additional action links to the WordLift plugin in the plugins page.
1796
-		$this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1796
+		$this->loader->add_filter('plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1);
1797 1797
 
1798 1798
 		/*
1799 1799
 		 * Remove the Analytics Settings link from the plugin page.
@@ -1804,25 +1804,25 @@  discard block
 block discarded – undo
1804 1804
 		// $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->analytics_settings_page_action_link, 'action_links', 10, 1 );
1805 1805
 
1806 1806
 		// Hook the AJAX `wl_publisher` action name.
1807
-		$this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1807
+		$this->loader->add_action('wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher');
1808 1808
 
1809 1809
 		// Hook row actions for the entity type list admin.
1810
-		$this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1810
+		$this->loader->add_filter('wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2);
1811 1811
 
1812 1812
 		/** Ajax actions. */
1813
-		$this->loader->add_action( 'wp_ajax_wl_google_analytics_export', $this->google_analytics_export_service, 'export' );
1813
+		$this->loader->add_action('wp_ajax_wl_google_analytics_export', $this->google_analytics_export_service, 'export');
1814 1814
 
1815 1815
 		// Hook capabilities manipulation to allow access to entity type admin
1816 1816
 		// page  on WordPress versions before 4.7.
1817 1817
 		global $wp_version;
1818
-		if ( version_compare( $wp_version, '4.7', '<' ) ) {
1819
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1818
+		if (version_compare($wp_version, '4.7', '<')) {
1819
+			$this->loader->add_filter('map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4);
1820 1820
 		}
1821 1821
 
1822
-		$this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1822
+		$this->loader->add_action('wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1);
1823 1823
 
1824 1824
 		/** Adapters. */
1825
-		$this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1825
+		$this->loader->add_filter('mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1);
1826 1826
 		/**
1827 1827
 		 * Disabling Faq temporarily.
1828 1828
 		 * Load the tinymce editor button on the tool bar.
@@ -1833,54 +1833,54 @@  discard block
 block discarded – undo
1833 1833
 		//$this->loader->add_filter( 'mce_external_plugins', $this->faq_tinymce_adapter, 'register_faq_tinymce_plugin', 10, 1 );
1834 1834
 
1835 1835
 
1836
-		$this->loader->add_action( 'wp_ajax_wl_relation_rebuild_process_all', $this->relation_rebuild_adapter, 'process_all' );
1837
-		$this->loader->add_action( 'wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create' );
1838
-		$this->loader->add_action( 'wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete' );
1836
+		$this->loader->add_action('wp_ajax_wl_relation_rebuild_process_all', $this->relation_rebuild_adapter, 'process_all');
1837
+		$this->loader->add_action('wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create');
1838
+		$this->loader->add_action('wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete');
1839 1839
 		/**
1840 1840
 		 * @since 3.26.0
1841 1841
 		 */
1842 1842
 		$excerpt_adapter = new Post_Excerpt_Meta_Box_Adapter();
1843
-		$this->loader->add_action( 'do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box' );
1843
+		$this->loader->add_action('do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box');
1844 1844
 		// Adding Rest route for the post excerpt
1845 1845
 		Post_Excerpt_Rest_Controller::register_routes();
1846 1846
 
1847
-		$this->loader->add_action( 'update_user_metadata', $this->user_service, 'update_user_metadata', 10, 5 );
1848
-		$this->loader->add_action( 'delete_user_metadata', $this->user_service, 'delete_user_metadata', 10, 5 );
1847
+		$this->loader->add_action('update_user_metadata', $this->user_service, 'update_user_metadata', 10, 5);
1848
+		$this->loader->add_action('delete_user_metadata', $this->user_service, 'delete_user_metadata', 10, 5);
1849 1849
 
1850 1850
 		// Handle the autocomplete request.
1851
-		add_action( 'wp_ajax_wl_autocomplete', array(
1851
+		add_action('wp_ajax_wl_autocomplete', array(
1852 1852
 			$this->autocomplete_adapter,
1853 1853
 			'wl_autocomplete',
1854
-		) );
1855
-		add_action( 'wp_ajax_nopriv_wl_autocomplete', array(
1854
+		));
1855
+		add_action('wp_ajax_nopriv_wl_autocomplete', array(
1856 1856
 			$this->autocomplete_adapter,
1857 1857
 			'wl_autocomplete',
1858
-		) );
1858
+		));
1859 1859
 
1860 1860
 		// Hooks to restrict multisite super admin from manipulating entity types.
1861
-		if ( is_multisite() ) {
1862
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1861
+		if (is_multisite()) {
1862
+			$this->loader->add_filter('map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4);
1863 1863
 		}
1864 1864
 
1865
-		$deactivator_feedback = new Wordlift_Deactivator_Feedback( $this->configuration_service );
1865
+		$deactivator_feedback = new Wordlift_Deactivator_Feedback($this->configuration_service);
1866 1866
 
1867
-		add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) );
1868
-		add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) );
1869
-		add_action( 'wp_ajax_wl_deactivation_feedback', array( $deactivator_feedback, 'wl_deactivation_feedback' ) );
1867
+		add_action('admin_footer', array($deactivator_feedback, 'render_feedback_popup'));
1868
+		add_action('admin_enqueue_scripts', array($deactivator_feedback, 'enqueue_popup_scripts'));
1869
+		add_action('wp_ajax_wl_deactivation_feedback', array($deactivator_feedback, 'wl_deactivation_feedback'));
1870 1870
 
1871 1871
 		/**
1872 1872
 		 * Always allow the `wordlift/classification` block.
1873 1873
 		 *
1874 1874
 		 * @since 3.23.0
1875 1875
 		 */
1876
-		add_filter( 'allowed_block_types', function ( $value ) {
1876
+		add_filter('allowed_block_types', function($value) {
1877 1877
 
1878
-			if ( true === $value ) {
1878
+			if (true === $value) {
1879 1879
 				return $value;
1880 1880
 			}
1881 1881
 
1882
-			return array_merge( (array) $value, array( 'wordlift/classification' ) );
1883
-		}, PHP_INT_MAX );
1882
+			return array_merge((array) $value, array('wordlift/classification'));
1883
+		}, PHP_INT_MAX);
1884 1884
 
1885 1885
 		/**
1886 1886
 		 * @since 3.27.7
@@ -1898,58 +1898,58 @@  discard block
 block discarded – undo
1898 1898
 	 */
1899 1899
 	private function define_public_hooks() {
1900 1900
 
1901
-		$plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1901
+		$plugin_public = new Wordlift_Public($this->get_plugin_name(), $this->get_version());
1902 1902
 
1903 1903
 		// Register the entity post type.
1904
-		$this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1904
+		$this->loader->add_action('init', $this->entity_post_type_service, 'register');
1905 1905
 
1906 1906
 		// Bind the link generation and handling hooks to the entity link service.
1907
-		$this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1908
-		$this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1907
+		$this->loader->add_filter('post_type_link', $this->entity_link_service, 'post_type_link', 10, 4);
1908
+		$this->loader->add_action('pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1);
1909 1909
 		// $this->loader->add_filter( 'wp_unique_post_slug_is_bad_flat_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_flat_slug', 10, 3 );
1910 1910
 		// $this->loader->add_filter( 'wp_unique_post_slug_is_bad_hierarchical_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_hierarchical_slug', 10, 4 );
1911 1911
 
1912
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1913
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1914
-		$this->loader->add_action( 'wp_enqueue_scripts', $this->context_cards_service, 'enqueue_scripts' );
1912
+		$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
1913
+		$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
1914
+		$this->loader->add_action('wp_enqueue_scripts', $this->context_cards_service, 'enqueue_scripts');
1915 1915
 
1916 1916
 		// Registering Faq_Content_Filter service used for removing faq question and answer tags from the html.
1917
-		$this->loader->add_filter( 'the_content', $this->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags' );
1917
+		$this->loader->add_filter('the_content', $this->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags');
1918 1918
 		// Hook the content filter service to add entity links.
1919
-		if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) {
1920
-			$this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1919
+		if ( ! defined('WL_DISABLE_CONTENT_FILTER') || ! WL_DISABLE_CONTENT_FILTER) {
1920
+			$this->loader->add_filter('the_content', $this->content_filter_service, 'the_content');
1921 1921
 		}
1922 1922
 
1923 1923
 		// Hook the AJAX wl_timeline action to the Timeline service.
1924
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1924
+		$this->loader->add_action('wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline');
1925 1925
 
1926 1926
 		// Hook the ShareThis service.
1927
-		$this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1928
-		$this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1927
+		$this->loader->add_filter('the_content', $this->sharethis_service, 'the_content', 99);
1928
+		$this->loader->add_filter('the_excerpt', $this->sharethis_service, 'the_excerpt', 99);
1929 1929
 
1930 1930
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1931
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1931
+		$this->loader->add_action('wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get');
1932 1932
 
1933 1933
 		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1934 1934
 		// in order to tweak WP's `WP_Query` to include entities in queries related
1935 1935
 		// to categories.
1936
-		$this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1936
+		$this->loader->add_action('pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1);
1937 1937
 
1938 1938
 		/*
1939 1939
 		 * Hook the `pre_get_posts` action to the `Wordlift_Entity_Page_Service`
1940 1940
 		 * in order to tweak WP's `WP_Query` to show event related entities in reverse
1941 1941
 		 * order of start time.
1942 1942
 		 */
1943
-		$this->loader->add_action( 'pre_get_posts', $this->entity_page_service, 'pre_get_posts', 10, 1 );
1943
+		$this->loader->add_action('pre_get_posts', $this->entity_page_service, 'pre_get_posts', 10, 1);
1944 1944
 
1945
-		$this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1945
+		$this->loader->add_action('wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1);
1946 1946
 
1947 1947
 		// This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done.
1948
-		$this->loader->add_action( 'save_post', $this->entity_type_adapter, 'save_post', 9, 3 );
1948
+		$this->loader->add_action('save_post', $this->entity_type_adapter, 'save_post', 9, 3);
1949 1949
 
1950 1950
 		// Analytics Script Frontend.
1951
-		if ( $this->configuration_service->is_analytics_enable() ) {
1952
-			$this->loader->add_action( 'wp_enqueue_scripts', $this->analytics_connect, 'enqueue_scripts', 10 );
1951
+		if ($this->configuration_service->is_analytics_enable()) {
1952
+			$this->loader->add_action('wp_enqueue_scripts', $this->analytics_connect, 'enqueue_scripts', 10);
1953 1953
 		}
1954 1954
 
1955 1955
 	}
@@ -2002,11 +2002,11 @@  discard block
 block discarded – undo
2002 2002
 	 */
2003 2003
 	private function load_cli_dependencies() {
2004 2004
 
2005
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'cli/class-wordlift-push-reference-data-command.php';
2005
+		require_once plugin_dir_path(dirname(__FILE__)).'cli/class-wordlift-push-reference-data-command.php';
2006 2006
 
2007
-		$push_reference_data_command = new Wordlift_Push_Reference_Data_Command( $this->relation_service, $this->entity_service, $this->sparql_service, $this->configuration_service, $this->entity_type_service );
2007
+		$push_reference_data_command = new Wordlift_Push_Reference_Data_Command($this->relation_service, $this->entity_service, $this->sparql_service, $this->configuration_service, $this->entity_type_service);
2008 2008
 
2009
-		WP_CLI::add_command( 'wl references push', $push_reference_data_command );
2009
+		WP_CLI::add_command('wl references push', $push_reference_data_command);
2010 2010
 
2011 2011
 	}
2012 2012
 
@@ -2031,7 +2031,7 @@  discard block
 block discarded – undo
2031 2031
 		 * @since 3.27.6
2032 2032
 		 */
2033 2033
 
2034
-		wp_register_script( 'wl_enabled_blocks', false );
2034
+		wp_register_script('wl_enabled_blocks', false);
2035 2035
 
2036 2036
 		$enabled_blocks = array();
2037 2037
 
@@ -2039,13 +2039,13 @@  discard block
 block discarded – undo
2039 2039
 		 * Filter name: wl_feature_enable__product_navigator
2040 2040
 		 * @since 3.30.0
2041 2041
 		 */
2042
-		if ( apply_filters( 'wl_feature_enable__product-navigator', true ) ) {
2042
+		if (apply_filters('wl_feature_enable__product-navigator', true)) {
2043 2043
 			$enabled_blocks[] = 'wordlift/products-navigator';
2044 2044
 		}
2045 2045
 
2046
-		if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
2046
+		if (apply_filters('wl_feature__enable__blocks', true)) {
2047 2047
 			// To intimate JS
2048
-			$enabled_blocks = array_merge( $enabled_blocks, array(
2048
+			$enabled_blocks = array_merge($enabled_blocks, array(
2049 2049
 				'wordlift/navigator',
2050 2050
 				'wordlift/chord',
2051 2051
 				'wordlift/geomap',
@@ -2053,11 +2053,11 @@  discard block
 block discarded – undo
2053 2053
 				'wordlift/cloud',
2054 2054
 				'wordlift/vocabulary',
2055 2055
 				'wordlift/faceted-search'
2056
-			) );
2056
+			));
2057 2057
 		}
2058 2058
 
2059
-		wp_localize_script( 'wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks );
2060
-		wp_enqueue_script( 'wl_enabled_blocks' );
2059
+		wp_localize_script('wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks);
2060
+		wp_enqueue_script('wl_enabled_blocks');
2061 2061
 	}
2062 2062
 
2063 2063
 	/**
@@ -2065,11 +2065,11 @@  discard block
 block discarded – undo
2065 2065
 	 */
2066 2066
 	public function register_screens() {
2067 2067
 		// Hook the menu to the Download Your Data page.
2068
-		if ( apply_filters( 'wl_feature__enable__settings-download', true ) ) {
2069
-			add_action( 'admin_menu', array( $this->download_your_data_page, 'admin_menu' ), 100, 0 );
2068
+		if (apply_filters('wl_feature__enable__settings-download', true)) {
2069
+			add_action('admin_menu', array($this->download_your_data_page, 'admin_menu'), 100, 0);
2070 2070
 		}
2071
-		add_action( 'admin_menu', array( $this->status_page, 'admin_menu' ), 100, 0 );
2072
-		add_action( 'admin_menu', array( $this->entity_type_settings_admin_page, 'admin_menu' ), 100, 0 );
2071
+		add_action('admin_menu', array($this->status_page, 'admin_menu'), 100, 0);
2072
+		add_action('admin_menu', array($this->entity_type_settings_admin_page, 'admin_menu'), 100, 0);
2073 2073
 
2074 2074
 	}
2075 2075
 
Please login to merge, or discard this patch.
Indentation   +1875 added lines, -1876 removed lines patch added patch discarded remove patch
@@ -75,1612 +75,1611 @@  discard block
 block discarded – undo
75 75
  */
76 76
 class Wordlift {
77 77
 
78
-	//<editor-fold desc="## FIELDS">
79
-
80
-	/**
81
-	 * The loader that's responsible for maintaining and registering all hooks that power
82
-	 * the plugin.
83
-	 *
84
-	 * @since    1.0.0
85
-	 * @access   protected
86
-	 * @var      Wordlift_Loader $loader Maintains and registers all hooks for the plugin.
87
-	 */
88
-	protected $loader;
89
-
90
-	/**
91
-	 * The unique identifier of this plugin.
92
-	 *
93
-	 * @since    1.0.0
94
-	 * @access   protected
95
-	 * @var      string $plugin_name The string used to uniquely identify this plugin.
96
-	 */
97
-	protected $plugin_name;
98
-
99
-	/**
100
-	 * The current version of the plugin.
101
-	 *
102
-	 * @since    1.0.0
103
-	 * @access   protected
104
-	 * @var      string $version The current version of the plugin.
105
-	 */
106
-	protected $version;
107
-
108
-	/**
109
-	 * The {@link Wordlift_Tinymce_Adapter} instance.
110
-	 *
111
-	 * @since  3.12.0
112
-	 * @access protected
113
-	 * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance.
114
-	 */
115
-	protected $tinymce_adapter;
116
-
117
-	/**
118
-	 * The {@link Faq_Tinymce_Adapter} instance
119
-	 * @since 3.26.0
120
-	 * @access protected
121
-	 * @var Faq_Tinymce_Adapter $faq_tinymce_adapter .
122
-	 */
123
-	//protected $faq_tinymce_adapter;
124
-
125
-	/**
126
-	 * The Thumbnail service.
127
-	 *
128
-	 * @since  3.1.5
129
-	 * @access private
130
-	 * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service.
131
-	 */
132
-	private $thumbnail_service;
133
-
134
-	/**
135
-	 * The UI service.
136
-	 *
137
-	 * @since  3.2.0
138
-	 * @access private
139
-	 * @var \Wordlift_UI_Service $ui_service The UI service.
140
-	 */
141
-	private $ui_service;
142
-
143
-	/**
144
-	 * The Schema service.
145
-	 *
146
-	 * @since  3.3.0
147
-	 * @access protected
148
-	 * @var \Wordlift_Schema_Service $schema_service The Schema service.
149
-	 */
150
-	protected $schema_service;
151
-
152
-	/**
153
-	 * The Entity service.
154
-	 *
155
-	 * @since  3.1.0
156
-	 * @access protected
157
-	 * @var \Wordlift_Entity_Service $entity_service The Entity service.
158
-	 */
159
-	protected $entity_service;
160
-
161
-	/**
162
-	 * The Topic Taxonomy service.
163
-	 *
164
-	 * @since  3.5.0
165
-	 * @access private
166
-	 * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service.
167
-	 */
168
-	private $topic_taxonomy_service;
169
-
170
-	/**
171
-	 * The Entity Types Taxonomy service.
172
-	 *
173
-	 * @since  3.18.0
174
-	 * @access private
175
-	 * @var \Wordlift_Entity_Type_Taxonomy_Service The Entity Types Taxonomy service.
176
-	 */
177
-	private $entity_types_taxonomy_service;
178
-
179
-	/**
180
-	 * The User service.
181
-	 *
182
-	 * @since  3.1.7
183
-	 * @access protected
184
-	 * @var \Wordlift_User_Service $user_service The User service.
185
-	 */
186
-	protected $user_service;
187
-
188
-	/**
189
-	 * The Timeline service.
190
-	 *
191
-	 * @since  3.1.0
192
-	 * @access private
193
-	 * @var \Wordlift_Timeline_Service $timeline_service The Timeline service.
194
-	 */
195
-	private $timeline_service;
196
-
197
-	/**
198
-	 * The Redirect service.
199
-	 *
200
-	 * @since  3.2.0
201
-	 * @access private
202
-	 * @var \Wordlift_Redirect_Service $redirect_service The Redirect service.
203
-	 */
204
-	private $redirect_service;
205
-
206
-	/**
207
-	 * The Notice service.
208
-	 *
209
-	 * @since  3.3.0
210
-	 * @access private
211
-	 * @var \Wordlift_Notice_Service $notice_service The Notice service.
212
-	 */
213
-	private $notice_service;
214
-
215
-	/**
216
-	 * The Entity list customization.
217
-	 *
218
-	 * @since  3.3.0
219
-	 * @access protected
220
-	 * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service.
221
-	 */
222
-	protected $entity_list_service;
223
-
224
-	/**
225
-	 * The Entity Types Taxonomy Walker.
226
-	 *
227
-	 * @since  3.1.0
228
-	 * @access private
229
-	 * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker
230
-	 */
231
-	private $entity_types_taxonomy_walker;
232
-
233
-	/**
234
-	 * The ShareThis service.
235
-	 *
236
-	 * @since  3.2.0
237
-	 * @access private
238
-	 * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service.
239
-	 */
240
-	private $sharethis_service;
241
-
242
-	/**
243
-	 * The PrimaShop adapter.
244
-	 *
245
-	 * @since  3.2.3
246
-	 * @access private
247
-	 * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter.
248
-	 */
249
-	private $primashop_adapter;
250
-
251
-	/**
252
-	 * The WordLift Dashboard adapter.
253
-	 *
254
-	 * @since  3.4.0
255
-	 * @access private
256
-	 * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service;
257
-	 */
258
-	private $dashboard_service;
259
-
260
-	/**
261
-	 * The entity type service.
262
-	 *
263
-	 * @since  3.6.0
264
-	 * @access private
265
-	 * @var \Wordlift_Entity_Post_Type_Service
266
-	 */
267
-	private $entity_post_type_service;
268
-
269
-	/**
270
-	 * The entity link service used to mangle links to entities with a custom slug or even w/o a slug.
271
-	 *
272
-	 * @since  3.6.0
273
-	 * @access private
274
-	 * @var \Wordlift_Entity_Link_Service $entity_link_service The {@link Wordlift_Entity_Link_Service} instance.
275
-	 */
276
-	private $entity_link_service;
277
-
278
-	/**
279
-	 * A {@link Wordlift_Sparql_Service} instance.
280
-	 *
281
-	 * @since    3.6.0
282
-	 * @access   protected
283
-	 * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance.
284
-	 */
285
-	protected $sparql_service;
286
-
287
-	/**
288
-	 * A {@link Wordlift_Import_Service} instance.
289
-	 *
290
-	 * @since  3.6.0
291
-	 * @access private
292
-	 * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance.
293
-	 */
294
-	private $import_service;
295
-
296
-	/**
297
-	 * A {@link Wordlift_Rebuild_Service} instance.
298
-	 *
299
-	 * @since  3.6.0
300
-	 * @access private
301
-	 * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance.
302
-	 */
303
-	private $rebuild_service;
304
-
305
-	/**
306
-	 * A {@link Wordlift_Jsonld_Service} instance.
307
-	 *
308
-	 * @since  3.7.0
309
-	 * @access protected
310
-	 * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance.
311
-	 */
312
-	protected $jsonld_service;
313
-
314
-	/**
315
-	 * A {@link Wordlift_Website_Jsonld_Converter} instance.
316
-	 *
317
-	 * @since  3.14.0
318
-	 * @access protected
319
-	 * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance.
320
-	 */
321
-	protected $jsonld_website_converter;
322
-
323
-	/**
324
-	 * A {@link Wordlift_Property_Factory} instance.
325
-	 *
326
-	 * @since  3.7.0
327
-	 * @access private
328
-	 * @var \Wordlift_Property_Factory $property_factory
329
-	 */
330
-	private $property_factory;
331
-
332
-	/**
333
-	 * The 'Download Your Data' page.
334
-	 *
335
-	 * @since  3.6.0
336
-	 * @access private
337
-	 * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
338
-	 */
339
-	private $download_your_data_page;
340
-
341
-	/**
342
-	 * The 'WordLift Settings' page.
343
-	 *
344
-	 * @since  3.11.0
345
-	 * @access protected
346
-	 * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
347
-	 */
348
-	protected $settings_page;
349
-
350
-	/**
351
-	 * The install wizard page.
352
-	 *
353
-	 * @since  3.9.0
354
-	 * @access private
355
-	 * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
356
-	 */
357
-	public $admin_setup;
358
-
359
-	/**
360
-	 * The Content Filter Service hooks up to the 'the_content' filter and provides
361
-	 * linking of entities to their pages.
362
-	 *
363
-	 * @since  3.8.0
364
-	 * @access private
365
-	 * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
366
-	 */
367
-	private $content_filter_service;
368
-
369
-	/**
370
-	 * The Faq Content filter service
371
-	 * @since  3.26.0
372
-	 * @access private
373
-	 * @var Faq_Content_Filter $faq_content_filter_service A {@link Faq_Content_Filter} instance.
374
-	 */
375
-	private $faq_content_filter_service;
376
-
377
-	/**
378
-	 * A {@link Wordlift_Key_Validation_Service} instance.
379
-	 *
380
-	 * @since  3.9.0
381
-	 * @access private
382
-	 * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
383
-	 */
384
-	private $key_validation_service;
385
-
386
-	/**
387
-	 * A {@link Wordlift_Rating_Service} instance.
388
-	 *
389
-	 * @since  3.10.0
390
-	 * @access private
391
-	 * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
392
-	 */
393
-	private $rating_service;
394
-
395
-	/**
396
-	 * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
397
-	 *
398
-	 * @since  3.10.0
399
-	 * @access protected
400
-	 * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
401
-	 */
402
-	protected $post_to_jsonld_converter;
403
-
404
-	/**
405
-	 * A {@link Wordlift_Configuration_Service} instance.
406
-	 *
407
-	 * @since  3.10.0
408
-	 * @access protected
409
-	 * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance.
410
-	 */
411
-	protected $configuration_service;
412
-
413
-	/**
414
-	 * A {@link Wordlift_Install_Service} instance.
415
-	 *
416
-	 * @since  3.18.0
417
-	 * @access protected
418
-	 * @var \Wordlift_Install_Service $install_service A {@link Wordlift_Install_Service} instance.
419
-	 */
420
-	protected $install_service;
421
-
422
-	/**
423
-	 * A {@link Wordlift_Entity_Type_Service} instance.
424
-	 *
425
-	 * @since  3.10.0
426
-	 * @access protected
427
-	 * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
428
-	 */
429
-	protected $entity_type_service;
430
-
431
-	/**
432
-	 * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
433
-	 *
434
-	 * @since  3.10.0
435
-	 * @access protected
436
-	 * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
437
-	 */
438
-	protected $entity_post_to_jsonld_converter;
439
-
440
-	/**
441
-	 * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
442
-	 *
443
-	 * @since  3.10.0
444
-	 * @access protected
445
-	 * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
446
-	 */
447
-	protected $postid_to_jsonld_converter;
448
-
449
-	/**
450
-	 * The {@link Wordlift_Admin_Status_Page} class.
451
-	 *
452
-	 * @since  3.9.8
453
-	 * @access private
454
-	 * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class.
455
-	 */
456
-	private $status_page;
457
-
458
-	/**
459
-	 * The {@link Wordlift_Category_Taxonomy_Service} instance.
460
-	 *
461
-	 * @since  3.11.0
462
-	 * @access protected
463
-	 * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
464
-	 */
465
-	protected $category_taxonomy_service;
466
-
467
-	/**
468
-	 * The {@link Wordlift_Entity_Page_Service} instance.
469
-	 *
470
-	 * @since  3.11.0
471
-	 * @access protected
472
-	 * @var \Wordlift_Entity_Page_Service $entity_page_service The {@link Wordlift_Entity_Page_Service} instance.
473
-	 */
474
-	protected $entity_page_service;
475
-
476
-	/**
477
-	 * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
478
-	 *
479
-	 * @since  3.11.0
480
-	 * @access protected
481
-	 * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
482
-	 */
483
-	protected $settings_page_action_link;
484
-
485
-	/**
486
-	 * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
487
-	 *
488
-	 * @since  3.11.0
489
-	 * @access protected
490
-	 * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
491
-	 */
492
-	protected $analytics_settings_page_action_link;
493
-
494
-	/**
495
-	 * The {@link Wordlift_Analytics_Connect} class.
496
-	 *
497
-	 * @since  3.11.0
498
-	 * @access protected
499
-	 * @var \Wordlift_Analytics_Connect $analytics_connect The {@link Wordlift_Analytics_Connect} class.
500
-	 */
501
-	protected $analytics_connect;
502
-
503
-	/**
504
-	 * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
505
-	 *
506
-	 * @since  3.11.0
507
-	 * @access protected
508
-	 * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
509
-	 */
510
-	protected $publisher_ajax_adapter;
511
-
512
-	/**
513
-	 * The {@link Wordlift_Admin_Input_Element} element renderer.
514
-	 *
515
-	 * @since  3.11.0
516
-	 * @access protected
517
-	 * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
518
-	 */
519
-	protected $input_element;
520
-
521
-	/**
522
-	 * The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
523
-	 *
524
-	 * @since  3.13.0
525
-	 * @access protected
526
-	 * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
527
-	 */
528
-	protected $radio_input_element;
529
-
530
-	/**
531
-	 * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
532
-	 *
533
-	 * @since  3.11.0
534
-	 * @access protected
535
-	 * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
536
-	 */
537
-	protected $language_select_element;
538
-
539
-	/**
540
-	 * The {@link Wordlift_Admin_Country_Select_Element} element renderer.
541
-	 *
542
-	 * @since  3.18.0
543
-	 * @access protected
544
-	 * @var \Wordlift_Admin_Country_Select_Element $country_select_element The {@link Wordlift_Admin_Country_Select_Element} element renderer.
545
-	 */
546
-	protected $country_select_element;
547
-
548
-	/**
549
-	 * The {@link Wordlift_Admin_Publisher_Element} element renderer.
550
-	 *
551
-	 * @since  3.11.0
552
-	 * @access protected
553
-	 * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
554
-	 */
555
-	protected $publisher_element;
556
-
557
-	/**
558
-	 * The {@link Wordlift_Admin_Select2_Element} element renderer.
559
-	 *
560
-	 * @since  3.11.0
561
-	 * @access protected
562
-	 * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
563
-	 */
564
-	protected $select2_element;
565
-
566
-	/**
567
-	 * The controller for the entity type list admin page
568
-	 *
569
-	 * @since  3.11.0
570
-	 * @access private
571
-	 * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
572
-	 */
573
-	private $entity_type_admin_page;
574
-
575
-	/**
576
-	 * The controller for the entity type settings admin page
577
-	 *
578
-	 * @since  3.11.0
579
-	 * @access private
580
-	 * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
581
-	 */
582
-	private $entity_type_settings_admin_page;
583
-
584
-	/**
585
-	 * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
586
-	 *
587
-	 * @since  3.11.0
588
-	 * @access protected
589
-	 * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
590
-	 */
591
-	protected $related_entities_cloud_widget;
592
-
593
-	/**
594
-	 * The {@link Wordlift_Admin_Author_Element} instance.
595
-	 *
596
-	 * @since  3.14.0
597
-	 * @access protected
598
-	 * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance.
599
-	 */
600
-	protected $author_element;
601
-
602
-	/**
603
-	 * The {@link Wordlift_Sample_Data_Service} instance.
604
-	 *
605
-	 * @since  3.12.0
606
-	 * @access protected
607
-	 * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
608
-	 */
609
-	protected $sample_data_service;
610
-
611
-	/**
612
-	 * The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
613
-	 *
614
-	 * @since  3.12.0
615
-	 * @access protected
616
-	 * @var \Wordlift_Sample_Data_Ajax_Adapter $sample_data_ajax_adapter The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
617
-	 */
618
-	protected $sample_data_ajax_adapter;
619
-
620
-	/**
621
-	 * The {@link Wordlift_Relation_Rebuild_Service} instance.
622
-	 *
623
-	 * @since  3.14.3
624
-	 * @access private
625
-	 * @var \Wordlift_Relation_Rebuild_Service $relation_rebuild_service The {@link Wordlift_Relation_Rebuild_Service} instance.
626
-	 */
627
-	private $relation_rebuild_service;
628
-
629
-	/**
630
-	 * The {@link Wordlift_Relation_Rebuild_Adapter} instance.
631
-	 *
632
-	 * @since  3.14.3
633
-	 * @access private
634
-	 * @var \Wordlift_Relation_Rebuild_Adapter $relation_rebuild_adapter The {@link Wordlift_Relation_Rebuild_Adapter} instance.
635
-	 */
636
-	private $relation_rebuild_adapter;
637
-
638
-	/**
639
-	 * The {@link Wordlift_Reference_Rebuild_Service} instance.
640
-	 *
641
-	 * @since  3.18.0
642
-	 * @access private
643
-	 * @var \Wordlift_Reference_Rebuild_Service $reference_rebuild_service The {@link Wordlift_Reference_Rebuild_Service} instance.
644
-	 */
645
-	private $reference_rebuild_service;
646
-
647
-	/**
648
-	 * The {@link Wordlift_Google_Analytics_Export_Service} instance.
649
-	 *
650
-	 * @since  3.16.0
651
-	 * @access protected
652
-	 * @var \Wordlift_Google_Analytics_Export_Service $google_analytics_export_service The {@link Wordlift_Google_Analytics_Export_Service} instance.
653
-	 */
654
-	protected $google_analytics_export_service;
655
-
656
-	/**
657
-	 * {@link Wordlift}'s singleton instance.
658
-	 *
659
-	 * @since  3.15.0
660
-	 * @access protected
661
-	 * @var \Wordlift_Entity_Type_Adapter $entity_type_adapter The {@link Wordlift_Entity_Type_Adapter} instance.
662
-	 */
663
-	protected $entity_type_adapter;
664
-
665
-	/**
666
-	 * The {@link Wordlift_Storage_Factory} instance.
667
-	 *
668
-	 * @since  3.15.0
669
-	 * @access protected
670
-	 * @var \Wordlift_Storage_Factory $storage_factory The {@link Wordlift_Storage_Factory} instance.
671
-	 */
672
-	protected $storage_factory;
673
-
674
-	/**
675
-	 * The {@link Wordlift_Sparql_Tuple_Rendition_Factory} instance.
676
-	 *
677
-	 * @since  3.15.0
678
-	 * @access protected
679
-	 * @var \Wordlift_Sparql_Tuple_Rendition_Factory $rendition_factory The {@link Wordlift_Sparql_Tuple_Rendition_Factory} instance.
680
-	 */
681
-	protected $rendition_factory;
682
-
683
-	/**
684
-	 * The {@link Wordlift_Autocomplete_Adapter} instance.
685
-	 *
686
-	 * @since  3.15.0
687
-	 * @access private
688
-	 * @var \Wordlift_Autocomplete_Adapter $autocomplete_adapter The {@link Wordlift_Autocomplete_Adapter} instance.
689
-	 */
690
-	private $autocomplete_adapter;
691
-
692
-	/**
693
-	 * The {@link Wordlift_Relation_Service} instance.
694
-	 *
695
-	 * @since  3.15.0
696
-	 * @access protected
697
-	 * @var \Wordlift_Relation_Service $relation_service The {@link Wordlift_Relation_Service} instance.
698
-	 */
699
-	protected $relation_service;
700
-
701
-	/**
702
-	 * The {@link Wordlift_Cached_Post_Converter} instance.
703
-	 *
704
-	 * @since  3.16.0
705
-	 * @access protected
706
-	 * @var  \Wordlift_Cached_Post_Converter $cached_postid_to_jsonld_converter The {@link Wordlift_Cached_Post_Converter} instance.
707
-	 *
708
-	 */
709
-	protected $cached_postid_to_jsonld_converter;
710
-
711
-	/**
712
-	 * The {@link Wordlift_Entity_Uri_Service} instance.
713
-	 *
714
-	 * @since  3.16.3
715
-	 * @access protected
716
-	 * @var \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance.
717
-	 */
718
-	protected $entity_uri_service;
719
-
720
-	/**
721
-	 * The {@link Wordlift_Publisher_Service} instance.
722
-	 *
723
-	 * @since  3.19.0
724
-	 * @access protected
725
-	 * @var \Wordlift_Publisher_Service $publisher_service The {@link Wordlift_Publisher_Service} instance.
726
-	 */
727
-	protected $publisher_service;
728
-
729
-	/**
730
-	 * The {@link Wordlift_Context_Cards_Service} instance.
731
-	 *
732
-	 * @var \Wordlift_Context_Cards_Service The {@link Wordlift_Context_Cards_Service} instance.
733
-	 */
734
-	protected $context_cards_service;
735
-
736
-	/**
737
-	 * {@link Wordlift}'s singleton instance.
738
-	 *
739
-	 * @since  3.11.2
740
-	 * @access private
741
-	 * @var Wordlift $instance {@link Wordlift}'s singleton instance.
742
-	 */
743
-	private static $instance;
744
-
745
-	/**
746
-	 * A singleton instance of features registry.
747
-	 * @since 3.30.0
748
-	 * @var Features_Registry
749
-	 */
750
-	private $features_registry;
751
-
752
-	//</editor-fold>
753
-
754
-	/**
755
-	 * Define the core functionality of the plugin.
756
-	 *
757
-	 * Set the plugin name and the plugin version that can be used throughout the plugin.
758
-	 * Load the dependencies, define the locale, and set the hooks for the admin area and
759
-	 * the public-facing side of the site.
760
-	 *
761
-	 * @since    1.0.0
762
-	 */
763
-	public function __construct() {
764
-
765
-		self::$instance = $this;
766
-
767
-		$this->plugin_name = 'wordlift';
768
-		$this->version     = '3.30.1';
769
-		$this->load_dependencies();
770
-		$this->set_locale();
771
-		$this->define_admin_hooks();
772
-		$this->define_public_hooks();
773
-
774
-		// If we're in `WP_CLI` load the related files.
775
-		if ( class_exists( 'WP_CLI' ) ) {
776
-			$this->load_cli_dependencies();
777
-		}
778
-
779
-	}
780
-
781
-	/**
782
-	 * Get the singleton instance.
783
-	 *
784
-	 * @return Wordlift The {@link Wordlift} singleton instance.
785
-	 * @since 3.11.2
786
-	 *
787
-	 */
788
-	public static function get_instance() {
789
-
790
-		return self::$instance;
791
-	}
792
-
793
-	/**
794
-	 * Load the required dependencies for this plugin.
795
-	 *
796
-	 * Include the following files that make up the plugin:
797
-	 *
798
-	 * - Wordlift_Loader. Orchestrates the hooks of the plugin.
799
-	 * - Wordlift_i18n. Defines internationalization functionality.
800
-	 * - Wordlift_Admin. Defines all hooks for the admin area.
801
-	 * - Wordlift_Public. Defines all hooks for the public side of the site.
802
-	 *
803
-	 * Create an instance of the loader which will be used to register the hooks
804
-	 * with WordPress.
805
-	 *
806
-	 * @throws Exception
807
-	 * @since    1.0.0
808
-	 * @access   private
809
-	 */
810
-	private function load_dependencies() {
811
-
812
-		/**
813
-		 * The class responsible for orchestrating the actions and filters of the
814
-		 * core plugin.
815
-		 */
816
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
817
-
818
-		// The class responsible for plugin uninstall.
819
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-deactivator-feedback.php';
820
-
821
-		/**
822
-		 * The class responsible for defining internationalization functionality
823
-		 * of the plugin.
824
-		 */
825
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
826
-
827
-		/**
828
-		 * WordLift's supported languages.
829
-		 */
830
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
831
-
832
-		/**
833
-		 * WordLift's supported countries.
834
-		 */
835
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-countries.php';
836
-
837
-		/**
838
-		 * Provide support functions to sanitize data.
839
-		 */
840
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
841
-
842
-		/** Services. */
843
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
844
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-http-api.php';
845
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
846
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
847
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
848
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
849
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
850
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-linked-data-service.php';
851
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-service.php';
852
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-image-service.php';
853
-
854
-		/**
855
-		 * The Query builder.
856
-		 */
857
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
858
-
859
-		/**
860
-		 * The Schema service.
861
-		 */
862
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
863
-
864
-		/**
865
-		 * The schema:url property service.
866
-		 */
867
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
868
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
869
-
870
-		/**
871
-		 * The UI service.
872
-		 */
873
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
874
-
875
-		/**
876
-		 * The Thumbnail service.
877
-		 */
878
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
879
-
880
-		/**
881
-		 * The Entity Types Taxonomy service.
882
-		 */
883
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-taxonomy-service.php';
884
-
885
-		/**
886
-		 * The Entity service.
887
-		 */
888
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-service.php';
889
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
890
-
891
-		// Add the entity rating service.
892
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
893
-
894
-		/**
895
-		 * The User service.
896
-		 */
897
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
898
-
899
-		/**
900
-		 * The Timeline service.
901
-		 */
902
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
903
-
904
-		/**
905
-		 * The Topic Taxonomy service.
906
-		 */
907
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
908
-
909
-		/**
910
-		 * The SPARQL service.
911
-		 */
912
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
913
-
914
-		/**
915
-		 * The WordLift import service.
916
-		 */
917
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
918
-
919
-		/**
920
-		 * The WordLift URI service.
921
-		 */
922
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
923
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
924
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
925
-
926
-		/**
927
-		 * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
928
-		 */
929
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-listable.php';
930
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-rebuild-service.php';
931
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-reference-rebuild-service.php';
932
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-service.php';
933
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-adapter.php';
934
-
935
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
936
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
937
-
938
-		/**
939
-		 * Load the converters.
940
-		 */
941
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
942
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
943
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
944
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
945
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
946
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
947
-
948
-		/**
949
-		 * Load cache-related files.
950
-		 */
951
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/cache/require.php';
952
-
953
-		/**
954
-		 * Load the content filter.
955
-		 */
956
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
957
-
958
-		/*
78
+    //<editor-fold desc="## FIELDS">
79
+
80
+    /**
81
+     * The loader that's responsible for maintaining and registering all hooks that power
82
+     * the plugin.
83
+     *
84
+     * @since    1.0.0
85
+     * @access   protected
86
+     * @var      Wordlift_Loader $loader Maintains and registers all hooks for the plugin.
87
+     */
88
+    protected $loader;
89
+
90
+    /**
91
+     * The unique identifier of this plugin.
92
+     *
93
+     * @since    1.0.0
94
+     * @access   protected
95
+     * @var      string $plugin_name The string used to uniquely identify this plugin.
96
+     */
97
+    protected $plugin_name;
98
+
99
+    /**
100
+     * The current version of the plugin.
101
+     *
102
+     * @since    1.0.0
103
+     * @access   protected
104
+     * @var      string $version The current version of the plugin.
105
+     */
106
+    protected $version;
107
+
108
+    /**
109
+     * The {@link Wordlift_Tinymce_Adapter} instance.
110
+     *
111
+     * @since  3.12.0
112
+     * @access protected
113
+     * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance.
114
+     */
115
+    protected $tinymce_adapter;
116
+
117
+    /**
118
+     * The {@link Faq_Tinymce_Adapter} instance
119
+     * @since 3.26.0
120
+     * @access protected
121
+     * @var Faq_Tinymce_Adapter $faq_tinymce_adapter .
122
+     */
123
+    //protected $faq_tinymce_adapter;
124
+
125
+    /**
126
+     * The Thumbnail service.
127
+     *
128
+     * @since  3.1.5
129
+     * @access private
130
+     * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service.
131
+     */
132
+    private $thumbnail_service;
133
+
134
+    /**
135
+     * The UI service.
136
+     *
137
+     * @since  3.2.0
138
+     * @access private
139
+     * @var \Wordlift_UI_Service $ui_service The UI service.
140
+     */
141
+    private $ui_service;
142
+
143
+    /**
144
+     * The Schema service.
145
+     *
146
+     * @since  3.3.0
147
+     * @access protected
148
+     * @var \Wordlift_Schema_Service $schema_service The Schema service.
149
+     */
150
+    protected $schema_service;
151
+
152
+    /**
153
+     * The Entity service.
154
+     *
155
+     * @since  3.1.0
156
+     * @access protected
157
+     * @var \Wordlift_Entity_Service $entity_service The Entity service.
158
+     */
159
+    protected $entity_service;
160
+
161
+    /**
162
+     * The Topic Taxonomy service.
163
+     *
164
+     * @since  3.5.0
165
+     * @access private
166
+     * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service.
167
+     */
168
+    private $topic_taxonomy_service;
169
+
170
+    /**
171
+     * The Entity Types Taxonomy service.
172
+     *
173
+     * @since  3.18.0
174
+     * @access private
175
+     * @var \Wordlift_Entity_Type_Taxonomy_Service The Entity Types Taxonomy service.
176
+     */
177
+    private $entity_types_taxonomy_service;
178
+
179
+    /**
180
+     * The User service.
181
+     *
182
+     * @since  3.1.7
183
+     * @access protected
184
+     * @var \Wordlift_User_Service $user_service The User service.
185
+     */
186
+    protected $user_service;
187
+
188
+    /**
189
+     * The Timeline service.
190
+     *
191
+     * @since  3.1.0
192
+     * @access private
193
+     * @var \Wordlift_Timeline_Service $timeline_service The Timeline service.
194
+     */
195
+    private $timeline_service;
196
+
197
+    /**
198
+     * The Redirect service.
199
+     *
200
+     * @since  3.2.0
201
+     * @access private
202
+     * @var \Wordlift_Redirect_Service $redirect_service The Redirect service.
203
+     */
204
+    private $redirect_service;
205
+
206
+    /**
207
+     * The Notice service.
208
+     *
209
+     * @since  3.3.0
210
+     * @access private
211
+     * @var \Wordlift_Notice_Service $notice_service The Notice service.
212
+     */
213
+    private $notice_service;
214
+
215
+    /**
216
+     * The Entity list customization.
217
+     *
218
+     * @since  3.3.0
219
+     * @access protected
220
+     * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service.
221
+     */
222
+    protected $entity_list_service;
223
+
224
+    /**
225
+     * The Entity Types Taxonomy Walker.
226
+     *
227
+     * @since  3.1.0
228
+     * @access private
229
+     * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker
230
+     */
231
+    private $entity_types_taxonomy_walker;
232
+
233
+    /**
234
+     * The ShareThis service.
235
+     *
236
+     * @since  3.2.0
237
+     * @access private
238
+     * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service.
239
+     */
240
+    private $sharethis_service;
241
+
242
+    /**
243
+     * The PrimaShop adapter.
244
+     *
245
+     * @since  3.2.3
246
+     * @access private
247
+     * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter.
248
+     */
249
+    private $primashop_adapter;
250
+
251
+    /**
252
+     * The WordLift Dashboard adapter.
253
+     *
254
+     * @since  3.4.0
255
+     * @access private
256
+     * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service;
257
+     */
258
+    private $dashboard_service;
259
+
260
+    /**
261
+     * The entity type service.
262
+     *
263
+     * @since  3.6.0
264
+     * @access private
265
+     * @var \Wordlift_Entity_Post_Type_Service
266
+     */
267
+    private $entity_post_type_service;
268
+
269
+    /**
270
+     * The entity link service used to mangle links to entities with a custom slug or even w/o a slug.
271
+     *
272
+     * @since  3.6.0
273
+     * @access private
274
+     * @var \Wordlift_Entity_Link_Service $entity_link_service The {@link Wordlift_Entity_Link_Service} instance.
275
+     */
276
+    private $entity_link_service;
277
+
278
+    /**
279
+     * A {@link Wordlift_Sparql_Service} instance.
280
+     *
281
+     * @since    3.6.0
282
+     * @access   protected
283
+     * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance.
284
+     */
285
+    protected $sparql_service;
286
+
287
+    /**
288
+     * A {@link Wordlift_Import_Service} instance.
289
+     *
290
+     * @since  3.6.0
291
+     * @access private
292
+     * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance.
293
+     */
294
+    private $import_service;
295
+
296
+    /**
297
+     * A {@link Wordlift_Rebuild_Service} instance.
298
+     *
299
+     * @since  3.6.0
300
+     * @access private
301
+     * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance.
302
+     */
303
+    private $rebuild_service;
304
+
305
+    /**
306
+     * A {@link Wordlift_Jsonld_Service} instance.
307
+     *
308
+     * @since  3.7.0
309
+     * @access protected
310
+     * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance.
311
+     */
312
+    protected $jsonld_service;
313
+
314
+    /**
315
+     * A {@link Wordlift_Website_Jsonld_Converter} instance.
316
+     *
317
+     * @since  3.14.0
318
+     * @access protected
319
+     * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance.
320
+     */
321
+    protected $jsonld_website_converter;
322
+
323
+    /**
324
+     * A {@link Wordlift_Property_Factory} instance.
325
+     *
326
+     * @since  3.7.0
327
+     * @access private
328
+     * @var \Wordlift_Property_Factory $property_factory
329
+     */
330
+    private $property_factory;
331
+
332
+    /**
333
+     * The 'Download Your Data' page.
334
+     *
335
+     * @since  3.6.0
336
+     * @access private
337
+     * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
338
+     */
339
+    private $download_your_data_page;
340
+
341
+    /**
342
+     * The 'WordLift Settings' page.
343
+     *
344
+     * @since  3.11.0
345
+     * @access protected
346
+     * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
347
+     */
348
+    protected $settings_page;
349
+
350
+    /**
351
+     * The install wizard page.
352
+     *
353
+     * @since  3.9.0
354
+     * @access private
355
+     * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
356
+     */
357
+    public $admin_setup;
358
+
359
+    /**
360
+     * The Content Filter Service hooks up to the 'the_content' filter and provides
361
+     * linking of entities to their pages.
362
+     *
363
+     * @since  3.8.0
364
+     * @access private
365
+     * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
366
+     */
367
+    private $content_filter_service;
368
+
369
+    /**
370
+     * The Faq Content filter service
371
+     * @since  3.26.0
372
+     * @access private
373
+     * @var Faq_Content_Filter $faq_content_filter_service A {@link Faq_Content_Filter} instance.
374
+     */
375
+    private $faq_content_filter_service;
376
+
377
+    /**
378
+     * A {@link Wordlift_Key_Validation_Service} instance.
379
+     *
380
+     * @since  3.9.0
381
+     * @access private
382
+     * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
383
+     */
384
+    private $key_validation_service;
385
+
386
+    /**
387
+     * A {@link Wordlift_Rating_Service} instance.
388
+     *
389
+     * @since  3.10.0
390
+     * @access private
391
+     * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
392
+     */
393
+    private $rating_service;
394
+
395
+    /**
396
+     * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
397
+     *
398
+     * @since  3.10.0
399
+     * @access protected
400
+     * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
401
+     */
402
+    protected $post_to_jsonld_converter;
403
+
404
+    /**
405
+     * A {@link Wordlift_Configuration_Service} instance.
406
+     *
407
+     * @since  3.10.0
408
+     * @access protected
409
+     * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance.
410
+     */
411
+    protected $configuration_service;
412
+
413
+    /**
414
+     * A {@link Wordlift_Install_Service} instance.
415
+     *
416
+     * @since  3.18.0
417
+     * @access protected
418
+     * @var \Wordlift_Install_Service $install_service A {@link Wordlift_Install_Service} instance.
419
+     */
420
+    protected $install_service;
421
+
422
+    /**
423
+     * A {@link Wordlift_Entity_Type_Service} instance.
424
+     *
425
+     * @since  3.10.0
426
+     * @access protected
427
+     * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
428
+     */
429
+    protected $entity_type_service;
430
+
431
+    /**
432
+     * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
433
+     *
434
+     * @since  3.10.0
435
+     * @access protected
436
+     * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
437
+     */
438
+    protected $entity_post_to_jsonld_converter;
439
+
440
+    /**
441
+     * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
442
+     *
443
+     * @since  3.10.0
444
+     * @access protected
445
+     * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
446
+     */
447
+    protected $postid_to_jsonld_converter;
448
+
449
+    /**
450
+     * The {@link Wordlift_Admin_Status_Page} class.
451
+     *
452
+     * @since  3.9.8
453
+     * @access private
454
+     * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class.
455
+     */
456
+    private $status_page;
457
+
458
+    /**
459
+     * The {@link Wordlift_Category_Taxonomy_Service} instance.
460
+     *
461
+     * @since  3.11.0
462
+     * @access protected
463
+     * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
464
+     */
465
+    protected $category_taxonomy_service;
466
+
467
+    /**
468
+     * The {@link Wordlift_Entity_Page_Service} instance.
469
+     *
470
+     * @since  3.11.0
471
+     * @access protected
472
+     * @var \Wordlift_Entity_Page_Service $entity_page_service The {@link Wordlift_Entity_Page_Service} instance.
473
+     */
474
+    protected $entity_page_service;
475
+
476
+    /**
477
+     * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
478
+     *
479
+     * @since  3.11.0
480
+     * @access protected
481
+     * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
482
+     */
483
+    protected $settings_page_action_link;
484
+
485
+    /**
486
+     * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
487
+     *
488
+     * @since  3.11.0
489
+     * @access protected
490
+     * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
491
+     */
492
+    protected $analytics_settings_page_action_link;
493
+
494
+    /**
495
+     * The {@link Wordlift_Analytics_Connect} class.
496
+     *
497
+     * @since  3.11.0
498
+     * @access protected
499
+     * @var \Wordlift_Analytics_Connect $analytics_connect The {@link Wordlift_Analytics_Connect} class.
500
+     */
501
+    protected $analytics_connect;
502
+
503
+    /**
504
+     * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
505
+     *
506
+     * @since  3.11.0
507
+     * @access protected
508
+     * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
509
+     */
510
+    protected $publisher_ajax_adapter;
511
+
512
+    /**
513
+     * The {@link Wordlift_Admin_Input_Element} element renderer.
514
+     *
515
+     * @since  3.11.0
516
+     * @access protected
517
+     * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
518
+     */
519
+    protected $input_element;
520
+
521
+    /**
522
+     * The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
523
+     *
524
+     * @since  3.13.0
525
+     * @access protected
526
+     * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
527
+     */
528
+    protected $radio_input_element;
529
+
530
+    /**
531
+     * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
532
+     *
533
+     * @since  3.11.0
534
+     * @access protected
535
+     * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
536
+     */
537
+    protected $language_select_element;
538
+
539
+    /**
540
+     * The {@link Wordlift_Admin_Country_Select_Element} element renderer.
541
+     *
542
+     * @since  3.18.0
543
+     * @access protected
544
+     * @var \Wordlift_Admin_Country_Select_Element $country_select_element The {@link Wordlift_Admin_Country_Select_Element} element renderer.
545
+     */
546
+    protected $country_select_element;
547
+
548
+    /**
549
+     * The {@link Wordlift_Admin_Publisher_Element} element renderer.
550
+     *
551
+     * @since  3.11.0
552
+     * @access protected
553
+     * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
554
+     */
555
+    protected $publisher_element;
556
+
557
+    /**
558
+     * The {@link Wordlift_Admin_Select2_Element} element renderer.
559
+     *
560
+     * @since  3.11.0
561
+     * @access protected
562
+     * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
563
+     */
564
+    protected $select2_element;
565
+
566
+    /**
567
+     * The controller for the entity type list admin page
568
+     *
569
+     * @since  3.11.0
570
+     * @access private
571
+     * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
572
+     */
573
+    private $entity_type_admin_page;
574
+
575
+    /**
576
+     * The controller for the entity type settings admin page
577
+     *
578
+     * @since  3.11.0
579
+     * @access private
580
+     * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
581
+     */
582
+    private $entity_type_settings_admin_page;
583
+
584
+    /**
585
+     * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
586
+     *
587
+     * @since  3.11.0
588
+     * @access protected
589
+     * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
590
+     */
591
+    protected $related_entities_cloud_widget;
592
+
593
+    /**
594
+     * The {@link Wordlift_Admin_Author_Element} instance.
595
+     *
596
+     * @since  3.14.0
597
+     * @access protected
598
+     * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance.
599
+     */
600
+    protected $author_element;
601
+
602
+    /**
603
+     * The {@link Wordlift_Sample_Data_Service} instance.
604
+     *
605
+     * @since  3.12.0
606
+     * @access protected
607
+     * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
608
+     */
609
+    protected $sample_data_service;
610
+
611
+    /**
612
+     * The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
613
+     *
614
+     * @since  3.12.0
615
+     * @access protected
616
+     * @var \Wordlift_Sample_Data_Ajax_Adapter $sample_data_ajax_adapter The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
617
+     */
618
+    protected $sample_data_ajax_adapter;
619
+
620
+    /**
621
+     * The {@link Wordlift_Relation_Rebuild_Service} instance.
622
+     *
623
+     * @since  3.14.3
624
+     * @access private
625
+     * @var \Wordlift_Relation_Rebuild_Service $relation_rebuild_service The {@link Wordlift_Relation_Rebuild_Service} instance.
626
+     */
627
+    private $relation_rebuild_service;
628
+
629
+    /**
630
+     * The {@link Wordlift_Relation_Rebuild_Adapter} instance.
631
+     *
632
+     * @since  3.14.3
633
+     * @access private
634
+     * @var \Wordlift_Relation_Rebuild_Adapter $relation_rebuild_adapter The {@link Wordlift_Relation_Rebuild_Adapter} instance.
635
+     */
636
+    private $relation_rebuild_adapter;
637
+
638
+    /**
639
+     * The {@link Wordlift_Reference_Rebuild_Service} instance.
640
+     *
641
+     * @since  3.18.0
642
+     * @access private
643
+     * @var \Wordlift_Reference_Rebuild_Service $reference_rebuild_service The {@link Wordlift_Reference_Rebuild_Service} instance.
644
+     */
645
+    private $reference_rebuild_service;
646
+
647
+    /**
648
+     * The {@link Wordlift_Google_Analytics_Export_Service} instance.
649
+     *
650
+     * @since  3.16.0
651
+     * @access protected
652
+     * @var \Wordlift_Google_Analytics_Export_Service $google_analytics_export_service The {@link Wordlift_Google_Analytics_Export_Service} instance.
653
+     */
654
+    protected $google_analytics_export_service;
655
+
656
+    /**
657
+     * {@link Wordlift}'s singleton instance.
658
+     *
659
+     * @since  3.15.0
660
+     * @access protected
661
+     * @var \Wordlift_Entity_Type_Adapter $entity_type_adapter The {@link Wordlift_Entity_Type_Adapter} instance.
662
+     */
663
+    protected $entity_type_adapter;
664
+
665
+    /**
666
+     * The {@link Wordlift_Storage_Factory} instance.
667
+     *
668
+     * @since  3.15.0
669
+     * @access protected
670
+     * @var \Wordlift_Storage_Factory $storage_factory The {@link Wordlift_Storage_Factory} instance.
671
+     */
672
+    protected $storage_factory;
673
+
674
+    /**
675
+     * The {@link Wordlift_Sparql_Tuple_Rendition_Factory} instance.
676
+     *
677
+     * @since  3.15.0
678
+     * @access protected
679
+     * @var \Wordlift_Sparql_Tuple_Rendition_Factory $rendition_factory The {@link Wordlift_Sparql_Tuple_Rendition_Factory} instance.
680
+     */
681
+    protected $rendition_factory;
682
+
683
+    /**
684
+     * The {@link Wordlift_Autocomplete_Adapter} instance.
685
+     *
686
+     * @since  3.15.0
687
+     * @access private
688
+     * @var \Wordlift_Autocomplete_Adapter $autocomplete_adapter The {@link Wordlift_Autocomplete_Adapter} instance.
689
+     */
690
+    private $autocomplete_adapter;
691
+
692
+    /**
693
+     * The {@link Wordlift_Relation_Service} instance.
694
+     *
695
+     * @since  3.15.0
696
+     * @access protected
697
+     * @var \Wordlift_Relation_Service $relation_service The {@link Wordlift_Relation_Service} instance.
698
+     */
699
+    protected $relation_service;
700
+
701
+    /**
702
+     * The {@link Wordlift_Cached_Post_Converter} instance.
703
+     *
704
+     * @since  3.16.0
705
+     * @access protected
706
+     * @var  \Wordlift_Cached_Post_Converter $cached_postid_to_jsonld_converter The {@link Wordlift_Cached_Post_Converter} instance.
707
+     *
708
+     */
709
+    protected $cached_postid_to_jsonld_converter;
710
+
711
+    /**
712
+     * The {@link Wordlift_Entity_Uri_Service} instance.
713
+     *
714
+     * @since  3.16.3
715
+     * @access protected
716
+     * @var \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance.
717
+     */
718
+    protected $entity_uri_service;
719
+
720
+    /**
721
+     * The {@link Wordlift_Publisher_Service} instance.
722
+     *
723
+     * @since  3.19.0
724
+     * @access protected
725
+     * @var \Wordlift_Publisher_Service $publisher_service The {@link Wordlift_Publisher_Service} instance.
726
+     */
727
+    protected $publisher_service;
728
+
729
+    /**
730
+     * The {@link Wordlift_Context_Cards_Service} instance.
731
+     *
732
+     * @var \Wordlift_Context_Cards_Service The {@link Wordlift_Context_Cards_Service} instance.
733
+     */
734
+    protected $context_cards_service;
735
+
736
+    /**
737
+     * {@link Wordlift}'s singleton instance.
738
+     *
739
+     * @since  3.11.2
740
+     * @access private
741
+     * @var Wordlift $instance {@link Wordlift}'s singleton instance.
742
+     */
743
+    private static $instance;
744
+
745
+    /**
746
+     * A singleton instance of features registry.
747
+     * @since 3.30.0
748
+     * @var Features_Registry
749
+     */
750
+    private $features_registry;
751
+
752
+    //</editor-fold>
753
+
754
+    /**
755
+     * Define the core functionality of the plugin.
756
+     *
757
+     * Set the plugin name and the plugin version that can be used throughout the plugin.
758
+     * Load the dependencies, define the locale, and set the hooks for the admin area and
759
+     * the public-facing side of the site.
760
+     *
761
+     * @since    1.0.0
762
+     */
763
+    public function __construct() {
764
+
765
+        self::$instance = $this;
766
+
767
+        $this->plugin_name = 'wordlift';
768
+        $this->version     = '3.30.1';
769
+        $this->load_dependencies();
770
+        $this->set_locale();
771
+        $this->define_admin_hooks();
772
+        $this->define_public_hooks();
773
+
774
+        // If we're in `WP_CLI` load the related files.
775
+        if ( class_exists( 'WP_CLI' ) ) {
776
+            $this->load_cli_dependencies();
777
+        }
778
+
779
+    }
780
+
781
+    /**
782
+     * Get the singleton instance.
783
+     *
784
+     * @return Wordlift The {@link Wordlift} singleton instance.
785
+     * @since 3.11.2
786
+     *
787
+     */
788
+    public static function get_instance() {
789
+
790
+        return self::$instance;
791
+    }
792
+
793
+    /**
794
+     * Load the required dependencies for this plugin.
795
+     *
796
+     * Include the following files that make up the plugin:
797
+     *
798
+     * - Wordlift_Loader. Orchestrates the hooks of the plugin.
799
+     * - Wordlift_i18n. Defines internationalization functionality.
800
+     * - Wordlift_Admin. Defines all hooks for the admin area.
801
+     * - Wordlift_Public. Defines all hooks for the public side of the site.
802
+     *
803
+     * Create an instance of the loader which will be used to register the hooks
804
+     * with WordPress.
805
+     *
806
+     * @throws Exception
807
+     * @since    1.0.0
808
+     * @access   private
809
+     */
810
+    private function load_dependencies() {
811
+
812
+        /**
813
+         * The class responsible for orchestrating the actions and filters of the
814
+         * core plugin.
815
+         */
816
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
817
+
818
+        // The class responsible for plugin uninstall.
819
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-deactivator-feedback.php';
820
+
821
+        /**
822
+         * The class responsible for defining internationalization functionality
823
+         * of the plugin.
824
+         */
825
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
826
+
827
+        /**
828
+         * WordLift's supported languages.
829
+         */
830
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
831
+
832
+        /**
833
+         * WordLift's supported countries.
834
+         */
835
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-countries.php';
836
+
837
+        /**
838
+         * Provide support functions to sanitize data.
839
+         */
840
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
841
+
842
+        /** Services. */
843
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
844
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-http-api.php';
845
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
846
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
847
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
848
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
849
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
850
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-linked-data-service.php';
851
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-service.php';
852
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-image-service.php';
853
+
854
+        /**
855
+         * The Query builder.
856
+         */
857
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
858
+
859
+        /**
860
+         * The Schema service.
861
+         */
862
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
863
+
864
+        /**
865
+         * The schema:url property service.
866
+         */
867
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
868
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
869
+
870
+        /**
871
+         * The UI service.
872
+         */
873
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
874
+
875
+        /**
876
+         * The Thumbnail service.
877
+         */
878
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
879
+
880
+        /**
881
+         * The Entity Types Taxonomy service.
882
+         */
883
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-taxonomy-service.php';
884
+
885
+        /**
886
+         * The Entity service.
887
+         */
888
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-service.php';
889
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
890
+
891
+        // Add the entity rating service.
892
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
893
+
894
+        /**
895
+         * The User service.
896
+         */
897
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
898
+
899
+        /**
900
+         * The Timeline service.
901
+         */
902
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
903
+
904
+        /**
905
+         * The Topic Taxonomy service.
906
+         */
907
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
908
+
909
+        /**
910
+         * The SPARQL service.
911
+         */
912
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
913
+
914
+        /**
915
+         * The WordLift import service.
916
+         */
917
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
918
+
919
+        /**
920
+         * The WordLift URI service.
921
+         */
922
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
923
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
924
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
925
+
926
+        /**
927
+         * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
928
+         */
929
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-listable.php';
930
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-rebuild-service.php';
931
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-reference-rebuild-service.php';
932
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-service.php';
933
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-adapter.php';
934
+
935
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
936
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
937
+
938
+        /**
939
+         * Load the converters.
940
+         */
941
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
942
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
943
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
944
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
945
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
946
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
947
+
948
+        /**
949
+         * Load cache-related files.
950
+         */
951
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/cache/require.php';
952
+
953
+        /**
954
+         * Load the content filter.
955
+         */
956
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
957
+
958
+        /*
959 959
 		 * Load the excerpt helper.
960 960
 		 */
961
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
962
-
963
-		/**
964
-		 * Load the JSON-LD service to publish entities using JSON-LD.s
965
-		 *
966
-		 * @since 3.8.0
967
-		 */
968
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
969
-
970
-		// The Publisher Service and the AJAX adapter.
971
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
972
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
973
-
974
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
975
-
976
-		/**
977
-		 * Load the WordLift key validation service.
978
-		 */
979
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
980
-
981
-		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
982
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
983
-
984
-		// Load the `Wordlift_Entity_Page_Service` class definition.
985
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-page-service.php';
986
-
987
-		/** Linked Data. */
988
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage.php';
989
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
990
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php';
991
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
992
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
993
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php';
994
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
995
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php';
996
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php';
997
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php';
998
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php';
999
-
1000
-		/** Linked Data Rendition. */
1001
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/intf-wordlift-sparql-tuple-rendition.php';
1002
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-default-sparql-tuple-rendition.php';
1003
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-address-sparql-tuple-rendition.php';
1004
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-sparql-tuple-rendition-factory.php';
1005
-
1006
-		/** Services. */
1007
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-google-analytics-export-service.php';
1008
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-api-service.php';
1009
-
1010
-		/** Adapters. */
1011
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
1012
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
1013
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
1014
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-adapter.php';
1015
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-wprocket-adapter.php';
1016
-
1017
-		/** Async Tasks. */
1018
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-async-task.php';
1019
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
1020
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-push-references-async-task.php';
1021
-
1022
-		/** Autocomplete. */
1023
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-autocomplete-adapter.php';
1024
-
1025
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-remote-image-service.php';
1026
-
1027
-		/** Analytics */
1028
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/analytics/class-wordlift-analytics-connect.php';
1029
-
1030
-		/**
1031
-		 * The class responsible for defining all actions that occur in the admin area.
1032
-		 */
1033
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
1034
-
1035
-		/**
1036
-		 * The class to customize the entity list admin page.
1037
-		 */
1038
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
1039
-
1040
-		/**
1041
-		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
1042
-		 */
1043
-		global $wp_version;
1044
-		if ( version_compare( $wp_version, '5.3', '<' ) ) {
1045
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
1046
-		} else {
1047
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
1048
-		}
1049
-
1050
-		/**
1051
-		 * The Notice service.
1052
-		 */
1053
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
1054
-
1055
-		/**
1056
-		 * The PrimaShop adapter.
1057
-		 */
1058
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
1059
-
1060
-		/**
1061
-		 * The WordLift Dashboard service.
1062
-		 */
1063
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
1064
-
1065
-		/**
1066
-		 * The admin 'Install wizard' page.
1067
-		 */
1068
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
1069
-
1070
-		/**
1071
-		 * The WordLift entity type list admin page controller.
1072
-		 */
1073
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
1074
-
1075
-		/**
1076
-		 * The WordLift entity type settings admin page controller.
1077
-		 */
1078
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
1079
-
1080
-		/**
1081
-		 * The admin 'Download Your Data' page.
1082
-		 */
1083
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
1084
-
1085
-		/**
1086
-		 * The admin 'WordLift Settings' page.
1087
-		 */
1088
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/intf-wordlift-admin-element.php';
1089
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-element.php';
1090
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-radio-element.php';
1091
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select-element.php';
1092
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select2-element.php';
1093
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-language-select-element.php';
1094
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-country-select-element.php';
1095
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-tabs-element.php';
1096
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-author-element.php';
1097
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-publisher-element.php';
1098
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
1099
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
1100
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page.php';
1101
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
1102
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
1103
-
1104
-		/** Admin Pages */
1105
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
1106
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
1107
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-search-rankings-page.php';
1108
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-admin-service.php';
1109
-
1110
-		/**
1111
-		 * The class responsible for defining all actions that occur in the public-facing
1112
-		 * side of the site.
1113
-		 */
1114
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
1115
-
1116
-		/**
1117
-		 * The shortcode abstract class.
1118
-		 */
1119
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
1120
-
1121
-		/**
1122
-		 * The Timeline shortcode.
1123
-		 */
1124
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
1125
-
1126
-		/**
1127
-		 * The Navigator shortcode.
1128
-		 */
1129
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
1130
-
1131
-		/**
1132
-		 * The Products Navigator shortcode.
1133
-		 */
1134
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-products-navigator-shortcode.php';
1135
-
1136
-		/**
1137
-		 * The chord shortcode.
1138
-		 */
1139
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
1140
-
1141
-		/**
1142
-		 * The geomap shortcode.
1143
-		 */
1144
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
1145
-
1146
-		/**
1147
-		 * The entity cloud shortcode.
1148
-		 */
1149
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
1150
-
1151
-		/**
1152
-		 * The entity glossary shortcode.
1153
-		 */
1154
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-alphabet-service.php';
1155
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-vocabulary-shortcode.php';
1156
-
1157
-		/**
1158
-		 * Faceted Search shortcode.
1159
-		 */
1160
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-faceted-search-shortcode.php';
1161
-
1162
-		/**
1163
-		 * The ShareThis service.
1164
-		 */
1165
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
1166
-
1167
-		/**
1168
-		 * The SEO service.
1169
-		 */
1170
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
1171
-
1172
-		/**
1173
-		 * The AMP service.
1174
-		 */
1175
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
1176
-
1177
-		/** Widgets */
1178
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
1179
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
1180
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-context-cards.php';
1181
-
1182
-		/*
961
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
962
+
963
+        /**
964
+         * Load the JSON-LD service to publish entities using JSON-LD.s
965
+         *
966
+         * @since 3.8.0
967
+         */
968
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
969
+
970
+        // The Publisher Service and the AJAX adapter.
971
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
972
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
973
+
974
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
975
+
976
+        /**
977
+         * Load the WordLift key validation service.
978
+         */
979
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
980
+
981
+        // Load the `Wordlift_Category_Taxonomy_Service` class definition.
982
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
983
+
984
+        // Load the `Wordlift_Entity_Page_Service` class definition.
985
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-page-service.php';
986
+
987
+        /** Linked Data. */
988
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage.php';
989
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
990
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php';
991
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
992
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
993
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php';
994
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
995
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php';
996
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php';
997
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php';
998
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php';
999
+
1000
+        /** Linked Data Rendition. */
1001
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/intf-wordlift-sparql-tuple-rendition.php';
1002
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-default-sparql-tuple-rendition.php';
1003
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-address-sparql-tuple-rendition.php';
1004
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-sparql-tuple-rendition-factory.php';
1005
+
1006
+        /** Services. */
1007
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-google-analytics-export-service.php';
1008
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-api-service.php';
1009
+
1010
+        /** Adapters. */
1011
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
1012
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
1013
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
1014
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-adapter.php';
1015
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-wprocket-adapter.php';
1016
+
1017
+        /** Async Tasks. */
1018
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-async-task.php';
1019
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
1020
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-push-references-async-task.php';
1021
+
1022
+        /** Autocomplete. */
1023
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-autocomplete-adapter.php';
1024
+
1025
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-remote-image-service.php';
1026
+
1027
+        /** Analytics */
1028
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/analytics/class-wordlift-analytics-connect.php';
1029
+
1030
+        /**
1031
+         * The class responsible for defining all actions that occur in the admin area.
1032
+         */
1033
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
1034
+
1035
+        /**
1036
+         * The class to customize the entity list admin page.
1037
+         */
1038
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
1039
+
1040
+        /**
1041
+         * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
1042
+         */
1043
+        global $wp_version;
1044
+        if ( version_compare( $wp_version, '5.3', '<' ) ) {
1045
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
1046
+        } else {
1047
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
1048
+        }
1049
+
1050
+        /**
1051
+         * The Notice service.
1052
+         */
1053
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
1054
+
1055
+        /**
1056
+         * The PrimaShop adapter.
1057
+         */
1058
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
1059
+
1060
+        /**
1061
+         * The WordLift Dashboard service.
1062
+         */
1063
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
1064
+
1065
+        /**
1066
+         * The admin 'Install wizard' page.
1067
+         */
1068
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
1069
+
1070
+        /**
1071
+         * The WordLift entity type list admin page controller.
1072
+         */
1073
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
1074
+
1075
+        /**
1076
+         * The WordLift entity type settings admin page controller.
1077
+         */
1078
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
1079
+
1080
+        /**
1081
+         * The admin 'Download Your Data' page.
1082
+         */
1083
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
1084
+
1085
+        /**
1086
+         * The admin 'WordLift Settings' page.
1087
+         */
1088
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/intf-wordlift-admin-element.php';
1089
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-element.php';
1090
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-radio-element.php';
1091
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select-element.php';
1092
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select2-element.php';
1093
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-language-select-element.php';
1094
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-country-select-element.php';
1095
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-tabs-element.php';
1096
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-author-element.php';
1097
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-publisher-element.php';
1098
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
1099
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
1100
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page.php';
1101
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
1102
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
1103
+
1104
+        /** Admin Pages */
1105
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
1106
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
1107
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-search-rankings-page.php';
1108
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-admin-service.php';
1109
+
1110
+        /**
1111
+         * The class responsible for defining all actions that occur in the public-facing
1112
+         * side of the site.
1113
+         */
1114
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
1115
+
1116
+        /**
1117
+         * The shortcode abstract class.
1118
+         */
1119
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
1120
+
1121
+        /**
1122
+         * The Timeline shortcode.
1123
+         */
1124
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
1125
+
1126
+        /**
1127
+         * The Navigator shortcode.
1128
+         */
1129
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
1130
+
1131
+        /**
1132
+         * The Products Navigator shortcode.
1133
+         */
1134
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-products-navigator-shortcode.php';
1135
+
1136
+        /**
1137
+         * The chord shortcode.
1138
+         */
1139
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
1140
+
1141
+        /**
1142
+         * The geomap shortcode.
1143
+         */
1144
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
1145
+
1146
+        /**
1147
+         * The entity cloud shortcode.
1148
+         */
1149
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
1150
+
1151
+        /**
1152
+         * The entity glossary shortcode.
1153
+         */
1154
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-alphabet-service.php';
1155
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-vocabulary-shortcode.php';
1156
+
1157
+        /**
1158
+         * Faceted Search shortcode.
1159
+         */
1160
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-faceted-search-shortcode.php';
1161
+
1162
+        /**
1163
+         * The ShareThis service.
1164
+         */
1165
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
1166
+
1167
+        /**
1168
+         * The SEO service.
1169
+         */
1170
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
1171
+
1172
+        /**
1173
+         * The AMP service.
1174
+         */
1175
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
1176
+
1177
+        /** Widgets */
1178
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
1179
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
1180
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-context-cards.php';
1181
+
1182
+        /*
1183 1183
 		 * Schema.org Services.
1184 1184
 		 *
1185 1185
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1186 1186
 		 */
1187
-		if ( WL_ALL_ENTITY_TYPES ) {
1188
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1189
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1190
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1191
-			new Wordlift_Schemaorg_Sync_Service();
1192
-			$schemaorg_property_service = new Wordlift_Schemaorg_Property_Service();
1193
-			new Wordlift_Schemaorg_Class_Service();
1194
-		} else {
1195
-			$schemaorg_property_service = null;
1196
-		}
1197
-
1198
-		$this->loader = new Wordlift_Loader();
1199
-		/**
1200
-		 * @since 3.30.0
1201
-		 */
1202
-		$this->features_registry = Features_Registry::get_instance();
1187
+        if ( WL_ALL_ENTITY_TYPES ) {
1188
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1189
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1190
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1191
+            new Wordlift_Schemaorg_Sync_Service();
1192
+            $schemaorg_property_service = new Wordlift_Schemaorg_Property_Service();
1193
+            new Wordlift_Schemaorg_Class_Service();
1194
+        } else {
1195
+            $schemaorg_property_service = null;
1196
+        }
1203 1197
 
1204
-		// Instantiate a global logger.
1205
-		global $wl_logger;
1206
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
1198
+        $this->loader = new Wordlift_Loader();
1199
+        /**
1200
+         * @since 3.30.0
1201
+         */
1202
+        $this->features_registry = Features_Registry::get_instance();
1207 1203
 
1208
-		// Load the `wl-api` end-point.
1209
-		new Wordlift_Http_Api();
1204
+        // Instantiate a global logger.
1205
+        global $wl_logger;
1206
+        $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
1210 1207
 
1211
-		// Load the Install Service.
1212
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'install/class-wordlift-install-service.php';
1213
-		$this->install_service = new Wordlift_Install_Service();
1208
+        // Load the `wl-api` end-point.
1209
+        new Wordlift_Http_Api();
1214 1210
 
1215
-		/** Services. */
1216
-		// Create the configuration service.
1217
-		$this->configuration_service = new Wordlift_Configuration_Service();
1218
-		$api_service                 = new Wordlift_Api_Service( $this->configuration_service );
1211
+        // Load the Install Service.
1212
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'install/class-wordlift-install-service.php';
1213
+        $this->install_service = new Wordlift_Install_Service();
1219 1214
 
1220
-		// Create an entity type service instance. It'll be later bound to the init action.
1221
-		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
1215
+        /** Services. */
1216
+        // Create the configuration service.
1217
+        $this->configuration_service = new Wordlift_Configuration_Service();
1218
+        $api_service                 = new Wordlift_Api_Service( $this->configuration_service );
1222 1219
 
1223
-		// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
1224
-		$this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
1220
+        // Create an entity type service instance. It'll be later bound to the init action.
1221
+        $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
1225 1222
 
1226
-		// Create an instance of the UI service.
1227
-		$this->ui_service = new Wordlift_UI_Service();
1223
+        // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
1224
+        $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
1228 1225
 
1229
-		// Create an instance of the Thumbnail service. Later it'll be hooked to post meta events.
1230
-		$this->thumbnail_service = new Wordlift_Thumbnail_Service();
1226
+        // Create an instance of the UI service.
1227
+        $this->ui_service = new Wordlift_UI_Service();
1231 1228
 
1232
-		$this->sparql_service        = new Wordlift_Sparql_Service();
1233
-		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
1234
-		$this->notice_service        = new Wordlift_Notice_Service();
1235
-		$this->relation_service      = new Wordlift_Relation_Service();
1229
+        // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events.
1230
+        $this->thumbnail_service = new Wordlift_Thumbnail_Service();
1236 1231
 
1237
-		$entity_uri_cache_service = new Wordlift_File_Cache_Service( WL_TEMP_DIR . 'entity_uri/' );
1238
-		$this->entity_uri_service = new Wordlift_Cached_Entity_Uri_Service( $this->configuration_service, $entity_uri_cache_service );
1239
-		$this->entity_service     = new Wordlift_Entity_Service( $this->ui_service, $this->relation_service, $this->entity_uri_service );
1240
-		$this->user_service       = new Wordlift_User_Service( $this->sparql_service, $this->entity_service );
1232
+        $this->sparql_service        = new Wordlift_Sparql_Service();
1233
+        $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
1234
+        $this->notice_service        = new Wordlift_Notice_Service();
1235
+        $this->relation_service      = new Wordlift_Relation_Service();
1241 1236
 
1242
-		// Instantiate the JSON-LD service.
1243
-		$property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1237
+        $entity_uri_cache_service = new Wordlift_File_Cache_Service( WL_TEMP_DIR . 'entity_uri/' );
1238
+        $this->entity_uri_service = new Wordlift_Cached_Entity_Uri_Service( $this->configuration_service, $entity_uri_cache_service );
1239
+        $this->entity_service     = new Wordlift_Entity_Service( $this->ui_service, $this->relation_service, $this->entity_uri_service );
1240
+        $this->user_service       = new Wordlift_User_Service( $this->sparql_service, $this->entity_service );
1244 1241
 
1245
-		/** Linked Data. */
1246
-		$this->storage_factory   = new Wordlift_Storage_Factory( $this->entity_service, $this->user_service, $property_getter );
1247
-		$this->rendition_factory = new Wordlift_Sparql_Tuple_Rendition_Factory( $this->entity_service );
1242
+        // Instantiate the JSON-LD service.
1243
+        $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1248 1244
 
1249
-		$this->schema_service = new Wordlift_Schema_Service( $this->storage_factory, $this->rendition_factory, $this->configuration_service );
1245
+        /** Linked Data. */
1246
+        $this->storage_factory   = new Wordlift_Storage_Factory( $this->entity_service, $this->user_service, $property_getter );
1247
+        $this->rendition_factory = new Wordlift_Sparql_Tuple_Rendition_Factory( $this->entity_service );
1250 1248
 
1251
-		// Create a new instance of the Redirect service.
1252
-		$this->redirect_service    = new Wordlift_Redirect_Service( $this->entity_uri_service );
1253
-		$this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
1249
+        $this->schema_service = new Wordlift_Schema_Service( $this->storage_factory, $this->rendition_factory, $this->configuration_service );
1254 1250
 
1255
-		// Create a new instance of the Timeline service and Timeline shortcode.
1256
-		$this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service, $this->entity_type_service );
1251
+        // Create a new instance of the Redirect service.
1252
+        $this->redirect_service    = new Wordlift_Redirect_Service( $this->entity_uri_service );
1253
+        $this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
1257 1254
 
1258
-		$this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
1255
+        // Create a new instance of the Timeline service and Timeline shortcode.
1256
+        $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service, $this->entity_type_service );
1259 1257
 
1260
-		$this->topic_taxonomy_service        = new Wordlift_Topic_Taxonomy_Service();
1261
-		$this->entity_types_taxonomy_service = new Wordlift_Entity_Type_Taxonomy_Service();
1258
+        $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
1262 1259
 
1263
-		// Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
1264
-		$this->sharethis_service = new Wordlift_ShareThis_Service();
1260
+        $this->topic_taxonomy_service        = new Wordlift_Topic_Taxonomy_Service();
1261
+        $this->entity_types_taxonomy_service = new Wordlift_Entity_Type_Taxonomy_Service();
1265 1262
 
1266
-		// Create an instance of the PrimaShop adapter.
1267
-		$this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
1263
+        // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
1264
+        $this->sharethis_service = new Wordlift_ShareThis_Service();
1268 1265
 
1269
-		// Create an import service instance to hook later to WP's import function.
1270
-		$this->import_service = new Wordlift_Import_Service( $this->entity_post_type_service, $this->entity_service, $this->schema_service, $this->sparql_service, $this->configuration_service->get_dataset_uri() );
1266
+        // Create an instance of the PrimaShop adapter.
1267
+        $this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
1271 1268
 
1272
-		$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
1269
+        // Create an import service instance to hook later to WP's import function.
1270
+        $this->import_service = new Wordlift_Import_Service( $this->entity_post_type_service, $this->entity_service, $this->schema_service, $this->sparql_service, $this->configuration_service->get_dataset_uri() );
1273 1271
 
1274
-		// Create the entity rating service.
1275
-		$this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
1272
+        $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
1276 1273
 
1277
-		// Create entity list customization (wp-admin/edit.php).
1278
-		$this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
1274
+        // Create the entity rating service.
1275
+        $this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
1279 1276
 
1280
-		// Create a new instance of the Redirect service.
1281
-		$this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service, $this->entity_service );
1277
+        // Create entity list customization (wp-admin/edit.php).
1278
+        $this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
1282 1279
 
1283
-		// Create an instance of the Publisher Service and the AJAX Adapter.
1284
-		$this->publisher_service = new Wordlift_Publisher_Service( $this->configuration_service );
1285
-		$this->property_factory  = new Wordlift_Property_Factory( $schema_url_property_service );
1286
-		$this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1280
+        // Create a new instance of the Redirect service.
1281
+        $this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service, $this->entity_service );
1287 1282
 
1288
-		$attachment_service = new Wordlift_Attachment_Service();
1283
+        // Create an instance of the Publisher Service and the AJAX Adapter.
1284
+        $this->publisher_service = new Wordlift_Publisher_Service( $this->configuration_service );
1285
+        $this->property_factory  = new Wordlift_Property_Factory( $schema_url_property_service );
1286
+        $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1289 1287
 
1290
-		// Instantiate the JSON-LD service.
1291
-		$property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1292
-		$this->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service );
1293
-		$this->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $this->post_to_jsonld_converter );
1294
-		$this->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter( $this->entity_service, $this->entity_post_to_jsonld_converter, $this->post_to_jsonld_converter );
1295
-		$this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service );
1288
+        $attachment_service = new Wordlift_Attachment_Service();
1296 1289
 
1297
-		$jsonld_cache                            = new Ttl_Cache( 'jsonld', 86400 );
1298
-		$this->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $this->postid_to_jsonld_converter, $this->configuration_service, $jsonld_cache );
1299
-		$this->jsonld_service                    = new Wordlift_Jsonld_Service( $this->entity_service, $this->cached_postid_to_jsonld_converter, $this->jsonld_website_converter );
1290
+        // Instantiate the JSON-LD service.
1291
+        $property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1292
+        $this->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service );
1293
+        $this->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $this->post_to_jsonld_converter );
1294
+        $this->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter( $this->entity_service, $this->entity_post_to_jsonld_converter, $this->post_to_jsonld_converter );
1295
+        $this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service );
1300 1296
 
1301
-		/*
1297
+        $jsonld_cache                            = new Ttl_Cache( 'jsonld', 86400 );
1298
+        $this->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $this->postid_to_jsonld_converter, $this->configuration_service, $jsonld_cache );
1299
+        $this->jsonld_service                    = new Wordlift_Jsonld_Service( $this->entity_service, $this->cached_postid_to_jsonld_converter, $this->jsonld_website_converter );
1300
+
1301
+        /*
1302 1302
 		 * Load the `Wordlift_Term_JsonLd_Adapter`.
1303 1303
 		 *
1304 1304
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/892
1305 1305
 		 *
1306 1306
 		 * @since 3.20.0
1307 1307
 		 */
1308
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-term-jsonld-adapter.php';
1309
-		$term_jsonld_adapter = new Wordlift_Term_JsonLd_Adapter( $this->entity_uri_service, $this->jsonld_service );
1310
-		$jsonld_service      = new Jsonld_Service(
1311
-			$this->jsonld_service,
1312
-			$term_jsonld_adapter,
1313
-			new Jsonld_User_Service( $this->user_service ) );
1314
-		new Jsonld_Endpoint( $jsonld_service, $this->entity_uri_service );
1315
-
1316
-		// Prints the JSON-LD in the head.
1317
-		new Jsonld_Adapter( $this->jsonld_service );
1318
-
1319
-		new Jsonld_By_Id_Endpoint( $this->jsonld_service, $this->entity_uri_service );
1320
-
1321
-		$this->key_validation_service = new Wordlift_Key_Validation_Service( $this->configuration_service );
1322
-		$this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service, $this->entity_uri_service );
1323
-		// Creating Faq Content filter service.
1324
-		$this->faq_content_filter_service = new Faq_Content_Filter();
1325
-		$this->relation_rebuild_service   = new Wordlift_Relation_Rebuild_Service( $this->content_filter_service, $this->entity_service );
1326
-		$this->sample_data_service        = new Wordlift_Sample_Data_Service( $this->entity_type_service, $this->configuration_service, $this->user_service );
1327
-		$this->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter( $this->sample_data_service );
1328
-		$this->reference_rebuild_service  = new Wordlift_Reference_Rebuild_Service( $this->entity_service );
1329
-
1330
-		$this->loader->add_action( 'enqueue_block_editor_assets', $this, 'add_wl_enabled_blocks' );
1331
-		$this->loader->add_action( 'admin_enqueue_scripts', $this, 'add_wl_enabled_blocks' );
1332
-
1333
-		/**
1334
-		 * Filter: wl_feature__enable__blocks.
1335
-		 *
1336
-		 * @param bool whether the blocks needed to be registered, defaults to true.
1337
-		 *
1338
-		 * @return bool
1339
-		 * @since 3.27.6
1340
-		 */
1341
-		if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1342
-			// Initialize the short-codes.
1343
-			new Async_Template_Decorator( new Wordlift_Navigator_Shortcode() );
1344
-			new Wordlift_Chord_Shortcode();
1345
-			new Wordlift_Geomap_Shortcode();
1346
-			new Wordlift_Timeline_Shortcode();
1347
-			new Wordlift_Related_Entities_Cloud_Shortcode( $this->relation_service );
1348
-			new Wordlift_Vocabulary_Shortcode( $this->configuration_service );
1349
-			new Async_Template_Decorator( new Wordlift_Faceted_Search_Shortcode() );
1350
-		}
1351
-
1352
-		new Wordlift_Products_Navigator_Shortcode();
1353
-
1354
-
1355
-		// Initialize the Context Cards Service
1356
-		$this->context_cards_service = new Wordlift_Context_Cards_Service();
1357
-
1358
-		// Initialize the SEO service.
1359
-		new Wordlift_Seo_Service();
1360
-
1361
-		// Initialize the AMP service.
1362
-		new Wordlift_AMP_Service( $this->jsonld_service );
1363
-
1364
-		/** Services. */
1365
-		$this->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service();
1366
-		new Wordlift_Image_Service();
1367
-
1368
-		/** Adapters. */
1369
-		$this->entity_type_adapter    = new Wordlift_Entity_Type_Adapter( $this->entity_type_service );
1370
-		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $this->publisher_service );
1371
-		$this->tinymce_adapter        = new Wordlift_Tinymce_Adapter( $this );
1372
-		//$this->faq_tinymce_adapter      = new Faq_Tinymce_Adapter();
1373
-		$this->relation_rebuild_adapter = new Wordlift_Relation_Rebuild_Adapter( $this->relation_rebuild_service );
1374
-
1375
-		/*
1308
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-term-jsonld-adapter.php';
1309
+        $term_jsonld_adapter = new Wordlift_Term_JsonLd_Adapter( $this->entity_uri_service, $this->jsonld_service );
1310
+        $jsonld_service      = new Jsonld_Service(
1311
+            $this->jsonld_service,
1312
+            $term_jsonld_adapter,
1313
+            new Jsonld_User_Service( $this->user_service ) );
1314
+        new Jsonld_Endpoint( $jsonld_service, $this->entity_uri_service );
1315
+
1316
+        // Prints the JSON-LD in the head.
1317
+        new Jsonld_Adapter( $this->jsonld_service );
1318
+
1319
+        new Jsonld_By_Id_Endpoint( $this->jsonld_service, $this->entity_uri_service );
1320
+
1321
+        $this->key_validation_service = new Wordlift_Key_Validation_Service( $this->configuration_service );
1322
+        $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service, $this->entity_uri_service );
1323
+        // Creating Faq Content filter service.
1324
+        $this->faq_content_filter_service = new Faq_Content_Filter();
1325
+        $this->relation_rebuild_service   = new Wordlift_Relation_Rebuild_Service( $this->content_filter_service, $this->entity_service );
1326
+        $this->sample_data_service        = new Wordlift_Sample_Data_Service( $this->entity_type_service, $this->configuration_service, $this->user_service );
1327
+        $this->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter( $this->sample_data_service );
1328
+        $this->reference_rebuild_service  = new Wordlift_Reference_Rebuild_Service( $this->entity_service );
1329
+
1330
+        $this->loader->add_action( 'enqueue_block_editor_assets', $this, 'add_wl_enabled_blocks' );
1331
+        $this->loader->add_action( 'admin_enqueue_scripts', $this, 'add_wl_enabled_blocks' );
1332
+
1333
+        /**
1334
+         * Filter: wl_feature__enable__blocks.
1335
+         *
1336
+         * @param bool whether the blocks needed to be registered, defaults to true.
1337
+         *
1338
+         * @return bool
1339
+         * @since 3.27.6
1340
+         */
1341
+        if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1342
+            // Initialize the short-codes.
1343
+            new Async_Template_Decorator( new Wordlift_Navigator_Shortcode() );
1344
+            new Wordlift_Chord_Shortcode();
1345
+            new Wordlift_Geomap_Shortcode();
1346
+            new Wordlift_Timeline_Shortcode();
1347
+            new Wordlift_Related_Entities_Cloud_Shortcode( $this->relation_service );
1348
+            new Wordlift_Vocabulary_Shortcode( $this->configuration_service );
1349
+            new Async_Template_Decorator( new Wordlift_Faceted_Search_Shortcode() );
1350
+        }
1351
+
1352
+        new Wordlift_Products_Navigator_Shortcode();
1353
+
1354
+
1355
+        // Initialize the Context Cards Service
1356
+        $this->context_cards_service = new Wordlift_Context_Cards_Service();
1357
+
1358
+        // Initialize the SEO service.
1359
+        new Wordlift_Seo_Service();
1360
+
1361
+        // Initialize the AMP service.
1362
+        new Wordlift_AMP_Service( $this->jsonld_service );
1363
+
1364
+        /** Services. */
1365
+        $this->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service();
1366
+        new Wordlift_Image_Service();
1367
+
1368
+        /** Adapters. */
1369
+        $this->entity_type_adapter    = new Wordlift_Entity_Type_Adapter( $this->entity_type_service );
1370
+        $this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $this->publisher_service );
1371
+        $this->tinymce_adapter        = new Wordlift_Tinymce_Adapter( $this );
1372
+        //$this->faq_tinymce_adapter      = new Faq_Tinymce_Adapter();
1373
+        $this->relation_rebuild_adapter = new Wordlift_Relation_Rebuild_Adapter( $this->relation_rebuild_service );
1374
+
1375
+        /*
1376 1376
 		 * Exclude our public js from WP-Rocket.
1377 1377
 		 *
1378 1378
 		 * @since 3.19.4
1379 1379
 		 *
1380 1380
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/842.
1381 1381
 		 */
1382
-		new Wordlift_WpRocket_Adapter();
1383
-
1384
-		// Create a Rebuild Service instance, which we'll later bound to an ajax call.
1385
-		$this->rebuild_service = new Wordlift_Rebuild_Service(
1386
-			$this->sparql_service,
1387
-			$uri_service
1388
-		);
1389
-
1390
-		$that = $this;
1391
-		add_action( 'plugins_loaded', function () use ( $that ) {
1392
-			if ( ! apply_filters( 'wl_feature__enable__dataset-ng', false ) ) {
1393
-				new Wordlift_Linked_Data_Service( $that->entity_service, $that->entity_type_service, $that->schema_service, $that->sparql_service );
1394
-				new Wordlift_Sparql_Query_Async_Task();
1395
-				new Wordlift_Push_References_Async_Task();
1396
-			}
1397
-		} );
1398
-
1399
-		/** WordPress Admin UI. */
1400
-
1401
-		// UI elements.
1402
-		$this->input_element           = new Wordlift_Admin_Input_Element();
1403
-		$this->radio_input_element     = new Wordlift_Admin_Radio_Input_Element();
1404
-		$this->select2_element         = new Wordlift_Admin_Select2_Element();
1405
-		$this->language_select_element = new Wordlift_Admin_Language_Select_Element();
1406
-		$this->country_select_element  = new Wordlift_Admin_Country_Select_Element();
1407
-		$tabs_element                  = new Wordlift_Admin_Tabs_Element();
1408
-		$this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $this->publisher_service, $tabs_element, $this->select2_element );
1409
-		$this->author_element          = new Wordlift_Admin_Author_Element( $this->publisher_service, $this->select2_element );
1410
-
1411
-		$this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->country_select_element, $this->publisher_element, $this->radio_input_element );
1412
-		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
1413
-
1414
-		$this->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page( $this->configuration_service, $this->input_element, $this->radio_input_element );
1415
-		$this->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $this->analytics_settings_page );
1416
-		$this->analytics_connect                   = new Wordlift_Analytics_Connect();
1417
-
1418
-		// Pages.
1419
-		/*
1382
+        new Wordlift_WpRocket_Adapter();
1383
+
1384
+        // Create a Rebuild Service instance, which we'll later bound to an ajax call.
1385
+        $this->rebuild_service = new Wordlift_Rebuild_Service(
1386
+            $this->sparql_service,
1387
+            $uri_service
1388
+        );
1389
+
1390
+        $that = $this;
1391
+        add_action( 'plugins_loaded', function () use ( $that ) {
1392
+            if ( ! apply_filters( 'wl_feature__enable__dataset-ng', false ) ) {
1393
+                new Wordlift_Linked_Data_Service( $that->entity_service, $that->entity_type_service, $that->schema_service, $that->sparql_service );
1394
+                new Wordlift_Sparql_Query_Async_Task();
1395
+                new Wordlift_Push_References_Async_Task();
1396
+            }
1397
+        } );
1398
+
1399
+        /** WordPress Admin UI. */
1400
+
1401
+        // UI elements.
1402
+        $this->input_element           = new Wordlift_Admin_Input_Element();
1403
+        $this->radio_input_element     = new Wordlift_Admin_Radio_Input_Element();
1404
+        $this->select2_element         = new Wordlift_Admin_Select2_Element();
1405
+        $this->language_select_element = new Wordlift_Admin_Language_Select_Element();
1406
+        $this->country_select_element  = new Wordlift_Admin_Country_Select_Element();
1407
+        $tabs_element                  = new Wordlift_Admin_Tabs_Element();
1408
+        $this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $this->publisher_service, $tabs_element, $this->select2_element );
1409
+        $this->author_element          = new Wordlift_Admin_Author_Element( $this->publisher_service, $this->select2_element );
1410
+
1411
+        $this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->country_select_element, $this->publisher_element, $this->radio_input_element );
1412
+        $this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
1413
+
1414
+        $this->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page( $this->configuration_service, $this->input_element, $this->radio_input_element );
1415
+        $this->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $this->analytics_settings_page );
1416
+        $this->analytics_connect                   = new Wordlift_Analytics_Connect();
1417
+
1418
+        // Pages.
1419
+        /*
1420 1420
 		 * Call the `wl_can_see_classification_box` filter to determine whether we can display the classification box.
1421 1421
 		 *
1422 1422
 		 * @since 3.20.3
1423 1423
 		 *
1424 1424
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/914
1425 1425
 		 */
1426
-		if ( apply_filters( 'wl_can_see_classification_box', true ) ) {
1427
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
1428
-			new Wordlift_Admin_Post_Edit_Page( $this );
1429
-		}
1430
-		new Wordlift_Entity_Type_Admin_Service();
1426
+        if ( apply_filters( 'wl_can_see_classification_box', true ) ) {
1427
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
1428
+            new Wordlift_Admin_Post_Edit_Page( $this );
1429
+        }
1430
+        new Wordlift_Entity_Type_Admin_Service();
1431 1431
 
1432
-		// create an instance of the entity type list admin page controller.
1433
-		$this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
1432
+        // create an instance of the entity type list admin page controller.
1433
+        $this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
1434 1434
 
1435
-		// create an instance of the entity type setting admin page controller.
1436
-		$this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
1435
+        // create an instance of the entity type setting admin page controller.
1436
+        $this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
1437 1437
 
1438
-		/** Widgets */
1439
-		$this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1438
+        /** Widgets */
1439
+        $this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1440 1440
 
1441
-		/* WordPress Admin. */
1442
-		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1443
-		$this->status_page             = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service );
1441
+        /* WordPress Admin. */
1442
+        $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1443
+        $this->status_page             = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service );
1444 1444
 
1445
-		// Create an instance of the install wizard.
1446
-		$this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service, $this->language_select_element, $this->country_select_element );
1445
+        // Create an instance of the install wizard.
1446
+        $this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service, $this->language_select_element, $this->country_select_element );
1447 1447
 
1448
-		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
1448
+        $this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
1449 1449
 
1450
-		// User Profile.
1451
-		new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service );
1450
+        // User Profile.
1451
+        new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service );
1452 1452
 
1453
-		$this->entity_page_service = new Wordlift_Entity_Page_Service();
1453
+        $this->entity_page_service = new Wordlift_Entity_Page_Service();
1454 1454
 
1455
-		// Load the debug service if WP is in debug mode.
1456
-		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1457
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1458
-			new Wordlift_Debug_Service( $this->entity_service, $uri_service );
1459
-		}
1455
+        // Load the debug service if WP is in debug mode.
1456
+        if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1457
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1458
+            new Wordlift_Debug_Service( $this->entity_service, $uri_service );
1459
+        }
1460 1460
 
1461
-		// Remote Image Service.
1462
-		new Wordlift_Remote_Image_Service();
1461
+        // Remote Image Service.
1462
+        new Wordlift_Remote_Image_Service();
1463 1463
 
1464
-		/*
1464
+        /*
1465 1465
 		 * Provides mappings between post types and entity types.
1466 1466
 		 *
1467 1467
 		 * @since 3.20.0
1468 1468
 		 *
1469 1469
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/852.
1470 1470
 		 */
1471
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-action.php';
1472
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-service.php';
1473
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1471
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-action.php';
1472
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-service.php';
1473
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1474 1474
 
1475
-		// Create an instance of the Mapping Service and assign it to the Ajax Adapter.
1476
-		new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) );
1475
+        // Create an instance of the Mapping Service and assign it to the Ajax Adapter.
1476
+        new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) );
1477 1477
 
1478
-		/*
1478
+        /*
1479 1479
 		 * Batch Operations. They're similar to Batch Actions but do not require working on post types.
1480 1480
 		 *
1481 1481
 		 * Eventually Batch Actions will become Batch Operations.
1482 1482
 		 *
1483 1483
 		 * @since 3.20.0
1484 1484
 		 */
1485
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/intf-wordlift-batch-operation.php';
1486
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1485
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/intf-wordlift-batch-operation.php';
1486
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1487 1487
 
1488
-		/*
1488
+        /*
1489 1489
 		 * Add the Search Keywords taxonomy to manage the Search Keywords on WLS.
1490 1490
 		 *
1491 1491
 		 * @link https://github.com/insideout10/wordlift-plugin/issues/761
1492 1492
 		 *
1493 1493
 		 * @since 3.20.0
1494 1494
 		 */
1495
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/search-keywords/class-wordlift-search-keyword-taxonomy.php';
1496
-		new Wordlift_Search_Keyword_Taxonomy( $api_service );
1495
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/search-keywords/class-wordlift-search-keyword-taxonomy.php';
1496
+        new Wordlift_Search_Keyword_Taxonomy( $api_service );
1497 1497
 
1498
-		/*
1498
+        /*
1499 1499
 		 * Load the Mappings JSON-LD post processing.
1500 1500
 		 *
1501 1501
 		 * @since 3.25.0
1502 1502
 		 */
1503 1503
 
1504
-		$mappings_dbo           = new Mappings_DBO();
1505
-		$default_rule_validator = new Taxonomy_Rule_Validator();
1506
-		new Post_Type_Rule_Validator();
1507
-		// Taxonomy term rule validator for validating rules for term pages.
1508
-		new Taxonomy_Term_Rule_Validator();
1509
-		new Post_Taxonomy_Term_Rule_Validator();
1510
-		$rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator );
1511
-		$rule_groups_validator    = new Rule_Groups_Validator( $rule_validators_registry );
1512
-		$mappings_validator       = new Mappings_Validator( $mappings_dbo, $rule_groups_validator );
1513
-
1514
-		new Url_To_Entity_Transform_Function( $this->entity_uri_service );
1515
-		new Taxonomy_To_Terms_Transform_Function();
1516
-		new Post_Id_To_Entity_Transform_Function();
1517
-		$mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry();
1518
-
1519
-		/**
1520
-		 * @since 3.27.1
1521
-		 * Intiailize the acf group data formatter.
1522
-		 */
1523
-		new Acf_Group_Formatter();
1524
-		new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry );
1525
-
1526
-		/**
1527
-		 * @since 3.26.0
1528
-		 * Initialize the Faq JSON LD converter here - disabled.
1529
-		 */
1530
-		// new Faq_To_Jsonld_Converter();
1531
-		/*
1504
+        $mappings_dbo           = new Mappings_DBO();
1505
+        $default_rule_validator = new Taxonomy_Rule_Validator();
1506
+        new Post_Type_Rule_Validator();
1507
+        // Taxonomy term rule validator for validating rules for term pages.
1508
+        new Taxonomy_Term_Rule_Validator();
1509
+        new Post_Taxonomy_Term_Rule_Validator();
1510
+        $rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator );
1511
+        $rule_groups_validator    = new Rule_Groups_Validator( $rule_validators_registry );
1512
+        $mappings_validator       = new Mappings_Validator( $mappings_dbo, $rule_groups_validator );
1513
+
1514
+        new Url_To_Entity_Transform_Function( $this->entity_uri_service );
1515
+        new Taxonomy_To_Terms_Transform_Function();
1516
+        new Post_Id_To_Entity_Transform_Function();
1517
+        $mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry();
1518
+
1519
+        /**
1520
+         * @since 3.27.1
1521
+         * Intiailize the acf group data formatter.
1522
+         */
1523
+        new Acf_Group_Formatter();
1524
+        new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry );
1525
+
1526
+        /**
1527
+         * @since 3.26.0
1528
+         * Initialize the Faq JSON LD converter here - disabled.
1529
+         */
1530
+        // new Faq_To_Jsonld_Converter();
1531
+        /*
1532 1532
 		 * Use the Templates Ajax Endpoint to load HTML templates for the legacy Angular app via admin-ajax.php
1533 1533
 		 * end-point.
1534 1534
 		 *
1535 1535
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/834
1536 1536
 		 * @since 3.24.4
1537 1537
 		 */
1538
-		new Templates_Ajax_Endpoint();
1539
-		// Call this static method to register FAQ routes to rest api - disabled
1540
-		//Faq_Rest_Controller::register_routes();
1538
+        new Templates_Ajax_Endpoint();
1539
+        // Call this static method to register FAQ routes to rest api - disabled
1540
+        //Faq_Rest_Controller::register_routes();
1541 1541
 
1542
-		/*
1542
+        /*
1543 1543
 		 * Create a singleton for the Analysis_Response_Ops_Factory.
1544 1544
 		 */
1545
-		$entity_helper = new Entity_Helper( $this->entity_uri_service, $this->entity_service );
1546
-		new Analysis_Response_Ops_Factory(
1547
-			$this->entity_uri_service,
1548
-			$this->entity_service,
1549
-			$this->entity_type_service,
1550
-			$this->storage_factory->post_images(),
1551
-			$entity_helper
1552
-		);
1553
-
1554
-		/** WL Autocomplete. */
1555
-		$autocomplete_service       = new All_Autocomplete_Service( array(
1556
-			new Local_Autocomplete_Service(),
1557
-			new Linked_Data_Autocomplete_Service( $this->configuration_service, $entity_helper, $this->entity_uri_service, $this->entity_service ),
1558
-		) );
1559
-		$this->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service );
1560
-
1561
-		/**
1562
-		 * @since 3.27.2
1563
-		 * Integrate the recipe maker jsonld & set recipe
1564
-		 * as default entity type to the wprm_recipe CPT.
1565
-		 */
1566
-		new Recipe_Maker_Post_Type_Hook();
1567
-		$recipe_maker_validation_service = new Recipe_Maker_Validation_Service();
1568
-		new Recipe_Maker_Jsonld_Hook( $attachment_service, $recipe_maker_validation_service );
1569
-		new Recipe_Maker_After_Get_Jsonld_Hook( $recipe_maker_validation_service );
1570
-		new Recipe_Maker_Warning( $recipe_maker_validation_service );
1571
-		new Yoast_Jsonld( $recipe_maker_validation_service );
1572
-
1573
-		/**
1574
-		 * @since 3.27.4
1575
-		 * Add the faq duplicate markup hook.
1576
-		 */
1577
-		new Faq_Duplicate_Markup_Remover();
1578
-		/**
1579
-		 * @since 3.27.8
1580
-		 * @see https://github.com/insideout10/wordlift-plugin/issues/1248
1581
-		 */
1582
-		new Key_Validation_Notice( $this->key_validation_service, $this->configuration_service );
1583
-		/**
1584
-
1585
-		 * @since 3.28.0
1586
-		 * @see https://github.com/insideout10/wordlift-plugin/issues?q=assignee%3Anaveen17797+is%3Aopen
1587
-		 */
1588
-		new Entity_No_Index_Flag();
1589
-
1590
-		/**
1591
-		 * @since 3.29.0
1592
-		 * @see https://github.com/insideout10/wordlift-plugin/issues/1304
1593
-		 */
1594
-		new Entity_Rest_Service( $this->entity_type_service );
1595
-
1596
-		/**
1597
-		 * Expand author in to references.
1598
-		 * @since 3.30.0
1599
-		 * @see https://github.com/insideout10/wordlift-plugin/issues/1318
1600
-		 */
1601
-
1602
-		add_action( 'plugins_loaded', function () use ( $that ) {
1603
-
1604
-			if ( apply_filters( 'wl_feature__enable__article-wrapper', false ) ) {
1605
-				new Jsonld_Article_Wrapper( Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter );
1606
-			}
1607
-
1608
-			if ( apply_filters( 'wl_feature__enable__match-terms', false ) ) {
1609
-				$vocabulary_loader = new Vocabulary_Loader();
1610
-				$vocabulary_loader->init_vocabulary();
1611
-			}
1612
-
1613
-		} );
1614
-
1615
-		/**
1616
-		 * @since 3.30.0
1617
-		 * Add a checkbox to user option screen for wordlift admin.
1618
-		 */
1619
-		$wordlift_admin_checkbox = new Admin_User_Option();
1620
-		$wordlift_admin_checkbox->connect_hook();
1621
-
1622
-	}
1623
-
1624
-	/**
1625
-	 * Define the locale for this plugin for internationalization.
1626
-	 *
1627
-	 * Uses the Wordlift_i18n class in order to set the domain and to register the hook
1628
-	 * with WordPress.
1629
-	 *
1630
-	 * @since    1.0.0
1631
-	 * @access   private
1632
-	 */
1633
-	private function set_locale() {
1634
-
1635
-		$plugin_i18n = new Wordlift_i18n();
1636
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
1637
-
1638
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1639
-
1640
-	}
1641
-
1642
-	/**
1643
-	 * Register all of the hooks related to the admin area functionality
1644
-	 * of the plugin.
1645
-	 *
1646
-	 * @since    1.0.0
1647
-	 * @access   private
1648
-	 */
1649
-	private function define_admin_hooks() {
1650
-		$that         = $this;
1651
-		$plugin_admin = new Wordlift_Admin(
1652
-			$this->get_plugin_name(),
1653
-			$this->get_version(),
1654
-			$this->configuration_service,
1655
-			$this->notice_service,
1656
-			$this->user_service
1657
-		);
1658
-
1659
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1660
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 );
1661
-
1662
-		// Hook the init action to taxonomy services.
1663
-		$this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
1664
-		$this->loader->add_action( 'init', $this->entity_types_taxonomy_service, 'init', 0 );
1665
-
1666
-		// Hook the deleted_post_meta action to the Thumbnail service.
1667
-		$this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
1668
-
1669
-		// Hook the added_post_meta action to the Thumbnail service.
1670
-		$this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1671
-
1672
-		// Hook the updated_post_meta action to the Thumbnail service.
1673
-		$this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1674
-
1675
-		// Hook the AJAX wl_timeline action to the Timeline service.
1676
-		$this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1677
-
1678
-		// Register custom allowed redirect hosts.
1679
-		$this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1680
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1681
-		$this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1682
-
1683
-		/*
1545
+        $entity_helper = new Entity_Helper( $this->entity_uri_service, $this->entity_service );
1546
+        new Analysis_Response_Ops_Factory(
1547
+            $this->entity_uri_service,
1548
+            $this->entity_service,
1549
+            $this->entity_type_service,
1550
+            $this->storage_factory->post_images(),
1551
+            $entity_helper
1552
+        );
1553
+
1554
+        /** WL Autocomplete. */
1555
+        $autocomplete_service       = new All_Autocomplete_Service( array(
1556
+            new Local_Autocomplete_Service(),
1557
+            new Linked_Data_Autocomplete_Service( $this->configuration_service, $entity_helper, $this->entity_uri_service, $this->entity_service ),
1558
+        ) );
1559
+        $this->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service );
1560
+
1561
+        /**
1562
+         * @since 3.27.2
1563
+         * Integrate the recipe maker jsonld & set recipe
1564
+         * as default entity type to the wprm_recipe CPT.
1565
+         */
1566
+        new Recipe_Maker_Post_Type_Hook();
1567
+        $recipe_maker_validation_service = new Recipe_Maker_Validation_Service();
1568
+        new Recipe_Maker_Jsonld_Hook( $attachment_service, $recipe_maker_validation_service );
1569
+        new Recipe_Maker_After_Get_Jsonld_Hook( $recipe_maker_validation_service );
1570
+        new Recipe_Maker_Warning( $recipe_maker_validation_service );
1571
+        new Yoast_Jsonld( $recipe_maker_validation_service );
1572
+
1573
+        /**
1574
+         * @since 3.27.4
1575
+         * Add the faq duplicate markup hook.
1576
+         */
1577
+        new Faq_Duplicate_Markup_Remover();
1578
+        /**
1579
+         * @since 3.27.8
1580
+         * @see https://github.com/insideout10/wordlift-plugin/issues/1248
1581
+         */
1582
+        new Key_Validation_Notice( $this->key_validation_service, $this->configuration_service );
1583
+        /**
1584
+         * @since 3.28.0
1585
+         * @see https://github.com/insideout10/wordlift-plugin/issues?q=assignee%3Anaveen17797+is%3Aopen
1586
+         */
1587
+        new Entity_No_Index_Flag();
1588
+
1589
+        /**
1590
+         * @since 3.29.0
1591
+         * @see https://github.com/insideout10/wordlift-plugin/issues/1304
1592
+         */
1593
+        new Entity_Rest_Service( $this->entity_type_service );
1594
+
1595
+        /**
1596
+         * Expand author in to references.
1597
+         * @since 3.30.0
1598
+         * @see https://github.com/insideout10/wordlift-plugin/issues/1318
1599
+         */
1600
+
1601
+        add_action( 'plugins_loaded', function () use ( $that ) {
1602
+
1603
+            if ( apply_filters( 'wl_feature__enable__article-wrapper', false ) ) {
1604
+                new Jsonld_Article_Wrapper( Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter );
1605
+            }
1606
+
1607
+            if ( apply_filters( 'wl_feature__enable__match-terms', false ) ) {
1608
+                $vocabulary_loader = new Vocabulary_Loader();
1609
+                $vocabulary_loader->init_vocabulary();
1610
+            }
1611
+
1612
+        } );
1613
+
1614
+        /**
1615
+         * @since 3.30.0
1616
+         * Add a checkbox to user option screen for wordlift admin.
1617
+         */
1618
+        $wordlift_admin_checkbox = new Admin_User_Option();
1619
+        $wordlift_admin_checkbox->connect_hook();
1620
+
1621
+    }
1622
+
1623
+    /**
1624
+     * Define the locale for this plugin for internationalization.
1625
+     *
1626
+     * Uses the Wordlift_i18n class in order to set the domain and to register the hook
1627
+     * with WordPress.
1628
+     *
1629
+     * @since    1.0.0
1630
+     * @access   private
1631
+     */
1632
+    private function set_locale() {
1633
+
1634
+        $plugin_i18n = new Wordlift_i18n();
1635
+        $plugin_i18n->set_domain( $this->get_plugin_name() );
1636
+
1637
+        $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1638
+
1639
+    }
1640
+
1641
+    /**
1642
+     * Register all of the hooks related to the admin area functionality
1643
+     * of the plugin.
1644
+     *
1645
+     * @since    1.0.0
1646
+     * @access   private
1647
+     */
1648
+    private function define_admin_hooks() {
1649
+        $that         = $this;
1650
+        $plugin_admin = new Wordlift_Admin(
1651
+            $this->get_plugin_name(),
1652
+            $this->get_version(),
1653
+            $this->configuration_service,
1654
+            $this->notice_service,
1655
+            $this->user_service
1656
+        );
1657
+
1658
+        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1659
+        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 );
1660
+
1661
+        // Hook the init action to taxonomy services.
1662
+        $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
1663
+        $this->loader->add_action( 'init', $this->entity_types_taxonomy_service, 'init', 0 );
1664
+
1665
+        // Hook the deleted_post_meta action to the Thumbnail service.
1666
+        $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
1667
+
1668
+        // Hook the added_post_meta action to the Thumbnail service.
1669
+        $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1670
+
1671
+        // Hook the updated_post_meta action to the Thumbnail service.
1672
+        $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1673
+
1674
+        // Hook the AJAX wl_timeline action to the Timeline service.
1675
+        $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1676
+
1677
+        // Register custom allowed redirect hosts.
1678
+        $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1679
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1680
+        $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1681
+
1682
+        /*
1684 1683
 		 * The old dashboard is replaced with dashboard v2.
1685 1684
 		 *
1686 1685
 		 * The old dashboard service is still loaded because its functions are used.
@@ -1689,388 +1688,388 @@  discard block
 block discarded – undo
1689 1688
 		 *
1690 1689
 		 * @since 3.20.0
1691 1690
 		 */
1692
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1693
-		// $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1694
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1695
-		// $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1696
-
1697
-		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1698
-		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1699
-		$this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1700
-		$this->loader->add_action( 'save_post', $this->rating_service, 'set_rating_for', 20, 1 );
1701
-
1702
-		$this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1703
-		$this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1704
-
1705
-		// Entity listing customization (wp-admin/edit.php)
1706
-		// Add custom columns.
1707
-		$this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1708
-		// no explicit entity as it prevents handling of other post types.
1709
-		$this->loader->add_filter( 'manage_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1710
-		// Add 4W selection.
1711
-		$this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1712
-		$this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1713
-		$this->loader->add_action( 'pre_get_posts', $this->entity_list_service, 'pre_get_posts' );
1714
-		$this->loader->add_action( 'load-edit.php', $this->entity_list_service, 'load_edit' );
1715
-
1716
-		/*
1691
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1692
+        // $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1693
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1694
+        // $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1695
+
1696
+        // Hook save_post to the entity service to update custom fields (such as alternate labels).
1697
+        // We have a priority of 9 because we want to be executed before data is sent to Redlink.
1698
+        $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1699
+        $this->loader->add_action( 'save_post', $this->rating_service, 'set_rating_for', 20, 1 );
1700
+
1701
+        $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1702
+        $this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1703
+
1704
+        // Entity listing customization (wp-admin/edit.php)
1705
+        // Add custom columns.
1706
+        $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1707
+        // no explicit entity as it prevents handling of other post types.
1708
+        $this->loader->add_filter( 'manage_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1709
+        // Add 4W selection.
1710
+        $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1711
+        $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1712
+        $this->loader->add_action( 'pre_get_posts', $this->entity_list_service, 'pre_get_posts' );
1713
+        $this->loader->add_action( 'load-edit.php', $this->entity_list_service, 'load_edit' );
1714
+
1715
+        /*
1717 1716
 		 * If `All Entity Types` is disable, use the radio button Walker.
1718 1717
 		 *
1719 1718
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1720 1719
 		 */
1721
-		if ( ! WL_ALL_ENTITY_TYPES ) {
1722
-			$this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1723
-		}
1724
-
1725
-		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1726
-		// entities.
1727
-		$this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1728
-
1729
-		// Filter imported post meta.
1730
-		$this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1731
-
1732
-		// Notify the import service when an import starts and ends.
1733
-		$this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1734
-		$this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1735
-
1736
-		// Hook the AJAX wl_rebuild action to the Rebuild Service.
1737
-		$this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1738
-		$this->loader->add_action( 'wp_ajax_wl_rebuild_references', $this->reference_rebuild_service, 'rebuild' );
1739
-
1740
-		/**
1741
-		 * Filter: wl_feature__enable__settings-download.
1742
-		 *
1743
-		 * @param bool whether the screens needed to be registered, defaults to true.
1744
-		 *
1745
-		 * @return bool
1746
-		 * @since 3.27.6
1747
-		 */
1748
-		$this->features_registry->register_feature_from_slug( 'settings-download', true, array( $this, 'register_screens' ) );
1749
-
1750
-
1751
-		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1752
-		$this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1753
-
1754
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1755
-		$this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1756
-		$this->loader->add_action( 'admin_post_wl_jsonld', $this->jsonld_service, 'get' );
1757
-		$this->loader->add_action( 'admin_post_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1758
-
1759
-		// Hook the AJAX wl_validate_key action to the Key Validation service.
1760
-		$this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1761
-
1762
-		// Hook the AJAX wl_update_country_options action to the countries.
1763
-		$this->loader->add_action( 'wp_ajax_wl_update_country_options', $this->country_select_element, 'get_options_html' );
1764
-
1765
-		// Hook the `admin_init` function to the Admin Setup.
1766
-		$this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1767
-
1768
-		// Hook the admin_init to the settings page.
1769
-		$this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1770
-		$this->loader->add_action( 'admin_init', $this->analytics_settings_page, 'admin_init' );
1771
-
1772
-		$this->loader->add_filter( 'admin_post_thumbnail_html', $this->publisher_service, 'add_featured_image_instruction' );
1773
-
1774
-		// Hook the menu creation on the general wordlift menu creation.
1775
-		/**
1776
-		 * Filter: wl_feature__enable__screens.
1777
-		 *
1778
-		 * @param bool whether the screens needed to be registered, defaults to true.
1779
-		 *
1780
-		 * @return bool
1781
-		 * @since 3.27.6
1782
-		 *
1783
-		 * Since 3.30.0 this feature is registered using registry.
1784
-		 */
1785
-		add_action( 'plugins_loaded', function () use ( $that ) {
1786
-			if ( apply_filters( 'wl_feature__enable__settings-screen', true ) || Admin_User_Option::is_wordlift_admin() ) {
1787
-				add_action( 'wl_admin_menu', array( $that->settings_page, 'admin_menu' ), 10, 2 );
1788
-			}
1789
-		} );
1790
-
1791
-		// Hook key update.
1792
-		$this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 );
1793
-		$this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1794
-
1795
-		// Add additional action links to the WordLift plugin in the plugins page.
1796
-		$this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1797
-
1798
-		/*
1720
+        if ( ! WL_ALL_ENTITY_TYPES ) {
1721
+            $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1722
+        }
1723
+
1724
+        // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1725
+        // entities.
1726
+        $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1727
+
1728
+        // Filter imported post meta.
1729
+        $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1730
+
1731
+        // Notify the import service when an import starts and ends.
1732
+        $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1733
+        $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1734
+
1735
+        // Hook the AJAX wl_rebuild action to the Rebuild Service.
1736
+        $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1737
+        $this->loader->add_action( 'wp_ajax_wl_rebuild_references', $this->reference_rebuild_service, 'rebuild' );
1738
+
1739
+        /**
1740
+         * Filter: wl_feature__enable__settings-download.
1741
+         *
1742
+         * @param bool whether the screens needed to be registered, defaults to true.
1743
+         *
1744
+         * @return bool
1745
+         * @since 3.27.6
1746
+         */
1747
+        $this->features_registry->register_feature_from_slug( 'settings-download', true, array( $this, 'register_screens' ) );
1748
+
1749
+
1750
+        // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1751
+        $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1752
+
1753
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1754
+        $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1755
+        $this->loader->add_action( 'admin_post_wl_jsonld', $this->jsonld_service, 'get' );
1756
+        $this->loader->add_action( 'admin_post_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1757
+
1758
+        // Hook the AJAX wl_validate_key action to the Key Validation service.
1759
+        $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1760
+
1761
+        // Hook the AJAX wl_update_country_options action to the countries.
1762
+        $this->loader->add_action( 'wp_ajax_wl_update_country_options', $this->country_select_element, 'get_options_html' );
1763
+
1764
+        // Hook the `admin_init` function to the Admin Setup.
1765
+        $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1766
+
1767
+        // Hook the admin_init to the settings page.
1768
+        $this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1769
+        $this->loader->add_action( 'admin_init', $this->analytics_settings_page, 'admin_init' );
1770
+
1771
+        $this->loader->add_filter( 'admin_post_thumbnail_html', $this->publisher_service, 'add_featured_image_instruction' );
1772
+
1773
+        // Hook the menu creation on the general wordlift menu creation.
1774
+        /**
1775
+         * Filter: wl_feature__enable__screens.
1776
+         *
1777
+         * @param bool whether the screens needed to be registered, defaults to true.
1778
+         *
1779
+         * @return bool
1780
+         * @since 3.27.6
1781
+         *
1782
+         * Since 3.30.0 this feature is registered using registry.
1783
+         */
1784
+        add_action( 'plugins_loaded', function () use ( $that ) {
1785
+            if ( apply_filters( 'wl_feature__enable__settings-screen', true ) || Admin_User_Option::is_wordlift_admin() ) {
1786
+                add_action( 'wl_admin_menu', array( $that->settings_page, 'admin_menu' ), 10, 2 );
1787
+            }
1788
+        } );
1789
+
1790
+        // Hook key update.
1791
+        $this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 );
1792
+        $this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1793
+
1794
+        // Add additional action links to the WordLift plugin in the plugins page.
1795
+        $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1796
+
1797
+        /*
1799 1798
 		 * Remove the Analytics Settings link from the plugin page.
1800 1799
 		 *
1801 1800
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/932
1802 1801
 		 * @since 3.21.1
1803 1802
 		 */
1804
-		// $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->analytics_settings_page_action_link, 'action_links', 10, 1 );
1805
-
1806
-		// Hook the AJAX `wl_publisher` action name.
1807
-		$this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1808
-
1809
-		// Hook row actions for the entity type list admin.
1810
-		$this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1811
-
1812
-		/** Ajax actions. */
1813
-		$this->loader->add_action( 'wp_ajax_wl_google_analytics_export', $this->google_analytics_export_service, 'export' );
1814
-
1815
-		// Hook capabilities manipulation to allow access to entity type admin
1816
-		// page  on WordPress versions before 4.7.
1817
-		global $wp_version;
1818
-		if ( version_compare( $wp_version, '4.7', '<' ) ) {
1819
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1820
-		}
1821
-
1822
-		$this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1823
-
1824
-		/** Adapters. */
1825
-		$this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1826
-		/**
1827
-		 * Disabling Faq temporarily.
1828
-		 * Load the tinymce editor button on the tool bar.
1829
-		 * @since 3.26.0
1830
-		 */
1831
-		//$this->loader->add_filter( 'tiny_mce_before_init', $this->faq_tinymce_adapter, 'register_custom_tags' );
1832
-		//$this->loader->add_filter( 'mce_buttons', $this->faq_tinymce_adapter, 'register_faq_toolbar_button', 10, 1 );
1833
-		//$this->loader->add_filter( 'mce_external_plugins', $this->faq_tinymce_adapter, 'register_faq_tinymce_plugin', 10, 1 );
1834
-
1835
-
1836
-		$this->loader->add_action( 'wp_ajax_wl_relation_rebuild_process_all', $this->relation_rebuild_adapter, 'process_all' );
1837
-		$this->loader->add_action( 'wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create' );
1838
-		$this->loader->add_action( 'wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete' );
1839
-		/**
1840
-		 * @since 3.26.0
1841
-		 */
1842
-		$excerpt_adapter = new Post_Excerpt_Meta_Box_Adapter();
1843
-		$this->loader->add_action( 'do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box' );
1844
-		// Adding Rest route for the post excerpt
1845
-		Post_Excerpt_Rest_Controller::register_routes();
1846
-
1847
-		$this->loader->add_action( 'update_user_metadata', $this->user_service, 'update_user_metadata', 10, 5 );
1848
-		$this->loader->add_action( 'delete_user_metadata', $this->user_service, 'delete_user_metadata', 10, 5 );
1849
-
1850
-		// Handle the autocomplete request.
1851
-		add_action( 'wp_ajax_wl_autocomplete', array(
1852
-			$this->autocomplete_adapter,
1853
-			'wl_autocomplete',
1854
-		) );
1855
-		add_action( 'wp_ajax_nopriv_wl_autocomplete', array(
1856
-			$this->autocomplete_adapter,
1857
-			'wl_autocomplete',
1858
-		) );
1859
-
1860
-		// Hooks to restrict multisite super admin from manipulating entity types.
1861
-		if ( is_multisite() ) {
1862
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1863
-		}
1864
-
1865
-		$deactivator_feedback = new Wordlift_Deactivator_Feedback( $this->configuration_service );
1866
-
1867
-		add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) );
1868
-		add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) );
1869
-		add_action( 'wp_ajax_wl_deactivation_feedback', array( $deactivator_feedback, 'wl_deactivation_feedback' ) );
1870
-
1871
-		/**
1872
-		 * Always allow the `wordlift/classification` block.
1873
-		 *
1874
-		 * @since 3.23.0
1875
-		 */
1876
-		add_filter( 'allowed_block_types', function ( $value ) {
1877
-
1878
-			if ( true === $value ) {
1879
-				return $value;
1880
-			}
1881
-
1882
-			return array_merge( (array) $value, array( 'wordlift/classification' ) );
1883
-		}, PHP_INT_MAX );
1884
-
1885
-		/**
1886
-		 * @since 3.27.7
1887
-		 * @see https://github.com/insideout10/wordlift-plugin/issues/1214
1888
-		 */
1889
-		new Top_Entities();
1890
-	}
1891
-
1892
-	/**
1893
-	 * Register all of the hooks related to the public-facing functionality
1894
-	 * of the plugin.
1895
-	 *
1896
-	 * @since    1.0.0
1897
-	 * @access   private
1898
-	 */
1899
-	private function define_public_hooks() {
1900
-
1901
-		$plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1902
-
1903
-		// Register the entity post type.
1904
-		$this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1905
-
1906
-		// Bind the link generation and handling hooks to the entity link service.
1907
-		$this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1908
-		$this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1909
-		// $this->loader->add_filter( 'wp_unique_post_slug_is_bad_flat_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_flat_slug', 10, 3 );
1910
-		// $this->loader->add_filter( 'wp_unique_post_slug_is_bad_hierarchical_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_hierarchical_slug', 10, 4 );
1911
-
1912
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1913
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1914
-		$this->loader->add_action( 'wp_enqueue_scripts', $this->context_cards_service, 'enqueue_scripts' );
1915
-
1916
-		// Registering Faq_Content_Filter service used for removing faq question and answer tags from the html.
1917
-		$this->loader->add_filter( 'the_content', $this->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags' );
1918
-		// Hook the content filter service to add entity links.
1919
-		if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) {
1920
-			$this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1921
-		}
1922
-
1923
-		// Hook the AJAX wl_timeline action to the Timeline service.
1924
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1925
-
1926
-		// Hook the ShareThis service.
1927
-		$this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1928
-		$this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1929
-
1930
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1931
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1932
-
1933
-		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1934
-		// in order to tweak WP's `WP_Query` to include entities in queries related
1935
-		// to categories.
1936
-		$this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1937
-
1938
-		/*
1803
+        // $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->analytics_settings_page_action_link, 'action_links', 10, 1 );
1804
+
1805
+        // Hook the AJAX `wl_publisher` action name.
1806
+        $this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1807
+
1808
+        // Hook row actions for the entity type list admin.
1809
+        $this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1810
+
1811
+        /** Ajax actions. */
1812
+        $this->loader->add_action( 'wp_ajax_wl_google_analytics_export', $this->google_analytics_export_service, 'export' );
1813
+
1814
+        // Hook capabilities manipulation to allow access to entity type admin
1815
+        // page  on WordPress versions before 4.7.
1816
+        global $wp_version;
1817
+        if ( version_compare( $wp_version, '4.7', '<' ) ) {
1818
+            $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1819
+        }
1820
+
1821
+        $this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1822
+
1823
+        /** Adapters. */
1824
+        $this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1825
+        /**
1826
+         * Disabling Faq temporarily.
1827
+         * Load the tinymce editor button on the tool bar.
1828
+         * @since 3.26.0
1829
+         */
1830
+        //$this->loader->add_filter( 'tiny_mce_before_init', $this->faq_tinymce_adapter, 'register_custom_tags' );
1831
+        //$this->loader->add_filter( 'mce_buttons', $this->faq_tinymce_adapter, 'register_faq_toolbar_button', 10, 1 );
1832
+        //$this->loader->add_filter( 'mce_external_plugins', $this->faq_tinymce_adapter, 'register_faq_tinymce_plugin', 10, 1 );
1833
+
1834
+
1835
+        $this->loader->add_action( 'wp_ajax_wl_relation_rebuild_process_all', $this->relation_rebuild_adapter, 'process_all' );
1836
+        $this->loader->add_action( 'wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create' );
1837
+        $this->loader->add_action( 'wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete' );
1838
+        /**
1839
+         * @since 3.26.0
1840
+         */
1841
+        $excerpt_adapter = new Post_Excerpt_Meta_Box_Adapter();
1842
+        $this->loader->add_action( 'do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box' );
1843
+        // Adding Rest route for the post excerpt
1844
+        Post_Excerpt_Rest_Controller::register_routes();
1845
+
1846
+        $this->loader->add_action( 'update_user_metadata', $this->user_service, 'update_user_metadata', 10, 5 );
1847
+        $this->loader->add_action( 'delete_user_metadata', $this->user_service, 'delete_user_metadata', 10, 5 );
1848
+
1849
+        // Handle the autocomplete request.
1850
+        add_action( 'wp_ajax_wl_autocomplete', array(
1851
+            $this->autocomplete_adapter,
1852
+            'wl_autocomplete',
1853
+        ) );
1854
+        add_action( 'wp_ajax_nopriv_wl_autocomplete', array(
1855
+            $this->autocomplete_adapter,
1856
+            'wl_autocomplete',
1857
+        ) );
1858
+
1859
+        // Hooks to restrict multisite super admin from manipulating entity types.
1860
+        if ( is_multisite() ) {
1861
+            $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1862
+        }
1863
+
1864
+        $deactivator_feedback = new Wordlift_Deactivator_Feedback( $this->configuration_service );
1865
+
1866
+        add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) );
1867
+        add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) );
1868
+        add_action( 'wp_ajax_wl_deactivation_feedback', array( $deactivator_feedback, 'wl_deactivation_feedback' ) );
1869
+
1870
+        /**
1871
+         * Always allow the `wordlift/classification` block.
1872
+         *
1873
+         * @since 3.23.0
1874
+         */
1875
+        add_filter( 'allowed_block_types', function ( $value ) {
1876
+
1877
+            if ( true === $value ) {
1878
+                return $value;
1879
+            }
1880
+
1881
+            return array_merge( (array) $value, array( 'wordlift/classification' ) );
1882
+        }, PHP_INT_MAX );
1883
+
1884
+        /**
1885
+         * @since 3.27.7
1886
+         * @see https://github.com/insideout10/wordlift-plugin/issues/1214
1887
+         */
1888
+        new Top_Entities();
1889
+    }
1890
+
1891
+    /**
1892
+     * Register all of the hooks related to the public-facing functionality
1893
+     * of the plugin.
1894
+     *
1895
+     * @since    1.0.0
1896
+     * @access   private
1897
+     */
1898
+    private function define_public_hooks() {
1899
+
1900
+        $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1901
+
1902
+        // Register the entity post type.
1903
+        $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1904
+
1905
+        // Bind the link generation and handling hooks to the entity link service.
1906
+        $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1907
+        $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1908
+        // $this->loader->add_filter( 'wp_unique_post_slug_is_bad_flat_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_flat_slug', 10, 3 );
1909
+        // $this->loader->add_filter( 'wp_unique_post_slug_is_bad_hierarchical_slug', $this->entity_link_service, 'wp_unique_post_slug_is_bad_hierarchical_slug', 10, 4 );
1910
+
1911
+        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1912
+        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1913
+        $this->loader->add_action( 'wp_enqueue_scripts', $this->context_cards_service, 'enqueue_scripts' );
1914
+
1915
+        // Registering Faq_Content_Filter service used for removing faq question and answer tags from the html.
1916
+        $this->loader->add_filter( 'the_content', $this->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags' );
1917
+        // Hook the content filter service to add entity links.
1918
+        if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) {
1919
+            $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1920
+        }
1921
+
1922
+        // Hook the AJAX wl_timeline action to the Timeline service.
1923
+        $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1924
+
1925
+        // Hook the ShareThis service.
1926
+        $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1927
+        $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1928
+
1929
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1930
+        $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1931
+
1932
+        // Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1933
+        // in order to tweak WP's `WP_Query` to include entities in queries related
1934
+        // to categories.
1935
+        $this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1936
+
1937
+        /*
1939 1938
 		 * Hook the `pre_get_posts` action to the `Wordlift_Entity_Page_Service`
1940 1939
 		 * in order to tweak WP's `WP_Query` to show event related entities in reverse
1941 1940
 		 * order of start time.
1942 1941
 		 */
1943
-		$this->loader->add_action( 'pre_get_posts', $this->entity_page_service, 'pre_get_posts', 10, 1 );
1944
-
1945
-		$this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1946
-
1947
-		// This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done.
1948
-		$this->loader->add_action( 'save_post', $this->entity_type_adapter, 'save_post', 9, 3 );
1949
-
1950
-		// Analytics Script Frontend.
1951
-		if ( $this->configuration_service->is_analytics_enable() ) {
1952
-			$this->loader->add_action( 'wp_enqueue_scripts', $this->analytics_connect, 'enqueue_scripts', 10 );
1953
-		}
1954
-
1955
-	}
1956
-
1957
-	/**
1958
-	 * Run the loader to execute all of the hooks with WordPress.
1959
-	 *
1960
-	 * @since    1.0.0
1961
-	 */
1962
-	public function run() {
1963
-		$this->loader->run();
1964
-	}
1965
-
1966
-	/**
1967
-	 * The name of the plugin used to uniquely identify it within the context of
1968
-	 * WordPress and to define internationalization functionality.
1969
-	 *
1970
-	 * @return    string    The name of the plugin.
1971
-	 * @since     1.0.0
1972
-	 */
1973
-	public function get_plugin_name() {
1974
-		return $this->plugin_name;
1975
-	}
1976
-
1977
-	/**
1978
-	 * The reference to the class that orchestrates the hooks with the plugin.
1979
-	 *
1980
-	 * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1981
-	 * @since     1.0.0
1982
-	 */
1983
-	public function get_loader() {
1984
-		return $this->loader;
1985
-	}
1986
-
1987
-	/**
1988
-	 * Retrieve the version number of the plugin.
1989
-	 *
1990
-	 * @return    string    The version number of the plugin.
1991
-	 * @since     1.0.0
1992
-	 */
1993
-	public function get_version() {
1994
-		return $this->version;
1995
-	}
1996
-
1997
-	/**
1998
-	 * Load dependencies for WP-CLI.
1999
-	 *
2000
-	 * @throws Exception
2001
-	 * @since 3.18.0
2002
-	 */
2003
-	private function load_cli_dependencies() {
2004
-
2005
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'cli/class-wordlift-push-reference-data-command.php';
2006
-
2007
-		$push_reference_data_command = new Wordlift_Push_Reference_Data_Command( $this->relation_service, $this->entity_service, $this->sparql_service, $this->configuration_service, $this->entity_type_service );
2008
-
2009
-		WP_CLI::add_command( 'wl references push', $push_reference_data_command );
2010
-
2011
-	}
2012
-
2013
-	/**
2014
-	 * Get the {@link \Wordlift_Dashboard_Service} to allow others to use its functions.
2015
-	 *
2016
-	 * @return \Wordlift_Dashboard_Service The {@link \Wordlift_Dashboard_Service} instance.
2017
-	 * @since 3.20.0
2018
-	 */
2019
-	public function get_dashboard_service() {
2020
-
2021
-		return $this->dashboard_service;
2022
-	}
2023
-
2024
-	public function add_wl_enabled_blocks() {
2025
-		/**
2026
-		 * Filter: wl_feature__enable__blocks.
2027
-		 *
2028
-		 * @param bool whether the blocks needed to be registered, defaults to true.
2029
-		 *
2030
-		 * @return bool
2031
-		 * @since 3.27.6
2032
-		 */
2033
-
2034
-		wp_register_script( 'wl_enabled_blocks', false );
2035
-
2036
-		$enabled_blocks = array();
2037
-
2038
-		/**
2039
-		 * Filter name: wl_feature_enable__product_navigator
2040
-		 * @since 3.30.0
2041
-		 */
2042
-		if ( apply_filters( 'wl_feature_enable__product-navigator', true ) ) {
2043
-			$enabled_blocks[] = 'wordlift/products-navigator';
2044
-		}
2045
-
2046
-		if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
2047
-			// To intimate JS
2048
-			$enabled_blocks = array_merge( $enabled_blocks, array(
2049
-				'wordlift/navigator',
2050
-				'wordlift/chord',
2051
-				'wordlift/geomap',
2052
-				'wordlift/timeline',
2053
-				'wordlift/cloud',
2054
-				'wordlift/vocabulary',
2055
-				'wordlift/faceted-search'
2056
-			) );
2057
-		}
2058
-
2059
-		wp_localize_script( 'wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks );
2060
-		wp_enqueue_script( 'wl_enabled_blocks' );
2061
-	}
2062
-
2063
-	/**
2064
-	 * Register screens based on the filter.
2065
-	 */
2066
-	public function register_screens() {
2067
-		// Hook the menu to the Download Your Data page.
2068
-		if ( apply_filters( 'wl_feature__enable__settings-download', true ) ) {
2069
-			add_action( 'admin_menu', array( $this->download_your_data_page, 'admin_menu' ), 100, 0 );
2070
-		}
2071
-		add_action( 'admin_menu', array( $this->status_page, 'admin_menu' ), 100, 0 );
2072
-		add_action( 'admin_menu', array( $this->entity_type_settings_admin_page, 'admin_menu' ), 100, 0 );
2073
-
2074
-	}
1942
+        $this->loader->add_action( 'pre_get_posts', $this->entity_page_service, 'pre_get_posts', 10, 1 );
1943
+
1944
+        $this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1945
+
1946
+        // This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done.
1947
+        $this->loader->add_action( 'save_post', $this->entity_type_adapter, 'save_post', 9, 3 );
1948
+
1949
+        // Analytics Script Frontend.
1950
+        if ( $this->configuration_service->is_analytics_enable() ) {
1951
+            $this->loader->add_action( 'wp_enqueue_scripts', $this->analytics_connect, 'enqueue_scripts', 10 );
1952
+        }
1953
+
1954
+    }
1955
+
1956
+    /**
1957
+     * Run the loader to execute all of the hooks with WordPress.
1958
+     *
1959
+     * @since    1.0.0
1960
+     */
1961
+    public function run() {
1962
+        $this->loader->run();
1963
+    }
1964
+
1965
+    /**
1966
+     * The name of the plugin used to uniquely identify it within the context of
1967
+     * WordPress and to define internationalization functionality.
1968
+     *
1969
+     * @return    string    The name of the plugin.
1970
+     * @since     1.0.0
1971
+     */
1972
+    public function get_plugin_name() {
1973
+        return $this->plugin_name;
1974
+    }
1975
+
1976
+    /**
1977
+     * The reference to the class that orchestrates the hooks with the plugin.
1978
+     *
1979
+     * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1980
+     * @since     1.0.0
1981
+     */
1982
+    public function get_loader() {
1983
+        return $this->loader;
1984
+    }
1985
+
1986
+    /**
1987
+     * Retrieve the version number of the plugin.
1988
+     *
1989
+     * @return    string    The version number of the plugin.
1990
+     * @since     1.0.0
1991
+     */
1992
+    public function get_version() {
1993
+        return $this->version;
1994
+    }
1995
+
1996
+    /**
1997
+     * Load dependencies for WP-CLI.
1998
+     *
1999
+     * @throws Exception
2000
+     * @since 3.18.0
2001
+     */
2002
+    private function load_cli_dependencies() {
2003
+
2004
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'cli/class-wordlift-push-reference-data-command.php';
2005
+
2006
+        $push_reference_data_command = new Wordlift_Push_Reference_Data_Command( $this->relation_service, $this->entity_service, $this->sparql_service, $this->configuration_service, $this->entity_type_service );
2007
+
2008
+        WP_CLI::add_command( 'wl references push', $push_reference_data_command );
2009
+
2010
+    }
2011
+
2012
+    /**
2013
+     * Get the {@link \Wordlift_Dashboard_Service} to allow others to use its functions.
2014
+     *
2015
+     * @return \Wordlift_Dashboard_Service The {@link \Wordlift_Dashboard_Service} instance.
2016
+     * @since 3.20.0
2017
+     */
2018
+    public function get_dashboard_service() {
2019
+
2020
+        return $this->dashboard_service;
2021
+    }
2022
+
2023
+    public function add_wl_enabled_blocks() {
2024
+        /**
2025
+         * Filter: wl_feature__enable__blocks.
2026
+         *
2027
+         * @param bool whether the blocks needed to be registered, defaults to true.
2028
+         *
2029
+         * @return bool
2030
+         * @since 3.27.6
2031
+         */
2032
+
2033
+        wp_register_script( 'wl_enabled_blocks', false );
2034
+
2035
+        $enabled_blocks = array();
2036
+
2037
+        /**
2038
+         * Filter name: wl_feature_enable__product_navigator
2039
+         * @since 3.30.0
2040
+         */
2041
+        if ( apply_filters( 'wl_feature_enable__product-navigator', true ) ) {
2042
+            $enabled_blocks[] = 'wordlift/products-navigator';
2043
+        }
2044
+
2045
+        if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
2046
+            // To intimate JS
2047
+            $enabled_blocks = array_merge( $enabled_blocks, array(
2048
+                'wordlift/navigator',
2049
+                'wordlift/chord',
2050
+                'wordlift/geomap',
2051
+                'wordlift/timeline',
2052
+                'wordlift/cloud',
2053
+                'wordlift/vocabulary',
2054
+                'wordlift/faceted-search'
2055
+            ) );
2056
+        }
2057
+
2058
+        wp_localize_script( 'wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks );
2059
+        wp_enqueue_script( 'wl_enabled_blocks' );
2060
+    }
2061
+
2062
+    /**
2063
+     * Register screens based on the filter.
2064
+     */
2065
+    public function register_screens() {
2066
+        // Hook the menu to the Download Your Data page.
2067
+        if ( apply_filters( 'wl_feature__enable__settings-download', true ) ) {
2068
+            add_action( 'admin_menu', array( $this->download_your_data_page, 'admin_menu' ), 100, 0 );
2069
+        }
2070
+        add_action( 'admin_menu', array( $this->status_page, 'admin_menu' ), 100, 0 );
2071
+        add_action( 'admin_menu', array( $this->entity_type_settings_admin_page, 'admin_menu' ), 100, 0 );
2072
+
2073
+    }
2075 2074
 
2076 2075
 }
Please login to merge, or discard this patch.
src/includes/class-wordlift-entity-type-taxonomy-service.php 2 patches
Indentation   +174 added lines, -174 removed lines patch added patch discarded remove patch
@@ -14,184 +14,184 @@
 block discarded – undo
14 14
  */
15 15
 class Wordlift_Entity_Type_Taxonomy_Service {
16 16
 
17
-	/**
18
-	 * The WordPress taxonomy name.
19
-	 *
20
-	 * @since 1.0.0
21
-	 */
22
-	const TAXONOMY_NAME = 'wl_entity_type';
23
-
24
-	/**
25
-	 * Register the taxonomies.
26
-	 *
27
-	 * @since 3.23.6 we hook to `wp_get_object_terms` to ensure that a term is returned when a post is queries for the
28
-	 *               `wl_entity_type` taxonomy.
29
-	 * @since 3.18.0
30
-	 */
31
-	public function init() {
32
-
33
-		$labels = array(
34
-			'name'              => _x( 'Entity Types', 'taxonomy general name', 'wordlift' ),
35
-			'singular_name'     => _x( 'Entity Type', 'taxonomy singular name', 'wordlift' ),
36
-			'search_items'      => __( 'Search Entity Types', 'wordlift' ),
37
-			'all_items'         => __( 'All Entity Types', 'wordlift' ),
38
-			'parent_item'       => __( 'Parent Entity Type', 'wordlift' ),
39
-			'parent_item_colon' => __( 'Parent Entity Type:', 'wordlift' ),
40
-			'edit_item'         => __( 'Edit Entity Type', 'wordlift' ),
41
-			'update_item'       => __( 'Update Entity Type', 'wordlift' ),
42
-			'add_new_item'      => __( 'Add New Entity Type', 'wordlift' ),
43
-			'new_item_name'     => __( 'New Entity Type', 'wordlift' ),
44
-			'menu_name'         => __( 'Entity Types', 'wordlift' ),
45
-		);
46
-
47
-		// Take away GUI for taxonomy editing.
48
-		// TODO: read capabilities when editing of the WL <-> schema.org mapping is possible.
49
-		$capabilities = array(
50
-			// We enable editors to change the title/description of terms:
51
-			//
52
-			// @see https://github.com/insideout10/wordlift-plugin/issues/398.
53
-			'manage_terms' => 'manage_options',
54
-			'edit_terms'   => 'wl_entity_type_edit_term',
55
-			'delete_terms' => 'wl_entity_type_delete_term',
56
-			'assign_terms' => 'edit_posts',
57
-		);
58
-
59
-		$args = array(
60
-			'labels'             => $labels,
61
-			'capabilities'       => $capabilities,
62
-			'hierarchical'       => true,
63
-			'show_admin_column'  => apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ),
64
-			'show_in_rest'       => apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ),
65
-			'show_in_quick_edit' => false,
66
-			'publicly_queryable' => false
67
-		);
68
-
69
-		/*
17
+    /**
18
+     * The WordPress taxonomy name.
19
+     *
20
+     * @since 1.0.0
21
+     */
22
+    const TAXONOMY_NAME = 'wl_entity_type';
23
+
24
+    /**
25
+     * Register the taxonomies.
26
+     *
27
+     * @since 3.23.6 we hook to `wp_get_object_terms` to ensure that a term is returned when a post is queries for the
28
+     *               `wl_entity_type` taxonomy.
29
+     * @since 3.18.0
30
+     */
31
+    public function init() {
32
+
33
+        $labels = array(
34
+            'name'              => _x( 'Entity Types', 'taxonomy general name', 'wordlift' ),
35
+            'singular_name'     => _x( 'Entity Type', 'taxonomy singular name', 'wordlift' ),
36
+            'search_items'      => __( 'Search Entity Types', 'wordlift' ),
37
+            'all_items'         => __( 'All Entity Types', 'wordlift' ),
38
+            'parent_item'       => __( 'Parent Entity Type', 'wordlift' ),
39
+            'parent_item_colon' => __( 'Parent Entity Type:', 'wordlift' ),
40
+            'edit_item'         => __( 'Edit Entity Type', 'wordlift' ),
41
+            'update_item'       => __( 'Update Entity Type', 'wordlift' ),
42
+            'add_new_item'      => __( 'Add New Entity Type', 'wordlift' ),
43
+            'new_item_name'     => __( 'New Entity Type', 'wordlift' ),
44
+            'menu_name'         => __( 'Entity Types', 'wordlift' ),
45
+        );
46
+
47
+        // Take away GUI for taxonomy editing.
48
+        // TODO: read capabilities when editing of the WL <-> schema.org mapping is possible.
49
+        $capabilities = array(
50
+            // We enable editors to change the title/description of terms:
51
+            //
52
+            // @see https://github.com/insideout10/wordlift-plugin/issues/398.
53
+            'manage_terms' => 'manage_options',
54
+            'edit_terms'   => 'wl_entity_type_edit_term',
55
+            'delete_terms' => 'wl_entity_type_delete_term',
56
+            'assign_terms' => 'edit_posts',
57
+        );
58
+
59
+        $args = array(
60
+            'labels'             => $labels,
61
+            'capabilities'       => $capabilities,
62
+            'hierarchical'       => true,
63
+            'show_admin_column'  => apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ),
64
+            'show_in_rest'       => apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ),
65
+            'show_in_quick_edit' => false,
66
+            'publicly_queryable' => false
67
+        );
68
+
69
+        /*
70 70
 		 * If `All Entity Types` is enabled, use the new metabox.
71 71
 		 *
72 72
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
73 73
 		 * @since 3.20.0
74 74
 		 */
75
-		if ( WL_ALL_ENTITY_TYPES ) {
76
-			$args['meta_box_cb'] = apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ) ? array(
77
-				'Wordlift_Admin_Schemaorg_Taxonomy_Metabox',
78
-				'render'
79
-			) : false;
80
-		}
81
-
82
-		register_taxonomy(
83
-			self::TAXONOMY_NAME, // Taxonomy name.
84
-			Wordlift_Entity_Service::valid_entity_post_types(), // Taxonomy post types.
85
-			$args // Taxonomy args.
86
-		);
87
-
88
-		/**
89
-		 * Register meta wl_entities_gutenberg for use in Gutenberg
90
-		 */
91
-		register_meta( 'post', 'wl_entities_gutenberg', array(
92
-			'show_in_rest' => true,
93
-			'single'       => true,
94
-			'type'         => 'string',
95
-		) );
96
-
97
-		/**
98
-		 * Register meta _wl_alt_label for use in Gutenberg
99
-		 */
100
-		register_meta( 'post', Wordlift_Entity_Service::ALTERNATIVE_LABEL_META_KEY, array(
101
-			'object_subtype' => '',
102
-			'show_in_rest'   => true,
103
-			'single'         => false,
104
-			'type'           => 'string',
105
-			'auth_callback'  => function () {
106
-				return current_user_can( 'edit_posts' );
107
-			}
108
-		) );
109
-
110
-		// Add filter to change the metabox CSS class.
111
-		add_filter( 'postbox_classes_entity_wl_entity_typediv', 'wl_admin_metaboxes_add_css_class' );
112
-
113
-		// Add a filter to preset the object term if none is set.
114
-		//
115
-		// DO NOT hook to `wp_get_object_terms`, because `wp_get_object_terms` returns imploded values for SQL queries.
116
-		//
117
-		// @see https://github.com/insideout10/wordlift-plugin/issues/995
118
-		// @since 3.23.6
119
-		add_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10, 4 );
120
-
121
-		/**
122
-		 * Exclude sitemap creation for wl_entity_type taxonomy in Yoast
123
-		 * @since 3.30.1
124
-		 */
125
-		add_filter( 'wpseo_sitemap_exclude_taxonomy', array( $this, 'wpseo_sitemap_exclude_taxonomy' ), 10, 2 );
126
-
127
-	}
128
-
129
-	/**
130
-	 * Hook to the `get_object_terms` filter.
131
-	 *
132
-	 * We check if our taxonomy is requested and whether a term has been returned. If no term has been returned we
133
-	 * preset `Article` for posts/pages and 'Thing' for everything else and we query the terms again.
134
-	 *
135
-	 * @param array $terms Array of terms for the given object or objects.
136
-	 * @param int[] $object_ids Array of object IDs for which terms were retrieved.
137
-	 * @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
138
-	 * @param array $args Array of arguments for retrieving terms for the given
139
-	 *                             object(s). See get_object_terms() for details.
140
-	 *
141
-	 * @return array|WP_Error
142
-	 * @since 3.23.6
143
-	 */
144
-	public function get_object_terms( $terms, $object_ids, $taxonomies, $args ) {
145
-		// Get our entity type.
146
-		$entity_type = self::TAXONOMY_NAME;
147
-
148
-		// Check if this is a query for our entity type, that no terms have been found and that we have an article
149
-		// term to preset in case.
150
-		if ( ! taxonomy_exists( $entity_type )
151
-		     || array( $entity_type ) !== (array) $taxonomies
152
-		     || ! empty( $terms )
153
-		     || ! term_exists( 'article', $entity_type )
154
-		     || ! term_exists( 'thing', $entity_type ) ) {
155
-
156
-			// Return the input value.
157
-			return $terms;
158
-		}
159
-
160
-		// Avoid nested calls in case of issues.
161
-		remove_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10 );
162
-
163
-		// Set the default term for all the queried object.
164
-		foreach ( (array) $object_ids as $object_id ) {
165
-			$post_type = get_post_type( $object_id );
166
-			if ( Wordlift_Entity_Type_Service::is_valid_entity_post_type( $post_type ) ) {
167
-				// Set the term to article for posts and pages, or to thing for everything else.
168
-				$uris = Wordlift_Entity_Type_Adapter::get_entity_types( $post_type );
169
-				foreach ( $uris as $uri ) {
170
-					// set the uri based on post type.
171
-					if ( $uri === 'http://schema.org/Article' || $uri === 'http://schema.org/Thing' ) {
172
-						$uri = Wordlift_Entity_Service::TYPE_NAME === $post_type ?
173
-							'http://schema.org/Thing' : 'http://schema.org/Article';
174
-					}
175
-					Wordlift_Entity_Type_Service::get_instance()->set( $object_id, $uri );
176
-				}
177
-			}
178
-		}
179
-
180
-		// Finally return the object terms.
181
-		$terms = wp_get_object_terms( $object_ids, $taxonomies, $args );
182
-
183
-		// Re-enable nested calls in case of issues.
184
-		add_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10, 4 );
185
-
186
-		return $terms;
187
-	}
188
-
189
-	public function wpseo_sitemap_exclude_taxonomy( $exclude, $tax ) {
190
-		if ( $tax === self::TAXONOMY_NAME ) {
191
-			return true;
192
-		}
193
-
194
-		return $exclude;
195
-	}
75
+        if ( WL_ALL_ENTITY_TYPES ) {
76
+            $args['meta_box_cb'] = apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ) ? array(
77
+                'Wordlift_Admin_Schemaorg_Taxonomy_Metabox',
78
+                'render'
79
+            ) : false;
80
+        }
81
+
82
+        register_taxonomy(
83
+            self::TAXONOMY_NAME, // Taxonomy name.
84
+            Wordlift_Entity_Service::valid_entity_post_types(), // Taxonomy post types.
85
+            $args // Taxonomy args.
86
+        );
87
+
88
+        /**
89
+         * Register meta wl_entities_gutenberg for use in Gutenberg
90
+         */
91
+        register_meta( 'post', 'wl_entities_gutenberg', array(
92
+            'show_in_rest' => true,
93
+            'single'       => true,
94
+            'type'         => 'string',
95
+        ) );
96
+
97
+        /**
98
+         * Register meta _wl_alt_label for use in Gutenberg
99
+         */
100
+        register_meta( 'post', Wordlift_Entity_Service::ALTERNATIVE_LABEL_META_KEY, array(
101
+            'object_subtype' => '',
102
+            'show_in_rest'   => true,
103
+            'single'         => false,
104
+            'type'           => 'string',
105
+            'auth_callback'  => function () {
106
+                return current_user_can( 'edit_posts' );
107
+            }
108
+        ) );
109
+
110
+        // Add filter to change the metabox CSS class.
111
+        add_filter( 'postbox_classes_entity_wl_entity_typediv', 'wl_admin_metaboxes_add_css_class' );
112
+
113
+        // Add a filter to preset the object term if none is set.
114
+        //
115
+        // DO NOT hook to `wp_get_object_terms`, because `wp_get_object_terms` returns imploded values for SQL queries.
116
+        //
117
+        // @see https://github.com/insideout10/wordlift-plugin/issues/995
118
+        // @since 3.23.6
119
+        add_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10, 4 );
120
+
121
+        /**
122
+         * Exclude sitemap creation for wl_entity_type taxonomy in Yoast
123
+         * @since 3.30.1
124
+         */
125
+        add_filter( 'wpseo_sitemap_exclude_taxonomy', array( $this, 'wpseo_sitemap_exclude_taxonomy' ), 10, 2 );
126
+
127
+    }
128
+
129
+    /**
130
+     * Hook to the `get_object_terms` filter.
131
+     *
132
+     * We check if our taxonomy is requested and whether a term has been returned. If no term has been returned we
133
+     * preset `Article` for posts/pages and 'Thing' for everything else and we query the terms again.
134
+     *
135
+     * @param array $terms Array of terms for the given object or objects.
136
+     * @param int[] $object_ids Array of object IDs for which terms were retrieved.
137
+     * @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
138
+     * @param array $args Array of arguments for retrieving terms for the given
139
+     *                             object(s). See get_object_terms() for details.
140
+     *
141
+     * @return array|WP_Error
142
+     * @since 3.23.6
143
+     */
144
+    public function get_object_terms( $terms, $object_ids, $taxonomies, $args ) {
145
+        // Get our entity type.
146
+        $entity_type = self::TAXONOMY_NAME;
147
+
148
+        // Check if this is a query for our entity type, that no terms have been found and that we have an article
149
+        // term to preset in case.
150
+        if ( ! taxonomy_exists( $entity_type )
151
+             || array( $entity_type ) !== (array) $taxonomies
152
+             || ! empty( $terms )
153
+             || ! term_exists( 'article', $entity_type )
154
+             || ! term_exists( 'thing', $entity_type ) ) {
155
+
156
+            // Return the input value.
157
+            return $terms;
158
+        }
159
+
160
+        // Avoid nested calls in case of issues.
161
+        remove_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10 );
162
+
163
+        // Set the default term for all the queried object.
164
+        foreach ( (array) $object_ids as $object_id ) {
165
+            $post_type = get_post_type( $object_id );
166
+            if ( Wordlift_Entity_Type_Service::is_valid_entity_post_type( $post_type ) ) {
167
+                // Set the term to article for posts and pages, or to thing for everything else.
168
+                $uris = Wordlift_Entity_Type_Adapter::get_entity_types( $post_type );
169
+                foreach ( $uris as $uri ) {
170
+                    // set the uri based on post type.
171
+                    if ( $uri === 'http://schema.org/Article' || $uri === 'http://schema.org/Thing' ) {
172
+                        $uri = Wordlift_Entity_Service::TYPE_NAME === $post_type ?
173
+                            'http://schema.org/Thing' : 'http://schema.org/Article';
174
+                    }
175
+                    Wordlift_Entity_Type_Service::get_instance()->set( $object_id, $uri );
176
+                }
177
+            }
178
+        }
179
+
180
+        // Finally return the object terms.
181
+        $terms = wp_get_object_terms( $object_ids, $taxonomies, $args );
182
+
183
+        // Re-enable nested calls in case of issues.
184
+        add_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10, 4 );
185
+
186
+        return $terms;
187
+    }
188
+
189
+    public function wpseo_sitemap_exclude_taxonomy( $exclude, $tax ) {
190
+        if ( $tax === self::TAXONOMY_NAME ) {
191
+            return true;
192
+        }
193
+
194
+        return $exclude;
195
+    }
196 196
 
197 197
 }
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -31,17 +31,17 @@  discard block
 block discarded – undo
31 31
 	public function init() {
32 32
 
33 33
 		$labels = array(
34
-			'name'              => _x( 'Entity Types', 'taxonomy general name', 'wordlift' ),
35
-			'singular_name'     => _x( 'Entity Type', 'taxonomy singular name', 'wordlift' ),
36
-			'search_items'      => __( 'Search Entity Types', 'wordlift' ),
37
-			'all_items'         => __( 'All Entity Types', 'wordlift' ),
38
-			'parent_item'       => __( 'Parent Entity Type', 'wordlift' ),
39
-			'parent_item_colon' => __( 'Parent Entity Type:', 'wordlift' ),
40
-			'edit_item'         => __( 'Edit Entity Type', 'wordlift' ),
41
-			'update_item'       => __( 'Update Entity Type', 'wordlift' ),
42
-			'add_new_item'      => __( 'Add New Entity Type', 'wordlift' ),
43
-			'new_item_name'     => __( 'New Entity Type', 'wordlift' ),
44
-			'menu_name'         => __( 'Entity Types', 'wordlift' ),
34
+			'name'              => _x('Entity Types', 'taxonomy general name', 'wordlift'),
35
+			'singular_name'     => _x('Entity Type', 'taxonomy singular name', 'wordlift'),
36
+			'search_items'      => __('Search Entity Types', 'wordlift'),
37
+			'all_items'         => __('All Entity Types', 'wordlift'),
38
+			'parent_item'       => __('Parent Entity Type', 'wordlift'),
39
+			'parent_item_colon' => __('Parent Entity Type:', 'wordlift'),
40
+			'edit_item'         => __('Edit Entity Type', 'wordlift'),
41
+			'update_item'       => __('Update Entity Type', 'wordlift'),
42
+			'add_new_item'      => __('Add New Entity Type', 'wordlift'),
43
+			'new_item_name'     => __('New Entity Type', 'wordlift'),
44
+			'menu_name'         => __('Entity Types', 'wordlift'),
45 45
 		);
46 46
 
47 47
 		// Take away GUI for taxonomy editing.
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 			'labels'             => $labels,
61 61
 			'capabilities'       => $capabilities,
62 62
 			'hierarchical'       => true,
63
-			'show_admin_column'  => apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ),
64
-			'show_in_rest'       => apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ),
63
+			'show_admin_column'  => apply_filters('wl_feature__enable__entity-types-taxonomy', true),
64
+			'show_in_rest'       => apply_filters('wl_feature__enable__entity-types-taxonomy', true),
65 65
 			'show_in_quick_edit' => false,
66 66
 			'publicly_queryable' => false
67 67
 		);
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
73 73
 		 * @since 3.20.0
74 74
 		 */
75
-		if ( WL_ALL_ENTITY_TYPES ) {
76
-			$args['meta_box_cb'] = apply_filters( 'wl_feature__enable__entity-types-taxonomy', true ) ? array(
75
+		if (WL_ALL_ENTITY_TYPES) {
76
+			$args['meta_box_cb'] = apply_filters('wl_feature__enable__entity-types-taxonomy', true) ? array(
77 77
 				'Wordlift_Admin_Schemaorg_Taxonomy_Metabox',
78 78
 				'render'
79 79
 			) : false;
@@ -88,27 +88,27 @@  discard block
 block discarded – undo
88 88
 		/**
89 89
 		 * Register meta wl_entities_gutenberg for use in Gutenberg
90 90
 		 */
91
-		register_meta( 'post', 'wl_entities_gutenberg', array(
91
+		register_meta('post', 'wl_entities_gutenberg', array(
92 92
 			'show_in_rest' => true,
93 93
 			'single'       => true,
94 94
 			'type'         => 'string',
95
-		) );
95
+		));
96 96
 
97 97
 		/**
98 98
 		 * Register meta _wl_alt_label for use in Gutenberg
99 99
 		 */
100
-		register_meta( 'post', Wordlift_Entity_Service::ALTERNATIVE_LABEL_META_KEY, array(
100
+		register_meta('post', Wordlift_Entity_Service::ALTERNATIVE_LABEL_META_KEY, array(
101 101
 			'object_subtype' => '',
102 102
 			'show_in_rest'   => true,
103 103
 			'single'         => false,
104 104
 			'type'           => 'string',
105
-			'auth_callback'  => function () {
106
-				return current_user_can( 'edit_posts' );
105
+			'auth_callback'  => function() {
106
+				return current_user_can('edit_posts');
107 107
 			}
108
-		) );
108
+		));
109 109
 
110 110
 		// Add filter to change the metabox CSS class.
111
-		add_filter( 'postbox_classes_entity_wl_entity_typediv', 'wl_admin_metaboxes_add_css_class' );
111
+		add_filter('postbox_classes_entity_wl_entity_typediv', 'wl_admin_metaboxes_add_css_class');
112 112
 
113 113
 		// Add a filter to preset the object term if none is set.
114 114
 		//
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 		//
117 117
 		// @see https://github.com/insideout10/wordlift-plugin/issues/995
118 118
 		// @since 3.23.6
119
-		add_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10, 4 );
119
+		add_filter('get_object_terms', array($this, 'get_object_terms'), 10, 4);
120 120
 
121 121
 		/**
122 122
 		 * Exclude sitemap creation for wl_entity_type taxonomy in Yoast
123 123
 		 * @since 3.30.1
124 124
 		 */
125
-		add_filter( 'wpseo_sitemap_exclude_taxonomy', array( $this, 'wpseo_sitemap_exclude_taxonomy' ), 10, 2 );
125
+		add_filter('wpseo_sitemap_exclude_taxonomy', array($this, 'wpseo_sitemap_exclude_taxonomy'), 10, 2);
126 126
 
127 127
 	}
128 128
 
@@ -141,53 +141,53 @@  discard block
 block discarded – undo
141 141
 	 * @return array|WP_Error
142 142
 	 * @since 3.23.6
143 143
 	 */
144
-	public function get_object_terms( $terms, $object_ids, $taxonomies, $args ) {
144
+	public function get_object_terms($terms, $object_ids, $taxonomies, $args) {
145 145
 		// Get our entity type.
146 146
 		$entity_type = self::TAXONOMY_NAME;
147 147
 
148 148
 		// Check if this is a query for our entity type, that no terms have been found and that we have an article
149 149
 		// term to preset in case.
150
-		if ( ! taxonomy_exists( $entity_type )
151
-		     || array( $entity_type ) !== (array) $taxonomies
152
-		     || ! empty( $terms )
153
-		     || ! term_exists( 'article', $entity_type )
154
-		     || ! term_exists( 'thing', $entity_type ) ) {
150
+		if ( ! taxonomy_exists($entity_type)
151
+		     || array($entity_type) !== (array) $taxonomies
152
+		     || ! empty($terms)
153
+		     || ! term_exists('article', $entity_type)
154
+		     || ! term_exists('thing', $entity_type)) {
155 155
 
156 156
 			// Return the input value.
157 157
 			return $terms;
158 158
 		}
159 159
 
160 160
 		// Avoid nested calls in case of issues.
161
-		remove_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10 );
161
+		remove_filter('get_object_terms', array($this, 'get_object_terms'), 10);
162 162
 
163 163
 		// Set the default term for all the queried object.
164
-		foreach ( (array) $object_ids as $object_id ) {
165
-			$post_type = get_post_type( $object_id );
166
-			if ( Wordlift_Entity_Type_Service::is_valid_entity_post_type( $post_type ) ) {
164
+		foreach ((array) $object_ids as $object_id) {
165
+			$post_type = get_post_type($object_id);
166
+			if (Wordlift_Entity_Type_Service::is_valid_entity_post_type($post_type)) {
167 167
 				// Set the term to article for posts and pages, or to thing for everything else.
168
-				$uris = Wordlift_Entity_Type_Adapter::get_entity_types( $post_type );
169
-				foreach ( $uris as $uri ) {
168
+				$uris = Wordlift_Entity_Type_Adapter::get_entity_types($post_type);
169
+				foreach ($uris as $uri) {
170 170
 					// set the uri based on post type.
171
-					if ( $uri === 'http://schema.org/Article' || $uri === 'http://schema.org/Thing' ) {
171
+					if ($uri === 'http://schema.org/Article' || $uri === 'http://schema.org/Thing') {
172 172
 						$uri = Wordlift_Entity_Service::TYPE_NAME === $post_type ?
173 173
 							'http://schema.org/Thing' : 'http://schema.org/Article';
174 174
 					}
175
-					Wordlift_Entity_Type_Service::get_instance()->set( $object_id, $uri );
175
+					Wordlift_Entity_Type_Service::get_instance()->set($object_id, $uri);
176 176
 				}
177 177
 			}
178 178
 		}
179 179
 
180 180
 		// Finally return the object terms.
181
-		$terms = wp_get_object_terms( $object_ids, $taxonomies, $args );
181
+		$terms = wp_get_object_terms($object_ids, $taxonomies, $args);
182 182
 
183 183
 		// Re-enable nested calls in case of issues.
184
-		add_filter( 'get_object_terms', array( $this, 'get_object_terms' ), 10, 4 );
184
+		add_filter('get_object_terms', array($this, 'get_object_terms'), 10, 4);
185 185
 
186 186
 		return $terms;
187 187
 	}
188 188
 
189
-	public function wpseo_sitemap_exclude_taxonomy( $exclude, $tax ) {
190
-		if ( $tax === self::TAXONOMY_NAME ) {
189
+	public function wpseo_sitemap_exclude_taxonomy($exclude, $tax) {
190
+		if ($tax === self::TAXONOMY_NAME) {
191 191
 			return true;
192 192
 		}
193 193
 
Please login to merge, or discard this patch.