Completed
Push — master ( fc13e4...7318f9 )
by David
05:04
created
src/includes/class-wordlift-content-filter-service.php 2 patches
Indentation   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -18,166 +18,166 @@
 block discarded – undo
18 18
  */
19 19
 class Wordlift_Content_Filter_Service {
20 20
 
21
-	/**
22
-	 * The pattern to find entities in text.
23
-	 *
24
-	 * @since 3.8.0
25
-	 */
26
-	const PATTERN = '/<(\\w+)[^<]*class="([^"]*)"\\sitemid=\"([^"]+)\"[^>]*>([^<]*)<\\/\\1>/i';
27
-
28
-	/**
29
-	 * A {@link Wordlift_Entity_Service} instance.
30
-	 *
31
-	 * @since  3.8.0
32
-	 * @access private
33
-	 * @var \Wordlift_Entity_Service $entity_service A {@link Wordlift_Entity_Service} instance.
34
-	 */
35
-	private $entity_service;
36
-
37
-	/**
38
-	 * The {@link Wordlift_Configuration_Service} instance.
39
-	 *
40
-	 * @since  3.13.0
41
-	 * @access private
42
-	 * @var \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
43
-	 */
44
-	private $configuration_service;
45
-
46
-	/**
47
-	 * The `link by default` setting.
48
-	 *
49
-	 * @since  3.13.0
50
-	 * @access private
51
-	 * @var bool True if link by default is enabled otherwise false.
52
-	 */
53
-	private $is_link_by_default;
54
-
55
-	/**
56
-	 * The {@link Wordlift_Content_Filter_Service} singleton instance.
57
-	 *
58
-	 * @since  3.14.2
59
-	 * @access private
60
-	 * @var \Wordlift_Content_Filter_Service $instance The {@link Wordlift_Content_Filter_Service} singleton instance.
61
-	 */
62
-	private static $instance;
63
-
64
-	/**
65
-	 * Create a {@link Wordlift_Content_Filter_Service} instance.
66
-	 *
67
-	 * @since 3.8.0
68
-	 *
69
-	 * @param \Wordlift_Entity_Service        $entity_service        The {@link Wordlift_Entity_Service} instance.
70
-	 * @param \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
71
-	 */
72
-	public function __construct( $entity_service, $configuration_service ) {
73
-
74
-		$this->entity_service        = $entity_service;
75
-		$this->configuration_service = $configuration_service;
76
-
77
-		self::$instance = $this;
78
-
79
-	}
80
-
81
-	/**
82
-	 * Get the {@link Wordlift_Content_Filter_Service} singleton instance.
83
-	 *
84
-	 * @since 3.14.2
85
-	 * @return \Wordlift_Content_Filter_Service The {@link Wordlift_Content_Filter_Service} singleton instance.
86
-	 */
87
-	public static function get_instance() {
88
-
89
-		return self::$instance;
90
-	}
91
-
92
-	/**
93
-	 * Mangle the content by adding links to the entity pages. This function is
94
-	 * hooked to the 'the_content' WP's filter.
95
-	 *
96
-	 * @since 3.8.0
97
-	 *
98
-	 * @param string $content The content being filtered.
99
-	 *
100
-	 * @return string The filtered content.
101
-	 */
102
-	public function the_content( $content ) {
103
-
104
-		// Links should be added only on the front end and not for RSS.
105
-		if ( is_feed() ) {
106
-			return $content;
107
-		}
108
-
109
-		// Preload the `link by default` setting.
110
-		$this->is_link_by_default = $this->configuration_service->is_link_by_default();
111
-
112
-		// Replace each match of the entity tag with the entity link. If an error
113
-		// occurs fail silently returning the original content.
114
-		return preg_replace_callback( self::PATTERN, array(
115
-			$this,
116
-			'link',
117
-		), $content ) ?: $content;
118
-	}
119
-
120
-	/**
121
-	 * Get the entity match and replace it with a page link.
122
-	 *
123
-	 * @since 3.8.0
124
-	 *
125
-	 * @param array $matches An array of matches.
126
-	 *
127
-	 * @return string The replaced text with the link to the entity page.
128
-	 */
129
-	private function link( $matches ) {
130
-
131
-		// Get the entity itemid URI and label.
132
-		$css_class = $matches[2];
133
-		$uri       = $matches[3];
134
-		$label     = $matches[4];
135
-
136
-		// Get the entity post by URI.
137
-		if ( null === ( $post = $this->entity_service->get_entity_post_by_uri( $uri ) ) ) {
138
-
139
-			// If the entity post is not found return the label w/o the markup
140
-			// around it.
141
-			//
142
-			// See https://github.com/insideout10/wordlift-plugin/issues/461
143
-			return $label;
144
-		}
145
-
146
-		$no_link = - 1 < strpos( $css_class, 'wl-no-link' );
147
-		$link    = - 1 < strpos( $css_class, 'wl-link' );
148
-
149
-		// Don't link if links are disabled and the entity is not link or the
150
-		// entity is do not link.
151
-		$dont_link = ( ! $this->is_link_by_default && ! $link ) || $no_link;
152
-
153
-		// Return the label if it's don't link.
154
-		if ( $dont_link ) {
155
-			return $label;
156
-		}
157
-
158
-		// Get the link.
159
-		$href = get_permalink( $post );
160
-
161
-		// Return the link.
162
-		return "<a class='wl-entity-page-link' href='$href'>$label</a>";
163
-	}
164
-
165
-	/**
166
-	 * Get the entity URIs (configured in the `itemid` attribute) contained in
167
-	 * the provided content.
168
-	 *
169
-	 * @since 3.14.2
170
-	 *
171
-	 * @param string $content The content.
172
-	 *
173
-	 * @return array An array of URIs.
174
-	 */
175
-	public function get_entity_uris( $content ) {
176
-
177
-		$matches = array();
178
-		preg_match_all( Wordlift_Content_Filter_Service::PATTERN, $content, $matches );
179
-
180
-		return array_unique( $matches[3] );
181
-	}
21
+    /**
22
+     * The pattern to find entities in text.
23
+     *
24
+     * @since 3.8.0
25
+     */
26
+    const PATTERN = '/<(\\w+)[^<]*class="([^"]*)"\\sitemid=\"([^"]+)\"[^>]*>([^<]*)<\\/\\1>/i';
27
+
28
+    /**
29
+     * A {@link Wordlift_Entity_Service} instance.
30
+     *
31
+     * @since  3.8.0
32
+     * @access private
33
+     * @var \Wordlift_Entity_Service $entity_service A {@link Wordlift_Entity_Service} instance.
34
+     */
35
+    private $entity_service;
36
+
37
+    /**
38
+     * The {@link Wordlift_Configuration_Service} instance.
39
+     *
40
+     * @since  3.13.0
41
+     * @access private
42
+     * @var \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
43
+     */
44
+    private $configuration_service;
45
+
46
+    /**
47
+     * The `link by default` setting.
48
+     *
49
+     * @since  3.13.0
50
+     * @access private
51
+     * @var bool True if link by default is enabled otherwise false.
52
+     */
53
+    private $is_link_by_default;
54
+
55
+    /**
56
+     * The {@link Wordlift_Content_Filter_Service} singleton instance.
57
+     *
58
+     * @since  3.14.2
59
+     * @access private
60
+     * @var \Wordlift_Content_Filter_Service $instance The {@link Wordlift_Content_Filter_Service} singleton instance.
61
+     */
62
+    private static $instance;
63
+
64
+    /**
65
+     * Create a {@link Wordlift_Content_Filter_Service} instance.
66
+     *
67
+     * @since 3.8.0
68
+     *
69
+     * @param \Wordlift_Entity_Service        $entity_service        The {@link Wordlift_Entity_Service} instance.
70
+     * @param \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
71
+     */
72
+    public function __construct( $entity_service, $configuration_service ) {
73
+
74
+        $this->entity_service        = $entity_service;
75
+        $this->configuration_service = $configuration_service;
76
+
77
+        self::$instance = $this;
78
+
79
+    }
80
+
81
+    /**
82
+     * Get the {@link Wordlift_Content_Filter_Service} singleton instance.
83
+     *
84
+     * @since 3.14.2
85
+     * @return \Wordlift_Content_Filter_Service The {@link Wordlift_Content_Filter_Service} singleton instance.
86
+     */
87
+    public static function get_instance() {
88
+
89
+        return self::$instance;
90
+    }
91
+
92
+    /**
93
+     * Mangle the content by adding links to the entity pages. This function is
94
+     * hooked to the 'the_content' WP's filter.
95
+     *
96
+     * @since 3.8.0
97
+     *
98
+     * @param string $content The content being filtered.
99
+     *
100
+     * @return string The filtered content.
101
+     */
102
+    public function the_content( $content ) {
103
+
104
+        // Links should be added only on the front end and not for RSS.
105
+        if ( is_feed() ) {
106
+            return $content;
107
+        }
108
+
109
+        // Preload the `link by default` setting.
110
+        $this->is_link_by_default = $this->configuration_service->is_link_by_default();
111
+
112
+        // Replace each match of the entity tag with the entity link. If an error
113
+        // occurs fail silently returning the original content.
114
+        return preg_replace_callback( self::PATTERN, array(
115
+            $this,
116
+            'link',
117
+        ), $content ) ?: $content;
118
+    }
119
+
120
+    /**
121
+     * Get the entity match and replace it with a page link.
122
+     *
123
+     * @since 3.8.0
124
+     *
125
+     * @param array $matches An array of matches.
126
+     *
127
+     * @return string The replaced text with the link to the entity page.
128
+     */
129
+    private function link( $matches ) {
130
+
131
+        // Get the entity itemid URI and label.
132
+        $css_class = $matches[2];
133
+        $uri       = $matches[3];
134
+        $label     = $matches[4];
135
+
136
+        // Get the entity post by URI.
137
+        if ( null === ( $post = $this->entity_service->get_entity_post_by_uri( $uri ) ) ) {
138
+
139
+            // If the entity post is not found return the label w/o the markup
140
+            // around it.
141
+            //
142
+            // See https://github.com/insideout10/wordlift-plugin/issues/461
143
+            return $label;
144
+        }
145
+
146
+        $no_link = - 1 < strpos( $css_class, 'wl-no-link' );
147
+        $link    = - 1 < strpos( $css_class, 'wl-link' );
148
+
149
+        // Don't link if links are disabled and the entity is not link or the
150
+        // entity is do not link.
151
+        $dont_link = ( ! $this->is_link_by_default && ! $link ) || $no_link;
152
+
153
+        // Return the label if it's don't link.
154
+        if ( $dont_link ) {
155
+            return $label;
156
+        }
157
+
158
+        // Get the link.
159
+        $href = get_permalink( $post );
160
+
161
+        // Return the link.
162
+        return "<a class='wl-entity-page-link' href='$href'>$label</a>";
163
+    }
164
+
165
+    /**
166
+     * Get the entity URIs (configured in the `itemid` attribute) contained in
167
+     * the provided content.
168
+     *
169
+     * @since 3.14.2
170
+     *
171
+     * @param string $content The content.
172
+     *
173
+     * @return array An array of URIs.
174
+     */
175
+    public function get_entity_uris( $content ) {
176
+
177
+        $matches = array();
178
+        preg_match_all( Wordlift_Content_Filter_Service::PATTERN, $content, $matches );
179
+
180
+        return array_unique( $matches[3] );
181
+    }
182 182
 
183 183
 }
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @param \Wordlift_Entity_Service        $entity_service        The {@link Wordlift_Entity_Service} instance.
70 70
 	 * @param \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
71 71
 	 */
72
-	public function __construct( $entity_service, $configuration_service ) {
72
+	public function __construct($entity_service, $configuration_service) {
73 73
 
74 74
 		$this->entity_service        = $entity_service;
75 75
 		$this->configuration_service = $configuration_service;
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
 	 *
100 100
 	 * @return string The filtered content.
101 101
 	 */
102
-	public function the_content( $content ) {
102
+	public function the_content($content) {
103 103
 
104 104
 		// Links should be added only on the front end and not for RSS.
105
-		if ( is_feed() ) {
105
+		if (is_feed()) {
106 106
 			return $content;
107 107
 		}
108 108
 
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
 
112 112
 		// Replace each match of the entity tag with the entity link. If an error
113 113
 		// occurs fail silently returning the original content.
114
-		return preg_replace_callback( self::PATTERN, array(
114
+		return preg_replace_callback(self::PATTERN, array(
115 115
 			$this,
116 116
 			'link',
117
-		), $content ) ?: $content;
117
+		), $content) ?: $content;
118 118
 	}
119 119
 
120 120
 	/**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 *
127 127
 	 * @return string The replaced text with the link to the entity page.
128 128
 	 */
129
-	private function link( $matches ) {
129
+	private function link($matches) {
130 130
 
131 131
 		// Get the entity itemid URI and label.
132 132
 		$css_class = $matches[2];
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 		$label     = $matches[4];
135 135
 
136 136
 		// Get the entity post by URI.
137
-		if ( null === ( $post = $this->entity_service->get_entity_post_by_uri( $uri ) ) ) {
137
+		if (null === ($post = $this->entity_service->get_entity_post_by_uri($uri))) {
138 138
 
139 139
 			// If the entity post is not found return the label w/o the markup
140 140
 			// around it.
@@ -143,20 +143,20 @@  discard block
 block discarded – undo
143 143
 			return $label;
144 144
 		}
145 145
 
146
-		$no_link = - 1 < strpos( $css_class, 'wl-no-link' );
147
-		$link    = - 1 < strpos( $css_class, 'wl-link' );
146
+		$no_link = - 1 < strpos($css_class, 'wl-no-link');
147
+		$link    = - 1 < strpos($css_class, 'wl-link');
148 148
 
149 149
 		// Don't link if links are disabled and the entity is not link or the
150 150
 		// entity is do not link.
151
-		$dont_link = ( ! $this->is_link_by_default && ! $link ) || $no_link;
151
+		$dont_link = ( ! $this->is_link_by_default && ! $link) || $no_link;
152 152
 
153 153
 		// Return the label if it's don't link.
154
-		if ( $dont_link ) {
154
+		if ($dont_link) {
155 155
 			return $label;
156 156
 		}
157 157
 
158 158
 		// Get the link.
159
-		$href = get_permalink( $post );
159
+		$href = get_permalink($post);
160 160
 
161 161
 		// Return the link.
162 162
 		return "<a class='wl-entity-page-link' href='$href'>$label</a>";
@@ -172,12 +172,12 @@  discard block
 block discarded – undo
172 172
 	 *
173 173
 	 * @return array An array of URIs.
174 174
 	 */
175
-	public function get_entity_uris( $content ) {
175
+	public function get_entity_uris($content) {
176 176
 
177 177
 		$matches = array();
178
-		preg_match_all( Wordlift_Content_Filter_Service::PATTERN, $content, $matches );
178
+		preg_match_all(Wordlift_Content_Filter_Service::PATTERN, $content, $matches);
179 179
 
180
-		return array_unique( $matches[3] );
180
+		return array_unique($matches[3]);
181 181
 	}
182 182
 
183 183
 }
Please login to merge, or discard this patch.
src/includes/class-wordlift.php 1 patch
Indentation   +1233 added lines, -1233 removed lines patch added patch discarded remove patch
@@ -29,1313 +29,1313 @@
 block discarded – undo
29 29
  */
30 30
 class Wordlift {
31 31
 
32
-	/**
33
-	 * The loader that's responsible for maintaining and registering all hooks that power
34
-	 * the plugin.
35
-	 *
36
-	 * @since    1.0.0
37
-	 * @access   protected
38
-	 * @var      Wordlift_Loader $loader Maintains and registers all hooks for the plugin.
39
-	 */
40
-	protected $loader;
41
-
42
-	/**
43
-	 * The unique identifier of this plugin.
44
-	 *
45
-	 * @since    1.0.0
46
-	 * @access   protected
47
-	 * @var      string $plugin_name The string used to uniquely identify this plugin.
48
-	 */
49
-	protected $plugin_name;
50
-
51
-	/**
52
-	 * The current version of the plugin.
53
-	 *
54
-	 * @since    1.0.0
55
-	 * @access   protected
56
-	 * @var      string $version The current version of the plugin.
57
-	 */
58
-	protected $version;
59
-
60
-	/**
61
-	 * The {@link Wordlift_Tinymce_Adapter} instance.
62
-	 *
63
-	 * @since  3.12.0
64
-	 * @access protected
65
-	 * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance.
66
-	 */
67
-	protected $tinymce_adapter;
68
-
69
-	/**
70
-	 * The Thumbnail service.
71
-	 *
72
-	 * @since  3.1.5
73
-	 * @access private
74
-	 * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service.
75
-	 */
76
-	private $thumbnail_service;
77
-
78
-	/**
79
-	 * The UI service.
80
-	 *
81
-	 * @since  3.2.0
82
-	 * @access private
83
-	 * @var \Wordlift_UI_Service $ui_service The UI service.
84
-	 */
85
-	private $ui_service;
86
-
87
-	/**
88
-	 * The Schema service.
89
-	 *
90
-	 * @since  3.3.0
91
-	 * @access private
92
-	 * @var \Wordlift_Schema_Service $schema_service The Schema service.
93
-	 */
94
-	private $schema_service;
95
-
96
-	/**
97
-	 * The Entity service.
98
-	 *
99
-	 * @since  3.1.0
100
-	 * @access protected
101
-	 * @var \Wordlift_Entity_Service $entity_service The Entity service.
102
-	 */
103
-	protected $entity_service;
104
-
105
-	/**
106
-	 * The Topic Taxonomy service.
107
-	 *
108
-	 * @since  3.5.0
109
-	 * @access private
110
-	 * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service.
111
-	 */
112
-	private $topic_taxonomy_service;
113
-
114
-	/**
115
-	 * The User service.
116
-	 *
117
-	 * @since  3.1.7
118
-	 * @access protected
119
-	 * @var \Wordlift_User_Service $user_service The User service.
120
-	 */
121
-	protected $user_service;
122
-
123
-	/**
124
-	 * The Timeline service.
125
-	 *
126
-	 * @since  3.1.0
127
-	 * @access private
128
-	 * @var \Wordlift_Timeline_Service $timeline_service The Timeline service.
129
-	 */
130
-	private $timeline_service;
131
-
132
-	/**
133
-	 * The Redirect service.
134
-	 *
135
-	 * @since  3.2.0
136
-	 * @access private
137
-	 * @var \Wordlift_Redirect_Service $redirect_service The Redirect service.
138
-	 */
139
-	private $redirect_service;
140
-
141
-	/**
142
-	 * The Notice service.
143
-	 *
144
-	 * @since  3.3.0
145
-	 * @access private
146
-	 * @var \Wordlift_Notice_Service $notice_service The Notice service.
147
-	 */
148
-	private $notice_service;
149
-
150
-	/**
151
-	 * The Entity list customization.
152
-	 *
153
-	 * @since  3.3.0
154
-	 * @access private
155
-	 * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service.
156
-	 */
157
-	private $entity_list_service;
158
-
159
-	/**
160
-	 * The Entity Types Taxonomy Walker.
161
-	 *
162
-	 * @since  3.1.0
163
-	 * @access private
164
-	 * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker
165
-	 */
166
-	private $entity_types_taxonomy_walker;
167
-
168
-	/**
169
-	 * The ShareThis service.
170
-	 *
171
-	 * @since  3.2.0
172
-	 * @access private
173
-	 * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service.
174
-	 */
175
-	private $sharethis_service;
176
-
177
-	/**
178
-	 * The PrimaShop adapter.
179
-	 *
180
-	 * @since  3.2.3
181
-	 * @access private
182
-	 * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter.
183
-	 */
184
-	private $primashop_adapter;
185
-
186
-	/**
187
-	 * The WordLift Dashboard adapter.
188
-	 *
189
-	 * @since  3.4.0
190
-	 * @access private
191
-	 * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service;
192
-	 */
193
-	private $dashboard_service;
194
-
195
-	/**
196
-	 * The entity type service.
197
-	 *
198
-	 * @since  3.6.0
199
-	 * @access private
200
-	 * @var \Wordlift_Entity_Post_Type_Service
201
-	 */
202
-	private $entity_post_type_service;
203
-
204
-	/**
205
-	 * The entity link service used to mangle links to entities with a custom slug or even w/o a slug.
206
-	 *
207
-	 * @since  3.6.0
208
-	 * @access private
209
-	 * @var \Wordlift_Entity_Link_Service
210
-	 */
211
-	private $entity_link_service;
212
-
213
-	/**
214
-	 * A {@link Wordlift_Sparql_Service} instance.
215
-	 *
216
-	 * @var    3.6.0
217
-	 * @access protected
218
-	 * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance.
219
-	 */
220
-	protected $sparql_service;
221
-
222
-	/**
223
-	 * A {@link Wordlift_Import_Service} instance.
224
-	 *
225
-	 * @since  3.6.0
226
-	 * @access private
227
-	 * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance.
228
-	 */
229
-	private $import_service;
230
-
231
-	/**
232
-	 * A {@link Wordlift_Rebuild_Service} instance.
233
-	 *
234
-	 * @since  3.6.0
235
-	 * @access private
236
-	 * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance.
237
-	 */
238
-	private $rebuild_service;
239
-
240
-	/**
241
-	 * A {@link Wordlift_Jsonld_Service} instance.
242
-	 *
243
-	 * @since  3.7.0
244
-	 * @access protected
245
-	 * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance.
246
-	 */
247
-	protected $jsonld_service;
248
-
249
-	/**
250
-	 * A {@link Wordlift_Website_Jsonld_Converter} instance.
251
-	 *
252
-	 * @since  3.14.0
253
-	 * @access protected
254
-	 * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance.
255
-	 */
256
-	protected $jsonld_website_converter;
257
-
258
-	/**
259
-	 *
260
-	 * @since  3.7.0
261
-	 * @access private
262
-	 * @var \Wordlift_Property_Factory $property_factory
263
-	 */
264
-	private $property_factory;
265
-
266
-	/**
267
-	 * The 'Download Your Data' page.
268
-	 *
269
-	 * @since  3.6.0
270
-	 * @access private
271
-	 * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
272
-	 */
273
-	private $download_your_data_page;
274
-
275
-	/**
276
-	 * The 'WordLift Settings' page.
277
-	 *
278
-	 * @since  3.11.0
279
-	 * @access protected
280
-	 * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
281
-	 */
282
-	protected $settings_page;
283
-
284
-	/**
285
-	 * The 'WordLift Batch analysis' page.
286
-	 *
287
-	 * @since  3.14.0
288
-	 * @access protected
289
-	 * @var \Wordlift_Batch_Analysis_Page $sbatch_analysis_page The 'WordLift batcch analysis' page.
290
-	 */
291
-	protected $batch_analysis_page;
292
-
293
-	/**
294
-	 * The install wizard page.
295
-	 *
296
-	 * @since  3.9.0
297
-	 * @access private
298
-	 * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
299
-	 */
300
-	private $admin_setup;
301
-
302
-	/**
303
-	 * The Content Filter Service hooks up to the 'the_content' filter and provides
304
-	 * linking of entities to their pages.
305
-	 *
306
-	 * @since  3.8.0
307
-	 * @access private
308
-	 * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
309
-	 */
310
-	private $content_filter_service;
311
-
312
-	/**
313
-	 * A {@link Wordlift_Key_Validation_Service} instance.
314
-	 *
315
-	 * @since  3.9.0
316
-	 * @access private
317
-	 * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
318
-	 */
319
-	private $key_validation_service;
320
-
321
-	/**
322
-	 * A {@link Wordlift_Rating_Service} instance.
323
-	 *
324
-	 * @since  3.10.0
325
-	 * @access private
326
-	 * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
327
-	 */
328
-	private $rating_service;
329
-
330
-	/**
331
-	 * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
332
-	 *
333
-	 * @since  3.10.0
334
-	 * @access protected
335
-	 * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
336
-	 */
337
-	protected $post_to_jsonld_converter;
338
-
339
-	/**
340
-	 * A {@link Wordlift_Configuration_Service} instance.
341
-	 *
342
-	 * @since  3.10.0
343
-	 * @access protected
344
-	 * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance.
345
-	 */
346
-	protected $configuration_service;
347
-
348
-	/**
349
-	 * A {@link Wordlift_Entity_Type_Service} instance.
350
-	 *
351
-	 * @since  3.10.0
352
-	 * @access protected
353
-	 * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
354
-	 */
355
-	protected $entity_type_service;
356
-
357
-	/**
358
-	 * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
359
-	 *
360
-	 * @since  3.10.0
361
-	 * @access protected
362
-	 * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
363
-	 */
364
-	protected $entity_post_to_jsonld_converter;
365
-
366
-	/**
367
-	 * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
368
-	 *
369
-	 * @since  3.10.0
370
-	 * @access protected
371
-	 * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
372
-	 */
373
-	protected $postid_to_jsonld_converter;
374
-
375
-	/**
376
-	 * The {@link Wordlift_Admin_Status_Page} class.
377
-	 *
378
-	 * @since  3.9.8
379
-	 * @access private
380
-	 * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class.
381
-	 */
382
-	private $status_page;
383
-
384
-	/**
385
-	 * The {@link Wordlift_Category_Taxonomy_Service} instance.
386
-	 *
387
-	 * @since  3.11.0
388
-	 * @access protected
389
-	 * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
390
-	 */
391
-	protected $category_taxonomy_service;
392
-
393
-	/**
394
-	 * The {@link Wordlift_Event_Entity_Page_Service} instance.
395
-	 *
396
-	 * @since  3.11.0
397
-	 * @access protected
398
-	 * @var \Wordlift_Event_Entity_Page_Service $event_entity_page_service The {@link Wordlift_Event_Entity_Page_Service} instance.
399
-	 */
400
-	protected $event_entity_page_service;
401
-
402
-	/**
403
-	 * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
404
-	 *
405
-	 * @since  3.11.0
406
-	 * @access protected
407
-	 * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
408
-	 */
409
-	protected $settings_page_action_link;
410
-
411
-	/**
412
-	 * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
413
-	 *
414
-	 * @since  3.11.0
415
-	 * @access protected
416
-	 * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
417
-	 */
418
-	protected $publisher_ajax_adapter;
419
-
420
-	/**
421
-	 * The {@link Wordlift_Admin_Input_Element} element renderer.
422
-	 *
423
-	 * @since  3.11.0
424
-	 * @access protected
425
-	 * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
426
-	 */
427
-	protected $input_element;
428
-
429
-	/**
430
-	 * The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
431
-	 *
432
-	 * @since  3.13.0
433
-	 * @access protected
434
-	 * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
435
-	 */
436
-	protected $radio_input_element;
437
-
438
-	/**
439
-	 * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
440
-	 *
441
-	 * @since  3.11.0
442
-	 * @access protected
443
-	 * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
444
-	 */
445
-	protected $language_select_element;
446
-
447
-	/**
448
-	 * The {@link Wordlift_Admin_Publisher_Element} element renderer.
449
-	 *
450
-	 * @since  3.11.0
451
-	 * @access protected
452
-	 * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
453
-	 */
454
-	protected $publisher_element;
455
-
456
-	/**
457
-	 * The {@link Wordlift_Admin_Select2_Element} element renderer.
458
-	 *
459
-	 * @since  3.11.0
460
-	 * @access protected
461
-	 * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
462
-	 */
463
-	protected $select2_element;
464
-
465
-	/**
466
-	 * The controller for the entity type list admin page
467
-	 *
468
-	 * @since  3.11.0
469
-	 * @access private
470
-	 * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
471
-	 */
472
-	private $entity_type_admin_page;
473
-
474
-	/**
475
-	 * The controller for the entity type settings admin page
476
-	 *
477
-	 * @since  3.11.0
478
-	 * @access private
479
-	 * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
480
-	 */
481
-	private $entity_type_settings_admin_page;
482
-
483
-	/**
484
-	 * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
485
-	 *
486
-	 * @since  3.11.0
487
-	 * @access protected
488
-	 * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
489
-	 */
490
-	protected $related_entities_cloud_widget;
491
-
492
-	/**
493
-	 * The {@link Wordlift_Admin_Author_Element} instance.
494
-	 *
495
-	 * @since  3.14.0
496
-	 * @access protected
497
-	 * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance.
498
-	 */
499
-	protected $author_element;
500
-
501
-	/**
502
-	 * The {@link Wordlift_Batch_Analysis_Service} instance.
503
-	 *
504
-	 * @since  3.14.0
505
-	 * @access protected
506
-	 * @var \Wordlift_Batch_Analysis_Service $batch_analysis_service The {@link Wordlift_Batch_Analysis_Service} instance.
507
-	 */
508
-	protected $batch_analysis_service;
509
-
510
-	/**
511
-	 * The {@link Wordlift_Batch_Analysis_Adapter} instance.
512
-	 *
513
-	 * @since  3.14.2
514
-	 * @access protected
515
-	 * @var \Wordlift_Batch_Analysis_Adapter $batch_analysis_adapter The {@link Wordlift_Batch_Analysis_Adapter} instance.
516
-	 */
517
-	private $batch_analysis_adapter;
518
-
519
-	/**
520
-	 * The {@link Wordlift_Relation_Rebuild_Service} instance.
521
-	 *
522
-	 * @since  3.14.3
523
-	 * @access private
524
-	 * @var \Wordlift_Relation_Rebuild_Service $relation_rebuild_service The {@link Wordlift_Relation_Rebuild_Service} instance.
525
-	 */
526
-	private $relation_rebuild_service;
527
-
528
-	/**
529
-	 * The {@link Wordlift_Relation_Rebuild_Adapter} instance.
530
-	 *
531
-	 * @since  3.14.3
532
-	 * @access private
533
-	 * @var \Wordlift_Relation_Rebuild_Adapter $relation_rebuild_adapter The {@link Wordlift_Relation_Rebuild_Adapter} instance.
534
-	 */
535
-	private $relation_rebuild_adapter;
536
-
537
-	/**
538
-	 * {@link Wordlift}'s singleton instance.
539
-	 *
540
-	 * @since  3.11.2
541
-	 *
542
-	 * @since  3.11.2
543
-	 * @access private
544
-	 * @var Wordlift $instance {@link Wordlift}'s singleton instance.
545
-	 */
546
-	private static $instance;
547
-
548
-	/**
549
-	 * Define the core functionality of the plugin.
550
-	 *
551
-	 * Set the plugin name and the plugin version that can be used throughout the plugin.
552
-	 * Load the dependencies, define the locale, and set the hooks for the admin area and
553
-	 * the public-facing side of the site.
554
-	 *
555
-	 * @since    1.0.0
556
-	 */
557
-	public function __construct() {
558
-
559
-		$this->plugin_name = 'wordlift';
560
-		$this->version     = '3.14.6';
561
-		$this->load_dependencies();
562
-		$this->set_locale();
563
-		$this->define_admin_hooks();
564
-		$this->define_public_hooks();
565
-
566
-		self::$instance = $this;
567
-
568
-	}
569
-
570
-	/**
571
-	 * Get the singleton instance.
572
-	 *
573
-	 * @since 3.11.2
574
-	 *
575
-	 * @return Wordlift The {@link Wordlift} singleton instance.
576
-	 */
577
-	public static function get_instance() {
578
-
579
-		return self::$instance;
580
-	}
581
-
582
-	/**
583
-	 * Load the required dependencies for this plugin.
584
-	 *
585
-	 * Include the following files that make up the plugin:
586
-	 *
587
-	 * - Wordlift_Loader. Orchestrates the hooks of the plugin.
588
-	 * - Wordlift_i18n. Defines internationalization functionality.
589
-	 * - Wordlift_Admin. Defines all hooks for the admin area.
590
-	 * - Wordlift_Public. Defines all hooks for the public side of the site.
591
-	 *
592
-	 * Create an instance of the loader which will be used to register the hooks
593
-	 * with WordPress.
594
-	 *
595
-	 * @since    1.0.0
596
-	 * @access   private
597
-	 */
598
-	private function load_dependencies() {
599
-
600
-		/**
601
-		 * The class responsible for orchestrating the actions and filters of the
602
-		 * core plugin.
603
-		 */
604
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
605
-
606
-		/**
607
-		 * The class responsible for defining internationalization functionality
608
-		 * of the plugin.
609
-		 */
610
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
611
-
612
-		/**
613
-		 * WordLift's supported languages.
614
-		 */
615
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
616
-
617
-		/**
618
-		 * Provide support functions to sanitize data.
619
-		 */
620
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
621
-
622
-		/**
623
-		 * The Redirect service.
624
-		 */
625
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
626
-
627
-		/**
628
-		 * The Log service.
629
-		 */
630
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
631
-
632
-		/**
633
-		 * The configuration service.
634
-		 */
635
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
636
-
637
-		/**
638
-		 * The entity post type service (this is the WordPress post type, not the entity schema type).
639
-		 */
640
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
641
-
642
-		/**
643
-		 * The entity type service (i.e. the schema type).
644
-		 */
645
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
646
-
647
-		/**
648
-		 * The entity link service.
649
-		 */
650
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
651
-
652
-		/**
653
-		 * The Query builder.
654
-		 */
655
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
656
-
657
-		/**
658
-		 * The Schema service.
659
-		 */
660
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
661
-
662
-		/**
663
-		 * The schema:url property service.
664
-		 */
665
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
666
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
667
-
668
-		/**
669
-		 * The UI service.
670
-		 */
671
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
672
-
673
-		/**
674
-		 * The Thumbnail service.
675
-		 */
676
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
677
-
678
-		/**
679
-		 * The Entity Types Taxonomy service.
680
-		 */
681
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php';
682
-
683
-		/**
684
-		 * The Entity service.
685
-		 */
686
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
687
-
688
-		// Add the entity rating service.
689
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
690
-
691
-		/**
692
-		 * The User service.
693
-		 */
694
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
695
-
696
-		/**
697
-		 * The Timeline service.
698
-		 */
699
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
700
-
701
-		/**
702
-		 * The Topic Taxonomy service.
703
-		 */
704
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
705
-
706
-		/**
707
-		 * The SPARQL service.
708
-		 */
709
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
710
-
711
-		/**
712
-		 * The WordLift import service.
713
-		 */
714
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
715
-
716
-		/**
717
-		 * The WordLift URI service.
718
-		 */
719
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
720
-
721
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php';
722
-
723
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
724
-
725
-		/**
726
-		 * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
727
-		 */
728
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php';
729
-
730
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
731
-
732
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
733
-
734
-		/**
735
-		 * Load the converters.
736
-		 */
737
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
738
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
739
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
740
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
741
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
742
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
743
-
744
-		/**
745
-		 * Load the content filter.
746
-		 */
747
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
748
-
749
-		/*
32
+    /**
33
+     * The loader that's responsible for maintaining and registering all hooks that power
34
+     * the plugin.
35
+     *
36
+     * @since    1.0.0
37
+     * @access   protected
38
+     * @var      Wordlift_Loader $loader Maintains and registers all hooks for the plugin.
39
+     */
40
+    protected $loader;
41
+
42
+    /**
43
+     * The unique identifier of this plugin.
44
+     *
45
+     * @since    1.0.0
46
+     * @access   protected
47
+     * @var      string $plugin_name The string used to uniquely identify this plugin.
48
+     */
49
+    protected $plugin_name;
50
+
51
+    /**
52
+     * The current version of the plugin.
53
+     *
54
+     * @since    1.0.0
55
+     * @access   protected
56
+     * @var      string $version The current version of the plugin.
57
+     */
58
+    protected $version;
59
+
60
+    /**
61
+     * The {@link Wordlift_Tinymce_Adapter} instance.
62
+     *
63
+     * @since  3.12.0
64
+     * @access protected
65
+     * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance.
66
+     */
67
+    protected $tinymce_adapter;
68
+
69
+    /**
70
+     * The Thumbnail service.
71
+     *
72
+     * @since  3.1.5
73
+     * @access private
74
+     * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service.
75
+     */
76
+    private $thumbnail_service;
77
+
78
+    /**
79
+     * The UI service.
80
+     *
81
+     * @since  3.2.0
82
+     * @access private
83
+     * @var \Wordlift_UI_Service $ui_service The UI service.
84
+     */
85
+    private $ui_service;
86
+
87
+    /**
88
+     * The Schema service.
89
+     *
90
+     * @since  3.3.0
91
+     * @access private
92
+     * @var \Wordlift_Schema_Service $schema_service The Schema service.
93
+     */
94
+    private $schema_service;
95
+
96
+    /**
97
+     * The Entity service.
98
+     *
99
+     * @since  3.1.0
100
+     * @access protected
101
+     * @var \Wordlift_Entity_Service $entity_service The Entity service.
102
+     */
103
+    protected $entity_service;
104
+
105
+    /**
106
+     * The Topic Taxonomy service.
107
+     *
108
+     * @since  3.5.0
109
+     * @access private
110
+     * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service.
111
+     */
112
+    private $topic_taxonomy_service;
113
+
114
+    /**
115
+     * The User service.
116
+     *
117
+     * @since  3.1.7
118
+     * @access protected
119
+     * @var \Wordlift_User_Service $user_service The User service.
120
+     */
121
+    protected $user_service;
122
+
123
+    /**
124
+     * The Timeline service.
125
+     *
126
+     * @since  3.1.0
127
+     * @access private
128
+     * @var \Wordlift_Timeline_Service $timeline_service The Timeline service.
129
+     */
130
+    private $timeline_service;
131
+
132
+    /**
133
+     * The Redirect service.
134
+     *
135
+     * @since  3.2.0
136
+     * @access private
137
+     * @var \Wordlift_Redirect_Service $redirect_service The Redirect service.
138
+     */
139
+    private $redirect_service;
140
+
141
+    /**
142
+     * The Notice service.
143
+     *
144
+     * @since  3.3.0
145
+     * @access private
146
+     * @var \Wordlift_Notice_Service $notice_service The Notice service.
147
+     */
148
+    private $notice_service;
149
+
150
+    /**
151
+     * The Entity list customization.
152
+     *
153
+     * @since  3.3.0
154
+     * @access private
155
+     * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service.
156
+     */
157
+    private $entity_list_service;
158
+
159
+    /**
160
+     * The Entity Types Taxonomy Walker.
161
+     *
162
+     * @since  3.1.0
163
+     * @access private
164
+     * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker
165
+     */
166
+    private $entity_types_taxonomy_walker;
167
+
168
+    /**
169
+     * The ShareThis service.
170
+     *
171
+     * @since  3.2.0
172
+     * @access private
173
+     * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service.
174
+     */
175
+    private $sharethis_service;
176
+
177
+    /**
178
+     * The PrimaShop adapter.
179
+     *
180
+     * @since  3.2.3
181
+     * @access private
182
+     * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter.
183
+     */
184
+    private $primashop_adapter;
185
+
186
+    /**
187
+     * The WordLift Dashboard adapter.
188
+     *
189
+     * @since  3.4.0
190
+     * @access private
191
+     * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service;
192
+     */
193
+    private $dashboard_service;
194
+
195
+    /**
196
+     * The entity type service.
197
+     *
198
+     * @since  3.6.0
199
+     * @access private
200
+     * @var \Wordlift_Entity_Post_Type_Service
201
+     */
202
+    private $entity_post_type_service;
203
+
204
+    /**
205
+     * The entity link service used to mangle links to entities with a custom slug or even w/o a slug.
206
+     *
207
+     * @since  3.6.0
208
+     * @access private
209
+     * @var \Wordlift_Entity_Link_Service
210
+     */
211
+    private $entity_link_service;
212
+
213
+    /**
214
+     * A {@link Wordlift_Sparql_Service} instance.
215
+     *
216
+     * @var    3.6.0
217
+     * @access protected
218
+     * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance.
219
+     */
220
+    protected $sparql_service;
221
+
222
+    /**
223
+     * A {@link Wordlift_Import_Service} instance.
224
+     *
225
+     * @since  3.6.0
226
+     * @access private
227
+     * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance.
228
+     */
229
+    private $import_service;
230
+
231
+    /**
232
+     * A {@link Wordlift_Rebuild_Service} instance.
233
+     *
234
+     * @since  3.6.0
235
+     * @access private
236
+     * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance.
237
+     */
238
+    private $rebuild_service;
239
+
240
+    /**
241
+     * A {@link Wordlift_Jsonld_Service} instance.
242
+     *
243
+     * @since  3.7.0
244
+     * @access protected
245
+     * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance.
246
+     */
247
+    protected $jsonld_service;
248
+
249
+    /**
250
+     * A {@link Wordlift_Website_Jsonld_Converter} instance.
251
+     *
252
+     * @since  3.14.0
253
+     * @access protected
254
+     * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance.
255
+     */
256
+    protected $jsonld_website_converter;
257
+
258
+    /**
259
+     *
260
+     * @since  3.7.0
261
+     * @access private
262
+     * @var \Wordlift_Property_Factory $property_factory
263
+     */
264
+    private $property_factory;
265
+
266
+    /**
267
+     * The 'Download Your Data' page.
268
+     *
269
+     * @since  3.6.0
270
+     * @access private
271
+     * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
272
+     */
273
+    private $download_your_data_page;
274
+
275
+    /**
276
+     * The 'WordLift Settings' page.
277
+     *
278
+     * @since  3.11.0
279
+     * @access protected
280
+     * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
281
+     */
282
+    protected $settings_page;
283
+
284
+    /**
285
+     * The 'WordLift Batch analysis' page.
286
+     *
287
+     * @since  3.14.0
288
+     * @access protected
289
+     * @var \Wordlift_Batch_Analysis_Page $sbatch_analysis_page The 'WordLift batcch analysis' page.
290
+     */
291
+    protected $batch_analysis_page;
292
+
293
+    /**
294
+     * The install wizard page.
295
+     *
296
+     * @since  3.9.0
297
+     * @access private
298
+     * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
299
+     */
300
+    private $admin_setup;
301
+
302
+    /**
303
+     * The Content Filter Service hooks up to the 'the_content' filter and provides
304
+     * linking of entities to their pages.
305
+     *
306
+     * @since  3.8.0
307
+     * @access private
308
+     * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
309
+     */
310
+    private $content_filter_service;
311
+
312
+    /**
313
+     * A {@link Wordlift_Key_Validation_Service} instance.
314
+     *
315
+     * @since  3.9.0
316
+     * @access private
317
+     * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
318
+     */
319
+    private $key_validation_service;
320
+
321
+    /**
322
+     * A {@link Wordlift_Rating_Service} instance.
323
+     *
324
+     * @since  3.10.0
325
+     * @access private
326
+     * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
327
+     */
328
+    private $rating_service;
329
+
330
+    /**
331
+     * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
332
+     *
333
+     * @since  3.10.0
334
+     * @access protected
335
+     * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
336
+     */
337
+    protected $post_to_jsonld_converter;
338
+
339
+    /**
340
+     * A {@link Wordlift_Configuration_Service} instance.
341
+     *
342
+     * @since  3.10.0
343
+     * @access protected
344
+     * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance.
345
+     */
346
+    protected $configuration_service;
347
+
348
+    /**
349
+     * A {@link Wordlift_Entity_Type_Service} instance.
350
+     *
351
+     * @since  3.10.0
352
+     * @access protected
353
+     * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
354
+     */
355
+    protected $entity_type_service;
356
+
357
+    /**
358
+     * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
359
+     *
360
+     * @since  3.10.0
361
+     * @access protected
362
+     * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
363
+     */
364
+    protected $entity_post_to_jsonld_converter;
365
+
366
+    /**
367
+     * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
368
+     *
369
+     * @since  3.10.0
370
+     * @access protected
371
+     * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
372
+     */
373
+    protected $postid_to_jsonld_converter;
374
+
375
+    /**
376
+     * The {@link Wordlift_Admin_Status_Page} class.
377
+     *
378
+     * @since  3.9.8
379
+     * @access private
380
+     * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class.
381
+     */
382
+    private $status_page;
383
+
384
+    /**
385
+     * The {@link Wordlift_Category_Taxonomy_Service} instance.
386
+     *
387
+     * @since  3.11.0
388
+     * @access protected
389
+     * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
390
+     */
391
+    protected $category_taxonomy_service;
392
+
393
+    /**
394
+     * The {@link Wordlift_Event_Entity_Page_Service} instance.
395
+     *
396
+     * @since  3.11.0
397
+     * @access protected
398
+     * @var \Wordlift_Event_Entity_Page_Service $event_entity_page_service The {@link Wordlift_Event_Entity_Page_Service} instance.
399
+     */
400
+    protected $event_entity_page_service;
401
+
402
+    /**
403
+     * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
404
+     *
405
+     * @since  3.11.0
406
+     * @access protected
407
+     * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
408
+     */
409
+    protected $settings_page_action_link;
410
+
411
+    /**
412
+     * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
413
+     *
414
+     * @since  3.11.0
415
+     * @access protected
416
+     * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
417
+     */
418
+    protected $publisher_ajax_adapter;
419
+
420
+    /**
421
+     * The {@link Wordlift_Admin_Input_Element} element renderer.
422
+     *
423
+     * @since  3.11.0
424
+     * @access protected
425
+     * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
426
+     */
427
+    protected $input_element;
428
+
429
+    /**
430
+     * The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
431
+     *
432
+     * @since  3.13.0
433
+     * @access protected
434
+     * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
435
+     */
436
+    protected $radio_input_element;
437
+
438
+    /**
439
+     * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
440
+     *
441
+     * @since  3.11.0
442
+     * @access protected
443
+     * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
444
+     */
445
+    protected $language_select_element;
446
+
447
+    /**
448
+     * The {@link Wordlift_Admin_Publisher_Element} element renderer.
449
+     *
450
+     * @since  3.11.0
451
+     * @access protected
452
+     * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
453
+     */
454
+    protected $publisher_element;
455
+
456
+    /**
457
+     * The {@link Wordlift_Admin_Select2_Element} element renderer.
458
+     *
459
+     * @since  3.11.0
460
+     * @access protected
461
+     * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
462
+     */
463
+    protected $select2_element;
464
+
465
+    /**
466
+     * The controller for the entity type list admin page
467
+     *
468
+     * @since  3.11.0
469
+     * @access private
470
+     * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
471
+     */
472
+    private $entity_type_admin_page;
473
+
474
+    /**
475
+     * The controller for the entity type settings admin page
476
+     *
477
+     * @since  3.11.0
478
+     * @access private
479
+     * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
480
+     */
481
+    private $entity_type_settings_admin_page;
482
+
483
+    /**
484
+     * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
485
+     *
486
+     * @since  3.11.0
487
+     * @access protected
488
+     * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
489
+     */
490
+    protected $related_entities_cloud_widget;
491
+
492
+    /**
493
+     * The {@link Wordlift_Admin_Author_Element} instance.
494
+     *
495
+     * @since  3.14.0
496
+     * @access protected
497
+     * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance.
498
+     */
499
+    protected $author_element;
500
+
501
+    /**
502
+     * The {@link Wordlift_Batch_Analysis_Service} instance.
503
+     *
504
+     * @since  3.14.0
505
+     * @access protected
506
+     * @var \Wordlift_Batch_Analysis_Service $batch_analysis_service The {@link Wordlift_Batch_Analysis_Service} instance.
507
+     */
508
+    protected $batch_analysis_service;
509
+
510
+    /**
511
+     * The {@link Wordlift_Batch_Analysis_Adapter} instance.
512
+     *
513
+     * @since  3.14.2
514
+     * @access protected
515
+     * @var \Wordlift_Batch_Analysis_Adapter $batch_analysis_adapter The {@link Wordlift_Batch_Analysis_Adapter} instance.
516
+     */
517
+    private $batch_analysis_adapter;
518
+
519
+    /**
520
+     * The {@link Wordlift_Relation_Rebuild_Service} instance.
521
+     *
522
+     * @since  3.14.3
523
+     * @access private
524
+     * @var \Wordlift_Relation_Rebuild_Service $relation_rebuild_service The {@link Wordlift_Relation_Rebuild_Service} instance.
525
+     */
526
+    private $relation_rebuild_service;
527
+
528
+    /**
529
+     * The {@link Wordlift_Relation_Rebuild_Adapter} instance.
530
+     *
531
+     * @since  3.14.3
532
+     * @access private
533
+     * @var \Wordlift_Relation_Rebuild_Adapter $relation_rebuild_adapter The {@link Wordlift_Relation_Rebuild_Adapter} instance.
534
+     */
535
+    private $relation_rebuild_adapter;
536
+
537
+    /**
538
+     * {@link Wordlift}'s singleton instance.
539
+     *
540
+     * @since  3.11.2
541
+     *
542
+     * @since  3.11.2
543
+     * @access private
544
+     * @var Wordlift $instance {@link Wordlift}'s singleton instance.
545
+     */
546
+    private static $instance;
547
+
548
+    /**
549
+     * Define the core functionality of the plugin.
550
+     *
551
+     * Set the plugin name and the plugin version that can be used throughout the plugin.
552
+     * Load the dependencies, define the locale, and set the hooks for the admin area and
553
+     * the public-facing side of the site.
554
+     *
555
+     * @since    1.0.0
556
+     */
557
+    public function __construct() {
558
+
559
+        $this->plugin_name = 'wordlift';
560
+        $this->version     = '3.14.6';
561
+        $this->load_dependencies();
562
+        $this->set_locale();
563
+        $this->define_admin_hooks();
564
+        $this->define_public_hooks();
565
+
566
+        self::$instance = $this;
567
+
568
+    }
569
+
570
+    /**
571
+     * Get the singleton instance.
572
+     *
573
+     * @since 3.11.2
574
+     *
575
+     * @return Wordlift The {@link Wordlift} singleton instance.
576
+     */
577
+    public static function get_instance() {
578
+
579
+        return self::$instance;
580
+    }
581
+
582
+    /**
583
+     * Load the required dependencies for this plugin.
584
+     *
585
+     * Include the following files that make up the plugin:
586
+     *
587
+     * - Wordlift_Loader. Orchestrates the hooks of the plugin.
588
+     * - Wordlift_i18n. Defines internationalization functionality.
589
+     * - Wordlift_Admin. Defines all hooks for the admin area.
590
+     * - Wordlift_Public. Defines all hooks for the public side of the site.
591
+     *
592
+     * Create an instance of the loader which will be used to register the hooks
593
+     * with WordPress.
594
+     *
595
+     * @since    1.0.0
596
+     * @access   private
597
+     */
598
+    private function load_dependencies() {
599
+
600
+        /**
601
+         * The class responsible for orchestrating the actions and filters of the
602
+         * core plugin.
603
+         */
604
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
605
+
606
+        /**
607
+         * The class responsible for defining internationalization functionality
608
+         * of the plugin.
609
+         */
610
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
611
+
612
+        /**
613
+         * WordLift's supported languages.
614
+         */
615
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
616
+
617
+        /**
618
+         * Provide support functions to sanitize data.
619
+         */
620
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
621
+
622
+        /**
623
+         * The Redirect service.
624
+         */
625
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
626
+
627
+        /**
628
+         * The Log service.
629
+         */
630
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
631
+
632
+        /**
633
+         * The configuration service.
634
+         */
635
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
636
+
637
+        /**
638
+         * The entity post type service (this is the WordPress post type, not the entity schema type).
639
+         */
640
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
641
+
642
+        /**
643
+         * The entity type service (i.e. the schema type).
644
+         */
645
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
646
+
647
+        /**
648
+         * The entity link service.
649
+         */
650
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
651
+
652
+        /**
653
+         * The Query builder.
654
+         */
655
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
656
+
657
+        /**
658
+         * The Schema service.
659
+         */
660
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
661
+
662
+        /**
663
+         * The schema:url property service.
664
+         */
665
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
666
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
667
+
668
+        /**
669
+         * The UI service.
670
+         */
671
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
672
+
673
+        /**
674
+         * The Thumbnail service.
675
+         */
676
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
677
+
678
+        /**
679
+         * The Entity Types Taxonomy service.
680
+         */
681
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php';
682
+
683
+        /**
684
+         * The Entity service.
685
+         */
686
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
687
+
688
+        // Add the entity rating service.
689
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
690
+
691
+        /**
692
+         * The User service.
693
+         */
694
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
695
+
696
+        /**
697
+         * The Timeline service.
698
+         */
699
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
700
+
701
+        /**
702
+         * The Topic Taxonomy service.
703
+         */
704
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
705
+
706
+        /**
707
+         * The SPARQL service.
708
+         */
709
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
710
+
711
+        /**
712
+         * The WordLift import service.
713
+         */
714
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
715
+
716
+        /**
717
+         * The WordLift URI service.
718
+         */
719
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
720
+
721
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php';
722
+
723
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
724
+
725
+        /**
726
+         * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
727
+         */
728
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php';
729
+
730
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
731
+
732
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
733
+
734
+        /**
735
+         * Load the converters.
736
+         */
737
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
738
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
739
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
740
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
741
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
742
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
743
+
744
+        /**
745
+         * Load the content filter.
746
+         */
747
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
748
+
749
+        /*
750 750
 		 * Load the excerpt helper.
751 751
 		 */
752
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
753
-
754
-		/**
755
-		 * Load the JSON-LD service to publish entities using JSON-LD.s
756
-		 *
757
-		 * @since 3.8.0
758
-		 */
759
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
760
-
761
-		// The Publisher Service and the AJAX adapter.
762
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
763
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
764
-
765
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
766
-
767
-		/**
768
-		 * Load the WordLift key validation service.
769
-		 */
770
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
771
-
772
-		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
773
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
774
-
775
-		// Load the `Wordlift_Event_Entity_Page_Service` class definition.
776
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-event-entity-page-service.php';
777
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-analysis-service.php';
778
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-rebuild-service.php';
779
-
780
-		/** Adapters. */
781
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
782
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
783
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-analysis-adapter.php';
784
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-rebuild-adapter.php';
785
-
786
-		/** Async Tasks. */
787
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/wp-async-task.php';
788
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
789
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-batch-analysis-request-async-task.php';
790
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-batch-analysis-complete-async-task.php';
791
-
792
-		/**
793
-		 * The class responsible for defining all actions that occur in the admin area.
794
-		 */
795
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
796
-
797
-		/**
798
-		 * The class to customize the entity list admin page.
799
-		 */
800
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
801
-
802
-		/**
803
-		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
804
-		 */
805
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
752
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
753
+
754
+        /**
755
+         * Load the JSON-LD service to publish entities using JSON-LD.s
756
+         *
757
+         * @since 3.8.0
758
+         */
759
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
760
+
761
+        // The Publisher Service and the AJAX adapter.
762
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
763
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
764
+
765
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
766
+
767
+        /**
768
+         * Load the WordLift key validation service.
769
+         */
770
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
771
+
772
+        // Load the `Wordlift_Category_Taxonomy_Service` class definition.
773
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
774
+
775
+        // Load the `Wordlift_Event_Entity_Page_Service` class definition.
776
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-event-entity-page-service.php';
777
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-analysis-service.php';
778
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-rebuild-service.php';
779
+
780
+        /** Adapters. */
781
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
782
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
783
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-analysis-adapter.php';
784
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-rebuild-adapter.php';
785
+
786
+        /** Async Tasks. */
787
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/wp-async-task.php';
788
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
789
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-batch-analysis-request-async-task.php';
790
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-batch-analysis-complete-async-task.php';
791
+
792
+        /**
793
+         * The class responsible for defining all actions that occur in the admin area.
794
+         */
795
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
796
+
797
+        /**
798
+         * The class to customize the entity list admin page.
799
+         */
800
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
801
+
802
+        /**
803
+         * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
804
+         */
805
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
806
+
807
+        /**
808
+         * The Notice service.
809
+         */
810
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
811
+
812
+        /**
813
+         * The PrimaShop adapter.
814
+         */
815
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
816
+
817
+        /**
818
+         * The WordLift Dashboard service.
819
+         */
820
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
821
+
822
+        /**
823
+         * The admin 'Install wizard' page.
824
+         */
825
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
826
+
827
+        /**
828
+         * The WordLift entity type list admin page controller.
829
+         */
830
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
831
+
832
+        /**
833
+         * The WordLift entity type settings admin page controller.
834
+         */
835
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
836
+
837
+        /**
838
+         * The admin 'Download Your Data' page.
839
+         */
840
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
841
+
842
+        /**
843
+         * The admin 'Download Your Data' page.
844
+         */
845
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
846
+
847
+        /**
848
+         * The admin 'WordLift Settings' page.
849
+         */
850
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/intf-wordlift-admin-element.php';
851
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-element.php';
852
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-radio-element.php';
853
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-select2-element.php';
854
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-language-select-element.php';
855
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-tabs-element.php';
856
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-author-element.php';
857
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-publisher-element.php';
858
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
859
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
860
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-batch-analysis-page.php';
861
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
862
+
863
+        /** Admin Pages */
864
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
865
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
866
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
867
+
868
+        /**
869
+         * The class responsible for defining all actions that occur in the public-facing
870
+         * side of the site.
871
+         */
872
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
873
+
874
+        /**
875
+         * The shortcode abstract class.
876
+         */
877
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
878
+
879
+        /**
880
+         * The Timeline shortcode.
881
+         */
882
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
883
+
884
+        /**
885
+         * The Navigator shortcode.
886
+         */
887
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
888
+
889
+        /**
890
+         * The chord shortcode.
891
+         */
892
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
893
+
894
+        /**
895
+         * The geomap shortcode.
896
+         */
897
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
898
+
899
+        /**
900
+         * The entity cloud shortcode.
901
+         */
902
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
903
+
904
+        /**
905
+         * The ShareThis service.
906
+         */
907
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
806 908
 
807
-		/**
808
-		 * The Notice service.
809
-		 */
810
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
909
+        /**
910
+         * The SEO service.
911
+         */
912
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
811 913
 
812
-		/**
813
-		 * The PrimaShop adapter.
814
-		 */
815
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
816
-
817
-		/**
818
-		 * The WordLift Dashboard service.
819
-		 */
820
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
821
-
822
-		/**
823
-		 * The admin 'Install wizard' page.
824
-		 */
825
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
826
-
827
-		/**
828
-		 * The WordLift entity type list admin page controller.
829
-		 */
830
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
831
-
832
-		/**
833
-		 * The WordLift entity type settings admin page controller.
834
-		 */
835
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
836
-
837
-		/**
838
-		 * The admin 'Download Your Data' page.
839
-		 */
840
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
841
-
842
-		/**
843
-		 * The admin 'Download Your Data' page.
844
-		 */
845
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
846
-
847
-		/**
848
-		 * The admin 'WordLift Settings' page.
849
-		 */
850
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/intf-wordlift-admin-element.php';
851
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-element.php';
852
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-radio-element.php';
853
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-select2-element.php';
854
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-language-select-element.php';
855
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-tabs-element.php';
856
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-author-element.php';
857
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-publisher-element.php';
858
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
859
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
860
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-batch-analysis-page.php';
861
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
862
-
863
-		/** Admin Pages */
864
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
865
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
866
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
867
-
868
-		/**
869
-		 * The class responsible for defining all actions that occur in the public-facing
870
-		 * side of the site.
871
-		 */
872
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
873
-
874
-		/**
875
-		 * The shortcode abstract class.
876
-		 */
877
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
878
-
879
-		/**
880
-		 * The Timeline shortcode.
881
-		 */
882
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
883
-
884
-		/**
885
-		 * The Navigator shortcode.
886
-		 */
887
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
888
-
889
-		/**
890
-		 * The chord shortcode.
891
-		 */
892
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
893
-
894
-		/**
895
-		 * The geomap shortcode.
896
-		 */
897
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
898
-
899
-		/**
900
-		 * The entity cloud shortcode.
901
-		 */
902
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
903
-
904
-		/**
905
-		 * The ShareThis service.
906
-		 */
907
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
908
-
909
-		/**
910
-		 * The SEO service.
911
-		 */
912
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
913
-
914
-		/**
915
-		 * The AMP service.
916
-		 */
917
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
914
+        /**
915
+         * The AMP service.
916
+         */
917
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
918 918
 
919
-		/** Widgets */
920
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
921
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
919
+        /** Widgets */
920
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
921
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
922 922
 
923
-		$this->loader = new Wordlift_Loader();
923
+        $this->loader = new Wordlift_Loader();
924 924
 
925
-		// Instantiate a global logger.
926
-		global $wl_logger;
927
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
925
+        // Instantiate a global logger.
926
+        global $wl_logger;
927
+        $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
928 928
 
929
-		// Create the configuration service.
930
-		$this->configuration_service = new Wordlift_Configuration_Service();
929
+        // Create the configuration service.
930
+        $this->configuration_service = new Wordlift_Configuration_Service();
931 931
 
932
-		// Create an entity type service instance. It'll be later bound to the init action.
933
-		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
932
+        // Create an entity type service instance. It'll be later bound to the init action.
933
+        $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
934 934
 
935
-		// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
936
-		$this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
935
+        // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
936
+        $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
937 937
 
938
-		// Create an instance of the UI service.
939
-		$this->ui_service = new Wordlift_UI_Service();
938
+        // Create an instance of the UI service.
939
+        $this->ui_service = new Wordlift_UI_Service();
940 940
 
941
-		// Create an instance of the Thumbnail service. Later it'll be hooked to post meta events.
942
-		$this->thumbnail_service = new Wordlift_Thumbnail_Service();
941
+        // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events.
942
+        $this->thumbnail_service = new Wordlift_Thumbnail_Service();
943 943
 
944
-		$this->sparql_service = new Wordlift_Sparql_Service();
944
+        $this->sparql_service = new Wordlift_Sparql_Service();
945 945
 
946
-		// Create an instance of the Schema service.
947
-		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
948
-		$this->schema_service        = new Wordlift_Schema_Service();
946
+        // Create an instance of the Schema service.
947
+        $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
948
+        $this->schema_service        = new Wordlift_Schema_Service();
949 949
 
950
-		// Create an instance of the Notice service.
951
-		$this->notice_service = new Wordlift_Notice_Service();
950
+        // Create an instance of the Notice service.
951
+        $this->notice_service = new Wordlift_Notice_Service();
952 952
 
953
-		// Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page.
954
-		$this->entity_service = new Wordlift_Entity_Service( $this->ui_service );
953
+        // Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page.
954
+        $this->entity_service = new Wordlift_Entity_Service( $this->ui_service );
955 955
 
956
-		// Create an instance of the User service.
957
-		$this->user_service = new Wordlift_User_Service();
956
+        // Create an instance of the User service.
957
+        $this->user_service = new Wordlift_User_Service();
958 958
 
959
-		// Create a new instance of the Timeline service and Timeline shortcode.
960
-		$this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service );
959
+        // Create a new instance of the Timeline service and Timeline shortcode.
960
+        $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service );
961 961
 
962
-		// Create a new instance of the Redirect service.
963
-		$this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service );
962
+        // Create a new instance of the Redirect service.
963
+        $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service );
964 964
 
965
-		// Initialize the shortcodes.
966
-		new Wordlift_Navigator_Shortcode();
967
-		new Wordlift_Chord_Shortcode();
968
-		new Wordlift_Geomap_Shortcode();
969
-		new Wordlift_Timeline_Shortcode();
970
-		new Wordlift_Related_Entities_Cloud_Shortcode();
965
+        // Initialize the shortcodes.
966
+        new Wordlift_Navigator_Shortcode();
967
+        new Wordlift_Chord_Shortcode();
968
+        new Wordlift_Geomap_Shortcode();
969
+        new Wordlift_Timeline_Shortcode();
970
+        new Wordlift_Related_Entities_Cloud_Shortcode();
971 971
 
972
-		// Initialize the SEO service.
973
-		new Wordlift_Seo_Service();
972
+        // Initialize the SEO service.
973
+        new Wordlift_Seo_Service();
974 974
 
975
-		// Initialize the AMP service.
976
-		new Wordlift_AMP_Service();
975
+        // Initialize the AMP service.
976
+        new Wordlift_AMP_Service();
977 977
 
978
-		$this->batch_analysis_service = new Wordlift_Batch_Analysis_Service( $this, $this->configuration_service );
978
+        $this->batch_analysis_service = new Wordlift_Batch_Analysis_Service( $this, $this->configuration_service );
979 979
 
980
-		$this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
980
+        $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
981 981
 
982
-		$this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service();
982
+        $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service();
983 983
 
984
-		// Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
985
-		$this->sharethis_service = new Wordlift_ShareThis_Service();
984
+        // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
985
+        $this->sharethis_service = new Wordlift_ShareThis_Service();
986 986
 
987
-		// Create an instance of the PrimaShop adapter.
988
-		$this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
987
+        // Create an instance of the PrimaShop adapter.
988
+        $this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
989 989
 
990
-		// Create an import service instance to hook later to WP's import function.
991
-		$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() );
990
+        // Create an import service instance to hook later to WP's import function.
991
+        $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() );
992 992
 
993
-		$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
993
+        $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
994 994
 
995
-		// Create a Rebuild Service instance, which we'll later bound to an ajax call.
996
-		$this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service );
995
+        // Create a Rebuild Service instance, which we'll later bound to an ajax call.
996
+        $this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service );
997 997
 
998
-		$this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
998
+        $this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
999 999
 
1000
-		// Create the entity rating service.
1001
-		$this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
1000
+        // Create the entity rating service.
1001
+        $this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
1002 1002
 
1003
-		// Create entity list customization (wp-admin/edit.php)
1004
-		$this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
1003
+        // Create entity list customization (wp-admin/edit.php)
1004
+        $this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
1005 1005
 
1006
-		// Create a new instance of the Redirect service.
1007
-		$this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service );
1006
+        // Create a new instance of the Redirect service.
1007
+        $this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service );
1008 1008
 
1009
-		$this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service );
1010
-		$this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1009
+        $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service );
1010
+        $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1011 1011
 
1012
-		$attachment_service = new Wordlift_Attachment_Service();
1012
+        $attachment_service = new Wordlift_Attachment_Service();
1013 1013
 
1014
-		// Instantiate the JSON-LD service.
1015
-		$property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1016
-		$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 );
1017
-		$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, $this->entity_post_to_jsonld_converter );
1018
-		$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 );
1019
-		$this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service, $this->entity_post_to_jsonld_converter );
1020
-		$this->jsonld_service                  = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter, $this->jsonld_website_converter );
1014
+        // Instantiate the JSON-LD service.
1015
+        $property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1016
+        $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 );
1017
+        $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, $this->entity_post_to_jsonld_converter );
1018
+        $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 );
1019
+        $this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service, $this->entity_post_to_jsonld_converter );
1020
+        $this->jsonld_service                  = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter, $this->jsonld_website_converter );
1021 1021
 
1022
-		$this->key_validation_service   = new Wordlift_Key_Validation_Service( $this->configuration_service );
1023
-		$publisher_service              = new Wordlift_Publisher_Service();
1024
-		$this->content_filter_service   = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service );
1025
-		$this->relation_rebuild_service = new Wordlift_Relation_Rebuild_Service( $this->content_filter_service, $this->entity_service );
1022
+        $this->key_validation_service   = new Wordlift_Key_Validation_Service( $this->configuration_service );
1023
+        $publisher_service              = new Wordlift_Publisher_Service();
1024
+        $this->content_filter_service   = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service );
1025
+        $this->relation_rebuild_service = new Wordlift_Relation_Rebuild_Service( $this->content_filter_service, $this->entity_service );
1026 1026
 
1027
-		/** Adapters. */
1028
-		$this->publisher_ajax_adapter   = new Wordlift_Publisher_Ajax_Adapter( $publisher_service );
1029
-		$this->tinymce_adapter          = new Wordlift_Tinymce_Adapter( $this );
1030
-		$this->batch_analysis_adapter   = new Wordlift_Batch_Analysis_Adapter( $this->batch_analysis_service );
1031
-		$this->relation_rebuild_adapter = new Wordlift_Relation_Rebuild_Adapter( $this->relation_rebuild_service );
1027
+        /** Adapters. */
1028
+        $this->publisher_ajax_adapter   = new Wordlift_Publisher_Ajax_Adapter( $publisher_service );
1029
+        $this->tinymce_adapter          = new Wordlift_Tinymce_Adapter( $this );
1030
+        $this->batch_analysis_adapter   = new Wordlift_Batch_Analysis_Adapter( $this->batch_analysis_service );
1031
+        $this->relation_rebuild_adapter = new Wordlift_Relation_Rebuild_Adapter( $this->relation_rebuild_service );
1032 1032
 
1033
-		/** Async Tasks. */
1034
-		new Wordlift_Sparql_Query_Async_Task();
1035
-		new Wordlift_Batch_Analysis_Request_Async_Task();
1036
-		new Wordlift_Batch_Analysis_Complete_Async_Task();
1033
+        /** Async Tasks. */
1034
+        new Wordlift_Sparql_Query_Async_Task();
1035
+        new Wordlift_Batch_Analysis_Request_Async_Task();
1036
+        new Wordlift_Batch_Analysis_Complete_Async_Task();
1037 1037
 
1038
-		/** WordPress Admin UI. */
1038
+        /** WordPress Admin UI. */
1039 1039
 
1040
-		// UI elements.
1041
-		$this->input_element           = new Wordlift_Admin_Input_Element();
1042
-		$this->radio_input_element     = new Wordlift_Admin_Radio_Input_Element();
1043
-		$this->select2_element         = new Wordlift_Admin_Select2_Element();
1044
-		$this->language_select_element = new Wordlift_Admin_Language_Select_Element();
1045
-		$tabs_element                  = new Wordlift_Admin_Tabs_Element();
1046
-		$this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $publisher_service, $tabs_element, $this->select2_element );
1047
-		$this->author_element          = new Wordlift_Admin_Author_Element( $publisher_service, $this->select2_element );
1040
+        // UI elements.
1041
+        $this->input_element           = new Wordlift_Admin_Input_Element();
1042
+        $this->radio_input_element     = new Wordlift_Admin_Radio_Input_Element();
1043
+        $this->select2_element         = new Wordlift_Admin_Select2_Element();
1044
+        $this->language_select_element = new Wordlift_Admin_Language_Select_Element();
1045
+        $tabs_element                  = new Wordlift_Admin_Tabs_Element();
1046
+        $this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $publisher_service, $tabs_element, $this->select2_element );
1047
+        $this->author_element          = new Wordlift_Admin_Author_Element( $publisher_service, $this->select2_element );
1048 1048
 
1049
-		$this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1050
-		$this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element, $this->radio_input_element );
1051
-		$this->batch_analysis_page       = new Wordlift_Batch_Analysis_Page( $this->batch_analysis_service );
1052
-		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
1049
+        $this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1050
+        $this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element, $this->radio_input_element );
1051
+        $this->batch_analysis_page       = new Wordlift_Batch_Analysis_Page( $this->batch_analysis_service );
1052
+        $this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
1053 1053
 
1054
-		// Pages.
1055
-		new Wordlift_Admin_Post_Edit_Page( $this );
1054
+        // Pages.
1055
+        new Wordlift_Admin_Post_Edit_Page( $this );
1056 1056
 
1057
-		// create an instance of the entity type list admin page controller.
1058
-		$this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
1057
+        // create an instance of the entity type list admin page controller.
1058
+        $this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
1059 1059
 
1060
-		// create an instance of the entity type etting admin page controller.
1061
-		$this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
1060
+        // create an instance of the entity type etting admin page controller.
1061
+        $this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
1062 1062
 
1063
-		/** Widgets */
1064
-		$this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1063
+        /** Widgets */
1064
+        $this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1065 1065
 
1066
-		//** WordPress Admin */
1067
-		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1068
-		$this->status_page             = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service );
1066
+        //** WordPress Admin */
1067
+        $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1068
+        $this->status_page             = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service );
1069 1069
 
1070
-		// Create an instance of the install wizard.
1071
-		$this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service );
1070
+        // Create an instance of the install wizard.
1071
+        $this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service );
1072 1072
 
1073
-		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
1073
+        $this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
1074 1074
 
1075
-		// User Profile.
1076
-		new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service );
1075
+        // User Profile.
1076
+        new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service );
1077 1077
 
1078
-		$this->event_entity_page_service = new Wordlift_Event_Entity_Page_Service();
1078
+        $this->event_entity_page_service = new Wordlift_Event_Entity_Page_Service();
1079 1079
 
1080
-		// Load the debug service if WP is in debug mode.
1081
-		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1082
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1083
-			new Wordlift_Debug_Service( $this->entity_service, $uri_service );
1084
-		}
1080
+        // Load the debug service if WP is in debug mode.
1081
+        if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1082
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1083
+            new Wordlift_Debug_Service( $this->entity_service, $uri_service );
1084
+        }
1085 1085
 
1086
-	}
1086
+    }
1087 1087
 
1088
-	/**
1089
-	 * Define the locale for this plugin for internationalization.
1090
-	 *
1091
-	 * Uses the Wordlift_i18n class in order to set the domain and to register the hook
1092
-	 * with WordPress.
1093
-	 *
1094
-	 * @since    1.0.0
1095
-	 * @access   private
1096
-	 */
1097
-	private function set_locale() {
1088
+    /**
1089
+     * Define the locale for this plugin for internationalization.
1090
+     *
1091
+     * Uses the Wordlift_i18n class in order to set the domain and to register the hook
1092
+     * with WordPress.
1093
+     *
1094
+     * @since    1.0.0
1095
+     * @access   private
1096
+     */
1097
+    private function set_locale() {
1098 1098
 
1099
-		$plugin_i18n = new Wordlift_i18n();
1100
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
1099
+        $plugin_i18n = new Wordlift_i18n();
1100
+        $plugin_i18n->set_domain( $this->get_plugin_name() );
1101 1101
 
1102
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1103
-
1104
-	}
1102
+        $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1103
+
1104
+    }
1105 1105
 
1106
-	/**
1107
-	 * Register all of the hooks related to the admin area functionality
1108
-	 * of the plugin.
1109
-	 *
1110
-	 * @since    1.0.0
1111
-	 * @access   private
1112
-	 */
1113
-	private function define_admin_hooks() {
1114
-
1115
-		$plugin_admin = new Wordlift_Admin(
1116
-			$this->get_plugin_name(),
1117
-			$this->get_version(),
1118
-			$this->configuration_service,
1119
-			$this->notice_service,
1120
-			$this->user_service
1121
-		);
1122
-
1123
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1124
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
1106
+    /**
1107
+     * Register all of the hooks related to the admin area functionality
1108
+     * of the plugin.
1109
+     *
1110
+     * @since    1.0.0
1111
+     * @access   private
1112
+     */
1113
+    private function define_admin_hooks() {
1114
+
1115
+        $plugin_admin = new Wordlift_Admin(
1116
+            $this->get_plugin_name(),
1117
+            $this->get_version(),
1118
+            $this->configuration_service,
1119
+            $this->notice_service,
1120
+            $this->user_service
1121
+        );
1122
+
1123
+        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1124
+        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
1125 1125
 
1126
-		// Hook the init action to the Topic Taxonomy service.
1127
-		$this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
1128
-
1129
-		// Hook the deleted_post_meta action to the Thumbnail service.
1130
-		$this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
1126
+        // Hook the init action to the Topic Taxonomy service.
1127
+        $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
1128
+
1129
+        // Hook the deleted_post_meta action to the Thumbnail service.
1130
+        $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
1131 1131
 
1132
-		// Hook the added_post_meta action to the Thumbnail service.
1133
-		$this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1132
+        // Hook the added_post_meta action to the Thumbnail service.
1133
+        $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1134 1134
 
1135
-		// Hook the updated_post_meta action to the Thumbnail service.
1136
-		$this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1135
+        // Hook the updated_post_meta action to the Thumbnail service.
1136
+        $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1137 1137
 
1138
-		// Hook posts inserts (or updates) to the user service.
1139
-		$this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 );
1140
-
1141
-		// Hook the AJAX wl_timeline action to the Timeline service.
1142
-		$this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1143
-
1144
-		// Register custom allowed redirect hosts.
1145
-		$this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1146
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1147
-		$this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1148
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1149
-		$this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1150
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1151
-		$this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1152
-
1153
-		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1154
-		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1155
-		$this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1156
-		$this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 );
1157
-
1158
-		$this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1159
-		$this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1160
-
1161
-		// Entity listing customization (wp-admin/edit.php)
1162
-		// Add custom columns
1163
-		$this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1164
-		$this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1165
-		// Add 4W selection
1166
-		$this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1167
-		$this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1168
-
1169
-		$this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1170
-
1171
-		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1172
-		// entities.
1173
-		$this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1174
-
1175
-		// Filter imported post meta.
1176
-		$this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1177
-
1178
-		// Notify the import service when an import starts and ends.
1179
-		$this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1180
-		$this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1181
-
1182
-		// Hook the AJAX wl_rebuild action to the Rebuild Service.
1183
-		$this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1184
-
1185
-		// Hook the menu to the Download Your Data page.
1186
-		$this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 );
1187
-		$this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 );
1188
-		$this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 );
1189
-
1190
-		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1191
-		$this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1192
-
1193
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1194
-		$this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1195
-
1196
-		// Hook the AJAX wl_validate_key action to the Key Validation service.
1197
-		$this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1198
-
1199
-		// Hook the `admin_init` function to the Admin Setup.
1200
-		$this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1201
-
1202
-		// Hook the admin_init to the settings page.
1203
-		$this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1204
-
1205
-		// Hook the menu creation on the general wordlift menu creation
1206
-		$this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 );
1207
-		if ( defined( 'WORDLIFT_BATCH' ) && WORDLIFT_BATCH ) {
1208
-			// Add the functionality only if a flag is set in wp-config.php .
1209
-			$this->loader->add_action( 'wl_admin_menu', $this->batch_analysis_page, 'admin_menu', 10, 2 );
1210
-		}
1211
-
1212
-		// Hook key update.
1213
-		$this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 );
1214
-		$this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1215
-
1216
-		// Add additional action links to the WordLift plugin in the plugins page.
1217
-		$this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1218
-
1219
-		// Hook the AJAX `wl_publisher` action name.
1220
-		$this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1138
+        // Hook posts inserts (or updates) to the user service.
1139
+        $this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 );
1140
+
1141
+        // Hook the AJAX wl_timeline action to the Timeline service.
1142
+        $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1143
+
1144
+        // Register custom allowed redirect hosts.
1145
+        $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1146
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1147
+        $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1148
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1149
+        $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1150
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1151
+        $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1152
+
1153
+        // Hook save_post to the entity service to update custom fields (such as alternate labels).
1154
+        // We have a priority of 9 because we want to be executed before data is sent to Redlink.
1155
+        $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1156
+        $this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 );
1157
+
1158
+        $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1159
+        $this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1160
+
1161
+        // Entity listing customization (wp-admin/edit.php)
1162
+        // Add custom columns
1163
+        $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1164
+        $this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1165
+        // Add 4W selection
1166
+        $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1167
+        $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1168
+
1169
+        $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1170
+
1171
+        // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1172
+        // entities.
1173
+        $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1174
+
1175
+        // Filter imported post meta.
1176
+        $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1177
+
1178
+        // Notify the import service when an import starts and ends.
1179
+        $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1180
+        $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1181
+
1182
+        // Hook the AJAX wl_rebuild action to the Rebuild Service.
1183
+        $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1184
+
1185
+        // Hook the menu to the Download Your Data page.
1186
+        $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 );
1187
+        $this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 );
1188
+        $this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 );
1189
+
1190
+        // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1191
+        $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1192
+
1193
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1194
+        $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1195
+
1196
+        // Hook the AJAX wl_validate_key action to the Key Validation service.
1197
+        $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1198
+
1199
+        // Hook the `admin_init` function to the Admin Setup.
1200
+        $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1201
+
1202
+        // Hook the admin_init to the settings page.
1203
+        $this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1204
+
1205
+        // Hook the menu creation on the general wordlift menu creation
1206
+        $this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 );
1207
+        if ( defined( 'WORDLIFT_BATCH' ) && WORDLIFT_BATCH ) {
1208
+            // Add the functionality only if a flag is set in wp-config.php .
1209
+            $this->loader->add_action( 'wl_admin_menu', $this->batch_analysis_page, 'admin_menu', 10, 2 );
1210
+        }
1211
+
1212
+        // Hook key update.
1213
+        $this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 );
1214
+        $this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1215
+
1216
+        // Add additional action links to the WordLift plugin in the plugins page.
1217
+        $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1218
+
1219
+        // Hook the AJAX `wl_publisher` action name.
1220
+        $this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1221 1221
 
1222
-		// Hook row actions for the entity type list admin.
1223
-		$this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1222
+        // Hook row actions for the entity type list admin.
1223
+        $this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1224 1224
 
1225
-		// Hook capabilities manipulation to allow access to entity type admin
1226
-		// page  on wordpress versions before 4.7.
1227
-		global $wp_version;
1228
-		if ( version_compare( $wp_version, '4.7', '<' ) ) {
1229
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1230
-		}
1231
-
1232
-		$this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1233
-
1234
-		/** Adapters. */
1235
-		$this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1236
-		$this->loader->add_action( 'wp_ajax_wl_batch_analysis_submit_auto_selected_posts', $this->batch_analysis_adapter, 'submit_auto_selected_posts', 10 );
1237
-		$this->loader->add_action( 'wp_ajax_wl_batch_analysis_submit_all_posts', $this->batch_analysis_adapter, 'submit_all_posts', 10 );
1238
-		$this->loader->add_action( 'wp_ajax_wl_batch_analysis_submit', $this->batch_analysis_adapter, 'submit', 10 );
1239
-		$this->loader->add_action( 'wp_ajax_wl_batch_analysis_cancel', $this->batch_analysis_adapter, 'cancel', 10 );
1240
-		$this->loader->add_action( 'wp_ajax_wl_batch_analysis_clear_warning', $this->batch_analysis_adapter, 'clear_warning', 10 );
1241
-		$this->loader->add_action( 'wp_ajax_wl_relation_rebuild_process_all', $this->relation_rebuild_adapter, 'process_all', 10 );
1242
-
1243
-		// Hooks to restrict multisite super admin from manipulating entity types.
1244
-		if ( is_multisite() ) {
1245
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1246
-		}
1247
-	}
1248
-
1249
-	/**
1250
-	 * Register all of the hooks related to the public-facing functionality
1251
-	 * of the plugin.
1252
-	 *
1253
-	 * @since    1.0.0
1254
-	 * @access   private
1255
-	 */
1256
-	private function define_public_hooks() {
1225
+        // Hook capabilities manipulation to allow access to entity type admin
1226
+        // page  on wordpress versions before 4.7.
1227
+        global $wp_version;
1228
+        if ( version_compare( $wp_version, '4.7', '<' ) ) {
1229
+            $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1230
+        }
1231
+
1232
+        $this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1233
+
1234
+        /** Adapters. */
1235
+        $this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1236
+        $this->loader->add_action( 'wp_ajax_wl_batch_analysis_submit_auto_selected_posts', $this->batch_analysis_adapter, 'submit_auto_selected_posts', 10 );
1237
+        $this->loader->add_action( 'wp_ajax_wl_batch_analysis_submit_all_posts', $this->batch_analysis_adapter, 'submit_all_posts', 10 );
1238
+        $this->loader->add_action( 'wp_ajax_wl_batch_analysis_submit', $this->batch_analysis_adapter, 'submit', 10 );
1239
+        $this->loader->add_action( 'wp_ajax_wl_batch_analysis_cancel', $this->batch_analysis_adapter, 'cancel', 10 );
1240
+        $this->loader->add_action( 'wp_ajax_wl_batch_analysis_clear_warning', $this->batch_analysis_adapter, 'clear_warning', 10 );
1241
+        $this->loader->add_action( 'wp_ajax_wl_relation_rebuild_process_all', $this->relation_rebuild_adapter, 'process_all', 10 );
1242
+
1243
+        // Hooks to restrict multisite super admin from manipulating entity types.
1244
+        if ( is_multisite() ) {
1245
+            $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1246
+        }
1247
+    }
1248
+
1249
+    /**
1250
+     * Register all of the hooks related to the public-facing functionality
1251
+     * of the plugin.
1252
+     *
1253
+     * @since    1.0.0
1254
+     * @access   private
1255
+     */
1256
+    private function define_public_hooks() {
1257 1257
 
1258
-		$plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1259
-
1260
-		// Register the entity post type.
1261
-		$this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1262
-
1263
-		// Bind the link generation and handling hooks to the entity link service.
1264
-		$this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1265
-		$this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1266
-		$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 );
1267
-		$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 );
1258
+        $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1259
+
1260
+        // Register the entity post type.
1261
+        $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1262
+
1263
+        // Bind the link generation and handling hooks to the entity link service.
1264
+        $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1265
+        $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1266
+        $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 );
1267
+        $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 );
1268 1268
 
1269
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1270
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1271
-
1272
-		// Hook the content filter service to add entity links.
1273
-		$this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1269
+        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1270
+        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1271
+
1272
+        // Hook the content filter service to add entity links.
1273
+        $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1274 1274
 
1275
-		// Hook the AJAX wl_timeline action to the Timeline service.
1276
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1275
+        // Hook the AJAX wl_timeline action to the Timeline service.
1276
+        $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1277 1277
 
1278
-		// Hook the ShareThis service.
1279
-		$this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1280
-		$this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1278
+        // Hook the ShareThis service.
1279
+        $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1280
+        $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1281 1281
 
1282
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1283
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1282
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1283
+        $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1284 1284
 
1285
-		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1286
-		// in order to tweak WP's `WP_Query` to include entities in queries related
1287
-		// to categories.
1288
-		$this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1285
+        // Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1286
+        // in order to tweak WP's `WP_Query` to include entities in queries related
1287
+        // to categories.
1288
+        $this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1289 1289
 
1290
-		/*
1290
+        /*
1291 1291
 		 * Hook the `pre_get_posts` action to the `Wordlift_Event_Entity_Page_Service`
1292 1292
 		 * in order to tweak WP's `WP_Query` to show event related entities in reverse
1293 1293
 		 * order of start time.
1294 1294
 		 */
1295
-		$this->loader->add_action( 'pre_get_posts', $this->event_entity_page_service, 'pre_get_posts', 10, 1 );
1296
-
1297
-		$this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1298
-
1299
-	}
1300
-
1301
-	/**
1302
-	 * Run the loader to execute all of the hooks with WordPress.
1303
-	 *
1304
-	 * @since    1.0.0
1305
-	 */
1306
-	public function run() {
1307
-		$this->loader->run();
1308
-	}
1309
-
1310
-	/**
1311
-	 * The name of the plugin used to uniquely identify it within the context of
1312
-	 * WordPress and to define internationalization functionality.
1313
-	 *
1314
-	 * @since     1.0.0
1315
-	 * @return    string    The name of the plugin.
1316
-	 */
1317
-	public function get_plugin_name() {
1318
-		return $this->plugin_name;
1319
-	}
1320
-
1321
-	/**
1322
-	 * The reference to the class that orchestrates the hooks with the plugin.
1323
-	 *
1324
-	 * @since     1.0.0
1325
-	 * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1326
-	 */
1327
-	public function get_loader() {
1328
-		return $this->loader;
1329
-	}
1330
-
1331
-	/**
1332
-	 * Retrieve the version number of the plugin.
1333
-	 *
1334
-	 * @since     1.0.0
1335
-	 * @return    string    The version number of the plugin.
1336
-	 */
1337
-	public function get_version() {
1338
-		return $this->version;
1339
-	}
1295
+        $this->loader->add_action( 'pre_get_posts', $this->event_entity_page_service, 'pre_get_posts', 10, 1 );
1296
+
1297
+        $this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1298
+
1299
+    }
1300
+
1301
+    /**
1302
+     * Run the loader to execute all of the hooks with WordPress.
1303
+     *
1304
+     * @since    1.0.0
1305
+     */
1306
+    public function run() {
1307
+        $this->loader->run();
1308
+    }
1309
+
1310
+    /**
1311
+     * The name of the plugin used to uniquely identify it within the context of
1312
+     * WordPress and to define internationalization functionality.
1313
+     *
1314
+     * @since     1.0.0
1315
+     * @return    string    The name of the plugin.
1316
+     */
1317
+    public function get_plugin_name() {
1318
+        return $this->plugin_name;
1319
+    }
1320
+
1321
+    /**
1322
+     * The reference to the class that orchestrates the hooks with the plugin.
1323
+     *
1324
+     * @since     1.0.0
1325
+     * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1326
+     */
1327
+    public function get_loader() {
1328
+        return $this->loader;
1329
+    }
1330
+
1331
+    /**
1332
+     * Retrieve the version number of the plugin.
1333
+     *
1334
+     * @since     1.0.0
1335
+     * @return    string    The version number of the plugin.
1336
+     */
1337
+    public function get_version() {
1338
+        return $this->version;
1339
+    }
1340 1340
 
1341 1341
 }
Please login to merge, or discard this patch.
src/wordlift.php 2 patches
Indentation   +206 added lines, -206 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 // If this file is called directly, abort.
28 28
 if ( ! defined( 'WPINC' ) ) {
29
-	die;
29
+    die;
30 30
 }
31 31
 
32 32
 // Include WordLift constants.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
  */
49 49
 function wl_write_log( $log ) {
50 50
 
51
-	Wordlift_Log_Service::get_instance()->info( $log );
51
+    Wordlift_Log_Service::get_instance()->info( $log );
52 52
 
53 53
 }
54 54
 
@@ -64,20 +64,20 @@  discard block
 block discarded – undo
64 64
  */
65 65
 function wl_write_log_handler( $log, $caller = null ) {
66 66
 
67
-	global $wl_logger;
67
+    global $wl_logger;
68 68
 
69
-	if ( true === WP_DEBUG ) {
69
+    if ( true === WP_DEBUG ) {
70 70
 
71
-		$message = ( isset( $caller ) ? sprintf( '[%-40.40s] ', $caller ) : '' ) .
72
-		           ( is_array( $log ) || is_object( $log ) ? print_r( $log, true ) : wl_write_log_hide_key( $log ) );
71
+        $message = ( isset( $caller ) ? sprintf( '[%-40.40s] ', $caller ) : '' ) .
72
+                    ( is_array( $log ) || is_object( $log ) ? print_r( $log, true ) : wl_write_log_hide_key( $log ) );
73 73
 
74
-		if ( isset( $wl_logger ) ) {
75
-			$wl_logger->info( $message );
76
-		} else {
77
-			error_log( $message );
78
-		}
74
+        if ( isset( $wl_logger ) ) {
75
+            $wl_logger->info( $message );
76
+        } else {
77
+            error_log( $message );
78
+        }
79 79
 
80
-	}
80
+    }
81 81
 
82 82
 }
83 83
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
  */
95 95
 function wl_write_log_hide_key( $text ) {
96 96
 
97
-	return str_ireplace( wl_configuration_get_key(), '<hidden>', $text );
97
+    return str_ireplace( wl_configuration_get_key(), '<hidden>', $text );
98 98
 }
99 99
 
100 100
 ///**
@@ -137,21 +137,21 @@  discard block
 block discarded – undo
137 137
  * see http://vip.wordpress.com/documentation/register-additional-html-attributes-for-tinymce-and-wp-kses/
138 138
  */
139 139
 function wordlift_allowed_post_tags() {
140
-	global $allowedposttags;
141
-
142
-	$tags           = array( 'span' );
143
-	$new_attributes = array(
144
-		'itemscope' => array(),
145
-		'itemtype'  => array(),
146
-		'itemprop'  => array(),
147
-		'itemid'    => array(),
148
-	);
149
-
150
-	foreach ( $tags as $tag ) {
151
-		if ( isset( $allowedposttags[ $tag ] ) && is_array( $allowedposttags[ $tag ] ) ) {
152
-			$allowedposttags[ $tag ] = array_merge( $allowedposttags[ $tag ], $new_attributes );
153
-		}
154
-	}
140
+    global $allowedposttags;
141
+
142
+    $tags           = array( 'span' );
143
+    $new_attributes = array(
144
+        'itemscope' => array(),
145
+        'itemtype'  => array(),
146
+        'itemprop'  => array(),
147
+        'itemid'    => array(),
148
+    );
149
+
150
+    foreach ( $tags as $tag ) {
151
+        if ( isset( $allowedposttags[ $tag ] ) && is_array( $allowedposttags[ $tag ] ) ) {
152
+            $allowedposttags[ $tag ] = array_merge( $allowedposttags[ $tag ], $new_attributes );
153
+        }
154
+    }
155 155
 }
156 156
 
157 157
 // init process for button control
@@ -166,28 +166,28 @@  discard block
 block discarded – undo
166 166
  */
167 167
 function wordlift_admin_enqueue_scripts() {
168 168
 
169
-	// Added for compatibility with WordPress 3.9 (see http://make.wordpress.org/core/2014/04/16/jquery-ui-and-wpdialogs-in-wordpress-3-9/)
170
-	wp_enqueue_script( 'wpdialogs' );
171
-	wp_enqueue_style( 'wp-jquery-ui-dialog' );
169
+    // Added for compatibility with WordPress 3.9 (see http://make.wordpress.org/core/2014/04/16/jquery-ui-and-wpdialogs-in-wordpress-3-9/)
170
+    wp_enqueue_script( 'wpdialogs' );
171
+    wp_enqueue_style( 'wp-jquery-ui-dialog' );
172 172
 
173
-	wp_enqueue_style( 'wordlift-reloaded', plugin_dir_url( __FILE__ ) . 'css/wordlift-reloaded.min.css' );
173
+    wp_enqueue_style( 'wordlift-reloaded', plugin_dir_url( __FILE__ ) . 'css/wordlift-reloaded.min.css' );
174 174
 
175
-	wp_enqueue_script( 'jquery-ui-autocomplete' );
176
-	wp_enqueue_script( 'angularjs', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular.min.js' );
177
-	wp_enqueue_script( 'angularjs-geolocation', plugin_dir_url( __FILE__ ) . 'bower_components/angularjs-geolocation/dist/angularjs-geolocation.min.js' );
178
-	wp_enqueue_script( 'angularjs-touch', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-touch.min.js' );
179
-	wp_enqueue_script( 'angularjs-animate', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-animate.min.js' );
175
+    wp_enqueue_script( 'jquery-ui-autocomplete' );
176
+    wp_enqueue_script( 'angularjs', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular.min.js' );
177
+    wp_enqueue_script( 'angularjs-geolocation', plugin_dir_url( __FILE__ ) . 'bower_components/angularjs-geolocation/dist/angularjs-geolocation.min.js' );
178
+    wp_enqueue_script( 'angularjs-touch', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-touch.min.js' );
179
+    wp_enqueue_script( 'angularjs-animate', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-animate.min.js' );
180 180
 
181
-	// Disable auto-save for custom entity posts only
182
-	if ( Wordlift_Entity_Service::TYPE_NAME === get_post_type() ) {
183
-		wp_dequeue_script( 'autosave' );
184
-	}
181
+    // Disable auto-save for custom entity posts only
182
+    if ( Wordlift_Entity_Service::TYPE_NAME === get_post_type() ) {
183
+        wp_dequeue_script( 'autosave' );
184
+    }
185 185
 }
186 186
 
187 187
 add_action( 'admin_enqueue_scripts', 'wordlift_admin_enqueue_scripts' );
188 188
 
189 189
 function wl_enqueue_scripts() {
190
-	wp_enqueue_style( 'wordlift-ui', plugin_dir_url( __FILE__ ) . 'css/wordlift-ui.min.css' );
190
+    wp_enqueue_style( 'wordlift-ui', plugin_dir_url( __FILE__ ) . 'css/wordlift-ui.min.css' );
191 191
 }
192 192
 
193 193
 add_action( 'wp_enqueue_scripts', 'wl_enqueue_scripts' );
@@ -202,18 +202,18 @@  discard block
 block discarded – undo
202 202
  */
203 203
 function wordlift_allowed_html( $allowedtags, $context ) {
204 204
 
205
-	if ( 'post' !== $context ) {
206
-		return $allowedtags;
207
-	}
208
-
209
-	return array_merge_recursive( $allowedtags, array(
210
-		'span' => array(
211
-			'itemscope' => true,
212
-			'itemtype'  => true,
213
-			'itemid'    => true,
214
-			'itemprop'  => true,
215
-		),
216
-	) );
205
+    if ( 'post' !== $context ) {
206
+        return $allowedtags;
207
+    }
208
+
209
+    return array_merge_recursive( $allowedtags, array(
210
+        'span' => array(
211
+            'itemscope' => true,
212
+            'itemtype'  => true,
213
+            'itemid'    => true,
214
+            'itemprop'  => true,
215
+        ),
216
+    ) );
217 217
 }
218 218
 
219 219
 add_filter( 'wp_kses_allowed_html', 'wordlift_allowed_html', 10, 2 );
@@ -227,16 +227,16 @@  discard block
 block discarded – undo
227 227
  */
228 228
 function wl_get_coordinates( $post_id ) {
229 229
 
230
-	$latitude  = wl_schema_get_value( $post_id, 'latitude' );
231
-	$longitude = wl_schema_get_value( $post_id, 'longitude' );
230
+    $latitude  = wl_schema_get_value( $post_id, 'latitude' );
231
+    $longitude = wl_schema_get_value( $post_id, 'longitude' );
232 232
 
233
-	// DO NOT set latitude/longitude to 0/0 as default values. It's a specific
234
-	// place on the globe:"The zero/zero point of this system is located in the
235
-	// Gulf of Guinea about 625 km (390 mi) south of Tema, Ghana."
236
-	return array(
237
-		'latitude'  => isset( $latitude[0] ) && is_numeric( $latitude[0] ) ? $latitude[0] : '',
238
-		'longitude' => isset( $longitude[0] ) && is_numeric( $longitude[0] ) ? $longitude[0] : '',
239
-	);
233
+    // DO NOT set latitude/longitude to 0/0 as default values. It's a specific
234
+    // place on the globe:"The zero/zero point of this system is located in the
235
+    // Gulf of Guinea about 625 km (390 mi) south of Tema, Ghana."
236
+    return array(
237
+        'latitude'  => isset( $latitude[0] ) && is_numeric( $latitude[0] ) ? $latitude[0] : '',
238
+        'longitude' => isset( $longitude[0] ) && is_numeric( $longitude[0] ) ? $longitude[0] : '',
239
+    );
240 240
 }
241 241
 
242 242
 /**
@@ -248,13 +248,13 @@  discard block
 block discarded – undo
248 248
  */
249 249
 function wl_get_post_modified_time( $post ) {
250 250
 
251
-	$date_modified = get_post_modified_time( 'c', true, $post );
251
+    $date_modified = get_post_modified_time( 'c', true, $post );
252 252
 
253
-	if ( '-' === substr( $date_modified, 0, 1 ) ) {
254
-		return get_the_time( 'c', $post );
255
-	}
253
+    if ( '-' === substr( $date_modified, 0, 1 ) ) {
254
+        return get_the_time( 'c', $post );
255
+    }
256 256
 
257
-	return $date_modified;
257
+    return $date_modified;
258 258
 }
259 259
 
260 260
 /**
@@ -266,40 +266,40 @@  discard block
 block discarded – undo
266 266
  */
267 267
 function wl_get_image_urls( $post_id ) {
268 268
 
269
-	// If there is a featured image it has the priority.
270
-	$featured_image_id = get_post_thumbnail_id( $post_id );
271
-	if ( is_numeric( $featured_image_id ) ) {
272
-		$image_url = wp_get_attachment_url( $featured_image_id );
269
+    // If there is a featured image it has the priority.
270
+    $featured_image_id = get_post_thumbnail_id( $post_id );
271
+    if ( is_numeric( $featured_image_id ) ) {
272
+        $image_url = wp_get_attachment_url( $featured_image_id );
273 273
 
274
-		return array( $image_url );
275
-	}
274
+        return array( $image_url );
275
+    }
276 276
 
277
-	$images = get_children( array(
278
-		'post_parent'    => $post_id,
279
-		'post_type'      => 'attachment',
280
-		'post_mime_type' => 'image',
281
-	) );
277
+    $images = get_children( array(
278
+        'post_parent'    => $post_id,
279
+        'post_type'      => 'attachment',
280
+        'post_mime_type' => 'image',
281
+    ) );
282 282
 
283
-	// Return an empty array if no image is found.
284
-	if ( empty( $images ) ) {
285
-		return array();
286
-	}
283
+    // Return an empty array if no image is found.
284
+    if ( empty( $images ) ) {
285
+        return array();
286
+    }
287 287
 
288
-	// Prepare the return array.
289
-	$image_urls = array();
288
+    // Prepare the return array.
289
+    $image_urls = array();
290 290
 
291
-	// Collect the URLs.
292
-	foreach ( $images as $attachment_id => $attachment ) {
293
-		$image_url = wp_get_attachment_url( $attachment_id );
294
-		// Ensure the URL isn't collected already.
295
-		if ( ! in_array( $image_url, $image_urls ) ) {
296
-			array_push( $image_urls, $image_url );
297
-		}
298
-	}
291
+    // Collect the URLs.
292
+    foreach ( $images as $attachment_id => $attachment ) {
293
+        $image_url = wp_get_attachment_url( $attachment_id );
294
+        // Ensure the URL isn't collected already.
295
+        if ( ! in_array( $image_url, $image_urls ) ) {
296
+            array_push( $image_urls, $image_url );
297
+        }
298
+    }
299 299
 
300
-	// wl_write_log( "wl_get_image_urls [ post id :: $post_id ][ image urls count :: " . count( $image_urls ) . " ]" );
300
+    // wl_write_log( "wl_get_image_urls [ post id :: $post_id ][ image urls count :: " . count( $image_urls ) . " ]" );
301 301
 
302
-	return $image_urls;
302
+    return $image_urls;
303 303
 }
304 304
 
305 305
 /**
@@ -312,25 +312,25 @@  discard block
 block discarded – undo
312 312
  */
313 313
 function wl_get_sparql_images( $uri, $post_id ) {
314 314
 
315
-	$sparql = '';
315
+    $sparql = '';
316 316
 
317
-	// Get the escaped URI.
318
-	$uri_e = esc_html( $uri );
317
+    // Get the escaped URI.
318
+    $uri_e = esc_html( $uri );
319 319
 
320
-	// Add SPARQL stmts to write the schema:image.
321
-	$image_urls = wl_get_image_urls( $post_id );
322
-	foreach ( $image_urls as $image_url ) {
320
+    // Add SPARQL stmts to write the schema:image.
321
+    $image_urls = wl_get_image_urls( $post_id );
322
+    foreach ( $image_urls as $image_url ) {
323 323
 
324
-		// Skip to the next item if the image isn't set.
325
-		if ( empty( $image_url ) ) {
326
-			continue;
327
-		}
324
+        // Skip to the next item if the image isn't set.
325
+        if ( empty( $image_url ) ) {
326
+            continue;
327
+        }
328 328
 
329
-		$image_url_esc = wl_sparql_escape_uri( $image_url );
330
-		$sparql        .= " <$uri_e> schema:image <$image_url_esc> . \n";
331
-	}
329
+        $image_url_esc = wl_sparql_escape_uri( $image_url );
330
+        $sparql        .= " <$uri_e> schema:image <$image_url_esc> . \n";
331
+    }
332 332
 
333
-	return $sparql;
333
+    return $sparql;
334 334
 }
335 335
 
336 336
 /**
@@ -343,24 +343,24 @@  discard block
 block discarded – undo
343 343
  */
344 344
 function wl_get_attachment_for_source_url( $parent_post_id, $source_url ) {
345 345
 
346
-	// wl_write_log( "wl_get_attachment_for_source_url [ parent post id :: $parent_post_id ][ source url :: $source_url ]" );
346
+    // wl_write_log( "wl_get_attachment_for_source_url [ parent post id :: $parent_post_id ][ source url :: $source_url ]" );
347 347
 
348
-	$posts = get_posts( array(
349
-		'post_type'      => 'attachment',
350
-		'posts_per_page' => 1,
351
-		'post_status'    => 'any',
352
-		'post_parent'    => $parent_post_id,
353
-		'meta_key'       => 'wl_source_url',
354
-		'meta_value'     => $source_url,
355
-	) );
348
+    $posts = get_posts( array(
349
+        'post_type'      => 'attachment',
350
+        'posts_per_page' => 1,
351
+        'post_status'    => 'any',
352
+        'post_parent'    => $parent_post_id,
353
+        'meta_key'       => 'wl_source_url',
354
+        'meta_value'     => $source_url,
355
+    ) );
356 356
 
357
-	// Return the found post.
358
-	if ( 1 === count( $posts ) ) {
359
-		return $posts[0];
360
-	}
357
+    // Return the found post.
358
+    if ( 1 === count( $posts ) ) {
359
+        return $posts[0];
360
+    }
361 361
 
362
-	// Return null.
363
-	return null;
362
+    // Return null.
363
+    return null;
364 364
 }
365 365
 
366 366
 /**
@@ -371,8 +371,8 @@  discard block
 block discarded – undo
371 371
  */
372 372
 function wl_set_source_url( $post_id, $source_url ) {
373 373
 
374
-	delete_post_meta( $post_id, 'wl_source_url' );
375
-	add_post_meta( $post_id, 'wl_source_url', $source_url );
374
+    delete_post_meta( $post_id, 'wl_source_url' );
375
+    add_post_meta( $post_id, 'wl_source_url', $source_url );
376 376
 }
377 377
 
378 378
 
@@ -390,61 +390,61 @@  discard block
 block discarded – undo
390 390
  */
391 391
 function wl_flush_rewrite_rules_hard( $hard ) {
392 392
 
393
-	// If WL is not yet configured, we cannot perform any update, so we exit.
394
-	if ( '' === wl_configuration_get_key() ) {
395
-		return;
396
-	}
393
+    // If WL is not yet configured, we cannot perform any update, so we exit.
394
+    if ( '' === wl_configuration_get_key() ) {
395
+        return;
396
+    }
397 397
 
398
-	// Set the initial offset and limit each call to 100 posts to avoid memory errors.
399
-	$offset = 0;
400
-	$limit  = 100;
398
+    // Set the initial offset and limit each call to 100 posts to avoid memory errors.
399
+    $offset = 0;
400
+    $limit  = 100;
401 401
 
402
-	// Get more posts if the number of returned posts matches the limit.
403
-	while ( $limit === ( $posts = get_posts( array(
404
-			'offset'      => $offset,
405
-			'numberposts' => $limit,
406
-			'orderby'     => 'ID',
407
-			'post_type'   => 'any',
408
-			'post_status' => 'publish',
409
-		) ) ) ) {
402
+    // Get more posts if the number of returned posts matches the limit.
403
+    while ( $limit === ( $posts = get_posts( array(
404
+            'offset'      => $offset,
405
+            'numberposts' => $limit,
406
+            'orderby'     => 'ID',
407
+            'post_type'   => 'any',
408
+            'post_status' => 'publish',
409
+        ) ) ) ) {
410 410
 
411
-		// Holds the delete part of the query.
412
-		$delete_query = rl_sparql_prefixes();
411
+        // Holds the delete part of the query.
412
+        $delete_query = rl_sparql_prefixes();
413 413
 
414
-		// Holds the insert part of the query.
415
-		$insert_query = '';
414
+        // Holds the insert part of the query.
415
+        $insert_query = '';
416 416
 
417
-		// Cycle in each post to build the query.
418
-		foreach ( $posts as $post ) {
417
+        // Cycle in each post to build the query.
418
+        foreach ( $posts as $post ) {
419 419
 
420
-			// Ignore revisions.
421
-			if ( wp_is_post_revision( $post->ID ) ) {
422
-				continue;
423
-			}
420
+            // Ignore revisions.
421
+            if ( wp_is_post_revision( $post->ID ) ) {
422
+                continue;
423
+            }
424 424
 
425
-			// Get the entity URI.
426
-			$s = Wordlift_Sparql_Service::escape_uri( Wordlift_Entity_Service::get_instance()
427
-			                                                                 ->get_uri( $post->ID ) );
425
+            // Get the entity URI.
426
+            $s = Wordlift_Sparql_Service::escape_uri( Wordlift_Entity_Service::get_instance()
427
+                                                                                ->get_uri( $post->ID ) );
428 428
 
429
-			// Get the post URL.
430
-			// $url = wl_sparql_escape_uri( get_permalink( $post->ID ) );
429
+            // Get the post URL.
430
+            // $url = wl_sparql_escape_uri( get_permalink( $post->ID ) );
431 431
 
432
-			// Prepare the DELETE and INSERT commands.
433
-			$delete_query .= "DELETE { <$s> schema:url ?u . } WHERE  { <$s> schema:url ?u . };\n";
432
+            // Prepare the DELETE and INSERT commands.
433
+            $delete_query .= "DELETE { <$s> schema:url ?u . } WHERE  { <$s> schema:url ?u . };\n";
434 434
 
435
-			$insert_query .= Wordlift_Schema_Url_Property_Service::get_instance()
436
-			                                                     ->get_insert_query( $s, $post->ID );
435
+            $insert_query .= Wordlift_Schema_Url_Property_Service::get_instance()
436
+                                                                    ->get_insert_query( $s, $post->ID );
437 437
 
438
-		}
438
+        }
439 439
 
440 440
 
441
-		// Execute the query.
442
-		rl_execute_sparql_update_query( $delete_query . $insert_query );
441
+        // Execute the query.
442
+        rl_execute_sparql_update_query( $delete_query . $insert_query );
443 443
 
444
-		// Advance to the next posts.
445
-		$offset += $limit;
444
+        // Advance to the next posts.
445
+        $offset += $limit;
446 446
 
447
-	}
447
+    }
448 448
 
449 449
 //	// Get all published posts.
450 450
 //	$posts = get_posts( array(
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
  */
471 471
 function wl_sanitize_uri_path( $path, $char = '_' ) {
472 472
 
473
-	return Wordlift_Uri_Service::get_instance()->sanitize_path( $path, $char );
473
+    return Wordlift_Uri_Service::get_instance()->sanitize_path( $path, $char );
474 474
 }
475 475
 
476 476
 /**
@@ -482,11 +482,11 @@  discard block
 block discarded – undo
482 482
  */
483 483
 function wl_force_to_array( $value ) {
484 484
 
485
-	if ( ! is_array( $value ) ) {
486
-		return array( $value );
487
-	}
485
+    if ( ! is_array( $value ) ) {
486
+        return array( $value );
487
+    }
488 488
 
489
-	return $value;
489
+    return $value;
490 490
 }
491 491
 
492 492
 ///**
@@ -527,46 +527,46 @@  discard block
 block discarded – undo
527 527
  */
528 528
 function wl_replace_item_id_with_uri( $content ) {
529 529
 
530
-	// wl_write_log( "wl_replace_item_id_with_uri" );
530
+    // wl_write_log( "wl_replace_item_id_with_uri" );
531 531
 
532
-	// Strip slashes, see https://core.trac.wordpress.org/ticket/21767
533
-	$content = stripslashes( $content );
532
+    // Strip slashes, see https://core.trac.wordpress.org/ticket/21767
533
+    $content = stripslashes( $content );
534 534
 
535
-	// If any match are found.
536
-	$matches = array();
537
-	if ( 0 < preg_match_all( '/ itemid="([^"]+)"/i', $content, $matches, PREG_SET_ORDER ) ) {
535
+    // If any match are found.
536
+    $matches = array();
537
+    if ( 0 < preg_match_all( '/ itemid="([^"]+)"/i', $content, $matches, PREG_SET_ORDER ) ) {
538 538
 
539
-		foreach ( $matches as $match ) {
539
+        foreach ( $matches as $match ) {
540 540
 
541
-			// Get the item ID.
542
-			$item_id = $match[1];
541
+            // Get the item ID.
542
+            $item_id = $match[1];
543 543
 
544
-			// Get the post bound to that item ID (looking both in the 'official' URI and in the 'same-as' .
545
-			$post = Wordlift_Entity_Service::get_instance()
546
-			                               ->get_entity_post_by_uri( $item_id );
544
+            // Get the post bound to that item ID (looking both in the 'official' URI and in the 'same-as' .
545
+            $post = Wordlift_Entity_Service::get_instance()
546
+                                            ->get_entity_post_by_uri( $item_id );
547 547
 
548
-			// If no entity is found, continue to the next one.
549
-			if ( null === $post ) {
550
-				continue;
551
-			}
548
+            // If no entity is found, continue to the next one.
549
+            if ( null === $post ) {
550
+                continue;
551
+            }
552 552
 
553
-			// Get the URI for that post.
554
-			$uri = wl_get_entity_uri( $post->ID );
553
+            // Get the URI for that post.
554
+            $uri = wl_get_entity_uri( $post->ID );
555 555
 
556
-			// wl_write_log( "wl_replace_item_id_with_uri [ item id :: $item_id ][ uri :: $uri ]" );
556
+            // wl_write_log( "wl_replace_item_id_with_uri [ item id :: $item_id ][ uri :: $uri ]" );
557 557
 
558
-			// If the item ID and the URI differ, replace the item ID with the URI saved in WordPress.
559
-			if ( $item_id !== $uri ) {
560
-				$uri_e   = esc_html( $uri );
561
-				$content = str_replace( " itemid=\"$item_id\"", " itemid=\"$uri_e\"", $content );
562
-			}
563
-		}
564
-	}
558
+            // If the item ID and the URI differ, replace the item ID with the URI saved in WordPress.
559
+            if ( $item_id !== $uri ) {
560
+                $uri_e   = esc_html( $uri );
561
+                $content = str_replace( " itemid=\"$item_id\"", " itemid=\"$uri_e\"", $content );
562
+            }
563
+        }
564
+    }
565 565
 
566
-	// Reapply slashes.
567
-	$content = addslashes( $content );
566
+    // Reapply slashes.
567
+    $content = addslashes( $content );
568 568
 
569
-	return $content;
569
+    return $content;
570 570
 }
571 571
 
572 572
 add_filter( 'content_save_pre', 'wl_replace_item_id_with_uri', 1, 1 );
@@ -635,8 +635,8 @@  discard block
 block discarded – undo
635 635
  * This action is documented in includes/class-wordlift-activator.php
636 636
  */
637 637
 function activate_wordlift() {
638
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-activator.php';
639
-	Wordlift_Activator::activate();
638
+    require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-activator.php';
639
+    Wordlift_Activator::activate();
640 640
 }
641 641
 
642 642
 /**
@@ -644,8 +644,8 @@  discard block
 block discarded – undo
644 644
  * This action is documented in includes/class-wordlift-deactivator.php
645 645
  */
646 646
 function deactivate_wordlift() {
647
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-deactivator.php';
648
-	Wordlift_Deactivator::deactivate();
647
+    require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-deactivator.php';
648
+    Wordlift_Deactivator::deactivate();
649 649
 }
650 650
 
651 651
 register_activation_hook( __FILE__, 'activate_wordlift' );
@@ -668,8 +668,8 @@  discard block
 block discarded – undo
668 668
  */
669 669
 function run_wordlift() {
670 670
 
671
-	$plugin = new Wordlift();
672
-	$plugin->run();
671
+    $plugin = new Wordlift();
672
+    $plugin->run();
673 673
 
674 674
 }
675 675
 
Please login to merge, or discard this patch.
Spacing   +133 added lines, -133 removed lines patch added patch discarded remove patch
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
  */
26 26
 
27 27
 // If this file is called directly, abort.
28
-if ( ! defined( 'WPINC' ) ) {
28
+if ( ! defined('WPINC')) {
29 29
 	die;
30 30
 }
31 31
 
32 32
 // Include WordLift constants.
33
-require_once( 'wordlift_constants.php' );
33
+require_once('wordlift_constants.php');
34 34
 
35 35
 // Load modules.
36
-require_once( 'modules/core/wordlift_core.php' );
36
+require_once('modules/core/wordlift_core.php');
37 37
 
38 38
 /**
39 39
  * Log to the debug.log file.
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
  *
47 47
  * @param string|mixed $log The log data.
48 48
  */
49
-function wl_write_log( $log ) {
49
+function wl_write_log($log) {
50 50
 
51
-	Wordlift_Log_Service::get_instance()->info( $log );
51
+	Wordlift_Log_Service::get_instance()->info($log);
52 52
 
53 53
 }
54 54
 
@@ -62,19 +62,19 @@  discard block
 block discarded – undo
62 62
  * @param string|array $log The log data.
63 63
  * @param string $caller The calling function.
64 64
  */
65
-function wl_write_log_handler( $log, $caller = null ) {
65
+function wl_write_log_handler($log, $caller = null) {
66 66
 
67 67
 	global $wl_logger;
68 68
 
69
-	if ( true === WP_DEBUG ) {
69
+	if (true === WP_DEBUG) {
70 70
 
71
-		$message = ( isset( $caller ) ? sprintf( '[%-40.40s] ', $caller ) : '' ) .
72
-		           ( is_array( $log ) || is_object( $log ) ? print_r( $log, true ) : wl_write_log_hide_key( $log ) );
71
+		$message = (isset($caller) ? sprintf('[%-40.40s] ', $caller) : '').
72
+		           (is_array($log) || is_object($log) ? print_r($log, true) : wl_write_log_hide_key($log));
73 73
 
74
-		if ( isset( $wl_logger ) ) {
75
-			$wl_logger->info( $message );
74
+		if (isset($wl_logger)) {
75
+			$wl_logger->info($message);
76 76
 		} else {
77
-			error_log( $message );
77
+			error_log($message);
78 78
 		}
79 79
 
80 80
 	}
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
  *
93 93
  * @return string A text with the key hidden.
94 94
  */
95
-function wl_write_log_hide_key( $text ) {
95
+function wl_write_log_hide_key($text) {
96 96
 
97
-	return str_ireplace( wl_configuration_get_key(), '<hidden>', $text );
97
+	return str_ireplace(wl_configuration_get_key(), '<hidden>', $text);
98 98
 }
99 99
 
100 100
 ///**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 function wordlift_allowed_post_tags() {
140 140
 	global $allowedposttags;
141 141
 
142
-	$tags           = array( 'span' );
142
+	$tags           = array('span');
143 143
 	$new_attributes = array(
144 144
 		'itemscope' => array(),
145 145
 		'itemtype'  => array(),
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 		'itemid'    => array(),
148 148
 	);
149 149
 
150
-	foreach ( $tags as $tag ) {
151
-		if ( isset( $allowedposttags[ $tag ] ) && is_array( $allowedposttags[ $tag ] ) ) {
152
-			$allowedposttags[ $tag ] = array_merge( $allowedposttags[ $tag ], $new_attributes );
150
+	foreach ($tags as $tag) {
151
+		if (isset($allowedposttags[$tag]) && is_array($allowedposttags[$tag])) {
152
+			$allowedposttags[$tag] = array_merge($allowedposttags[$tag], $new_attributes);
153 153
 		}
154 154
 	}
155 155
 }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 //add_action( 'init', 'wordlift_buttonhooks' );
159 159
 
160 160
 // add allowed post tags.
161
-add_action( 'init', 'wordlift_allowed_post_tags' );
161
+add_action('init', 'wordlift_allowed_post_tags');
162 162
 
163 163
 
164 164
 /**
@@ -167,30 +167,30 @@  discard block
 block discarded – undo
167 167
 function wordlift_admin_enqueue_scripts() {
168 168
 
169 169
 	// Added for compatibility with WordPress 3.9 (see http://make.wordpress.org/core/2014/04/16/jquery-ui-and-wpdialogs-in-wordpress-3-9/)
170
-	wp_enqueue_script( 'wpdialogs' );
171
-	wp_enqueue_style( 'wp-jquery-ui-dialog' );
170
+	wp_enqueue_script('wpdialogs');
171
+	wp_enqueue_style('wp-jquery-ui-dialog');
172 172
 
173
-	wp_enqueue_style( 'wordlift-reloaded', plugin_dir_url( __FILE__ ) . 'css/wordlift-reloaded.min.css' );
173
+	wp_enqueue_style('wordlift-reloaded', plugin_dir_url(__FILE__).'css/wordlift-reloaded.min.css');
174 174
 
175
-	wp_enqueue_script( 'jquery-ui-autocomplete' );
176
-	wp_enqueue_script( 'angularjs', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular.min.js' );
177
-	wp_enqueue_script( 'angularjs-geolocation', plugin_dir_url( __FILE__ ) . 'bower_components/angularjs-geolocation/dist/angularjs-geolocation.min.js' );
178
-	wp_enqueue_script( 'angularjs-touch', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-touch.min.js' );
179
-	wp_enqueue_script( 'angularjs-animate', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-animate.min.js' );
175
+	wp_enqueue_script('jquery-ui-autocomplete');
176
+	wp_enqueue_script('angularjs', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular.min.js');
177
+	wp_enqueue_script('angularjs-geolocation', plugin_dir_url(__FILE__).'bower_components/angularjs-geolocation/dist/angularjs-geolocation.min.js');
178
+	wp_enqueue_script('angularjs-touch', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-touch.min.js');
179
+	wp_enqueue_script('angularjs-animate', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-animate.min.js');
180 180
 
181 181
 	// Disable auto-save for custom entity posts only
182
-	if ( Wordlift_Entity_Service::TYPE_NAME === get_post_type() ) {
183
-		wp_dequeue_script( 'autosave' );
182
+	if (Wordlift_Entity_Service::TYPE_NAME === get_post_type()) {
183
+		wp_dequeue_script('autosave');
184 184
 	}
185 185
 }
186 186
 
187
-add_action( 'admin_enqueue_scripts', 'wordlift_admin_enqueue_scripts' );
187
+add_action('admin_enqueue_scripts', 'wordlift_admin_enqueue_scripts');
188 188
 
189 189
 function wl_enqueue_scripts() {
190
-	wp_enqueue_style( 'wordlift-ui', plugin_dir_url( __FILE__ ) . 'css/wordlift-ui.min.css' );
190
+	wp_enqueue_style('wordlift-ui', plugin_dir_url(__FILE__).'css/wordlift-ui.min.css');
191 191
 }
192 192
 
193
-add_action( 'wp_enqueue_scripts', 'wl_enqueue_scripts' );
193
+add_action('wp_enqueue_scripts', 'wl_enqueue_scripts');
194 194
 
195 195
 /**
196 196
  * Hooked to *wp_kses_allowed_html* filter, adds microdata attributes.
@@ -200,23 +200,23 @@  discard block
 block discarded – undo
200 200
  *
201 201
  * @return array An array which contains allowed microdata attributes.
202 202
  */
203
-function wordlift_allowed_html( $allowedtags, $context ) {
203
+function wordlift_allowed_html($allowedtags, $context) {
204 204
 
205
-	if ( 'post' !== $context ) {
205
+	if ('post' !== $context) {
206 206
 		return $allowedtags;
207 207
 	}
208 208
 
209
-	return array_merge_recursive( $allowedtags, array(
209
+	return array_merge_recursive($allowedtags, array(
210 210
 		'span' => array(
211 211
 			'itemscope' => true,
212 212
 			'itemtype'  => true,
213 213
 			'itemid'    => true,
214 214
 			'itemprop'  => true,
215 215
 		),
216
-	) );
216
+	));
217 217
 }
218 218
 
219
-add_filter( 'wp_kses_allowed_html', 'wordlift_allowed_html', 10, 2 );
219
+add_filter('wp_kses_allowed_html', 'wordlift_allowed_html', 10, 2);
220 220
 
221 221
 /**
222 222
  * Get the coordinates for the specified post ID.
@@ -225,17 +225,17 @@  discard block
 block discarded – undo
225 225
  *
226 226
  * @return array|null An array of coordinates or null.
227 227
  */
228
-function wl_get_coordinates( $post_id ) {
228
+function wl_get_coordinates($post_id) {
229 229
 
230
-	$latitude  = wl_schema_get_value( $post_id, 'latitude' );
231
-	$longitude = wl_schema_get_value( $post_id, 'longitude' );
230
+	$latitude  = wl_schema_get_value($post_id, 'latitude');
231
+	$longitude = wl_schema_get_value($post_id, 'longitude');
232 232
 
233 233
 	// DO NOT set latitude/longitude to 0/0 as default values. It's a specific
234 234
 	// place on the globe:"The zero/zero point of this system is located in the
235 235
 	// Gulf of Guinea about 625 km (390 mi) south of Tema, Ghana."
236 236
 	return array(
237
-		'latitude'  => isset( $latitude[0] ) && is_numeric( $latitude[0] ) ? $latitude[0] : '',
238
-		'longitude' => isset( $longitude[0] ) && is_numeric( $longitude[0] ) ? $longitude[0] : '',
237
+		'latitude'  => isset($latitude[0]) && is_numeric($latitude[0]) ? $latitude[0] : '',
238
+		'longitude' => isset($longitude[0]) && is_numeric($longitude[0]) ? $longitude[0] : '',
239 239
 	);
240 240
 }
241 241
 
@@ -246,12 +246,12 @@  discard block
 block discarded – undo
246 246
  *
247 247
  * @return string A datetime.
248 248
  */
249
-function wl_get_post_modified_time( $post ) {
249
+function wl_get_post_modified_time($post) {
250 250
 
251
-	$date_modified = get_post_modified_time( 'c', true, $post );
251
+	$date_modified = get_post_modified_time('c', true, $post);
252 252
 
253
-	if ( '-' === substr( $date_modified, 0, 1 ) ) {
254
-		return get_the_time( 'c', $post );
253
+	if ('-' === substr($date_modified, 0, 1)) {
254
+		return get_the_time('c', $post);
255 255
 	}
256 256
 
257 257
 	return $date_modified;
@@ -264,24 +264,24 @@  discard block
 block discarded – undo
264 264
  *
265 265
  * @return array An array of image URLs.
266 266
  */
267
-function wl_get_image_urls( $post_id ) {
267
+function wl_get_image_urls($post_id) {
268 268
 
269 269
 	// If there is a featured image it has the priority.
270
-	$featured_image_id = get_post_thumbnail_id( $post_id );
271
-	if ( is_numeric( $featured_image_id ) ) {
272
-		$image_url = wp_get_attachment_url( $featured_image_id );
270
+	$featured_image_id = get_post_thumbnail_id($post_id);
271
+	if (is_numeric($featured_image_id)) {
272
+		$image_url = wp_get_attachment_url($featured_image_id);
273 273
 
274
-		return array( $image_url );
274
+		return array($image_url);
275 275
 	}
276 276
 
277
-	$images = get_children( array(
277
+	$images = get_children(array(
278 278
 		'post_parent'    => $post_id,
279 279
 		'post_type'      => 'attachment',
280 280
 		'post_mime_type' => 'image',
281
-	) );
281
+	));
282 282
 
283 283
 	// Return an empty array if no image is found.
284
-	if ( empty( $images ) ) {
284
+	if (empty($images)) {
285 285
 		return array();
286 286
 	}
287 287
 
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
 	$image_urls = array();
290 290
 
291 291
 	// Collect the URLs.
292
-	foreach ( $images as $attachment_id => $attachment ) {
293
-		$image_url = wp_get_attachment_url( $attachment_id );
292
+	foreach ($images as $attachment_id => $attachment) {
293
+		$image_url = wp_get_attachment_url($attachment_id);
294 294
 		// Ensure the URL isn't collected already.
295
-		if ( ! in_array( $image_url, $image_urls ) ) {
296
-			array_push( $image_urls, $image_url );
295
+		if ( ! in_array($image_url, $image_urls)) {
296
+			array_push($image_urls, $image_url);
297 297
 		}
298 298
 	}
299 299
 
@@ -310,24 +310,24 @@  discard block
 block discarded – undo
310 310
  *
311 311
  * @return string The SPARQL fragment.
312 312
  */
313
-function wl_get_sparql_images( $uri, $post_id ) {
313
+function wl_get_sparql_images($uri, $post_id) {
314 314
 
315 315
 	$sparql = '';
316 316
 
317 317
 	// Get the escaped URI.
318
-	$uri_e = esc_html( $uri );
318
+	$uri_e = esc_html($uri);
319 319
 
320 320
 	// Add SPARQL stmts to write the schema:image.
321
-	$image_urls = wl_get_image_urls( $post_id );
322
-	foreach ( $image_urls as $image_url ) {
321
+	$image_urls = wl_get_image_urls($post_id);
322
+	foreach ($image_urls as $image_url) {
323 323
 
324 324
 		// Skip to the next item if the image isn't set.
325
-		if ( empty( $image_url ) ) {
325
+		if (empty($image_url)) {
326 326
 			continue;
327 327
 		}
328 328
 
329
-		$image_url_esc = wl_sparql_escape_uri( $image_url );
330
-		$sparql        .= " <$uri_e> schema:image <$image_url_esc> . \n";
329
+		$image_url_esc = wl_sparql_escape_uri($image_url);
330
+		$sparql .= " <$uri_e> schema:image <$image_url_esc> . \n";
331 331
 	}
332 332
 
333 333
 	return $sparql;
@@ -341,21 +341,21 @@  discard block
 block discarded – undo
341 341
  *
342 342
  * @return WP_Post|null A post instance or null if not found.
343 343
  */
344
-function wl_get_attachment_for_source_url( $parent_post_id, $source_url ) {
344
+function wl_get_attachment_for_source_url($parent_post_id, $source_url) {
345 345
 
346 346
 	// wl_write_log( "wl_get_attachment_for_source_url [ parent post id :: $parent_post_id ][ source url :: $source_url ]" );
347 347
 
348
-	$posts = get_posts( array(
348
+	$posts = get_posts(array(
349 349
 		'post_type'      => 'attachment',
350 350
 		'posts_per_page' => 1,
351 351
 		'post_status'    => 'any',
352 352
 		'post_parent'    => $parent_post_id,
353 353
 		'meta_key'       => 'wl_source_url',
354 354
 		'meta_value'     => $source_url,
355
-	) );
355
+	));
356 356
 
357 357
 	// Return the found post.
358
-	if ( 1 === count( $posts ) ) {
358
+	if (1 === count($posts)) {
359 359
 		return $posts[0];
360 360
 	}
361 361
 
@@ -369,10 +369,10 @@  discard block
 block discarded – undo
369 369
  * @param int $post_id The post ID.
370 370
  * @param string $source_url The source URL.
371 371
  */
372
-function wl_set_source_url( $post_id, $source_url ) {
372
+function wl_set_source_url($post_id, $source_url) {
373 373
 
374
-	delete_post_meta( $post_id, 'wl_source_url' );
375
-	add_post_meta( $post_id, 'wl_source_url', $source_url );
374
+	delete_post_meta($post_id, 'wl_source_url');
375
+	add_post_meta($post_id, 'wl_source_url', $source_url);
376 376
 }
377 377
 
378 378
 
@@ -388,10 +388,10 @@  discard block
 block discarded – undo
388 388
  *
389 389
  * @param bool $hard True if the rewrite involves configuration updates in Apache/IIS.
390 390
  */
391
-function wl_flush_rewrite_rules_hard( $hard ) {
391
+function wl_flush_rewrite_rules_hard($hard) {
392 392
 
393 393
 	// If WL is not yet configured, we cannot perform any update, so we exit.
394
-	if ( '' === wl_configuration_get_key() ) {
394
+	if ('' === wl_configuration_get_key()) {
395 395
 		return;
396 396
 	}
397 397
 
@@ -400,13 +400,13 @@  discard block
 block discarded – undo
400 400
 	$limit  = 100;
401 401
 
402 402
 	// Get more posts if the number of returned posts matches the limit.
403
-	while ( $limit === ( $posts = get_posts( array(
403
+	while ($limit === ($posts = get_posts(array(
404 404
 			'offset'      => $offset,
405 405
 			'numberposts' => $limit,
406 406
 			'orderby'     => 'ID',
407 407
 			'post_type'   => 'any',
408 408
 			'post_status' => 'publish',
409
-		) ) ) ) {
409
+		)))) {
410 410
 
411 411
 		// Holds the delete part of the query.
412 412
 		$delete_query = rl_sparql_prefixes();
@@ -415,16 +415,16 @@  discard block
 block discarded – undo
415 415
 		$insert_query = '';
416 416
 
417 417
 		// Cycle in each post to build the query.
418
-		foreach ( $posts as $post ) {
418
+		foreach ($posts as $post) {
419 419
 
420 420
 			// Ignore revisions.
421
-			if ( wp_is_post_revision( $post->ID ) ) {
421
+			if (wp_is_post_revision($post->ID)) {
422 422
 				continue;
423 423
 			}
424 424
 
425 425
 			// Get the entity URI.
426
-			$s = Wordlift_Sparql_Service::escape_uri( Wordlift_Entity_Service::get_instance()
427
-			                                                                 ->get_uri( $post->ID ) );
426
+			$s = Wordlift_Sparql_Service::escape_uri(Wordlift_Entity_Service::get_instance()
427
+			                                                                 ->get_uri($post->ID));
428 428
 
429 429
 			// Get the post URL.
430 430
 			// $url = wl_sparql_escape_uri( get_permalink( $post->ID ) );
@@ -433,13 +433,13 @@  discard block
 block discarded – undo
433 433
 			$delete_query .= "DELETE { <$s> schema:url ?u . } WHERE  { <$s> schema:url ?u . };\n";
434 434
 
435 435
 			$insert_query .= Wordlift_Schema_Url_Property_Service::get_instance()
436
-			                                                     ->get_insert_query( $s, $post->ID );
436
+			                                                     ->get_insert_query($s, $post->ID);
437 437
 
438 438
 		}
439 439
 
440 440
 
441 441
 		// Execute the query.
442
-		rl_execute_sparql_update_query( $delete_query . $insert_query );
442
+		rl_execute_sparql_update_query($delete_query.$insert_query);
443 443
 
444 444
 		// Advance to the next posts.
445 445
 		$offset += $limit;
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 
456 456
 }
457 457
 
458
-add_filter( 'flush_rewrite_rules_hard', 'wl_flush_rewrite_rules_hard', 10, 1 );
458
+add_filter('flush_rewrite_rules_hard', 'wl_flush_rewrite_rules_hard', 10, 1);
459 459
 
460 460
 /**
461 461
  * Sanitizes an URI path by replacing the non allowed characters with an underscore.
@@ -468,9 +468,9 @@  discard block
 block discarded – undo
468 468
  *
469 469
  * @return string The sanitized path.
470 470
  */
471
-function wl_sanitize_uri_path( $path, $char = '_' ) {
471
+function wl_sanitize_uri_path($path, $char = '_') {
472 472
 
473
-	return Wordlift_Uri_Service::get_instance()->sanitize_path( $path, $char );
473
+	return Wordlift_Uri_Service::get_instance()->sanitize_path($path, $char);
474 474
 }
475 475
 
476 476
 /**
@@ -480,10 +480,10 @@  discard block
 block discarded – undo
480 480
  *
481 481
  * @return array Array containing $value (if $value was not an array)
482 482
  */
483
-function wl_force_to_array( $value ) {
483
+function wl_force_to_array($value) {
484 484
 
485
-	if ( ! is_array( $value ) ) {
486
-		return array( $value );
485
+	if ( ! is_array($value)) {
486
+		return array($value);
487 487
 	}
488 488
 
489 489
 	return $value;
@@ -525,109 +525,109 @@  discard block
 block discarded – undo
525 525
  *
526 526
  * @return string The updated post content.
527 527
  */
528
-function wl_replace_item_id_with_uri( $content ) {
528
+function wl_replace_item_id_with_uri($content) {
529 529
 
530 530
 	// wl_write_log( "wl_replace_item_id_with_uri" );
531 531
 
532 532
 	// Strip slashes, see https://core.trac.wordpress.org/ticket/21767
533
-	$content = stripslashes( $content );
533
+	$content = stripslashes($content);
534 534
 
535 535
 	// If any match are found.
536 536
 	$matches = array();
537
-	if ( 0 < preg_match_all( '/ itemid="([^"]+)"/i', $content, $matches, PREG_SET_ORDER ) ) {
537
+	if (0 < preg_match_all('/ itemid="([^"]+)"/i', $content, $matches, PREG_SET_ORDER)) {
538 538
 
539
-		foreach ( $matches as $match ) {
539
+		foreach ($matches as $match) {
540 540
 
541 541
 			// Get the item ID.
542 542
 			$item_id = $match[1];
543 543
 
544 544
 			// Get the post bound to that item ID (looking both in the 'official' URI and in the 'same-as' .
545 545
 			$post = Wordlift_Entity_Service::get_instance()
546
-			                               ->get_entity_post_by_uri( $item_id );
546
+			                               ->get_entity_post_by_uri($item_id);
547 547
 
548 548
 			// If no entity is found, continue to the next one.
549
-			if ( null === $post ) {
549
+			if (null === $post) {
550 550
 				continue;
551 551
 			}
552 552
 
553 553
 			// Get the URI for that post.
554
-			$uri = wl_get_entity_uri( $post->ID );
554
+			$uri = wl_get_entity_uri($post->ID);
555 555
 
556 556
 			// wl_write_log( "wl_replace_item_id_with_uri [ item id :: $item_id ][ uri :: $uri ]" );
557 557
 
558 558
 			// If the item ID and the URI differ, replace the item ID with the URI saved in WordPress.
559
-			if ( $item_id !== $uri ) {
560
-				$uri_e   = esc_html( $uri );
561
-				$content = str_replace( " itemid=\"$item_id\"", " itemid=\"$uri_e\"", $content );
559
+			if ($item_id !== $uri) {
560
+				$uri_e   = esc_html($uri);
561
+				$content = str_replace(" itemid=\"$item_id\"", " itemid=\"$uri_e\"", $content);
562 562
 			}
563 563
 		}
564 564
 	}
565 565
 
566 566
 	// Reapply slashes.
567
-	$content = addslashes( $content );
567
+	$content = addslashes($content);
568 568
 
569 569
 	return $content;
570 570
 }
571 571
 
572
-add_filter( 'content_save_pre', 'wl_replace_item_id_with_uri', 1, 1 );
572
+add_filter('content_save_pre', 'wl_replace_item_id_with_uri', 1, 1);
573 573
 
574
-require_once( 'wordlift_entity_functions.php' );
574
+require_once('wordlift_entity_functions.php');
575 575
 
576 576
 // add editor related methods.
577
-require_once( 'wordlift_editor.php' );
577
+require_once('wordlift_editor.php');
578 578
 
579 579
 // add the WordLift entity custom type.
580
-require_once( 'wordlift_entity_type.php' );
581
-require_once( 'wordlift_entity_type_taxonomy.php' );
580
+require_once('wordlift_entity_type.php');
581
+require_once('wordlift_entity_type_taxonomy.php');
582 582
 
583 583
 // add callbacks on post save to notify data changes from wp to redlink triple store
584
-require_once( 'wordlift_to_redlink_data_push_callbacks.php' );
584
+require_once('wordlift_to_redlink_data_push_callbacks.php');
585 585
 
586
-require_once( 'modules/configuration/wordlift_configuration_settings.php' );
586
+require_once('modules/configuration/wordlift_configuration_settings.php');
587 587
 
588 588
 // Load modules
589
-require_once( 'modules/analyzer/wordlift_analyzer.php' );
590
-require_once( 'modules/linked_data/wordlift_linked_data.php' );
591
-require_once( 'modules/prefixes/wordlift_prefixes.php' );
592
-require_once( 'modules/redirector/wordlift_redirector.php' );
589
+require_once('modules/analyzer/wordlift_analyzer.php');
590
+require_once('modules/linked_data/wordlift_linked_data.php');
591
+require_once('modules/prefixes/wordlift_prefixes.php');
592
+require_once('modules/redirector/wordlift_redirector.php');
593 593
 
594 594
 // Shortcodes
595 595
 
596
-require_once( 'modules/geo_widget/wordlift_geo_widget.php' );
597
-require_once( 'shortcodes/wordlift_shortcode_chord.php' );
598
-require_once( 'shortcodes/wordlift_shortcode_geomap.php' );
599
-require_once( 'shortcodes/wordlift_shortcode_field.php' );
600
-require_once( 'shortcodes/wordlift_shortcode_faceted_search.php' );
601
-require_once( 'shortcodes/wordlift_shortcode_navigator.php' );
596
+require_once('modules/geo_widget/wordlift_geo_widget.php');
597
+require_once('shortcodes/wordlift_shortcode_chord.php');
598
+require_once('shortcodes/wordlift_shortcode_geomap.php');
599
+require_once('shortcodes/wordlift_shortcode_field.php');
600
+require_once('shortcodes/wordlift_shortcode_faceted_search.php');
601
+require_once('shortcodes/wordlift_shortcode_navigator.php');
602 602
 
603
-require_once( 'widgets/wordlift_widget_geo.php' );
604
-require_once( 'widgets/wordlift_widget_chord.php' );
605
-require_once( 'widgets/wordlift_widget_timeline.php' );
603
+require_once('widgets/wordlift_widget_geo.php');
604
+require_once('widgets/wordlift_widget_chord.php');
605
+require_once('widgets/wordlift_widget_timeline.php');
606 606
 
607
-require_once( 'wordlift_sparql.php' );
608
-require_once( 'wordlift_redlink.php' );
607
+require_once('wordlift_sparql.php');
608
+require_once('wordlift_redlink.php');
609 609
 
610 610
 // Add admin functions.
611 611
 // TODO: find a way to make 'admin' UI tests work.
612 612
 //if ( is_admin() ) {
613 613
 
614
-require_once( 'admin/wordlift_admin.php' );
615
-require_once( 'admin/wordlift_admin_edit_post.php' );
616
-require_once( 'admin/wordlift_admin_save_post.php' );
614
+require_once('admin/wordlift_admin.php');
615
+require_once('admin/wordlift_admin_edit_post.php');
616
+require_once('admin/wordlift_admin_save_post.php');
617 617
 
618 618
 // add the entities meta box.
619
-require_once( 'admin/wordlift_admin_meta_box_entities.php' );
619
+require_once('admin/wordlift_admin_meta_box_entities.php');
620 620
 
621 621
 // add the entity creation AJAX.
622
-require_once( 'admin/wordlift_admin_ajax_related_posts.php' );
622
+require_once('admin/wordlift_admin_ajax_related_posts.php');
623 623
 
624 624
 // Load the wl_chord TinyMCE button and configuration dialog.
625
-require_once( 'admin/wordlift_admin_shortcodes.php' );
625
+require_once('admin/wordlift_admin_shortcodes.php');
626 626
 
627 627
 // load languages.
628 628
 // TODO: the following call gives for granted that the plugin is in the wordlift directory,
629 629
 //       we're currently doing this because wordlift is symbolic linked.
630
-load_plugin_textdomain( 'wordlift', false, '/wordlift/languages' );
630
+load_plugin_textdomain('wordlift', false, '/wordlift/languages');
631 631
 
632 632
 
633 633
 /**
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
  * This action is documented in includes/class-wordlift-activator.php
636 636
  */
637 637
 function activate_wordlift() {
638
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-activator.php';
638
+	require_once plugin_dir_path(__FILE__).'includes/class-wordlift-activator.php';
639 639
 	Wordlift_Activator::activate();
640 640
 }
641 641
 
@@ -644,18 +644,18 @@  discard block
 block discarded – undo
644 644
  * This action is documented in includes/class-wordlift-deactivator.php
645 645
  */
646 646
 function deactivate_wordlift() {
647
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-deactivator.php';
647
+	require_once plugin_dir_path(__FILE__).'includes/class-wordlift-deactivator.php';
648 648
 	Wordlift_Deactivator::deactivate();
649 649
 }
650 650
 
651
-register_activation_hook( __FILE__, 'activate_wordlift' );
652
-register_deactivation_hook( __FILE__, 'deactivate_wordlift' );
651
+register_activation_hook(__FILE__, 'activate_wordlift');
652
+register_deactivation_hook(__FILE__, 'deactivate_wordlift');
653 653
 
654 654
 /**
655 655
  * The core plugin class that is used to define internationalization,
656 656
  * admin-specific hooks, and public-facing site hooks.
657 657
  */
658
-require plugin_dir_path( __FILE__ ) . 'includes/class-wordlift.php';
658
+require plugin_dir_path(__FILE__).'includes/class-wordlift.php';
659 659
 
660 660
 /**
661 661
  * Begins execution of the plugin.
Please login to merge, or discard this patch.