@@ -48,1495 +48,1495 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | class Wordlift { |
| 50 | 50 | |
| 51 | - //<editor-fold desc="## FIELDS"> |
|
| 52 | - |
|
| 53 | - /** |
|
| 54 | - * The loader that's responsible for maintaining and registering all hooks that power |
|
| 55 | - * the plugin. |
|
| 56 | - * |
|
| 57 | - * @since 1.0.0 |
|
| 58 | - * @access protected |
|
| 59 | - * @var Wordlift_Loader $loader Maintains and registers all hooks for the plugin. |
|
| 60 | - */ |
|
| 61 | - protected $loader; |
|
| 62 | - |
|
| 63 | - /** |
|
| 64 | - * The unique identifier of this plugin. |
|
| 65 | - * |
|
| 66 | - * @since 1.0.0 |
|
| 67 | - * @access protected |
|
| 68 | - * @var string $plugin_name The string used to uniquely identify this plugin. |
|
| 69 | - */ |
|
| 70 | - protected $plugin_name; |
|
| 71 | - |
|
| 72 | - /** |
|
| 73 | - * The current version of the plugin. |
|
| 74 | - * |
|
| 75 | - * @since 1.0.0 |
|
| 76 | - * @access protected |
|
| 77 | - * @var string $version The current version of the plugin. |
|
| 78 | - */ |
|
| 79 | - protected $version; |
|
| 80 | - |
|
| 81 | - /** |
|
| 82 | - * The {@link Wordlift_Tinymce_Adapter} instance. |
|
| 83 | - * |
|
| 84 | - * @since 3.12.0 |
|
| 85 | - * @access protected |
|
| 86 | - * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance. |
|
| 87 | - */ |
|
| 88 | - protected $tinymce_adapter; |
|
| 89 | - |
|
| 90 | - /** |
|
| 91 | - * The Thumbnail service. |
|
| 92 | - * |
|
| 93 | - * @since 3.1.5 |
|
| 94 | - * @access private |
|
| 95 | - * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service. |
|
| 96 | - */ |
|
| 97 | - private $thumbnail_service; |
|
| 98 | - |
|
| 99 | - /** |
|
| 100 | - * The UI service. |
|
| 101 | - * |
|
| 102 | - * @since 3.2.0 |
|
| 103 | - * @access private |
|
| 104 | - * @var \Wordlift_UI_Service $ui_service The UI service. |
|
| 105 | - */ |
|
| 106 | - private $ui_service; |
|
| 107 | - |
|
| 108 | - /** |
|
| 109 | - * The Schema service. |
|
| 110 | - * |
|
| 111 | - * @since 3.3.0 |
|
| 112 | - * @access protected |
|
| 113 | - * @var \Wordlift_Schema_Service $schema_service The Schema service. |
|
| 114 | - */ |
|
| 115 | - protected $schema_service; |
|
| 116 | - |
|
| 117 | - /** |
|
| 118 | - * The Entity service. |
|
| 119 | - * |
|
| 120 | - * @since 3.1.0 |
|
| 121 | - * @access protected |
|
| 122 | - * @var \Wordlift_Entity_Service $entity_service The Entity service. |
|
| 123 | - */ |
|
| 124 | - protected $entity_service; |
|
| 125 | - |
|
| 126 | - /** |
|
| 127 | - * The Topic Taxonomy service. |
|
| 128 | - * |
|
| 129 | - * @since 3.5.0 |
|
| 130 | - * @access private |
|
| 131 | - * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service. |
|
| 132 | - */ |
|
| 133 | - private $topic_taxonomy_service; |
|
| 134 | - |
|
| 135 | - /** |
|
| 136 | - * The Entity Types Taxonomy service. |
|
| 137 | - * |
|
| 138 | - * @since 3.18.0 |
|
| 139 | - * @access private |
|
| 140 | - * @var \Wordlift_Entity_Type_Taxonomy_Service The Entity Types Taxonomy service. |
|
| 141 | - */ |
|
| 142 | - private $entity_types_taxonomy_service; |
|
| 143 | - |
|
| 144 | - /** |
|
| 145 | - * The User service. |
|
| 146 | - * |
|
| 147 | - * @since 3.1.7 |
|
| 148 | - * @access protected |
|
| 149 | - * @var \Wordlift_User_Service $user_service The User service. |
|
| 150 | - */ |
|
| 151 | - protected $user_service; |
|
| 152 | - |
|
| 153 | - /** |
|
| 154 | - * The Timeline service. |
|
| 155 | - * |
|
| 156 | - * @since 3.1.0 |
|
| 157 | - * @access private |
|
| 158 | - * @var \Wordlift_Timeline_Service $timeline_service The Timeline service. |
|
| 159 | - */ |
|
| 160 | - private $timeline_service; |
|
| 161 | - |
|
| 162 | - /** |
|
| 163 | - * The Redirect service. |
|
| 164 | - * |
|
| 165 | - * @since 3.2.0 |
|
| 166 | - * @access private |
|
| 167 | - * @var \Wordlift_Redirect_Service $redirect_service The Redirect service. |
|
| 168 | - */ |
|
| 169 | - private $redirect_service; |
|
| 170 | - |
|
| 171 | - /** |
|
| 172 | - * The Notice service. |
|
| 173 | - * |
|
| 174 | - * @since 3.3.0 |
|
| 175 | - * @access private |
|
| 176 | - * @var \Wordlift_Notice_Service $notice_service The Notice service. |
|
| 177 | - */ |
|
| 178 | - private $notice_service; |
|
| 179 | - |
|
| 180 | - /** |
|
| 181 | - * The Entity list customization. |
|
| 182 | - * |
|
| 183 | - * @since 3.3.0 |
|
| 184 | - * @access protected |
|
| 185 | - * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service. |
|
| 186 | - */ |
|
| 187 | - protected $entity_list_service; |
|
| 188 | - |
|
| 189 | - /** |
|
| 190 | - * The Entity Types Taxonomy Walker. |
|
| 191 | - * |
|
| 192 | - * @since 3.1.0 |
|
| 193 | - * @access private |
|
| 194 | - * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker |
|
| 195 | - */ |
|
| 196 | - private $entity_types_taxonomy_walker; |
|
| 197 | - |
|
| 198 | - /** |
|
| 199 | - * The ShareThis service. |
|
| 200 | - * |
|
| 201 | - * @since 3.2.0 |
|
| 202 | - * @access private |
|
| 203 | - * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service. |
|
| 204 | - */ |
|
| 205 | - private $sharethis_service; |
|
| 206 | - |
|
| 207 | - /** |
|
| 208 | - * The PrimaShop adapter. |
|
| 209 | - * |
|
| 210 | - * @since 3.2.3 |
|
| 211 | - * @access private |
|
| 212 | - * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter. |
|
| 213 | - */ |
|
| 214 | - private $primashop_adapter; |
|
| 215 | - |
|
| 216 | - /** |
|
| 217 | - * The WordLift Dashboard adapter. |
|
| 218 | - * |
|
| 219 | - * @since 3.4.0 |
|
| 220 | - * @access private |
|
| 221 | - * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service; |
|
| 222 | - */ |
|
| 223 | - private $dashboard_service; |
|
| 224 | - |
|
| 225 | - /** |
|
| 226 | - * The entity type service. |
|
| 227 | - * |
|
| 228 | - * @since 3.6.0 |
|
| 229 | - * @access private |
|
| 230 | - * @var \Wordlift_Entity_Post_Type_Service |
|
| 231 | - */ |
|
| 232 | - private $entity_post_type_service; |
|
| 233 | - |
|
| 234 | - /** |
|
| 235 | - * The entity link service used to mangle links to entities with a custom slug or even w/o a slug. |
|
| 236 | - * |
|
| 237 | - * @since 3.6.0 |
|
| 238 | - * @access private |
|
| 239 | - * @var \Wordlift_Entity_Link_Service $entity_link_service The {@link Wordlift_Entity_Link_Service} instance. |
|
| 240 | - */ |
|
| 241 | - private $entity_link_service; |
|
| 242 | - |
|
| 243 | - /** |
|
| 244 | - * A {@link Wordlift_Sparql_Service} instance. |
|
| 245 | - * |
|
| 246 | - * @since 3.6.0 |
|
| 247 | - * @access protected |
|
| 248 | - * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance. |
|
| 249 | - */ |
|
| 250 | - protected $sparql_service; |
|
| 251 | - |
|
| 252 | - /** |
|
| 253 | - * A {@link Wordlift_Import_Service} instance. |
|
| 254 | - * |
|
| 255 | - * @since 3.6.0 |
|
| 256 | - * @access private |
|
| 257 | - * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance. |
|
| 258 | - */ |
|
| 259 | - private $import_service; |
|
| 260 | - |
|
| 261 | - /** |
|
| 262 | - * A {@link Wordlift_Rebuild_Service} instance. |
|
| 263 | - * |
|
| 264 | - * @since 3.6.0 |
|
| 265 | - * @access private |
|
| 266 | - * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance. |
|
| 267 | - */ |
|
| 268 | - private $rebuild_service; |
|
| 269 | - |
|
| 270 | - /** |
|
| 271 | - * A {@link Wordlift_Jsonld_Service} instance. |
|
| 272 | - * |
|
| 273 | - * @since 3.7.0 |
|
| 274 | - * @access protected |
|
| 275 | - * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance. |
|
| 276 | - */ |
|
| 277 | - protected $jsonld_service; |
|
| 278 | - |
|
| 279 | - /** |
|
| 280 | - * A {@link Wordlift_Website_Jsonld_Converter} instance. |
|
| 281 | - * |
|
| 282 | - * @since 3.14.0 |
|
| 283 | - * @access protected |
|
| 284 | - * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance. |
|
| 285 | - */ |
|
| 286 | - protected $jsonld_website_converter; |
|
| 287 | - |
|
| 288 | - /** |
|
| 289 | - * A {@link Wordlift_Property_Factory} instance. |
|
| 290 | - * |
|
| 291 | - * @since 3.7.0 |
|
| 292 | - * @access private |
|
| 293 | - * @var \Wordlift_Property_Factory $property_factory |
|
| 294 | - */ |
|
| 295 | - private $property_factory; |
|
| 296 | - |
|
| 297 | - /** |
|
| 298 | - * The 'Download Your Data' page. |
|
| 299 | - * |
|
| 300 | - * @since 3.6.0 |
|
| 301 | - * @access private |
|
| 302 | - * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page. |
|
| 303 | - */ |
|
| 304 | - private $download_your_data_page; |
|
| 305 | - |
|
| 306 | - /** |
|
| 307 | - * The 'WordLift Settings' page. |
|
| 308 | - * |
|
| 309 | - * @since 3.11.0 |
|
| 310 | - * @access protected |
|
| 311 | - * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page. |
|
| 312 | - */ |
|
| 313 | - protected $settings_page; |
|
| 314 | - |
|
| 315 | - /** |
|
| 316 | - * The install wizard page. |
|
| 317 | - * |
|
| 318 | - * @since 3.9.0 |
|
| 319 | - * @access private |
|
| 320 | - * @var \Wordlift_Admin_Setup $admin_setup The Install wizard. |
|
| 321 | - */ |
|
| 322 | - private $admin_setup; |
|
| 323 | - |
|
| 324 | - /** |
|
| 325 | - * The Content Filter Service hooks up to the 'the_content' filter and provides |
|
| 326 | - * linking of entities to their pages. |
|
| 327 | - * |
|
| 328 | - * @since 3.8.0 |
|
| 329 | - * @access private |
|
| 330 | - * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance. |
|
| 331 | - */ |
|
| 332 | - private $content_filter_service; |
|
| 333 | - |
|
| 334 | - /** |
|
| 335 | - * A {@link Wordlift_Key_Validation_Service} instance. |
|
| 336 | - * |
|
| 337 | - * @since 3.9.0 |
|
| 338 | - * @access private |
|
| 339 | - * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance. |
|
| 340 | - */ |
|
| 341 | - private $key_validation_service; |
|
| 342 | - |
|
| 343 | - /** |
|
| 344 | - * A {@link Wordlift_Rating_Service} instance. |
|
| 345 | - * |
|
| 346 | - * @since 3.10.0 |
|
| 347 | - * @access private |
|
| 348 | - * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance. |
|
| 349 | - */ |
|
| 350 | - private $rating_service; |
|
| 351 | - |
|
| 352 | - /** |
|
| 353 | - * A {@link Wordlift_Post_To_Jsonld_Converter} instance. |
|
| 354 | - * |
|
| 355 | - * @since 3.10.0 |
|
| 356 | - * @access protected |
|
| 357 | - * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance. |
|
| 358 | - */ |
|
| 359 | - protected $post_to_jsonld_converter; |
|
| 360 | - |
|
| 361 | - /** |
|
| 362 | - * A {@link Wordlift_Configuration_Service} instance. |
|
| 363 | - * |
|
| 364 | - * @since 3.10.0 |
|
| 365 | - * @access protected |
|
| 366 | - * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance. |
|
| 367 | - */ |
|
| 368 | - protected $configuration_service; |
|
| 369 | - |
|
| 370 | - /** |
|
| 371 | - * A {@link Wordlift_Install_Service} instance. |
|
| 372 | - * |
|
| 373 | - * @since 3.18.0 |
|
| 374 | - * @access protected |
|
| 375 | - * @var \Wordlift_Install_Service $install_service A {@link Wordlift_Install_Service} instance. |
|
| 376 | - */ |
|
| 377 | - protected $install_service; |
|
| 378 | - |
|
| 379 | - /** |
|
| 380 | - * A {@link Wordlift_Entity_Type_Service} instance. |
|
| 381 | - * |
|
| 382 | - * @since 3.10.0 |
|
| 383 | - * @access protected |
|
| 384 | - * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance. |
|
| 385 | - */ |
|
| 386 | - protected $entity_type_service; |
|
| 387 | - |
|
| 388 | - /** |
|
| 389 | - * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance. |
|
| 390 | - * |
|
| 391 | - * @since 3.10.0 |
|
| 392 | - * @access protected |
|
| 393 | - * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance. |
|
| 394 | - */ |
|
| 395 | - protected $entity_post_to_jsonld_converter; |
|
| 396 | - |
|
| 397 | - /** |
|
| 398 | - * A {@link Wordlift_Postid_To_Jsonld_Converter} instance. |
|
| 399 | - * |
|
| 400 | - * @since 3.10.0 |
|
| 401 | - * @access protected |
|
| 402 | - * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance. |
|
| 403 | - */ |
|
| 404 | - protected $postid_to_jsonld_converter; |
|
| 405 | - |
|
| 406 | - /** |
|
| 407 | - * The {@link Wordlift_Admin_Status_Page} class. |
|
| 408 | - * |
|
| 409 | - * @since 3.9.8 |
|
| 410 | - * @access private |
|
| 411 | - * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class. |
|
| 412 | - */ |
|
| 413 | - private $status_page; |
|
| 414 | - |
|
| 415 | - /** |
|
| 416 | - * The {@link Wordlift_Category_Taxonomy_Service} instance. |
|
| 417 | - * |
|
| 418 | - * @since 3.11.0 |
|
| 419 | - * @access protected |
|
| 420 | - * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance. |
|
| 421 | - */ |
|
| 422 | - protected $category_taxonomy_service; |
|
| 423 | - |
|
| 424 | - /** |
|
| 425 | - * The {@link Wordlift_Entity_Page_Service} instance. |
|
| 426 | - * |
|
| 427 | - * @since 3.11.0 |
|
| 428 | - * @access protected |
|
| 429 | - * @var \Wordlift_Entity_Page_Service $entity_page_service The {@link Wordlift_Entity_Page_Service} instance. |
|
| 430 | - */ |
|
| 431 | - protected $entity_page_service; |
|
| 432 | - |
|
| 433 | - /** |
|
| 434 | - * The {@link Wordlift_Admin_Settings_Page_Action_Link} class. |
|
| 435 | - * |
|
| 436 | - * @since 3.11.0 |
|
| 437 | - * @access protected |
|
| 438 | - * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class. |
|
| 439 | - */ |
|
| 440 | - protected $settings_page_action_link; |
|
| 441 | - |
|
| 442 | - /** |
|
| 443 | - * The {@link Wordlift_Admin_Settings_Page_Action_Link} class. |
|
| 444 | - * |
|
| 445 | - * @since 3.11.0 |
|
| 446 | - * @access protected |
|
| 447 | - * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class. |
|
| 448 | - */ |
|
| 449 | - protected $analytics_settings_page_action_link; |
|
| 450 | - |
|
| 451 | - /** |
|
| 452 | - * The {@link Wordlift_Analytics_Connect} class. |
|
| 453 | - * |
|
| 454 | - * @since 3.11.0 |
|
| 455 | - * @access protected |
|
| 456 | - * @var \Wordlift_Analytics_Connect $analytics_connect The {@link Wordlift_Analytics_Connect} class. |
|
| 457 | - */ |
|
| 458 | - protected $analytics_connect; |
|
| 459 | - |
|
| 460 | - /** |
|
| 461 | - * The {@link Wordlift_Publisher_Ajax_Adapter} instance. |
|
| 462 | - * |
|
| 463 | - * @since 3.11.0 |
|
| 464 | - * @access protected |
|
| 465 | - * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance. |
|
| 466 | - */ |
|
| 467 | - protected $publisher_ajax_adapter; |
|
| 468 | - |
|
| 469 | - /** |
|
| 470 | - * The {@link Wordlift_Admin_Input_Element} element renderer. |
|
| 471 | - * |
|
| 472 | - * @since 3.11.0 |
|
| 473 | - * @access protected |
|
| 474 | - * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer. |
|
| 475 | - */ |
|
| 476 | - protected $input_element; |
|
| 477 | - |
|
| 478 | - /** |
|
| 479 | - * The {@link Wordlift_Admin_Radio_Input_Element} element renderer. |
|
| 480 | - * |
|
| 481 | - * @since 3.13.0 |
|
| 482 | - * @access protected |
|
| 483 | - * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer. |
|
| 484 | - */ |
|
| 485 | - protected $radio_input_element; |
|
| 486 | - |
|
| 487 | - /** |
|
| 488 | - * The {@link Wordlift_Admin_Language_Select_Element} element renderer. |
|
| 489 | - * |
|
| 490 | - * @since 3.11.0 |
|
| 491 | - * @access protected |
|
| 492 | - * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer. |
|
| 493 | - */ |
|
| 494 | - protected $language_select_element; |
|
| 495 | - |
|
| 496 | - /** |
|
| 497 | - * The {@link Wordlift_Admin_Country_Select_Element} element renderer. |
|
| 498 | - * |
|
| 499 | - * @since 3.18.0 |
|
| 500 | - * @access protected |
|
| 501 | - * @var \Wordlift_Admin_Country_Select_Element $country_select_element The {@link Wordlift_Admin_Country_Select_Element} element renderer. |
|
| 502 | - */ |
|
| 503 | - protected $country_select_element; |
|
| 504 | - |
|
| 505 | - /** |
|
| 506 | - * The {@link Wordlift_Admin_Publisher_Element} element renderer. |
|
| 507 | - * |
|
| 508 | - * @since 3.11.0 |
|
| 509 | - * @access protected |
|
| 510 | - * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer. |
|
| 511 | - */ |
|
| 512 | - protected $publisher_element; |
|
| 513 | - |
|
| 514 | - /** |
|
| 515 | - * The {@link Wordlift_Admin_Select2_Element} element renderer. |
|
| 516 | - * |
|
| 517 | - * @since 3.11.0 |
|
| 518 | - * @access protected |
|
| 519 | - * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer. |
|
| 520 | - */ |
|
| 521 | - protected $select2_element; |
|
| 522 | - |
|
| 523 | - /** |
|
| 524 | - * The controller for the entity type list admin page |
|
| 525 | - * |
|
| 526 | - * @since 3.11.0 |
|
| 527 | - * @access private |
|
| 528 | - * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class. |
|
| 529 | - */ |
|
| 530 | - private $entity_type_admin_page; |
|
| 531 | - |
|
| 532 | - /** |
|
| 533 | - * The controller for the entity type settings admin page |
|
| 534 | - * |
|
| 535 | - * @since 3.11.0 |
|
| 536 | - * @access private |
|
| 537 | - * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class. |
|
| 538 | - */ |
|
| 539 | - private $entity_type_settings_admin_page; |
|
| 540 | - |
|
| 541 | - /** |
|
| 542 | - * The {@link Wordlift_Related_Entities_Cloud_Widget} instance. |
|
| 543 | - * |
|
| 544 | - * @since 3.11.0 |
|
| 545 | - * @access protected |
|
| 546 | - * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance. |
|
| 547 | - */ |
|
| 548 | - protected $related_entities_cloud_widget; |
|
| 549 | - |
|
| 550 | - /** |
|
| 551 | - * The {@link Wordlift_Admin_Author_Element} instance. |
|
| 552 | - * |
|
| 553 | - * @since 3.14.0 |
|
| 554 | - * @access protected |
|
| 555 | - * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance. |
|
| 556 | - */ |
|
| 557 | - protected $author_element; |
|
| 558 | - |
|
| 559 | - /** |
|
| 560 | - * The {@link Wordlift_Sample_Data_Service} instance. |
|
| 561 | - * |
|
| 562 | - * @since 3.12.0 |
|
| 563 | - * @access protected |
|
| 564 | - * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance. |
|
| 565 | - */ |
|
| 566 | - protected $sample_data_service; |
|
| 567 | - |
|
| 568 | - /** |
|
| 569 | - * The {@link Wordlift_Sample_Data_Ajax_Adapter} instance. |
|
| 570 | - * |
|
| 571 | - * @since 3.12.0 |
|
| 572 | - * @access protected |
|
| 573 | - * @var \Wordlift_Sample_Data_Ajax_Adapter $sample_data_ajax_adapter The {@link Wordlift_Sample_Data_Ajax_Adapter} instance. |
|
| 574 | - */ |
|
| 575 | - protected $sample_data_ajax_adapter; |
|
| 576 | - |
|
| 577 | - /** |
|
| 578 | - * The {@link Wordlift_Relation_Rebuild_Service} instance. |
|
| 579 | - * |
|
| 580 | - * @since 3.14.3 |
|
| 581 | - * @access private |
|
| 582 | - * @var \Wordlift_Relation_Rebuild_Service $relation_rebuild_service The {@link Wordlift_Relation_Rebuild_Service} instance. |
|
| 583 | - */ |
|
| 584 | - private $relation_rebuild_service; |
|
| 585 | - |
|
| 586 | - /** |
|
| 587 | - * The {@link Wordlift_Relation_Rebuild_Adapter} instance. |
|
| 588 | - * |
|
| 589 | - * @since 3.14.3 |
|
| 590 | - * @access private |
|
| 591 | - * @var \Wordlift_Relation_Rebuild_Adapter $relation_rebuild_adapter The {@link Wordlift_Relation_Rebuild_Adapter} instance. |
|
| 592 | - */ |
|
| 593 | - private $relation_rebuild_adapter; |
|
| 594 | - |
|
| 595 | - /** |
|
| 596 | - * The {@link Wordlift_Reference_Rebuild_Service} instance. |
|
| 597 | - * |
|
| 598 | - * @since 3.18.0 |
|
| 599 | - * @access private |
|
| 600 | - * @var \Wordlift_Reference_Rebuild_Service $reference_rebuild_service The {@link Wordlift_Reference_Rebuild_Service} instance. |
|
| 601 | - */ |
|
| 602 | - private $reference_rebuild_service; |
|
| 603 | - |
|
| 604 | - /** |
|
| 605 | - * The {@link Wordlift_Google_Analytics_Export_Service} instance. |
|
| 606 | - * |
|
| 607 | - * @since 3.16.0 |
|
| 608 | - * @access protected |
|
| 609 | - * @var \Wordlift_Google_Analytics_Export_Service $google_analytics_export_service The {@link Wordlift_Google_Analytics_Export_Service} instance. |
|
| 610 | - */ |
|
| 611 | - protected $google_analytics_export_service; |
|
| 612 | - |
|
| 613 | - /** |
|
| 614 | - * {@link Wordlift}'s singleton instance. |
|
| 615 | - * |
|
| 616 | - * @since 3.15.0 |
|
| 617 | - * @access protected |
|
| 618 | - * @var \Wordlift_Entity_Type_Adapter $entity_type_adapter The {@link Wordlift_Entity_Type_Adapter} instance. |
|
| 619 | - */ |
|
| 620 | - protected $entity_type_adapter; |
|
| 621 | - |
|
| 622 | - /** |
|
| 623 | - * The {@link Wordlift_Linked_Data_Service} instance. |
|
| 624 | - * |
|
| 625 | - * @since 3.15.0 |
|
| 626 | - * @access protected |
|
| 627 | - * @var \Wordlift_Linked_Data_Service $linked_data_service The {@link Wordlift_Linked_Data_Service} instance. |
|
| 628 | - */ |
|
| 629 | - protected $linked_data_service; |
|
| 630 | - |
|
| 631 | - /** |
|
| 632 | - * The {@link Wordlift_Storage_Factory} instance. |
|
| 633 | - * |
|
| 634 | - * @since 3.15.0 |
|
| 635 | - * @access protected |
|
| 636 | - * @var \Wordlift_Storage_Factory $storage_factory The {@link Wordlift_Storage_Factory} instance. |
|
| 637 | - */ |
|
| 638 | - protected $storage_factory; |
|
| 639 | - |
|
| 640 | - /** |
|
| 641 | - * The {@link Wordlift_Sparql_Tuple_Rendition_Factory} instance. |
|
| 642 | - * |
|
| 643 | - * @since 3.15.0 |
|
| 644 | - * @access protected |
|
| 645 | - * @var \Wordlift_Sparql_Tuple_Rendition_Factory $rendition_factory The {@link Wordlift_Sparql_Tuple_Rendition_Factory} instance. |
|
| 646 | - */ |
|
| 647 | - protected $rendition_factory; |
|
| 648 | - |
|
| 649 | - /** |
|
| 650 | - * The {@link Wordlift_Autocomplete_Adapter} instance. |
|
| 651 | - * |
|
| 652 | - * @since 3.15.0 |
|
| 653 | - * @access private |
|
| 654 | - * @var \Wordlift_Autocomplete_Adapter $autocomplete_adapter The {@link Wordlift_Autocomplete_Adapter} instance. |
|
| 655 | - */ |
|
| 656 | - private $autocomplete_adapter; |
|
| 657 | - |
|
| 658 | - /** |
|
| 659 | - * The {@link Wordlift_Relation_Service} instance. |
|
| 660 | - * |
|
| 661 | - * @since 3.15.0 |
|
| 662 | - * @access protected |
|
| 663 | - * @var \Wordlift_Relation_Service $relation_service The {@link Wordlift_Relation_Service} instance. |
|
| 664 | - */ |
|
| 665 | - protected $relation_service; |
|
| 666 | - |
|
| 667 | - /** |
|
| 668 | - * The {@link Wordlift_Cached_Post_Converter} instance. |
|
| 669 | - * |
|
| 670 | - * @since 3.16.0 |
|
| 671 | - * @access protected |
|
| 672 | - * @var \Wordlift_Cached_Post_Converter $cached_postid_to_jsonld_converter The {@link Wordlift_Cached_Post_Converter} instance. |
|
| 673 | - * |
|
| 674 | - */ |
|
| 675 | - protected $cached_postid_to_jsonld_converter; |
|
| 676 | - |
|
| 677 | - /** |
|
| 678 | - * The {@link Wordlift_Entity_Uri_Service} instance. |
|
| 679 | - * |
|
| 680 | - * @since 3.16.3 |
|
| 681 | - * @access protected |
|
| 682 | - * @var \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance. |
|
| 683 | - */ |
|
| 684 | - protected $entity_uri_service; |
|
| 685 | - |
|
| 686 | - /** |
|
| 687 | - * The {@link Wordlift_Publisher_Service} instance. |
|
| 688 | - * |
|
| 689 | - * @since 3.19.0 |
|
| 690 | - * @access protected |
|
| 691 | - * @var \Wordlift_Publisher_Service $publisher_service The {@link Wordlift_Publisher_Service} instance. |
|
| 692 | - */ |
|
| 693 | - protected $publisher_service; |
|
| 694 | - |
|
| 695 | - /** |
|
| 696 | - * The {@link Wordlift_Context_Cards_Service} instance. |
|
| 697 | - * |
|
| 698 | - * @var \Wordlift_Context_Cards_Service The {@link Wordlift_Context_Cards_Service} instance. |
|
| 699 | - */ |
|
| 700 | - protected $context_cards_service; |
|
| 701 | - |
|
| 702 | - /** |
|
| 703 | - * {@link Wordlift}'s singleton instance. |
|
| 704 | - * |
|
| 705 | - * @since 3.11.2 |
|
| 706 | - * @access private |
|
| 707 | - * @var Wordlift $instance {@link Wordlift}'s singleton instance. |
|
| 708 | - */ |
|
| 709 | - private static $instance; |
|
| 710 | - |
|
| 711 | - //</editor-fold> |
|
| 712 | - |
|
| 713 | - /** |
|
| 714 | - * Define the core functionality of the plugin. |
|
| 715 | - * |
|
| 716 | - * Set the plugin name and the plugin version that can be used throughout the plugin. |
|
| 717 | - * Load the dependencies, define the locale, and set the hooks for the admin area and |
|
| 718 | - * the public-facing side of the site. |
|
| 719 | - * |
|
| 720 | - * @since 1.0.0 |
|
| 721 | - */ |
|
| 722 | - public function __construct() { |
|
| 723 | - |
|
| 724 | - self::$instance = $this; |
|
| 725 | - |
|
| 726 | - $this->plugin_name = 'wordlift'; |
|
| 727 | - $this->version = '3.25.5.1'; |
|
| 728 | - $this->load_dependencies(); |
|
| 729 | - $this->set_locale(); |
|
| 730 | - $this->define_admin_hooks(); |
|
| 731 | - $this->define_public_hooks(); |
|
| 732 | - |
|
| 733 | - // If we're in `WP_CLI` load the related files. |
|
| 734 | - if ( class_exists( 'WP_CLI' ) ) { |
|
| 735 | - $this->load_cli_dependencies(); |
|
| 736 | - } |
|
| 737 | - |
|
| 738 | - } |
|
| 739 | - |
|
| 740 | - /** |
|
| 741 | - * Get the singleton instance. |
|
| 742 | - * |
|
| 743 | - * @return Wordlift The {@link Wordlift} singleton instance. |
|
| 744 | - * @since 3.11.2 |
|
| 745 | - * |
|
| 746 | - */ |
|
| 747 | - public static function get_instance() { |
|
| 748 | - |
|
| 749 | - return self::$instance; |
|
| 750 | - } |
|
| 751 | - |
|
| 752 | - /** |
|
| 753 | - * Load the required dependencies for this plugin. |
|
| 754 | - * |
|
| 755 | - * Include the following files that make up the plugin: |
|
| 756 | - * |
|
| 757 | - * - Wordlift_Loader. Orchestrates the hooks of the plugin. |
|
| 758 | - * - Wordlift_i18n. Defines internationalization functionality. |
|
| 759 | - * - Wordlift_Admin. Defines all hooks for the admin area. |
|
| 760 | - * - Wordlift_Public. Defines all hooks for the public side of the site. |
|
| 761 | - * |
|
| 762 | - * Create an instance of the loader which will be used to register the hooks |
|
| 763 | - * with WordPress. |
|
| 764 | - * |
|
| 765 | - * @throws Exception |
|
| 766 | - * @since 1.0.0 |
|
| 767 | - * @access private |
|
| 768 | - */ |
|
| 769 | - private function load_dependencies() { |
|
| 770 | - |
|
| 771 | - /** |
|
| 772 | - * The class responsible for orchestrating the actions and filters of the |
|
| 773 | - * core plugin. |
|
| 774 | - */ |
|
| 775 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php'; |
|
| 776 | - |
|
| 777 | - // The class responsible for plugin uninstall. |
|
| 778 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-deactivator-feedback.php'; |
|
| 779 | - |
|
| 780 | - /** |
|
| 781 | - * The class responsible for defining internationalization functionality |
|
| 782 | - * of the plugin. |
|
| 783 | - */ |
|
| 784 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php'; |
|
| 785 | - |
|
| 786 | - /** |
|
| 787 | - * WordLift's supported languages. |
|
| 788 | - */ |
|
| 789 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php'; |
|
| 790 | - |
|
| 791 | - /** |
|
| 792 | - * WordLift's supported countries. |
|
| 793 | - */ |
|
| 794 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-countries.php'; |
|
| 795 | - |
|
| 796 | - /** |
|
| 797 | - * Provide support functions to sanitize data. |
|
| 798 | - */ |
|
| 799 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php'; |
|
| 800 | - |
|
| 801 | - /** Services. */ |
|
| 802 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php'; |
|
| 803 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-http-api.php'; |
|
| 804 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php'; |
|
| 805 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php'; |
|
| 806 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php'; |
|
| 807 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php'; |
|
| 808 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php'; |
|
| 809 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-linked-data-service.php'; |
|
| 810 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-service.php'; |
|
| 811 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-image-service.php'; |
|
| 812 | - |
|
| 813 | - /** |
|
| 814 | - * The Query builder. |
|
| 815 | - */ |
|
| 816 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php'; |
|
| 817 | - |
|
| 818 | - /** |
|
| 819 | - * The Schema service. |
|
| 820 | - */ |
|
| 821 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php'; |
|
| 822 | - |
|
| 823 | - /** |
|
| 824 | - * The schema:url property service. |
|
| 825 | - */ |
|
| 826 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php'; |
|
| 827 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php'; |
|
| 828 | - |
|
| 829 | - /** |
|
| 830 | - * The UI service. |
|
| 831 | - */ |
|
| 832 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php'; |
|
| 833 | - |
|
| 834 | - /** |
|
| 835 | - * The Thumbnail service. |
|
| 836 | - */ |
|
| 837 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php'; |
|
| 838 | - |
|
| 839 | - /** |
|
| 840 | - * The Entity Types Taxonomy service. |
|
| 841 | - */ |
|
| 842 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-taxonomy-service.php'; |
|
| 843 | - |
|
| 844 | - /** |
|
| 845 | - * The Entity service. |
|
| 846 | - */ |
|
| 847 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-service.php'; |
|
| 848 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php'; |
|
| 849 | - |
|
| 850 | - // Add the entity rating service. |
|
| 851 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php'; |
|
| 852 | - |
|
| 853 | - /** |
|
| 854 | - * The User service. |
|
| 855 | - */ |
|
| 856 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php'; |
|
| 857 | - |
|
| 858 | - /** |
|
| 859 | - * The Timeline service. |
|
| 860 | - */ |
|
| 861 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php'; |
|
| 862 | - |
|
| 863 | - /** |
|
| 864 | - * The Topic Taxonomy service. |
|
| 865 | - */ |
|
| 866 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php'; |
|
| 867 | - |
|
| 868 | - /** |
|
| 869 | - * The SPARQL service. |
|
| 870 | - */ |
|
| 871 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php'; |
|
| 872 | - |
|
| 873 | - /** |
|
| 874 | - * The WordLift import service. |
|
| 875 | - */ |
|
| 876 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php'; |
|
| 877 | - |
|
| 878 | - /** |
|
| 879 | - * The WordLift URI service. |
|
| 880 | - */ |
|
| 881 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php'; |
|
| 882 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php'; |
|
| 883 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php'; |
|
| 884 | - |
|
| 885 | - /** |
|
| 886 | - * The WordLift rebuild service, used to rebuild the remote dataset using the local data. |
|
| 887 | - */ |
|
| 888 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-listable.php'; |
|
| 889 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-rebuild-service.php'; |
|
| 890 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-reference-rebuild-service.php'; |
|
| 891 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-service.php'; |
|
| 892 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-adapter.php'; |
|
| 893 | - |
|
| 894 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php'; |
|
| 895 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php'; |
|
| 896 | - |
|
| 897 | - /** |
|
| 898 | - * Load the converters. |
|
| 899 | - */ |
|
| 900 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php'; |
|
| 901 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php'; |
|
| 902 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php'; |
|
| 903 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php'; |
|
| 904 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php'; |
|
| 905 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php'; |
|
| 906 | - |
|
| 907 | - /** |
|
| 908 | - * Load cache-related files. |
|
| 909 | - */ |
|
| 910 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/cache/require.php'; |
|
| 911 | - |
|
| 912 | - /** |
|
| 913 | - * Load the content filter. |
|
| 914 | - */ |
|
| 915 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php'; |
|
| 916 | - |
|
| 917 | - /* |
|
| 51 | + //<editor-fold desc="## FIELDS"> |
|
| 52 | + |
|
| 53 | + /** |
|
| 54 | + * The loader that's responsible for maintaining and registering all hooks that power |
|
| 55 | + * the plugin. |
|
| 56 | + * |
|
| 57 | + * @since 1.0.0 |
|
| 58 | + * @access protected |
|
| 59 | + * @var Wordlift_Loader $loader Maintains and registers all hooks for the plugin. |
|
| 60 | + */ |
|
| 61 | + protected $loader; |
|
| 62 | + |
|
| 63 | + /** |
|
| 64 | + * The unique identifier of this plugin. |
|
| 65 | + * |
|
| 66 | + * @since 1.0.0 |
|
| 67 | + * @access protected |
|
| 68 | + * @var string $plugin_name The string used to uniquely identify this plugin. |
|
| 69 | + */ |
|
| 70 | + protected $plugin_name; |
|
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * The current version of the plugin. |
|
| 74 | + * |
|
| 75 | + * @since 1.0.0 |
|
| 76 | + * @access protected |
|
| 77 | + * @var string $version The current version of the plugin. |
|
| 78 | + */ |
|
| 79 | + protected $version; |
|
| 80 | + |
|
| 81 | + /** |
|
| 82 | + * The {@link Wordlift_Tinymce_Adapter} instance. |
|
| 83 | + * |
|
| 84 | + * @since 3.12.0 |
|
| 85 | + * @access protected |
|
| 86 | + * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance. |
|
| 87 | + */ |
|
| 88 | + protected $tinymce_adapter; |
|
| 89 | + |
|
| 90 | + /** |
|
| 91 | + * The Thumbnail service. |
|
| 92 | + * |
|
| 93 | + * @since 3.1.5 |
|
| 94 | + * @access private |
|
| 95 | + * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service. |
|
| 96 | + */ |
|
| 97 | + private $thumbnail_service; |
|
| 98 | + |
|
| 99 | + /** |
|
| 100 | + * The UI service. |
|
| 101 | + * |
|
| 102 | + * @since 3.2.0 |
|
| 103 | + * @access private |
|
| 104 | + * @var \Wordlift_UI_Service $ui_service The UI service. |
|
| 105 | + */ |
|
| 106 | + private $ui_service; |
|
| 107 | + |
|
| 108 | + /** |
|
| 109 | + * The Schema service. |
|
| 110 | + * |
|
| 111 | + * @since 3.3.0 |
|
| 112 | + * @access protected |
|
| 113 | + * @var \Wordlift_Schema_Service $schema_service The Schema service. |
|
| 114 | + */ |
|
| 115 | + protected $schema_service; |
|
| 116 | + |
|
| 117 | + /** |
|
| 118 | + * The Entity service. |
|
| 119 | + * |
|
| 120 | + * @since 3.1.0 |
|
| 121 | + * @access protected |
|
| 122 | + * @var \Wordlift_Entity_Service $entity_service The Entity service. |
|
| 123 | + */ |
|
| 124 | + protected $entity_service; |
|
| 125 | + |
|
| 126 | + /** |
|
| 127 | + * The Topic Taxonomy service. |
|
| 128 | + * |
|
| 129 | + * @since 3.5.0 |
|
| 130 | + * @access private |
|
| 131 | + * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service. |
|
| 132 | + */ |
|
| 133 | + private $topic_taxonomy_service; |
|
| 134 | + |
|
| 135 | + /** |
|
| 136 | + * The Entity Types Taxonomy service. |
|
| 137 | + * |
|
| 138 | + * @since 3.18.0 |
|
| 139 | + * @access private |
|
| 140 | + * @var \Wordlift_Entity_Type_Taxonomy_Service The Entity Types Taxonomy service. |
|
| 141 | + */ |
|
| 142 | + private $entity_types_taxonomy_service; |
|
| 143 | + |
|
| 144 | + /** |
|
| 145 | + * The User service. |
|
| 146 | + * |
|
| 147 | + * @since 3.1.7 |
|
| 148 | + * @access protected |
|
| 149 | + * @var \Wordlift_User_Service $user_service The User service. |
|
| 150 | + */ |
|
| 151 | + protected $user_service; |
|
| 152 | + |
|
| 153 | + /** |
|
| 154 | + * The Timeline service. |
|
| 155 | + * |
|
| 156 | + * @since 3.1.0 |
|
| 157 | + * @access private |
|
| 158 | + * @var \Wordlift_Timeline_Service $timeline_service The Timeline service. |
|
| 159 | + */ |
|
| 160 | + private $timeline_service; |
|
| 161 | + |
|
| 162 | + /** |
|
| 163 | + * The Redirect service. |
|
| 164 | + * |
|
| 165 | + * @since 3.2.0 |
|
| 166 | + * @access private |
|
| 167 | + * @var \Wordlift_Redirect_Service $redirect_service The Redirect service. |
|
| 168 | + */ |
|
| 169 | + private $redirect_service; |
|
| 170 | + |
|
| 171 | + /** |
|
| 172 | + * The Notice service. |
|
| 173 | + * |
|
| 174 | + * @since 3.3.0 |
|
| 175 | + * @access private |
|
| 176 | + * @var \Wordlift_Notice_Service $notice_service The Notice service. |
|
| 177 | + */ |
|
| 178 | + private $notice_service; |
|
| 179 | + |
|
| 180 | + /** |
|
| 181 | + * The Entity list customization. |
|
| 182 | + * |
|
| 183 | + * @since 3.3.0 |
|
| 184 | + * @access protected |
|
| 185 | + * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service. |
|
| 186 | + */ |
|
| 187 | + protected $entity_list_service; |
|
| 188 | + |
|
| 189 | + /** |
|
| 190 | + * The Entity Types Taxonomy Walker. |
|
| 191 | + * |
|
| 192 | + * @since 3.1.0 |
|
| 193 | + * @access private |
|
| 194 | + * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker |
|
| 195 | + */ |
|
| 196 | + private $entity_types_taxonomy_walker; |
|
| 197 | + |
|
| 198 | + /** |
|
| 199 | + * The ShareThis service. |
|
| 200 | + * |
|
| 201 | + * @since 3.2.0 |
|
| 202 | + * @access private |
|
| 203 | + * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service. |
|
| 204 | + */ |
|
| 205 | + private $sharethis_service; |
|
| 206 | + |
|
| 207 | + /** |
|
| 208 | + * The PrimaShop adapter. |
|
| 209 | + * |
|
| 210 | + * @since 3.2.3 |
|
| 211 | + * @access private |
|
| 212 | + * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter. |
|
| 213 | + */ |
|
| 214 | + private $primashop_adapter; |
|
| 215 | + |
|
| 216 | + /** |
|
| 217 | + * The WordLift Dashboard adapter. |
|
| 218 | + * |
|
| 219 | + * @since 3.4.0 |
|
| 220 | + * @access private |
|
| 221 | + * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service; |
|
| 222 | + */ |
|
| 223 | + private $dashboard_service; |
|
| 224 | + |
|
| 225 | + /** |
|
| 226 | + * The entity type service. |
|
| 227 | + * |
|
| 228 | + * @since 3.6.0 |
|
| 229 | + * @access private |
|
| 230 | + * @var \Wordlift_Entity_Post_Type_Service |
|
| 231 | + */ |
|
| 232 | + private $entity_post_type_service; |
|
| 233 | + |
|
| 234 | + /** |
|
| 235 | + * The entity link service used to mangle links to entities with a custom slug or even w/o a slug. |
|
| 236 | + * |
|
| 237 | + * @since 3.6.0 |
|
| 238 | + * @access private |
|
| 239 | + * @var \Wordlift_Entity_Link_Service $entity_link_service The {@link Wordlift_Entity_Link_Service} instance. |
|
| 240 | + */ |
|
| 241 | + private $entity_link_service; |
|
| 242 | + |
|
| 243 | + /** |
|
| 244 | + * A {@link Wordlift_Sparql_Service} instance. |
|
| 245 | + * |
|
| 246 | + * @since 3.6.0 |
|
| 247 | + * @access protected |
|
| 248 | + * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance. |
|
| 249 | + */ |
|
| 250 | + protected $sparql_service; |
|
| 251 | + |
|
| 252 | + /** |
|
| 253 | + * A {@link Wordlift_Import_Service} instance. |
|
| 254 | + * |
|
| 255 | + * @since 3.6.0 |
|
| 256 | + * @access private |
|
| 257 | + * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance. |
|
| 258 | + */ |
|
| 259 | + private $import_service; |
|
| 260 | + |
|
| 261 | + /** |
|
| 262 | + * A {@link Wordlift_Rebuild_Service} instance. |
|
| 263 | + * |
|
| 264 | + * @since 3.6.0 |
|
| 265 | + * @access private |
|
| 266 | + * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance. |
|
| 267 | + */ |
|
| 268 | + private $rebuild_service; |
|
| 269 | + |
|
| 270 | + /** |
|
| 271 | + * A {@link Wordlift_Jsonld_Service} instance. |
|
| 272 | + * |
|
| 273 | + * @since 3.7.0 |
|
| 274 | + * @access protected |
|
| 275 | + * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance. |
|
| 276 | + */ |
|
| 277 | + protected $jsonld_service; |
|
| 278 | + |
|
| 279 | + /** |
|
| 280 | + * A {@link Wordlift_Website_Jsonld_Converter} instance. |
|
| 281 | + * |
|
| 282 | + * @since 3.14.0 |
|
| 283 | + * @access protected |
|
| 284 | + * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance. |
|
| 285 | + */ |
|
| 286 | + protected $jsonld_website_converter; |
|
| 287 | + |
|
| 288 | + /** |
|
| 289 | + * A {@link Wordlift_Property_Factory} instance. |
|
| 290 | + * |
|
| 291 | + * @since 3.7.0 |
|
| 292 | + * @access private |
|
| 293 | + * @var \Wordlift_Property_Factory $property_factory |
|
| 294 | + */ |
|
| 295 | + private $property_factory; |
|
| 296 | + |
|
| 297 | + /** |
|
| 298 | + * The 'Download Your Data' page. |
|
| 299 | + * |
|
| 300 | + * @since 3.6.0 |
|
| 301 | + * @access private |
|
| 302 | + * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page. |
|
| 303 | + */ |
|
| 304 | + private $download_your_data_page; |
|
| 305 | + |
|
| 306 | + /** |
|
| 307 | + * The 'WordLift Settings' page. |
|
| 308 | + * |
|
| 309 | + * @since 3.11.0 |
|
| 310 | + * @access protected |
|
| 311 | + * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page. |
|
| 312 | + */ |
|
| 313 | + protected $settings_page; |
|
| 314 | + |
|
| 315 | + /** |
|
| 316 | + * The install wizard page. |
|
| 317 | + * |
|
| 318 | + * @since 3.9.0 |
|
| 319 | + * @access private |
|
| 320 | + * @var \Wordlift_Admin_Setup $admin_setup The Install wizard. |
|
| 321 | + */ |
|
| 322 | + private $admin_setup; |
|
| 323 | + |
|
| 324 | + /** |
|
| 325 | + * The Content Filter Service hooks up to the 'the_content' filter and provides |
|
| 326 | + * linking of entities to their pages. |
|
| 327 | + * |
|
| 328 | + * @since 3.8.0 |
|
| 329 | + * @access private |
|
| 330 | + * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance. |
|
| 331 | + */ |
|
| 332 | + private $content_filter_service; |
|
| 333 | + |
|
| 334 | + /** |
|
| 335 | + * A {@link Wordlift_Key_Validation_Service} instance. |
|
| 336 | + * |
|
| 337 | + * @since 3.9.0 |
|
| 338 | + * @access private |
|
| 339 | + * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance. |
|
| 340 | + */ |
|
| 341 | + private $key_validation_service; |
|
| 342 | + |
|
| 343 | + /** |
|
| 344 | + * A {@link Wordlift_Rating_Service} instance. |
|
| 345 | + * |
|
| 346 | + * @since 3.10.0 |
|
| 347 | + * @access private |
|
| 348 | + * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance. |
|
| 349 | + */ |
|
| 350 | + private $rating_service; |
|
| 351 | + |
|
| 352 | + /** |
|
| 353 | + * A {@link Wordlift_Post_To_Jsonld_Converter} instance. |
|
| 354 | + * |
|
| 355 | + * @since 3.10.0 |
|
| 356 | + * @access protected |
|
| 357 | + * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance. |
|
| 358 | + */ |
|
| 359 | + protected $post_to_jsonld_converter; |
|
| 360 | + |
|
| 361 | + /** |
|
| 362 | + * A {@link Wordlift_Configuration_Service} instance. |
|
| 363 | + * |
|
| 364 | + * @since 3.10.0 |
|
| 365 | + * @access protected |
|
| 366 | + * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance. |
|
| 367 | + */ |
|
| 368 | + protected $configuration_service; |
|
| 369 | + |
|
| 370 | + /** |
|
| 371 | + * A {@link Wordlift_Install_Service} instance. |
|
| 372 | + * |
|
| 373 | + * @since 3.18.0 |
|
| 374 | + * @access protected |
|
| 375 | + * @var \Wordlift_Install_Service $install_service A {@link Wordlift_Install_Service} instance. |
|
| 376 | + */ |
|
| 377 | + protected $install_service; |
|
| 378 | + |
|
| 379 | + /** |
|
| 380 | + * A {@link Wordlift_Entity_Type_Service} instance. |
|
| 381 | + * |
|
| 382 | + * @since 3.10.0 |
|
| 383 | + * @access protected |
|
| 384 | + * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance. |
|
| 385 | + */ |
|
| 386 | + protected $entity_type_service; |
|
| 387 | + |
|
| 388 | + /** |
|
| 389 | + * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance. |
|
| 390 | + * |
|
| 391 | + * @since 3.10.0 |
|
| 392 | + * @access protected |
|
| 393 | + * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance. |
|
| 394 | + */ |
|
| 395 | + protected $entity_post_to_jsonld_converter; |
|
| 396 | + |
|
| 397 | + /** |
|
| 398 | + * A {@link Wordlift_Postid_To_Jsonld_Converter} instance. |
|
| 399 | + * |
|
| 400 | + * @since 3.10.0 |
|
| 401 | + * @access protected |
|
| 402 | + * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance. |
|
| 403 | + */ |
|
| 404 | + protected $postid_to_jsonld_converter; |
|
| 405 | + |
|
| 406 | + /** |
|
| 407 | + * The {@link Wordlift_Admin_Status_Page} class. |
|
| 408 | + * |
|
| 409 | + * @since 3.9.8 |
|
| 410 | + * @access private |
|
| 411 | + * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class. |
|
| 412 | + */ |
|
| 413 | + private $status_page; |
|
| 414 | + |
|
| 415 | + /** |
|
| 416 | + * The {@link Wordlift_Category_Taxonomy_Service} instance. |
|
| 417 | + * |
|
| 418 | + * @since 3.11.0 |
|
| 419 | + * @access protected |
|
| 420 | + * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance. |
|
| 421 | + */ |
|
| 422 | + protected $category_taxonomy_service; |
|
| 423 | + |
|
| 424 | + /** |
|
| 425 | + * The {@link Wordlift_Entity_Page_Service} instance. |
|
| 426 | + * |
|
| 427 | + * @since 3.11.0 |
|
| 428 | + * @access protected |
|
| 429 | + * @var \Wordlift_Entity_Page_Service $entity_page_service The {@link Wordlift_Entity_Page_Service} instance. |
|
| 430 | + */ |
|
| 431 | + protected $entity_page_service; |
|
| 432 | + |
|
| 433 | + /** |
|
| 434 | + * The {@link Wordlift_Admin_Settings_Page_Action_Link} class. |
|
| 435 | + * |
|
| 436 | + * @since 3.11.0 |
|
| 437 | + * @access protected |
|
| 438 | + * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class. |
|
| 439 | + */ |
|
| 440 | + protected $settings_page_action_link; |
|
| 441 | + |
|
| 442 | + /** |
|
| 443 | + * The {@link Wordlift_Admin_Settings_Page_Action_Link} class. |
|
| 444 | + * |
|
| 445 | + * @since 3.11.0 |
|
| 446 | + * @access protected |
|
| 447 | + * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class. |
|
| 448 | + */ |
|
| 449 | + protected $analytics_settings_page_action_link; |
|
| 450 | + |
|
| 451 | + /** |
|
| 452 | + * The {@link Wordlift_Analytics_Connect} class. |
|
| 453 | + * |
|
| 454 | + * @since 3.11.0 |
|
| 455 | + * @access protected |
|
| 456 | + * @var \Wordlift_Analytics_Connect $analytics_connect The {@link Wordlift_Analytics_Connect} class. |
|
| 457 | + */ |
|
| 458 | + protected $analytics_connect; |
|
| 459 | + |
|
| 460 | + /** |
|
| 461 | + * The {@link Wordlift_Publisher_Ajax_Adapter} instance. |
|
| 462 | + * |
|
| 463 | + * @since 3.11.0 |
|
| 464 | + * @access protected |
|
| 465 | + * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance. |
|
| 466 | + */ |
|
| 467 | + protected $publisher_ajax_adapter; |
|
| 468 | + |
|
| 469 | + /** |
|
| 470 | + * The {@link Wordlift_Admin_Input_Element} element renderer. |
|
| 471 | + * |
|
| 472 | + * @since 3.11.0 |
|
| 473 | + * @access protected |
|
| 474 | + * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer. |
|
| 475 | + */ |
|
| 476 | + protected $input_element; |
|
| 477 | + |
|
| 478 | + /** |
|
| 479 | + * The {@link Wordlift_Admin_Radio_Input_Element} element renderer. |
|
| 480 | + * |
|
| 481 | + * @since 3.13.0 |
|
| 482 | + * @access protected |
|
| 483 | + * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer. |
|
| 484 | + */ |
|
| 485 | + protected $radio_input_element; |
|
| 486 | + |
|
| 487 | + /** |
|
| 488 | + * The {@link Wordlift_Admin_Language_Select_Element} element renderer. |
|
| 489 | + * |
|
| 490 | + * @since 3.11.0 |
|
| 491 | + * @access protected |
|
| 492 | + * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer. |
|
| 493 | + */ |
|
| 494 | + protected $language_select_element; |
|
| 495 | + |
|
| 496 | + /** |
|
| 497 | + * The {@link Wordlift_Admin_Country_Select_Element} element renderer. |
|
| 498 | + * |
|
| 499 | + * @since 3.18.0 |
|
| 500 | + * @access protected |
|
| 501 | + * @var \Wordlift_Admin_Country_Select_Element $country_select_element The {@link Wordlift_Admin_Country_Select_Element} element renderer. |
|
| 502 | + */ |
|
| 503 | + protected $country_select_element; |
|
| 504 | + |
|
| 505 | + /** |
|
| 506 | + * The {@link Wordlift_Admin_Publisher_Element} element renderer. |
|
| 507 | + * |
|
| 508 | + * @since 3.11.0 |
|
| 509 | + * @access protected |
|
| 510 | + * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer. |
|
| 511 | + */ |
|
| 512 | + protected $publisher_element; |
|
| 513 | + |
|
| 514 | + /** |
|
| 515 | + * The {@link Wordlift_Admin_Select2_Element} element renderer. |
|
| 516 | + * |
|
| 517 | + * @since 3.11.0 |
|
| 518 | + * @access protected |
|
| 519 | + * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer. |
|
| 520 | + */ |
|
| 521 | + protected $select2_element; |
|
| 522 | + |
|
| 523 | + /** |
|
| 524 | + * The controller for the entity type list admin page |
|
| 525 | + * |
|
| 526 | + * @since 3.11.0 |
|
| 527 | + * @access private |
|
| 528 | + * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class. |
|
| 529 | + */ |
|
| 530 | + private $entity_type_admin_page; |
|
| 531 | + |
|
| 532 | + /** |
|
| 533 | + * The controller for the entity type settings admin page |
|
| 534 | + * |
|
| 535 | + * @since 3.11.0 |
|
| 536 | + * @access private |
|
| 537 | + * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class. |
|
| 538 | + */ |
|
| 539 | + private $entity_type_settings_admin_page; |
|
| 540 | + |
|
| 541 | + /** |
|
| 542 | + * The {@link Wordlift_Related_Entities_Cloud_Widget} instance. |
|
| 543 | + * |
|
| 544 | + * @since 3.11.0 |
|
| 545 | + * @access protected |
|
| 546 | + * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance. |
|
| 547 | + */ |
|
| 548 | + protected $related_entities_cloud_widget; |
|
| 549 | + |
|
| 550 | + /** |
|
| 551 | + * The {@link Wordlift_Admin_Author_Element} instance. |
|
| 552 | + * |
|
| 553 | + * @since 3.14.0 |
|
| 554 | + * @access protected |
|
| 555 | + * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance. |
|
| 556 | + */ |
|
| 557 | + protected $author_element; |
|
| 558 | + |
|
| 559 | + /** |
|
| 560 | + * The {@link Wordlift_Sample_Data_Service} instance. |
|
| 561 | + * |
|
| 562 | + * @since 3.12.0 |
|
| 563 | + * @access protected |
|
| 564 | + * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance. |
|
| 565 | + */ |
|
| 566 | + protected $sample_data_service; |
|
| 567 | + |
|
| 568 | + /** |
|
| 569 | + * The {@link Wordlift_Sample_Data_Ajax_Adapter} instance. |
|
| 570 | + * |
|
| 571 | + * @since 3.12.0 |
|
| 572 | + * @access protected |
|
| 573 | + * @var \Wordlift_Sample_Data_Ajax_Adapter $sample_data_ajax_adapter The {@link Wordlift_Sample_Data_Ajax_Adapter} instance. |
|
| 574 | + */ |
|
| 575 | + protected $sample_data_ajax_adapter; |
|
| 576 | + |
|
| 577 | + /** |
|
| 578 | + * The {@link Wordlift_Relation_Rebuild_Service} instance. |
|
| 579 | + * |
|
| 580 | + * @since 3.14.3 |
|
| 581 | + * @access private |
|
| 582 | + * @var \Wordlift_Relation_Rebuild_Service $relation_rebuild_service The {@link Wordlift_Relation_Rebuild_Service} instance. |
|
| 583 | + */ |
|
| 584 | + private $relation_rebuild_service; |
|
| 585 | + |
|
| 586 | + /** |
|
| 587 | + * The {@link Wordlift_Relation_Rebuild_Adapter} instance. |
|
| 588 | + * |
|
| 589 | + * @since 3.14.3 |
|
| 590 | + * @access private |
|
| 591 | + * @var \Wordlift_Relation_Rebuild_Adapter $relation_rebuild_adapter The {@link Wordlift_Relation_Rebuild_Adapter} instance. |
|
| 592 | + */ |
|
| 593 | + private $relation_rebuild_adapter; |
|
| 594 | + |
|
| 595 | + /** |
|
| 596 | + * The {@link Wordlift_Reference_Rebuild_Service} instance. |
|
| 597 | + * |
|
| 598 | + * @since 3.18.0 |
|
| 599 | + * @access private |
|
| 600 | + * @var \Wordlift_Reference_Rebuild_Service $reference_rebuild_service The {@link Wordlift_Reference_Rebuild_Service} instance. |
|
| 601 | + */ |
|
| 602 | + private $reference_rebuild_service; |
|
| 603 | + |
|
| 604 | + /** |
|
| 605 | + * The {@link Wordlift_Google_Analytics_Export_Service} instance. |
|
| 606 | + * |
|
| 607 | + * @since 3.16.0 |
|
| 608 | + * @access protected |
|
| 609 | + * @var \Wordlift_Google_Analytics_Export_Service $google_analytics_export_service The {@link Wordlift_Google_Analytics_Export_Service} instance. |
|
| 610 | + */ |
|
| 611 | + protected $google_analytics_export_service; |
|
| 612 | + |
|
| 613 | + /** |
|
| 614 | + * {@link Wordlift}'s singleton instance. |
|
| 615 | + * |
|
| 616 | + * @since 3.15.0 |
|
| 617 | + * @access protected |
|
| 618 | + * @var \Wordlift_Entity_Type_Adapter $entity_type_adapter The {@link Wordlift_Entity_Type_Adapter} instance. |
|
| 619 | + */ |
|
| 620 | + protected $entity_type_adapter; |
|
| 621 | + |
|
| 622 | + /** |
|
| 623 | + * The {@link Wordlift_Linked_Data_Service} instance. |
|
| 624 | + * |
|
| 625 | + * @since 3.15.0 |
|
| 626 | + * @access protected |
|
| 627 | + * @var \Wordlift_Linked_Data_Service $linked_data_service The {@link Wordlift_Linked_Data_Service} instance. |
|
| 628 | + */ |
|
| 629 | + protected $linked_data_service; |
|
| 630 | + |
|
| 631 | + /** |
|
| 632 | + * The {@link Wordlift_Storage_Factory} instance. |
|
| 633 | + * |
|
| 634 | + * @since 3.15.0 |
|
| 635 | + * @access protected |
|
| 636 | + * @var \Wordlift_Storage_Factory $storage_factory The {@link Wordlift_Storage_Factory} instance. |
|
| 637 | + */ |
|
| 638 | + protected $storage_factory; |
|
| 639 | + |
|
| 640 | + /** |
|
| 641 | + * The {@link Wordlift_Sparql_Tuple_Rendition_Factory} instance. |
|
| 642 | + * |
|
| 643 | + * @since 3.15.0 |
|
| 644 | + * @access protected |
|
| 645 | + * @var \Wordlift_Sparql_Tuple_Rendition_Factory $rendition_factory The {@link Wordlift_Sparql_Tuple_Rendition_Factory} instance. |
|
| 646 | + */ |
|
| 647 | + protected $rendition_factory; |
|
| 648 | + |
|
| 649 | + /** |
|
| 650 | + * The {@link Wordlift_Autocomplete_Adapter} instance. |
|
| 651 | + * |
|
| 652 | + * @since 3.15.0 |
|
| 653 | + * @access private |
|
| 654 | + * @var \Wordlift_Autocomplete_Adapter $autocomplete_adapter The {@link Wordlift_Autocomplete_Adapter} instance. |
|
| 655 | + */ |
|
| 656 | + private $autocomplete_adapter; |
|
| 657 | + |
|
| 658 | + /** |
|
| 659 | + * The {@link Wordlift_Relation_Service} instance. |
|
| 660 | + * |
|
| 661 | + * @since 3.15.0 |
|
| 662 | + * @access protected |
|
| 663 | + * @var \Wordlift_Relation_Service $relation_service The {@link Wordlift_Relation_Service} instance. |
|
| 664 | + */ |
|
| 665 | + protected $relation_service; |
|
| 666 | + |
|
| 667 | + /** |
|
| 668 | + * The {@link Wordlift_Cached_Post_Converter} instance. |
|
| 669 | + * |
|
| 670 | + * @since 3.16.0 |
|
| 671 | + * @access protected |
|
| 672 | + * @var \Wordlift_Cached_Post_Converter $cached_postid_to_jsonld_converter The {@link Wordlift_Cached_Post_Converter} instance. |
|
| 673 | + * |
|
| 674 | + */ |
|
| 675 | + protected $cached_postid_to_jsonld_converter; |
|
| 676 | + |
|
| 677 | + /** |
|
| 678 | + * The {@link Wordlift_Entity_Uri_Service} instance. |
|
| 679 | + * |
|
| 680 | + * @since 3.16.3 |
|
| 681 | + * @access protected |
|
| 682 | + * @var \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance. |
|
| 683 | + */ |
|
| 684 | + protected $entity_uri_service; |
|
| 685 | + |
|
| 686 | + /** |
|
| 687 | + * The {@link Wordlift_Publisher_Service} instance. |
|
| 688 | + * |
|
| 689 | + * @since 3.19.0 |
|
| 690 | + * @access protected |
|
| 691 | + * @var \Wordlift_Publisher_Service $publisher_service The {@link Wordlift_Publisher_Service} instance. |
|
| 692 | + */ |
|
| 693 | + protected $publisher_service; |
|
| 694 | + |
|
| 695 | + /** |
|
| 696 | + * The {@link Wordlift_Context_Cards_Service} instance. |
|
| 697 | + * |
|
| 698 | + * @var \Wordlift_Context_Cards_Service The {@link Wordlift_Context_Cards_Service} instance. |
|
| 699 | + */ |
|
| 700 | + protected $context_cards_service; |
|
| 701 | + |
|
| 702 | + /** |
|
| 703 | + * {@link Wordlift}'s singleton instance. |
|
| 704 | + * |
|
| 705 | + * @since 3.11.2 |
|
| 706 | + * @access private |
|
| 707 | + * @var Wordlift $instance {@link Wordlift}'s singleton instance. |
|
| 708 | + */ |
|
| 709 | + private static $instance; |
|
| 710 | + |
|
| 711 | + //</editor-fold> |
|
| 712 | + |
|
| 713 | + /** |
|
| 714 | + * Define the core functionality of the plugin. |
|
| 715 | + * |
|
| 716 | + * Set the plugin name and the plugin version that can be used throughout the plugin. |
|
| 717 | + * Load the dependencies, define the locale, and set the hooks for the admin area and |
|
| 718 | + * the public-facing side of the site. |
|
| 719 | + * |
|
| 720 | + * @since 1.0.0 |
|
| 721 | + */ |
|
| 722 | + public function __construct() { |
|
| 723 | + |
|
| 724 | + self::$instance = $this; |
|
| 725 | + |
|
| 726 | + $this->plugin_name = 'wordlift'; |
|
| 727 | + $this->version = '3.25.5.1'; |
|
| 728 | + $this->load_dependencies(); |
|
| 729 | + $this->set_locale(); |
|
| 730 | + $this->define_admin_hooks(); |
|
| 731 | + $this->define_public_hooks(); |
|
| 732 | + |
|
| 733 | + // If we're in `WP_CLI` load the related files. |
|
| 734 | + if ( class_exists( 'WP_CLI' ) ) { |
|
| 735 | + $this->load_cli_dependencies(); |
|
| 736 | + } |
|
| 737 | + |
|
| 738 | + } |
|
| 739 | + |
|
| 740 | + /** |
|
| 741 | + * Get the singleton instance. |
|
| 742 | + * |
|
| 743 | + * @return Wordlift The {@link Wordlift} singleton instance. |
|
| 744 | + * @since 3.11.2 |
|
| 745 | + * |
|
| 746 | + */ |
|
| 747 | + public static function get_instance() { |
|
| 748 | + |
|
| 749 | + return self::$instance; |
|
| 750 | + } |
|
| 751 | + |
|
| 752 | + /** |
|
| 753 | + * Load the required dependencies for this plugin. |
|
| 754 | + * |
|
| 755 | + * Include the following files that make up the plugin: |
|
| 756 | + * |
|
| 757 | + * - Wordlift_Loader. Orchestrates the hooks of the plugin. |
|
| 758 | + * - Wordlift_i18n. Defines internationalization functionality. |
|
| 759 | + * - Wordlift_Admin. Defines all hooks for the admin area. |
|
| 760 | + * - Wordlift_Public. Defines all hooks for the public side of the site. |
|
| 761 | + * |
|
| 762 | + * Create an instance of the loader which will be used to register the hooks |
|
| 763 | + * with WordPress. |
|
| 764 | + * |
|
| 765 | + * @throws Exception |
|
| 766 | + * @since 1.0.0 |
|
| 767 | + * @access private |
|
| 768 | + */ |
|
| 769 | + private function load_dependencies() { |
|
| 770 | + |
|
| 771 | + /** |
|
| 772 | + * The class responsible for orchestrating the actions and filters of the |
|
| 773 | + * core plugin. |
|
| 774 | + */ |
|
| 775 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php'; |
|
| 776 | + |
|
| 777 | + // The class responsible for plugin uninstall. |
|
| 778 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-deactivator-feedback.php'; |
|
| 779 | + |
|
| 780 | + /** |
|
| 781 | + * The class responsible for defining internationalization functionality |
|
| 782 | + * of the plugin. |
|
| 783 | + */ |
|
| 784 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php'; |
|
| 785 | + |
|
| 786 | + /** |
|
| 787 | + * WordLift's supported languages. |
|
| 788 | + */ |
|
| 789 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php'; |
|
| 790 | + |
|
| 791 | + /** |
|
| 792 | + * WordLift's supported countries. |
|
| 793 | + */ |
|
| 794 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-countries.php'; |
|
| 795 | + |
|
| 796 | + /** |
|
| 797 | + * Provide support functions to sanitize data. |
|
| 798 | + */ |
|
| 799 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php'; |
|
| 800 | + |
|
| 801 | + /** Services. */ |
|
| 802 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php'; |
|
| 803 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-http-api.php'; |
|
| 804 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php'; |
|
| 805 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php'; |
|
| 806 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php'; |
|
| 807 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php'; |
|
| 808 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php'; |
|
| 809 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-linked-data-service.php'; |
|
| 810 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-service.php'; |
|
| 811 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-image-service.php'; |
|
| 812 | + |
|
| 813 | + /** |
|
| 814 | + * The Query builder. |
|
| 815 | + */ |
|
| 816 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php'; |
|
| 817 | + |
|
| 818 | + /** |
|
| 819 | + * The Schema service. |
|
| 820 | + */ |
|
| 821 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php'; |
|
| 822 | + |
|
| 823 | + /** |
|
| 824 | + * The schema:url property service. |
|
| 825 | + */ |
|
| 826 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php'; |
|
| 827 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php'; |
|
| 828 | + |
|
| 829 | + /** |
|
| 830 | + * The UI service. |
|
| 831 | + */ |
|
| 832 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php'; |
|
| 833 | + |
|
| 834 | + /** |
|
| 835 | + * The Thumbnail service. |
|
| 836 | + */ |
|
| 837 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php'; |
|
| 838 | + |
|
| 839 | + /** |
|
| 840 | + * The Entity Types Taxonomy service. |
|
| 841 | + */ |
|
| 842 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-taxonomy-service.php'; |
|
| 843 | + |
|
| 844 | + /** |
|
| 845 | + * The Entity service. |
|
| 846 | + */ |
|
| 847 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-service.php'; |
|
| 848 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php'; |
|
| 849 | + |
|
| 850 | + // Add the entity rating service. |
|
| 851 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php'; |
|
| 852 | + |
|
| 853 | + /** |
|
| 854 | + * The User service. |
|
| 855 | + */ |
|
| 856 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php'; |
|
| 857 | + |
|
| 858 | + /** |
|
| 859 | + * The Timeline service. |
|
| 860 | + */ |
|
| 861 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php'; |
|
| 862 | + |
|
| 863 | + /** |
|
| 864 | + * The Topic Taxonomy service. |
|
| 865 | + */ |
|
| 866 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php'; |
|
| 867 | + |
|
| 868 | + /** |
|
| 869 | + * The SPARQL service. |
|
| 870 | + */ |
|
| 871 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php'; |
|
| 872 | + |
|
| 873 | + /** |
|
| 874 | + * The WordLift import service. |
|
| 875 | + */ |
|
| 876 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php'; |
|
| 877 | + |
|
| 878 | + /** |
|
| 879 | + * The WordLift URI service. |
|
| 880 | + */ |
|
| 881 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php'; |
|
| 882 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php'; |
|
| 883 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php'; |
|
| 884 | + |
|
| 885 | + /** |
|
| 886 | + * The WordLift rebuild service, used to rebuild the remote dataset using the local data. |
|
| 887 | + */ |
|
| 888 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-listable.php'; |
|
| 889 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-rebuild-service.php'; |
|
| 890 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-reference-rebuild-service.php'; |
|
| 891 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-service.php'; |
|
| 892 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/rebuild/class-wordlift-relation-rebuild-adapter.php'; |
|
| 893 | + |
|
| 894 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php'; |
|
| 895 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php'; |
|
| 896 | + |
|
| 897 | + /** |
|
| 898 | + * Load the converters. |
|
| 899 | + */ |
|
| 900 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php'; |
|
| 901 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php'; |
|
| 902 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php'; |
|
| 903 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php'; |
|
| 904 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php'; |
|
| 905 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php'; |
|
| 906 | + |
|
| 907 | + /** |
|
| 908 | + * Load cache-related files. |
|
| 909 | + */ |
|
| 910 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/cache/require.php'; |
|
| 911 | + |
|
| 912 | + /** |
|
| 913 | + * Load the content filter. |
|
| 914 | + */ |
|
| 915 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php'; |
|
| 916 | + |
|
| 917 | + /* |
|
| 918 | 918 | * Load the excerpt helper. |
| 919 | 919 | */ |
| 920 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php'; |
|
| 921 | - |
|
| 922 | - /** |
|
| 923 | - * Load the JSON-LD service to publish entities using JSON-LD.s |
|
| 920 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php'; |
|
| 921 | + |
|
| 922 | + /** |
|
| 923 | + * Load the JSON-LD service to publish entities using JSON-LD.s |
|
| 924 | + * |
|
| 925 | + * @since 3.8.0 |
|
| 926 | + */ |
|
| 927 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php'; |
|
| 928 | + |
|
| 929 | + // The Publisher Service and the AJAX adapter. |
|
| 930 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php'; |
|
| 931 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php'; |
|
| 932 | + |
|
| 933 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php'; |
|
| 934 | + |
|
| 935 | + /** |
|
| 936 | + * Load the WordLift key validation service. |
|
| 937 | + */ |
|
| 938 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php'; |
|
| 939 | + |
|
| 940 | + // Load the `Wordlift_Category_Taxonomy_Service` class definition. |
|
| 941 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php'; |
|
| 942 | + |
|
| 943 | + // Load the `Wordlift_Entity_Page_Service` class definition. |
|
| 944 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-page-service.php'; |
|
| 945 | + |
|
| 946 | + /** Linked Data. */ |
|
| 947 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage.php'; |
|
| 948 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php'; |
|
| 949 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php'; |
|
| 950 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php'; |
|
| 951 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php'; |
|
| 952 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php'; |
|
| 953 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php'; |
|
| 954 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php'; |
|
| 955 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php'; |
|
| 956 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php'; |
|
| 957 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php'; |
|
| 958 | + |
|
| 959 | + /** Linked Data Rendition. */ |
|
| 960 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/intf-wordlift-sparql-tuple-rendition.php'; |
|
| 961 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-default-sparql-tuple-rendition.php'; |
|
| 962 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-address-sparql-tuple-rendition.php'; |
|
| 963 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-sparql-tuple-rendition-factory.php'; |
|
| 964 | + |
|
| 965 | + /** Services. */ |
|
| 966 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-google-analytics-export-service.php'; |
|
| 967 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-api-service.php'; |
|
| 968 | + |
|
| 969 | + /** Adapters. */ |
|
| 970 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php'; |
|
| 971 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php'; |
|
| 972 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php'; |
|
| 973 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-adapter.php'; |
|
| 974 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-wprocket-adapter.php'; |
|
| 975 | + |
|
| 976 | + /** Async Tasks. */ |
|
| 977 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-async-task.php'; |
|
| 978 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php'; |
|
| 979 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-push-references-async-task.php'; |
|
| 980 | + |
|
| 981 | + /** Autocomplete. */ |
|
| 982 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-autocomplete-adapter.php'; |
|
| 983 | + |
|
| 984 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-remote-image-service.php'; |
|
| 985 | + |
|
| 986 | + /** Analytics */ |
|
| 987 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/analytics/class-wordlift-analytics-connect.php'; |
|
| 988 | + |
|
| 989 | + /** |
|
| 990 | + * The class responsible for defining all actions that occur in the admin area. |
|
| 991 | + */ |
|
| 992 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php'; |
|
| 993 | + |
|
| 994 | + /** |
|
| 995 | + * The class to customize the entity list admin page. |
|
| 996 | + */ |
|
| 997 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php'; |
|
| 998 | + |
|
| 999 | + /** |
|
| 1000 | + * The Entity Types Taxonomy Walker (transforms checkboxes into radios). |
|
| 1001 | + */ |
|
| 1002 | + global $wp_version; |
|
| 1003 | + if ( version_compare( $wp_version, '5.3', '<' ) ) { |
|
| 1004 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php'; |
|
| 1005 | + } else { |
|
| 1006 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php'; |
|
| 1007 | + } |
|
| 1008 | + |
|
| 1009 | + /** |
|
| 1010 | + * The Notice service. |
|
| 1011 | + */ |
|
| 1012 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php'; |
|
| 1013 | + |
|
| 1014 | + /** |
|
| 1015 | + * The PrimaShop adapter. |
|
| 1016 | + */ |
|
| 1017 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php'; |
|
| 1018 | + |
|
| 1019 | + /** |
|
| 1020 | + * The WordLift Dashboard service. |
|
| 1021 | + */ |
|
| 1022 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php'; |
|
| 1023 | + |
|
| 1024 | + /** |
|
| 1025 | + * The admin 'Install wizard' page. |
|
| 1026 | + */ |
|
| 1027 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php'; |
|
| 1028 | + |
|
| 1029 | + /** |
|
| 1030 | + * The WordLift entity type list admin page controller. |
|
| 1031 | + */ |
|
| 1032 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php'; |
|
| 1033 | + |
|
| 1034 | + /** |
|
| 1035 | + * The WordLift entity type settings admin page controller. |
|
| 1036 | + */ |
|
| 1037 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php'; |
|
| 1038 | + |
|
| 1039 | + /** |
|
| 1040 | + * The admin 'Download Your Data' page. |
|
| 1041 | + */ |
|
| 1042 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php'; |
|
| 1043 | + |
|
| 1044 | + /** |
|
| 1045 | + * The admin 'WordLift Settings' page. |
|
| 1046 | + */ |
|
| 1047 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/intf-wordlift-admin-element.php'; |
|
| 1048 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-element.php'; |
|
| 1049 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-radio-element.php'; |
|
| 1050 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select-element.php'; |
|
| 1051 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select2-element.php'; |
|
| 1052 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-language-select-element.php'; |
|
| 1053 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-country-select-element.php'; |
|
| 1054 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-tabs-element.php'; |
|
| 1055 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-author-element.php'; |
|
| 1056 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-publisher-element.php'; |
|
| 1057 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php'; |
|
| 1058 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php'; |
|
| 1059 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page.php'; |
|
| 1060 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php'; |
|
| 1061 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php'; |
|
| 1062 | + |
|
| 1063 | + /** Admin Pages */ |
|
| 1064 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php'; |
|
| 1065 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php'; |
|
| 1066 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-search-rankings-page.php'; |
|
| 1067 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-admin-service.php'; |
|
| 1068 | + |
|
| 1069 | + /** |
|
| 1070 | + * The class responsible for defining all actions that occur in the public-facing |
|
| 1071 | + * side of the site. |
|
| 1072 | + */ |
|
| 1073 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php'; |
|
| 1074 | + |
|
| 1075 | + /** |
|
| 1076 | + * The shortcode abstract class. |
|
| 1077 | + */ |
|
| 1078 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php'; |
|
| 1079 | + |
|
| 1080 | + /** |
|
| 1081 | + * The Timeline shortcode. |
|
| 1082 | + */ |
|
| 1083 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php'; |
|
| 1084 | + |
|
| 1085 | + /** |
|
| 1086 | + * The Navigator shortcode. |
|
| 1087 | + */ |
|
| 1088 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php'; |
|
| 1089 | + |
|
| 1090 | + /** |
|
| 1091 | + * The chord shortcode. |
|
| 1092 | + */ |
|
| 1093 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php'; |
|
| 1094 | + |
|
| 1095 | + /** |
|
| 1096 | + * The geomap shortcode. |
|
| 1097 | + */ |
|
| 1098 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php'; |
|
| 1099 | + |
|
| 1100 | + /** |
|
| 1101 | + * The entity cloud shortcode. |
|
| 1102 | + */ |
|
| 1103 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php'; |
|
| 1104 | + |
|
| 1105 | + /** |
|
| 1106 | + * The entity glossary shortcode. |
|
| 1107 | + */ |
|
| 1108 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-alphabet-service.php'; |
|
| 1109 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-vocabulary-shortcode.php'; |
|
| 1110 | + |
|
| 1111 | + /** |
|
| 1112 | + * Faceted Search shortcode. |
|
| 1113 | + */ |
|
| 1114 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-faceted-search-shortcode.php'; |
|
| 1115 | + |
|
| 1116 | + /** |
|
| 1117 | + * The ShareThis service. |
|
| 1118 | + */ |
|
| 1119 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php'; |
|
| 1120 | + |
|
| 1121 | + /** |
|
| 1122 | + * The SEO service. |
|
| 1123 | + */ |
|
| 1124 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php'; |
|
| 1125 | + |
|
| 1126 | + /** |
|
| 1127 | + * The AMP service. |
|
| 1128 | + */ |
|
| 1129 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php'; |
|
| 1130 | + |
|
| 1131 | + /** Widgets */ |
|
| 1132 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php'; |
|
| 1133 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php'; |
|
| 1134 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-context-cards.php'; |
|
| 1135 | + |
|
| 1136 | + /* |
|
| 1137 | + * Schema.org Services. |
|
| 924 | 1138 | * |
| 925 | - * @since 3.8.0 |
|
| 926 | - */ |
|
| 927 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php'; |
|
| 928 | - |
|
| 929 | - // The Publisher Service and the AJAX adapter. |
|
| 930 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php'; |
|
| 931 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php'; |
|
| 932 | - |
|
| 933 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php'; |
|
| 934 | - |
|
| 935 | - /** |
|
| 936 | - * Load the WordLift key validation service. |
|
| 937 | - */ |
|
| 938 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php'; |
|
| 939 | - |
|
| 940 | - // Load the `Wordlift_Category_Taxonomy_Service` class definition. |
|
| 941 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php'; |
|
| 942 | - |
|
| 943 | - // Load the `Wordlift_Entity_Page_Service` class definition. |
|
| 944 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-page-service.php'; |
|
| 945 | - |
|
| 946 | - /** Linked Data. */ |
|
| 947 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage.php'; |
|
| 948 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php'; |
|
| 949 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php'; |
|
| 950 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php'; |
|
| 951 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php'; |
|
| 952 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php'; |
|
| 953 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php'; |
|
| 954 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php'; |
|
| 955 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php'; |
|
| 956 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php'; |
|
| 957 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php'; |
|
| 958 | - |
|
| 959 | - /** Linked Data Rendition. */ |
|
| 960 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/intf-wordlift-sparql-tuple-rendition.php'; |
|
| 961 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-default-sparql-tuple-rendition.php'; |
|
| 962 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-address-sparql-tuple-rendition.php'; |
|
| 963 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/rendition/class-wordlift-sparql-tuple-rendition-factory.php'; |
|
| 964 | - |
|
| 965 | - /** Services. */ |
|
| 966 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-google-analytics-export-service.php'; |
|
| 967 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-api-service.php'; |
|
| 968 | - |
|
| 969 | - /** Adapters. */ |
|
| 970 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php'; |
|
| 971 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php'; |
|
| 972 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php'; |
|
| 973 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-adapter.php'; |
|
| 974 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-wprocket-adapter.php'; |
|
| 975 | - |
|
| 976 | - /** Async Tasks. */ |
|
| 977 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-async-task.php'; |
|
| 978 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php'; |
|
| 979 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-push-references-async-task.php'; |
|
| 980 | - |
|
| 981 | - /** Autocomplete. */ |
|
| 982 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-autocomplete-adapter.php'; |
|
| 983 | - |
|
| 984 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-remote-image-service.php'; |
|
| 985 | - |
|
| 986 | - /** Analytics */ |
|
| 987 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/analytics/class-wordlift-analytics-connect.php'; |
|
| 988 | - |
|
| 989 | - /** |
|
| 990 | - * The class responsible for defining all actions that occur in the admin area. |
|
| 991 | - */ |
|
| 992 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php'; |
|
| 993 | - |
|
| 994 | - /** |
|
| 995 | - * The class to customize the entity list admin page. |
|
| 1139 | + * @see https://github.com/insideout10/wordlift-plugin/issues/835 |
|
| 996 | 1140 | */ |
| 997 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php'; |
|
| 1141 | + if ( WL_ALL_ENTITY_TYPES ) { |
|
| 1142 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php'; |
|
| 1143 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php'; |
|
| 1144 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php'; |
|
| 1145 | + new Wordlift_Schemaorg_Sync_Service(); |
|
| 1146 | + $schemaorg_property_service = new Wordlift_Schemaorg_Property_Service(); |
|
| 1147 | + new Wordlift_Schemaorg_Class_Service(); |
|
| 1148 | + } else { |
|
| 1149 | + $schemaorg_property_service = null; |
|
| 1150 | + } |
|
| 998 | 1151 | |
| 999 | - /** |
|
| 1000 | - * The Entity Types Taxonomy Walker (transforms checkboxes into radios). |
|
| 1001 | - */ |
|
| 1002 | - global $wp_version; |
|
| 1003 | - if ( version_compare( $wp_version, '5.3', '<' ) ) { |
|
| 1004 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php'; |
|
| 1005 | - } else { |
|
| 1006 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php'; |
|
| 1007 | - } |
|
| 1008 | - |
|
| 1009 | - /** |
|
| 1010 | - * The Notice service. |
|
| 1011 | - */ |
|
| 1012 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php'; |
|
| 1152 | + $this->loader = new Wordlift_Loader(); |
|
| 1013 | 1153 | |
| 1014 | - /** |
|
| 1015 | - * The PrimaShop adapter. |
|
| 1016 | - */ |
|
| 1017 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php'; |
|
| 1154 | + // Instantiate a global logger. |
|
| 1155 | + global $wl_logger; |
|
| 1156 | + $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' ); |
|
| 1018 | 1157 | |
| 1019 | - /** |
|
| 1020 | - * The WordLift Dashboard service. |
|
| 1021 | - */ |
|
| 1022 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php'; |
|
| 1158 | + // Load the `wl-api` end-point. |
|
| 1159 | + new Wordlift_Http_Api(); |
|
| 1023 | 1160 | |
| 1024 | - /** |
|
| 1025 | - * The admin 'Install wizard' page. |
|
| 1026 | - */ |
|
| 1027 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php'; |
|
| 1161 | + // Load the Install Service. |
|
| 1162 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'install/class-wordlift-install-service.php'; |
|
| 1163 | + $this->install_service = new Wordlift_Install_Service(); |
|
| 1028 | 1164 | |
| 1029 | - /** |
|
| 1030 | - * The WordLift entity type list admin page controller. |
|
| 1031 | - */ |
|
| 1032 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php'; |
|
| 1165 | + /** Services. */ |
|
| 1166 | + // Create the configuration service. |
|
| 1167 | + $this->configuration_service = new Wordlift_Configuration_Service(); |
|
| 1168 | + $api_service = new Wordlift_Api_Service( $this->configuration_service ); |
|
| 1033 | 1169 | |
| 1034 | - /** |
|
| 1035 | - * The WordLift entity type settings admin page controller. |
|
| 1036 | - */ |
|
| 1037 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php'; |
|
| 1170 | + // Create an entity type service instance. It'll be later bound to the init action. |
|
| 1171 | + $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() ); |
|
| 1038 | 1172 | |
| 1039 | - /** |
|
| 1040 | - * The admin 'Download Your Data' page. |
|
| 1041 | - */ |
|
| 1042 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php'; |
|
| 1173 | + // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions. |
|
| 1174 | + $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() ); |
|
| 1043 | 1175 | |
| 1044 | - /** |
|
| 1045 | - * The admin 'WordLift Settings' page. |
|
| 1046 | - */ |
|
| 1047 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/intf-wordlift-admin-element.php'; |
|
| 1048 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-element.php'; |
|
| 1049 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-radio-element.php'; |
|
| 1050 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select-element.php'; |
|
| 1051 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select2-element.php'; |
|
| 1052 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-language-select-element.php'; |
|
| 1053 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-country-select-element.php'; |
|
| 1054 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-tabs-element.php'; |
|
| 1055 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-author-element.php'; |
|
| 1056 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-publisher-element.php'; |
|
| 1057 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php'; |
|
| 1058 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php'; |
|
| 1059 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page.php'; |
|
| 1060 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php'; |
|
| 1061 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php'; |
|
| 1062 | - |
|
| 1063 | - /** Admin Pages */ |
|
| 1064 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php'; |
|
| 1065 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php'; |
|
| 1066 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-search-rankings-page.php'; |
|
| 1067 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-admin-service.php'; |
|
| 1068 | - |
|
| 1069 | - /** |
|
| 1070 | - * The class responsible for defining all actions that occur in the public-facing |
|
| 1071 | - * side of the site. |
|
| 1072 | - */ |
|
| 1073 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php'; |
|
| 1176 | + // Create an instance of the UI service. |
|
| 1177 | + $this->ui_service = new Wordlift_UI_Service(); |
|
| 1074 | 1178 | |
| 1075 | - /** |
|
| 1076 | - * The shortcode abstract class. |
|
| 1077 | - */ |
|
| 1078 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php'; |
|
| 1179 | + // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events. |
|
| 1180 | + $this->thumbnail_service = new Wordlift_Thumbnail_Service(); |
|
| 1079 | 1181 | |
| 1080 | - /** |
|
| 1081 | - * The Timeline shortcode. |
|
| 1082 | - */ |
|
| 1083 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php'; |
|
| 1182 | + $this->sparql_service = new Wordlift_Sparql_Service(); |
|
| 1183 | + $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service ); |
|
| 1184 | + $this->notice_service = new Wordlift_Notice_Service(); |
|
| 1185 | + $this->relation_service = new Wordlift_Relation_Service(); |
|
| 1084 | 1186 | |
| 1085 | - /** |
|
| 1086 | - * The Navigator shortcode. |
|
| 1087 | - */ |
|
| 1088 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php'; |
|
| 1187 | + $entity_uri_cache_service = new Wordlift_File_Cache_Service( WL_TEMP_DIR . 'entity_uri/' ); |
|
| 1188 | + $this->entity_uri_service = new Wordlift_Cached_Entity_Uri_Service( $this->configuration_service, $entity_uri_cache_service ); |
|
| 1189 | + $this->entity_service = new Wordlift_Entity_Service( $this->ui_service, $this->relation_service, $this->entity_uri_service ); |
|
| 1190 | + $this->user_service = new Wordlift_User_Service( $this->sparql_service, $this->entity_service ); |
|
| 1089 | 1191 | |
| 1090 | - /** |
|
| 1091 | - * The chord shortcode. |
|
| 1092 | - */ |
|
| 1093 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php'; |
|
| 1192 | + // Instantiate the JSON-LD service. |
|
| 1193 | + $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service ); |
|
| 1094 | 1194 | |
| 1095 | - /** |
|
| 1096 | - * The geomap shortcode. |
|
| 1097 | - */ |
|
| 1098 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php'; |
|
| 1195 | + /** Linked Data. */ |
|
| 1196 | + $this->storage_factory = new Wordlift_Storage_Factory( $this->entity_service, $this->user_service, $property_getter ); |
|
| 1197 | + $this->rendition_factory = new Wordlift_Sparql_Tuple_Rendition_Factory( $this->entity_service ); |
|
| 1099 | 1198 | |
| 1100 | - /** |
|
| 1101 | - * The entity cloud shortcode. |
|
| 1102 | - */ |
|
| 1103 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php'; |
|
| 1199 | + $this->schema_service = new Wordlift_Schema_Service( $this->storage_factory, $this->rendition_factory, $this->configuration_service ); |
|
| 1104 | 1200 | |
| 1105 | - /** |
|
| 1106 | - * The entity glossary shortcode. |
|
| 1107 | - */ |
|
| 1108 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-alphabet-service.php'; |
|
| 1109 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-vocabulary-shortcode.php'; |
|
| 1201 | + // Create a new instance of the Redirect service. |
|
| 1202 | + $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_uri_service ); |
|
| 1203 | + $this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service ); |
|
| 1204 | + $this->linked_data_service = new Wordlift_Linked_Data_Service( $this->entity_service, $this->entity_type_service, $this->schema_service, $this->sparql_service ); |
|
| 1110 | 1205 | |
| 1111 | - /** |
|
| 1112 | - * Faceted Search shortcode. |
|
| 1113 | - */ |
|
| 1114 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-faceted-search-shortcode.php'; |
|
| 1206 | + // Create a new instance of the Timeline service and Timeline shortcode. |
|
| 1207 | + $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service, $this->entity_type_service ); |
|
| 1115 | 1208 | |
| 1116 | - /** |
|
| 1117 | - * The ShareThis service. |
|
| 1118 | - */ |
|
| 1119 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php'; |
|
| 1209 | + $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker(); |
|
| 1120 | 1210 | |
| 1121 | - /** |
|
| 1122 | - * The SEO service. |
|
| 1123 | - */ |
|
| 1124 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php'; |
|
| 1211 | + $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service(); |
|
| 1212 | + $this->entity_types_taxonomy_service = new Wordlift_Entity_Type_Taxonomy_Service(); |
|
| 1125 | 1213 | |
| 1126 | - /** |
|
| 1127 | - * The AMP service. |
|
| 1128 | - */ |
|
| 1129 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php'; |
|
| 1130 | - |
|
| 1131 | - /** Widgets */ |
|
| 1132 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php'; |
|
| 1133 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php'; |
|
| 1134 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-context-cards.php'; |
|
| 1214 | + // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters. |
|
| 1215 | + $this->sharethis_service = new Wordlift_ShareThis_Service(); |
|
| 1135 | 1216 | |
| 1136 | - /* |
|
| 1137 | - * Schema.org Services. |
|
| 1138 | - * |
|
| 1139 | - * @see https://github.com/insideout10/wordlift-plugin/issues/835 |
|
| 1140 | - */ |
|
| 1141 | - if ( WL_ALL_ENTITY_TYPES ) { |
|
| 1142 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php'; |
|
| 1143 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php'; |
|
| 1144 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php'; |
|
| 1145 | - new Wordlift_Schemaorg_Sync_Service(); |
|
| 1146 | - $schemaorg_property_service = new Wordlift_Schemaorg_Property_Service(); |
|
| 1147 | - new Wordlift_Schemaorg_Class_Service(); |
|
| 1148 | - } else { |
|
| 1149 | - $schemaorg_property_service = null; |
|
| 1150 | - } |
|
| 1217 | + // Create an instance of the PrimaShop adapter. |
|
| 1218 | + $this->primashop_adapter = new Wordlift_PrimaShop_Adapter(); |
|
| 1151 | 1219 | |
| 1152 | - $this->loader = new Wordlift_Loader(); |
|
| 1220 | + // Create an import service instance to hook later to WP's import function. |
|
| 1221 | + $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() ); |
|
| 1153 | 1222 | |
| 1154 | - // Instantiate a global logger. |
|
| 1155 | - global $wl_logger; |
|
| 1156 | - $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' ); |
|
| 1223 | + $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] ); |
|
| 1157 | 1224 | |
| 1158 | - // Load the `wl-api` end-point. |
|
| 1159 | - new Wordlift_Http_Api(); |
|
| 1225 | + // Create the entity rating service. |
|
| 1226 | + $this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service ); |
|
| 1160 | 1227 | |
| 1161 | - // Load the Install Service. |
|
| 1162 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'install/class-wordlift-install-service.php'; |
|
| 1163 | - $this->install_service = new Wordlift_Install_Service(); |
|
| 1228 | + // Create entity list customization (wp-admin/edit.php). |
|
| 1229 | + $this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service ); |
|
| 1164 | 1230 | |
| 1165 | - /** Services. */ |
|
| 1166 | - // Create the configuration service. |
|
| 1167 | - $this->configuration_service = new Wordlift_Configuration_Service(); |
|
| 1168 | - $api_service = new Wordlift_Api_Service( $this->configuration_service ); |
|
| 1169 | - |
|
| 1170 | - // Create an entity type service instance. It'll be later bound to the init action. |
|
| 1171 | - $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() ); |
|
| 1172 | - |
|
| 1173 | - // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions. |
|
| 1174 | - $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() ); |
|
| 1231 | + // Create a new instance of the Redirect service. |
|
| 1232 | + $this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service, $this->entity_service ); |
|
| 1175 | 1233 | |
| 1176 | - // Create an instance of the UI service. |
|
| 1177 | - $this->ui_service = new Wordlift_UI_Service(); |
|
| 1234 | + // Create an instance of the Publisher Service and the AJAX Adapter. |
|
| 1235 | + $this->publisher_service = new Wordlift_Publisher_Service( $this->configuration_service ); |
|
| 1236 | + $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service ); |
|
| 1237 | + $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service ); |
|
| 1178 | 1238 | |
| 1179 | - // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events. |
|
| 1180 | - $this->thumbnail_service = new Wordlift_Thumbnail_Service(); |
|
| 1239 | + $attachment_service = new Wordlift_Attachment_Service(); |
|
| 1181 | 1240 | |
| 1182 | - $this->sparql_service = new Wordlift_Sparql_Service(); |
|
| 1183 | - $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service ); |
|
| 1184 | - $this->notice_service = new Wordlift_Notice_Service(); |
|
| 1185 | - $this->relation_service = new Wordlift_Relation_Service(); |
|
| 1241 | + // Instantiate the JSON-LD service. |
|
| 1242 | + $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service ); |
|
| 1243 | + $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 ); |
|
| 1244 | + $this->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $this->post_to_jsonld_converter ); |
|
| 1245 | + $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 ); |
|
| 1246 | + $this->jsonld_website_converter = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service ); |
|
| 1186 | 1247 | |
| 1187 | - $entity_uri_cache_service = new Wordlift_File_Cache_Service( WL_TEMP_DIR . 'entity_uri/' ); |
|
| 1188 | - $this->entity_uri_service = new Wordlift_Cached_Entity_Uri_Service( $this->configuration_service, $entity_uri_cache_service ); |
|
| 1189 | - $this->entity_service = new Wordlift_Entity_Service( $this->ui_service, $this->relation_service, $this->entity_uri_service ); |
|
| 1190 | - $this->user_service = new Wordlift_User_Service( $this->sparql_service, $this->entity_service ); |
|
| 1248 | + $jsonld_cache = new Ttl_Cache( 'jsonld', 86400 ); |
|
| 1249 | + $this->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $this->postid_to_jsonld_converter, $this->configuration_service, $jsonld_cache ); |
|
| 1250 | + $this->jsonld_service = new Wordlift_Jsonld_Service( $this->entity_service, $this->cached_postid_to_jsonld_converter, $this->jsonld_website_converter ); |
|
| 1251 | + new Jsonld_Endpoint( $this->jsonld_service, $this->entity_uri_service ); |
|
| 1252 | + // Prints the JSON-LD in the head. |
|
| 1253 | + new Jsonld_Adapter( $this->jsonld_service ); |
|
| 1191 | 1254 | |
| 1192 | - // Instantiate the JSON-LD service. |
|
| 1193 | - $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service ); |
|
| 1255 | + $this->key_validation_service = new Wordlift_Key_Validation_Service( $this->configuration_service ); |
|
| 1256 | + $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service, $this->entity_uri_service ); |
|
| 1257 | + $this->relation_rebuild_service = new Wordlift_Relation_Rebuild_Service( $this->content_filter_service, $this->entity_service ); |
|
| 1258 | + $this->sample_data_service = new Wordlift_Sample_Data_Service( $this->entity_type_service, $this->configuration_service, $this->user_service ); |
|
| 1259 | + $this->sample_data_ajax_adapter = new Wordlift_Sample_Data_Ajax_Adapter( $this->sample_data_service ); |
|
| 1260 | + $this->reference_rebuild_service = new Wordlift_Reference_Rebuild_Service( $this->linked_data_service, $this->entity_service, $this->relation_service ); |
|
| 1194 | 1261 | |
| 1195 | - /** Linked Data. */ |
|
| 1196 | - $this->storage_factory = new Wordlift_Storage_Factory( $this->entity_service, $this->user_service, $property_getter ); |
|
| 1197 | - $this->rendition_factory = new Wordlift_Sparql_Tuple_Rendition_Factory( $this->entity_service ); |
|
| 1262 | + // Initialize the short-codes. |
|
| 1263 | + new Wordlift_Navigator_Shortcode(); |
|
| 1264 | + new Wordlift_Chord_Shortcode(); |
|
| 1265 | + new Wordlift_Geomap_Shortcode(); |
|
| 1266 | + new Wordlift_Timeline_Shortcode(); |
|
| 1267 | + new Wordlift_Related_Entities_Cloud_Shortcode( $this->relation_service ); |
|
| 1268 | + new Wordlift_Vocabulary_Shortcode( $this->configuration_service ); |
|
| 1269 | + new Wordlift_Faceted_Search_Shortcode(); |
|
| 1198 | 1270 | |
| 1199 | - $this->schema_service = new Wordlift_Schema_Service( $this->storage_factory, $this->rendition_factory, $this->configuration_service ); |
|
| 1271 | + // Initialize the SEO service. |
|
| 1272 | + new Wordlift_Seo_Service(); |
|
| 1200 | 1273 | |
| 1201 | - // Create a new instance of the Redirect service. |
|
| 1202 | - $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_uri_service ); |
|
| 1203 | - $this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service ); |
|
| 1204 | - $this->linked_data_service = new Wordlift_Linked_Data_Service( $this->entity_service, $this->entity_type_service, $this->schema_service, $this->sparql_service ); |
|
| 1274 | + // Initialize the AMP service. |
|
| 1275 | + new Wordlift_AMP_Service( $this->jsonld_service ); |
|
| 1205 | 1276 | |
| 1206 | - // Create a new instance of the Timeline service and Timeline shortcode. |
|
| 1207 | - $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service, $this->entity_type_service ); |
|
| 1277 | + /** Services. */ |
|
| 1278 | + $this->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service(); |
|
| 1279 | + new Wordlift_Image_Service(); |
|
| 1208 | 1280 | |
| 1209 | - $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker(); |
|
| 1281 | + /** Adapters. */ |
|
| 1282 | + $this->entity_type_adapter = new Wordlift_Entity_Type_Adapter( $this->entity_type_service ); |
|
| 1283 | + $this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $this->publisher_service ); |
|
| 1284 | + $this->tinymce_adapter = new Wordlift_Tinymce_Adapter( $this ); |
|
| 1285 | + $this->relation_rebuild_adapter = new Wordlift_Relation_Rebuild_Adapter( $this->relation_rebuild_service ); |
|
| 1210 | 1286 | |
| 1211 | - $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service(); |
|
| 1212 | - $this->entity_types_taxonomy_service = new Wordlift_Entity_Type_Taxonomy_Service(); |
|
| 1213 | - |
|
| 1214 | - // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters. |
|
| 1215 | - $this->sharethis_service = new Wordlift_ShareThis_Service(); |
|
| 1216 | - |
|
| 1217 | - // Create an instance of the PrimaShop adapter. |
|
| 1218 | - $this->primashop_adapter = new Wordlift_PrimaShop_Adapter(); |
|
| 1219 | - |
|
| 1220 | - // Create an import service instance to hook later to WP's import function. |
|
| 1221 | - $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() ); |
|
| 1222 | - |
|
| 1223 | - $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] ); |
|
| 1224 | - |
|
| 1225 | - // Create the entity rating service. |
|
| 1226 | - $this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service ); |
|
| 1227 | - |
|
| 1228 | - // Create entity list customization (wp-admin/edit.php). |
|
| 1229 | - $this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service ); |
|
| 1230 | - |
|
| 1231 | - // Create a new instance of the Redirect service. |
|
| 1232 | - $this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service, $this->entity_service ); |
|
| 1233 | - |
|
| 1234 | - // Create an instance of the Publisher Service and the AJAX Adapter. |
|
| 1235 | - $this->publisher_service = new Wordlift_Publisher_Service( $this->configuration_service ); |
|
| 1236 | - $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service ); |
|
| 1237 | - $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service ); |
|
| 1238 | - |
|
| 1239 | - $attachment_service = new Wordlift_Attachment_Service(); |
|
| 1240 | - |
|
| 1241 | - // Instantiate the JSON-LD service. |
|
| 1242 | - $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service ); |
|
| 1243 | - $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 ); |
|
| 1244 | - $this->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $this->post_to_jsonld_converter ); |
|
| 1245 | - $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 ); |
|
| 1246 | - $this->jsonld_website_converter = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service ); |
|
| 1247 | - |
|
| 1248 | - $jsonld_cache = new Ttl_Cache( 'jsonld', 86400 ); |
|
| 1249 | - $this->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $this->postid_to_jsonld_converter, $this->configuration_service, $jsonld_cache ); |
|
| 1250 | - $this->jsonld_service = new Wordlift_Jsonld_Service( $this->entity_service, $this->cached_postid_to_jsonld_converter, $this->jsonld_website_converter ); |
|
| 1251 | - new Jsonld_Endpoint( $this->jsonld_service, $this->entity_uri_service ); |
|
| 1252 | - // Prints the JSON-LD in the head. |
|
| 1253 | - new Jsonld_Adapter( $this->jsonld_service ); |
|
| 1287 | + /* |
|
| 1288 | + * Exclude our public js from WP-Rocket. |
|
| 1289 | + * |
|
| 1290 | + * @since 3.19.4 |
|
| 1291 | + * |
|
| 1292 | + * @see https://github.com/insideout10/wordlift-plugin/issues/842. |
|
| 1293 | + */ |
|
| 1294 | + new Wordlift_WpRocket_Adapter(); |
|
| 1254 | 1295 | |
| 1255 | - $this->key_validation_service = new Wordlift_Key_Validation_Service( $this->configuration_service ); |
|
| 1256 | - $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service, $this->entity_uri_service ); |
|
| 1257 | - $this->relation_rebuild_service = new Wordlift_Relation_Rebuild_Service( $this->content_filter_service, $this->entity_service ); |
|
| 1258 | - $this->sample_data_service = new Wordlift_Sample_Data_Service( $this->entity_type_service, $this->configuration_service, $this->user_service ); |
|
| 1259 | - $this->sample_data_ajax_adapter = new Wordlift_Sample_Data_Ajax_Adapter( $this->sample_data_service ); |
|
| 1260 | - $this->reference_rebuild_service = new Wordlift_Reference_Rebuild_Service( $this->linked_data_service, $this->entity_service, $this->relation_service ); |
|
| 1296 | + // Create a Rebuild Service instance, which we'll later bound to an ajax call. |
|
| 1297 | + $this->rebuild_service = new Wordlift_Rebuild_Service( |
|
| 1298 | + $this->sparql_service, |
|
| 1299 | + $uri_service |
|
| 1300 | + ); |
|
| 1261 | 1301 | |
| 1262 | - // Initialize the short-codes. |
|
| 1263 | - new Wordlift_Navigator_Shortcode(); |
|
| 1264 | - new Wordlift_Chord_Shortcode(); |
|
| 1265 | - new Wordlift_Geomap_Shortcode(); |
|
| 1266 | - new Wordlift_Timeline_Shortcode(); |
|
| 1267 | - new Wordlift_Related_Entities_Cloud_Shortcode( $this->relation_service ); |
|
| 1268 | - new Wordlift_Vocabulary_Shortcode( $this->configuration_service ); |
|
| 1269 | - new Wordlift_Faceted_Search_Shortcode(); |
|
| 1302 | + /** Async Tasks. */ |
|
| 1303 | + new Wordlift_Sparql_Query_Async_Task(); |
|
| 1304 | + new Wordlift_Push_References_Async_Task(); |
|
| 1270 | 1305 | |
| 1271 | - // Initialize the SEO service. |
|
| 1272 | - new Wordlift_Seo_Service(); |
|
| 1306 | + /** WordPress Admin UI. */ |
|
| 1273 | 1307 | |
| 1274 | - // Initialize the AMP service. |
|
| 1275 | - new Wordlift_AMP_Service( $this->jsonld_service ); |
|
| 1308 | + // UI elements. |
|
| 1309 | + $this->input_element = new Wordlift_Admin_Input_Element(); |
|
| 1310 | + $this->radio_input_element = new Wordlift_Admin_Radio_Input_Element(); |
|
| 1311 | + $this->select2_element = new Wordlift_Admin_Select2_Element(); |
|
| 1312 | + $this->language_select_element = new Wordlift_Admin_Language_Select_Element(); |
|
| 1313 | + $this->country_select_element = new Wordlift_Admin_Country_Select_Element(); |
|
| 1314 | + $tabs_element = new Wordlift_Admin_Tabs_Element(); |
|
| 1315 | + $this->publisher_element = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $this->publisher_service, $tabs_element, $this->select2_element ); |
|
| 1316 | + $this->author_element = new Wordlift_Admin_Author_Element( $this->publisher_service, $this->select2_element ); |
|
| 1276 | 1317 | |
| 1277 | - /** Services. */ |
|
| 1278 | - $this->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service(); |
|
| 1279 | - new Wordlift_Image_Service(); |
|
| 1318 | + $this->settings_page = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->country_select_element, $this->publisher_element, $this->radio_input_element ); |
|
| 1319 | + $this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page ); |
|
| 1280 | 1320 | |
| 1281 | - /** Adapters. */ |
|
| 1282 | - $this->entity_type_adapter = new Wordlift_Entity_Type_Adapter( $this->entity_type_service ); |
|
| 1283 | - $this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $this->publisher_service ); |
|
| 1284 | - $this->tinymce_adapter = new Wordlift_Tinymce_Adapter( $this ); |
|
| 1285 | - $this->relation_rebuild_adapter = new Wordlift_Relation_Rebuild_Adapter( $this->relation_rebuild_service ); |
|
| 1321 | + $this->analytics_settings_page = new Wordlift_Admin_Settings_Analytics_Page( $this->configuration_service, $this->input_element, $this->radio_input_element ); |
|
| 1322 | + $this->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $this->analytics_settings_page ); |
|
| 1323 | + $this->analytics_connect = new Wordlift_Analytics_Connect(); |
|
| 1286 | 1324 | |
| 1287 | - /* |
|
| 1288 | - * Exclude our public js from WP-Rocket. |
|
| 1289 | - * |
|
| 1290 | - * @since 3.19.4 |
|
| 1291 | - * |
|
| 1292 | - * @see https://github.com/insideout10/wordlift-plugin/issues/842. |
|
| 1293 | - */ |
|
| 1294 | - new Wordlift_WpRocket_Adapter(); |
|
| 1295 | - |
|
| 1296 | - // Create a Rebuild Service instance, which we'll later bound to an ajax call. |
|
| 1297 | - $this->rebuild_service = new Wordlift_Rebuild_Service( |
|
| 1298 | - $this->sparql_service, |
|
| 1299 | - $uri_service |
|
| 1300 | - ); |
|
| 1301 | - |
|
| 1302 | - /** Async Tasks. */ |
|
| 1303 | - new Wordlift_Sparql_Query_Async_Task(); |
|
| 1304 | - new Wordlift_Push_References_Async_Task(); |
|
| 1305 | - |
|
| 1306 | - /** WordPress Admin UI. */ |
|
| 1307 | - |
|
| 1308 | - // UI elements. |
|
| 1309 | - $this->input_element = new Wordlift_Admin_Input_Element(); |
|
| 1310 | - $this->radio_input_element = new Wordlift_Admin_Radio_Input_Element(); |
|
| 1311 | - $this->select2_element = new Wordlift_Admin_Select2_Element(); |
|
| 1312 | - $this->language_select_element = new Wordlift_Admin_Language_Select_Element(); |
|
| 1313 | - $this->country_select_element = new Wordlift_Admin_Country_Select_Element(); |
|
| 1314 | - $tabs_element = new Wordlift_Admin_Tabs_Element(); |
|
| 1315 | - $this->publisher_element = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $this->publisher_service, $tabs_element, $this->select2_element ); |
|
| 1316 | - $this->author_element = new Wordlift_Admin_Author_Element( $this->publisher_service, $this->select2_element ); |
|
| 1317 | - |
|
| 1318 | - $this->settings_page = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->country_select_element, $this->publisher_element, $this->radio_input_element ); |
|
| 1319 | - $this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page ); |
|
| 1320 | - |
|
| 1321 | - $this->analytics_settings_page = new Wordlift_Admin_Settings_Analytics_Page( $this->configuration_service, $this->input_element, $this->radio_input_element ); |
|
| 1322 | - $this->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $this->analytics_settings_page ); |
|
| 1323 | - $this->analytics_connect = new Wordlift_Analytics_Connect(); |
|
| 1324 | - |
|
| 1325 | - // Pages. |
|
| 1326 | - /* |
|
| 1325 | + // Pages. |
|
| 1326 | + /* |
|
| 1327 | 1327 | * Call the `wl_can_see_classification_box` filter to determine whether we can display the classification box. |
| 1328 | 1328 | * |
| 1329 | 1329 | * @since 3.20.3 |
| 1330 | 1330 | * |
| 1331 | 1331 | * @see https://github.com/insideout10/wordlift-plugin/issues/914 |
| 1332 | 1332 | */ |
| 1333 | - if ( apply_filters( 'wl_can_see_classification_box', true ) ) { |
|
| 1334 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php'; |
|
| 1335 | - new Wordlift_Admin_Post_Edit_Page( $this ); |
|
| 1336 | - } |
|
| 1337 | - new Wordlift_Entity_Type_Admin_Service(); |
|
| 1333 | + if ( apply_filters( 'wl_can_see_classification_box', true ) ) { |
|
| 1334 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php'; |
|
| 1335 | + new Wordlift_Admin_Post_Edit_Page( $this ); |
|
| 1336 | + } |
|
| 1337 | + new Wordlift_Entity_Type_Admin_Service(); |
|
| 1338 | 1338 | |
| 1339 | - // create an instance of the entity type list admin page controller. |
|
| 1340 | - $this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page(); |
|
| 1339 | + // create an instance of the entity type list admin page controller. |
|
| 1340 | + $this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page(); |
|
| 1341 | 1341 | |
| 1342 | - // create an instance of the entity type setting admin page controller. |
|
| 1343 | - $this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings(); |
|
| 1342 | + // create an instance of the entity type setting admin page controller. |
|
| 1343 | + $this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings(); |
|
| 1344 | 1344 | |
| 1345 | - /** Widgets */ |
|
| 1346 | - $this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget(); |
|
| 1345 | + /** Widgets */ |
|
| 1346 | + $this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget(); |
|
| 1347 | 1347 | |
| 1348 | - /* WordPress Admin. */ |
|
| 1349 | - $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service ); |
|
| 1350 | - $this->status_page = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service ); |
|
| 1348 | + /* WordPress Admin. */ |
|
| 1349 | + $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service ); |
|
| 1350 | + $this->status_page = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service ); |
|
| 1351 | 1351 | |
| 1352 | - // Create an instance of the install wizard. |
|
| 1353 | - $this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service, $this->language_select_element, $this->country_select_element ); |
|
| 1352 | + // Create an instance of the install wizard. |
|
| 1353 | + $this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service, $this->language_select_element, $this->country_select_element ); |
|
| 1354 | 1354 | |
| 1355 | - $this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service ); |
|
| 1355 | + $this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service ); |
|
| 1356 | 1356 | |
| 1357 | - // User Profile. |
|
| 1358 | - new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service ); |
|
| 1357 | + // User Profile. |
|
| 1358 | + new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service ); |
|
| 1359 | 1359 | |
| 1360 | - $this->entity_page_service = new Wordlift_Entity_Page_Service(); |
|
| 1360 | + $this->entity_page_service = new Wordlift_Entity_Page_Service(); |
|
| 1361 | 1361 | |
| 1362 | - // Load the debug service if WP is in debug mode. |
|
| 1363 | - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { |
|
| 1364 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php'; |
|
| 1365 | - new Wordlift_Debug_Service( $this->entity_service, $uri_service ); |
|
| 1366 | - } |
|
| 1362 | + // Load the debug service if WP is in debug mode. |
|
| 1363 | + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { |
|
| 1364 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php'; |
|
| 1365 | + new Wordlift_Debug_Service( $this->entity_service, $uri_service ); |
|
| 1366 | + } |
|
| 1367 | 1367 | |
| 1368 | - // Remote Image Service. |
|
| 1369 | - new Wordlift_Remote_Image_Service(); |
|
| 1368 | + // Remote Image Service. |
|
| 1369 | + new Wordlift_Remote_Image_Service(); |
|
| 1370 | 1370 | |
| 1371 | - /* |
|
| 1371 | + /* |
|
| 1372 | 1372 | * Provides mappings between post types and entity types. |
| 1373 | 1373 | * |
| 1374 | 1374 | * @since 3.20.0 |
| 1375 | 1375 | * |
| 1376 | 1376 | * @see https://github.com/insideout10/wordlift-plugin/issues/852. |
| 1377 | 1377 | */ |
| 1378 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-action.php'; |
|
| 1379 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-service.php'; |
|
| 1380 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php'; |
|
| 1378 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-action.php'; |
|
| 1379 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-service.php'; |
|
| 1380 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php'; |
|
| 1381 | 1381 | |
| 1382 | - // Create an instance of the Mapping Service and assign it to the Ajax Adapter. |
|
| 1383 | - new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) ); |
|
| 1382 | + // Create an instance of the Mapping Service and assign it to the Ajax Adapter. |
|
| 1383 | + new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) ); |
|
| 1384 | 1384 | |
| 1385 | - /* |
|
| 1385 | + /* |
|
| 1386 | 1386 | * Batch Operations. They're similar to Batch Actions but do not require working on post types. |
| 1387 | 1387 | * |
| 1388 | 1388 | * Eventually Batch Actions will become Batch Operations. |
| 1389 | 1389 | * |
| 1390 | 1390 | * @since 3.20.0 |
| 1391 | 1391 | */ |
| 1392 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/intf-wordlift-batch-operation.php'; |
|
| 1393 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php'; |
|
| 1392 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/intf-wordlift-batch-operation.php'; |
|
| 1393 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php'; |
|
| 1394 | 1394 | |
| 1395 | - /* |
|
| 1395 | + /* |
|
| 1396 | 1396 | * Add the Search Keywords taxonomy to manage the Search Keywords on WLS. |
| 1397 | 1397 | * |
| 1398 | 1398 | * @link https://github.com/insideout10/wordlift-plugin/issues/761 |
| 1399 | 1399 | * |
| 1400 | 1400 | * @since 3.20.0 |
| 1401 | 1401 | */ |
| 1402 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/search-keywords/class-wordlift-search-keyword-taxonomy.php'; |
|
| 1403 | - new Wordlift_Search_Keyword_Taxonomy( $api_service ); |
|
| 1402 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/search-keywords/class-wordlift-search-keyword-taxonomy.php'; |
|
| 1403 | + new Wordlift_Search_Keyword_Taxonomy( $api_service ); |
|
| 1404 | 1404 | |
| 1405 | - /* |
|
| 1405 | + /* |
|
| 1406 | 1406 | * Load dependencies for the front-end. |
| 1407 | 1407 | * |
| 1408 | 1408 | * @since 3.20.0 |
| 1409 | 1409 | */ |
| 1410 | - if ( ! is_admin() ) { |
|
| 1411 | - /* |
|
| 1410 | + if ( ! is_admin() ) { |
|
| 1411 | + /* |
|
| 1412 | 1412 | * Load the `Wordlift_Term_JsonLd_Adapter`. |
| 1413 | 1413 | * |
| 1414 | 1414 | * @see https://github.com/insideout10/wordlift-plugin/issues/892 |
| 1415 | 1415 | * |
| 1416 | 1416 | * @since 3.20.0 |
| 1417 | 1417 | */ |
| 1418 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-term-jsonld-adapter.php'; |
|
| 1419 | - new Wordlift_Term_JsonLd_Adapter( $this->entity_uri_service, $this->jsonld_service ); |
|
| 1420 | - } |
|
| 1418 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-term-jsonld-adapter.php'; |
|
| 1419 | + new Wordlift_Term_JsonLd_Adapter( $this->entity_uri_service, $this->jsonld_service ); |
|
| 1420 | + } |
|
| 1421 | 1421 | |
| 1422 | - /* |
|
| 1422 | + /* |
|
| 1423 | 1423 | * Initialize the Context Cards Service |
| 1424 | 1424 | * |
| 1425 | 1425 | * @link https://github.com/insideout10/wordlift-plugin/issues/934 |
| 1426 | 1426 | * |
| 1427 | 1427 | * @since 3.22.0 |
| 1428 | 1428 | */ |
| 1429 | - $this->context_cards_service = new Wordlift_Context_Cards_Service(); |
|
| 1429 | + $this->context_cards_service = new Wordlift_Context_Cards_Service(); |
|
| 1430 | 1430 | |
| 1431 | - /* |
|
| 1431 | + /* |
|
| 1432 | 1432 | * Load the Mappings JSON-LD post processing. |
| 1433 | 1433 | * |
| 1434 | 1434 | * @since 3.25.0 |
| 1435 | 1435 | */ |
| 1436 | 1436 | |
| 1437 | - $mappings_dbo = new Mappings_DBO(); |
|
| 1438 | - $default_rule_validator = new Taxonomy_Rule_Validator(); |
|
| 1439 | - new Post_Type_Rule_Validator(); |
|
| 1440 | - $rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator ); |
|
| 1441 | - $rule_groups_validator = new Rule_Groups_Validator( $rule_validators_registry ); |
|
| 1442 | - $mappings_validator = new Mappings_Validator( $mappings_dbo, $rule_groups_validator ); |
|
| 1437 | + $mappings_dbo = new Mappings_DBO(); |
|
| 1438 | + $default_rule_validator = new Taxonomy_Rule_Validator(); |
|
| 1439 | + new Post_Type_Rule_Validator(); |
|
| 1440 | + $rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator ); |
|
| 1441 | + $rule_groups_validator = new Rule_Groups_Validator( $rule_validators_registry ); |
|
| 1442 | + $mappings_validator = new Mappings_Validator( $mappings_dbo, $rule_groups_validator ); |
|
| 1443 | 1443 | |
| 1444 | - new Url_To_Entity_Transform_Function( $this->entity_uri_service ); |
|
| 1445 | - new Taxonomy_To_Terms_Transform_Function(); |
|
| 1446 | - $mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry(); |
|
| 1444 | + new Url_To_Entity_Transform_Function( $this->entity_uri_service ); |
|
| 1445 | + new Taxonomy_To_Terms_Transform_Function(); |
|
| 1446 | + $mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry(); |
|
| 1447 | 1447 | |
| 1448 | - new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry ); |
|
| 1448 | + new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry ); |
|
| 1449 | 1449 | |
| 1450 | - /* |
|
| 1450 | + /* |
|
| 1451 | 1451 | * Use the Templates Ajax Endpoint to load HTML templates for the legacy Angular app via admin-ajax.php |
| 1452 | 1452 | * end-point. |
| 1453 | 1453 | * |
| 1454 | 1454 | * @see https://github.com/insideout10/wordlift-plugin/issues/834 |
| 1455 | 1455 | * @since 3.24.4 |
| 1456 | 1456 | */ |
| 1457 | - new Templates_Ajax_Endpoint(); |
|
| 1457 | + new Templates_Ajax_Endpoint(); |
|
| 1458 | 1458 | |
| 1459 | - /* |
|
| 1459 | + /* |
|
| 1460 | 1460 | * Create a singleton for the Analysis_Response_Ops_Factory. |
| 1461 | 1461 | */ |
| 1462 | - $entity_helper = new Entity_Helper( $this->entity_uri_service, $this->entity_service ); |
|
| 1463 | - new Analysis_Response_Ops_Factory( |
|
| 1464 | - $this->entity_uri_service, |
|
| 1465 | - $this->entity_service, |
|
| 1466 | - $this->entity_type_service, |
|
| 1467 | - $this->storage_factory->post_images(), |
|
| 1468 | - $entity_helper |
|
| 1469 | - ); |
|
| 1470 | - |
|
| 1471 | - /** WL Autocomplete. */ |
|
| 1472 | - $autocomplete_service = new All_Autocomplete_Service( array( |
|
| 1473 | - new Local_Autocomplete_Service(), |
|
| 1474 | - new Linked_Data_Autocomplete_Service( $this->configuration_service, $entity_helper, $this->entity_uri_service, $this->entity_service ), |
|
| 1475 | - ) ); |
|
| 1476 | - $this->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service ); |
|
| 1477 | - |
|
| 1478 | - } |
|
| 1479 | - |
|
| 1480 | - /** |
|
| 1481 | - * Define the locale for this plugin for internationalization. |
|
| 1482 | - * |
|
| 1483 | - * Uses the Wordlift_i18n class in order to set the domain and to register the hook |
|
| 1484 | - * with WordPress. |
|
| 1485 | - * |
|
| 1486 | - * @since 1.0.0 |
|
| 1487 | - * @access private |
|
| 1488 | - */ |
|
| 1489 | - private function set_locale() { |
|
| 1490 | - |
|
| 1491 | - $plugin_i18n = new Wordlift_i18n(); |
|
| 1492 | - $plugin_i18n->set_domain( $this->get_plugin_name() ); |
|
| 1493 | - |
|
| 1494 | - $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); |
|
| 1495 | - |
|
| 1496 | - } |
|
| 1497 | - |
|
| 1498 | - /** |
|
| 1499 | - * Register all of the hooks related to the admin area functionality |
|
| 1500 | - * of the plugin. |
|
| 1501 | - * |
|
| 1502 | - * @since 1.0.0 |
|
| 1503 | - * @access private |
|
| 1504 | - */ |
|
| 1505 | - private function define_admin_hooks() { |
|
| 1506 | - |
|
| 1507 | - $plugin_admin = new Wordlift_Admin( |
|
| 1508 | - $this->get_plugin_name(), |
|
| 1509 | - $this->get_version(), |
|
| 1510 | - $this->configuration_service, |
|
| 1511 | - $this->notice_service, |
|
| 1512 | - $this->user_service |
|
| 1513 | - ); |
|
| 1514 | - |
|
| 1515 | - $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); |
|
| 1516 | - $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 ); |
|
| 1517 | - |
|
| 1518 | - // Hook the init action to taxonomy services. |
|
| 1519 | - $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 ); |
|
| 1520 | - $this->loader->add_action( 'init', $this->entity_types_taxonomy_service, 'init', 0 ); |
|
| 1521 | - |
|
| 1522 | - // Hook the deleted_post_meta action to the Thumbnail service. |
|
| 1523 | - $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 ); |
|
| 1524 | - |
|
| 1525 | - // Hook the added_post_meta action to the Thumbnail service. |
|
| 1526 | - $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 1527 | - |
|
| 1528 | - // Hook the updated_post_meta action to the Thumbnail service. |
|
| 1529 | - $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 1530 | - |
|
| 1531 | - // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 1532 | - $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 1533 | - |
|
| 1534 | - // Register custom allowed redirect hosts. |
|
| 1535 | - $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' ); |
|
| 1536 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 1537 | - $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' ); |
|
| 1538 | - |
|
| 1539 | - /* |
|
| 1462 | + $entity_helper = new Entity_Helper( $this->entity_uri_service, $this->entity_service ); |
|
| 1463 | + new Analysis_Response_Ops_Factory( |
|
| 1464 | + $this->entity_uri_service, |
|
| 1465 | + $this->entity_service, |
|
| 1466 | + $this->entity_type_service, |
|
| 1467 | + $this->storage_factory->post_images(), |
|
| 1468 | + $entity_helper |
|
| 1469 | + ); |
|
| 1470 | + |
|
| 1471 | + /** WL Autocomplete. */ |
|
| 1472 | + $autocomplete_service = new All_Autocomplete_Service( array( |
|
| 1473 | + new Local_Autocomplete_Service(), |
|
| 1474 | + new Linked_Data_Autocomplete_Service( $this->configuration_service, $entity_helper, $this->entity_uri_service, $this->entity_service ), |
|
| 1475 | + ) ); |
|
| 1476 | + $this->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service ); |
|
| 1477 | + |
|
| 1478 | + } |
|
| 1479 | + |
|
| 1480 | + /** |
|
| 1481 | + * Define the locale for this plugin for internationalization. |
|
| 1482 | + * |
|
| 1483 | + * Uses the Wordlift_i18n class in order to set the domain and to register the hook |
|
| 1484 | + * with WordPress. |
|
| 1485 | + * |
|
| 1486 | + * @since 1.0.0 |
|
| 1487 | + * @access private |
|
| 1488 | + */ |
|
| 1489 | + private function set_locale() { |
|
| 1490 | + |
|
| 1491 | + $plugin_i18n = new Wordlift_i18n(); |
|
| 1492 | + $plugin_i18n->set_domain( $this->get_plugin_name() ); |
|
| 1493 | + |
|
| 1494 | + $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); |
|
| 1495 | + |
|
| 1496 | + } |
|
| 1497 | + |
|
| 1498 | + /** |
|
| 1499 | + * Register all of the hooks related to the admin area functionality |
|
| 1500 | + * of the plugin. |
|
| 1501 | + * |
|
| 1502 | + * @since 1.0.0 |
|
| 1503 | + * @access private |
|
| 1504 | + */ |
|
| 1505 | + private function define_admin_hooks() { |
|
| 1506 | + |
|
| 1507 | + $plugin_admin = new Wordlift_Admin( |
|
| 1508 | + $this->get_plugin_name(), |
|
| 1509 | + $this->get_version(), |
|
| 1510 | + $this->configuration_service, |
|
| 1511 | + $this->notice_service, |
|
| 1512 | + $this->user_service |
|
| 1513 | + ); |
|
| 1514 | + |
|
| 1515 | + $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); |
|
| 1516 | + $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 ); |
|
| 1517 | + |
|
| 1518 | + // Hook the init action to taxonomy services. |
|
| 1519 | + $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 ); |
|
| 1520 | + $this->loader->add_action( 'init', $this->entity_types_taxonomy_service, 'init', 0 ); |
|
| 1521 | + |
|
| 1522 | + // Hook the deleted_post_meta action to the Thumbnail service. |
|
| 1523 | + $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 ); |
|
| 1524 | + |
|
| 1525 | + // Hook the added_post_meta action to the Thumbnail service. |
|
| 1526 | + $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 1527 | + |
|
| 1528 | + // Hook the updated_post_meta action to the Thumbnail service. |
|
| 1529 | + $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 1530 | + |
|
| 1531 | + // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 1532 | + $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 1533 | + |
|
| 1534 | + // Register custom allowed redirect hosts. |
|
| 1535 | + $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' ); |
|
| 1536 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 1537 | + $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' ); |
|
| 1538 | + |
|
| 1539 | + /* |
|
| 1540 | 1540 | * The old dashboard is replaced with dashboard v2. |
| 1541 | 1541 | * |
| 1542 | 1542 | * The old dashboard service is still loaded because its functions are used. |
@@ -1545,306 +1545,306 @@ discard block |
||
| 1545 | 1545 | * |
| 1546 | 1546 | * @since 3.20.0 |
| 1547 | 1547 | */ |
| 1548 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 1549 | - // $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' ); |
|
| 1550 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 1551 | - // $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' ); |
|
| 1552 | - |
|
| 1553 | - // Hook save_post to the entity service to update custom fields (such as alternate labels). |
|
| 1554 | - // We have a priority of 9 because we want to be executed before data is sent to Redlink. |
|
| 1555 | - $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 ); |
|
| 1556 | - $this->loader->add_action( 'save_post', $this->rating_service, 'set_rating_for', 20, 1 ); |
|
| 1557 | - |
|
| 1558 | - $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 ); |
|
| 1559 | - $this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' ); |
|
| 1560 | - |
|
| 1561 | - // Entity listing customization (wp-admin/edit.php) |
|
| 1562 | - // Add custom columns. |
|
| 1563 | - $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' ); |
|
| 1564 | - // no explicit entity as it prevents handling of other post types. |
|
| 1565 | - $this->loader->add_filter( 'manage_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 ); |
|
| 1566 | - // Add 4W selection. |
|
| 1567 | - $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' ); |
|
| 1568 | - $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' ); |
|
| 1569 | - $this->loader->add_action( 'pre_get_posts', $this->entity_list_service, 'pre_get_posts' ); |
|
| 1570 | - $this->loader->add_action( 'load-edit.php', $this->entity_list_service, 'load_edit' ); |
|
| 1571 | - |
|
| 1572 | - /* |
|
| 1548 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 1549 | + // $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' ); |
|
| 1550 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 1551 | + // $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' ); |
|
| 1552 | + |
|
| 1553 | + // Hook save_post to the entity service to update custom fields (such as alternate labels). |
|
| 1554 | + // We have a priority of 9 because we want to be executed before data is sent to Redlink. |
|
| 1555 | + $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 ); |
|
| 1556 | + $this->loader->add_action( 'save_post', $this->rating_service, 'set_rating_for', 20, 1 ); |
|
| 1557 | + |
|
| 1558 | + $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 ); |
|
| 1559 | + $this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' ); |
|
| 1560 | + |
|
| 1561 | + // Entity listing customization (wp-admin/edit.php) |
|
| 1562 | + // Add custom columns. |
|
| 1563 | + $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' ); |
|
| 1564 | + // no explicit entity as it prevents handling of other post types. |
|
| 1565 | + $this->loader->add_filter( 'manage_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 ); |
|
| 1566 | + // Add 4W selection. |
|
| 1567 | + $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' ); |
|
| 1568 | + $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' ); |
|
| 1569 | + $this->loader->add_action( 'pre_get_posts', $this->entity_list_service, 'pre_get_posts' ); |
|
| 1570 | + $this->loader->add_action( 'load-edit.php', $this->entity_list_service, 'load_edit' ); |
|
| 1571 | + |
|
| 1572 | + /* |
|
| 1573 | 1573 | * If `All Entity Types` is disable, use the radio button Walker. |
| 1574 | 1574 | * |
| 1575 | 1575 | * @see https://github.com/insideout10/wordlift-plugin/issues/835 |
| 1576 | 1576 | */ |
| 1577 | - if ( ! WL_ALL_ENTITY_TYPES ) { |
|
| 1578 | - $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' ); |
|
| 1579 | - } |
|
| 1577 | + if ( ! WL_ALL_ENTITY_TYPES ) { |
|
| 1578 | + $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' ); |
|
| 1579 | + } |
|
| 1580 | 1580 | |
| 1581 | - // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for |
|
| 1582 | - // entities. |
|
| 1583 | - $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 ); |
|
| 1581 | + // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for |
|
| 1582 | + // entities. |
|
| 1583 | + $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 ); |
|
| 1584 | 1584 | |
| 1585 | - // Filter imported post meta. |
|
| 1586 | - $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 ); |
|
| 1585 | + // Filter imported post meta. |
|
| 1586 | + $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 ); |
|
| 1587 | 1587 | |
| 1588 | - // Notify the import service when an import starts and ends. |
|
| 1589 | - $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 ); |
|
| 1590 | - $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 ); |
|
| 1588 | + // Notify the import service when an import starts and ends. |
|
| 1589 | + $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 ); |
|
| 1590 | + $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 ); |
|
| 1591 | 1591 | |
| 1592 | - // Hook the AJAX wl_rebuild action to the Rebuild Service. |
|
| 1593 | - $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' ); |
|
| 1594 | - $this->loader->add_action( 'wp_ajax_wl_rebuild_references', $this->reference_rebuild_service, 'rebuild' ); |
|
| 1592 | + // Hook the AJAX wl_rebuild action to the Rebuild Service. |
|
| 1593 | + $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' ); |
|
| 1594 | + $this->loader->add_action( 'wp_ajax_wl_rebuild_references', $this->reference_rebuild_service, 'rebuild' ); |
|
| 1595 | 1595 | |
| 1596 | - // Hook the menu to the Download Your Data page. |
|
| 1597 | - $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 ); |
|
| 1598 | - $this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 ); |
|
| 1599 | - $this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 ); |
|
| 1596 | + // Hook the menu to the Download Your Data page. |
|
| 1597 | + $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 ); |
|
| 1598 | + $this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 ); |
|
| 1599 | + $this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 ); |
|
| 1600 | 1600 | |
| 1601 | - // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links. |
|
| 1602 | - $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 ); |
|
| 1601 | + // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links. |
|
| 1602 | + $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 ); |
|
| 1603 | 1603 | |
| 1604 | - // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 1605 | - $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 1606 | - $this->loader->add_action( 'admin_post_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 1607 | - $this->loader->add_action( 'admin_post_nopriv_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 1604 | + // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 1605 | + $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 1606 | + $this->loader->add_action( 'admin_post_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 1607 | + $this->loader->add_action( 'admin_post_nopriv_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 1608 | 1608 | |
| 1609 | - // Hook the AJAX wl_validate_key action to the Key Validation service. |
|
| 1610 | - $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' ); |
|
| 1609 | + // Hook the AJAX wl_validate_key action to the Key Validation service. |
|
| 1610 | + $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' ); |
|
| 1611 | 1611 | |
| 1612 | - // Hook the AJAX wl_update_country_options action to the countries. |
|
| 1613 | - $this->loader->add_action( 'wp_ajax_wl_update_country_options', $this->country_select_element, 'get_options_html' ); |
|
| 1612 | + // Hook the AJAX wl_update_country_options action to the countries. |
|
| 1613 | + $this->loader->add_action( 'wp_ajax_wl_update_country_options', $this->country_select_element, 'get_options_html' ); |
|
| 1614 | 1614 | |
| 1615 | - // Hook the `admin_init` function to the Admin Setup. |
|
| 1616 | - $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' ); |
|
| 1615 | + // Hook the `admin_init` function to the Admin Setup. |
|
| 1616 | + $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' ); |
|
| 1617 | 1617 | |
| 1618 | - // Hook the admin_init to the settings page. |
|
| 1619 | - $this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' ); |
|
| 1620 | - $this->loader->add_action( 'admin_init', $this->analytics_settings_page, 'admin_init' ); |
|
| 1618 | + // Hook the admin_init to the settings page. |
|
| 1619 | + $this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' ); |
|
| 1620 | + $this->loader->add_action( 'admin_init', $this->analytics_settings_page, 'admin_init' ); |
|
| 1621 | 1621 | |
| 1622 | - $this->loader->add_filter( 'admin_post_thumbnail_html', $this->publisher_service, 'add_featured_image_instruction' ); |
|
| 1622 | + $this->loader->add_filter( 'admin_post_thumbnail_html', $this->publisher_service, 'add_featured_image_instruction' ); |
|
| 1623 | 1623 | |
| 1624 | - // Hook the menu creation on the general wordlift menu creation. |
|
| 1625 | - $this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 ); |
|
| 1624 | + // Hook the menu creation on the general wordlift menu creation. |
|
| 1625 | + $this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 ); |
|
| 1626 | 1626 | |
| 1627 | - /* |
|
| 1627 | + /* |
|
| 1628 | 1628 | * Display the `Wordlift_Admin_Search_Rankings_Page` page. |
| 1629 | 1629 | * |
| 1630 | 1630 | * @link https://github.com/insideout10/wordlift-plugin/issues/761 |
| 1631 | 1631 | * |
| 1632 | 1632 | * @since 3.20.0 |
| 1633 | 1633 | */ |
| 1634 | - if ( in_array( $this->configuration_service->get_package_type(), array( 'editorial', 'business' ) ) ) { |
|
| 1635 | - $admin_search_rankings_page = new Wordlift_Admin_Search_Rankings_Page(); |
|
| 1636 | - $this->loader->add_action( 'wl_admin_menu', $admin_search_rankings_page, 'admin_menu' ); |
|
| 1637 | - } |
|
| 1634 | + if ( in_array( $this->configuration_service->get_package_type(), array( 'editorial', 'business' ) ) ) { |
|
| 1635 | + $admin_search_rankings_page = new Wordlift_Admin_Search_Rankings_Page(); |
|
| 1636 | + $this->loader->add_action( 'wl_admin_menu', $admin_search_rankings_page, 'admin_menu' ); |
|
| 1637 | + } |
|
| 1638 | 1638 | |
| 1639 | - // Hook key update. |
|
| 1640 | - $this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 ); |
|
| 1641 | - $this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 ); |
|
| 1639 | + // Hook key update. |
|
| 1640 | + $this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 ); |
|
| 1641 | + $this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 ); |
|
| 1642 | 1642 | |
| 1643 | - // Add additional action links to the WordLift plugin in the plugins page. |
|
| 1644 | - $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 ); |
|
| 1643 | + // Add additional action links to the WordLift plugin in the plugins page. |
|
| 1644 | + $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 ); |
|
| 1645 | 1645 | |
| 1646 | - /* |
|
| 1646 | + /* |
|
| 1647 | 1647 | * Remove the Analytics Settings link from the plugin page. |
| 1648 | 1648 | * |
| 1649 | 1649 | * @see https://github.com/insideout10/wordlift-plugin/issues/932 |
| 1650 | 1650 | * @since 3.21.1 |
| 1651 | 1651 | */ |
| 1652 | - // $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->analytics_settings_page_action_link, 'action_links', 10, 1 ); |
|
| 1652 | + // $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->analytics_settings_page_action_link, 'action_links', 10, 1 ); |
|
| 1653 | 1653 | |
| 1654 | - // Hook the AJAX `wl_publisher` action name. |
|
| 1655 | - $this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' ); |
|
| 1654 | + // Hook the AJAX `wl_publisher` action name. |
|
| 1655 | + $this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' ); |
|
| 1656 | 1656 | |
| 1657 | - // Hook row actions for the entity type list admin. |
|
| 1658 | - $this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 ); |
|
| 1657 | + // Hook row actions for the entity type list admin. |
|
| 1658 | + $this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 ); |
|
| 1659 | 1659 | |
| 1660 | - /** Ajax actions. */ |
|
| 1661 | - $this->loader->add_action( 'wp_ajax_wl_google_analytics_export', $this->google_analytics_export_service, 'export' ); |
|
| 1660 | + /** Ajax actions. */ |
|
| 1661 | + $this->loader->add_action( 'wp_ajax_wl_google_analytics_export', $this->google_analytics_export_service, 'export' ); |
|
| 1662 | 1662 | |
| 1663 | - // Hook capabilities manipulation to allow access to entity type admin |
|
| 1664 | - // page on WordPress versions before 4.7. |
|
| 1665 | - global $wp_version; |
|
| 1666 | - if ( version_compare( $wp_version, '4.7', '<' ) ) { |
|
| 1667 | - $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 ); |
|
| 1668 | - } |
|
| 1663 | + // Hook capabilities manipulation to allow access to entity type admin |
|
| 1664 | + // page on WordPress versions before 4.7. |
|
| 1665 | + global $wp_version; |
|
| 1666 | + if ( version_compare( $wp_version, '4.7', '<' ) ) { |
|
| 1667 | + $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 ); |
|
| 1668 | + } |
|
| 1669 | 1669 | |
| 1670 | - $this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 ); |
|
| 1670 | + $this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 ); |
|
| 1671 | 1671 | |
| 1672 | - /** Adapters. */ |
|
| 1673 | - $this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 ); |
|
| 1674 | - $this->loader->add_action( 'wp_ajax_wl_relation_rebuild_process_all', $this->relation_rebuild_adapter, 'process_all' ); |
|
| 1672 | + /** Adapters. */ |
|
| 1673 | + $this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 ); |
|
| 1674 | + $this->loader->add_action( 'wp_ajax_wl_relation_rebuild_process_all', $this->relation_rebuild_adapter, 'process_all' ); |
|
| 1675 | 1675 | |
| 1676 | - $this->loader->add_action( 'wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create' ); |
|
| 1677 | - $this->loader->add_action( 'wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete' ); |
|
| 1676 | + $this->loader->add_action( 'wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create' ); |
|
| 1677 | + $this->loader->add_action( 'wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete' ); |
|
| 1678 | 1678 | |
| 1679 | 1679 | |
| 1680 | - $this->loader->add_action( 'update_user_metadata', $this->user_service, 'update_user_metadata', 10, 5 ); |
|
| 1681 | - $this->loader->add_action( 'delete_user_metadata', $this->user_service, 'delete_user_metadata', 10, 5 ); |
|
| 1680 | + $this->loader->add_action( 'update_user_metadata', $this->user_service, 'update_user_metadata', 10, 5 ); |
|
| 1681 | + $this->loader->add_action( 'delete_user_metadata', $this->user_service, 'delete_user_metadata', 10, 5 ); |
|
| 1682 | 1682 | |
| 1683 | - // Handle the autocomplete request. |
|
| 1684 | - add_action( 'wp_ajax_wl_autocomplete', array( |
|
| 1685 | - $this->autocomplete_adapter, |
|
| 1686 | - 'wl_autocomplete', |
|
| 1687 | - ) ); |
|
| 1688 | - add_action( 'wp_ajax_nopriv_wl_autocomplete', array( |
|
| 1689 | - $this->autocomplete_adapter, |
|
| 1690 | - 'wl_autocomplete', |
|
| 1691 | - ) ); |
|
| 1683 | + // Handle the autocomplete request. |
|
| 1684 | + add_action( 'wp_ajax_wl_autocomplete', array( |
|
| 1685 | + $this->autocomplete_adapter, |
|
| 1686 | + 'wl_autocomplete', |
|
| 1687 | + ) ); |
|
| 1688 | + add_action( 'wp_ajax_nopriv_wl_autocomplete', array( |
|
| 1689 | + $this->autocomplete_adapter, |
|
| 1690 | + 'wl_autocomplete', |
|
| 1691 | + ) ); |
|
| 1692 | 1692 | |
| 1693 | - // Hooks to restrict multisite super admin from manipulating entity types. |
|
| 1694 | - if ( is_multisite() ) { |
|
| 1695 | - $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 ); |
|
| 1696 | - } |
|
| 1693 | + // Hooks to restrict multisite super admin from manipulating entity types. |
|
| 1694 | + if ( is_multisite() ) { |
|
| 1695 | + $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 ); |
|
| 1696 | + } |
|
| 1697 | 1697 | |
| 1698 | - $deactivator_feedback = new Wordlift_Deactivator_Feedback( $this->configuration_service ); |
|
| 1698 | + $deactivator_feedback = new Wordlift_Deactivator_Feedback( $this->configuration_service ); |
|
| 1699 | 1699 | |
| 1700 | - add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) ); |
|
| 1701 | - add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) ); |
|
| 1702 | - add_action( 'wp_ajax_wl_deactivation_feedback', array( $deactivator_feedback, 'wl_deactivation_feedback' ) ); |
|
| 1703 | - |
|
| 1704 | - /** |
|
| 1705 | - * Always allow the `wordlift/classification` block. |
|
| 1706 | - * |
|
| 1707 | - * @since 3.23.0 |
|
| 1708 | - */ |
|
| 1709 | - add_filter( 'allowed_block_types', function ( $value ) { |
|
| 1700 | + add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) ); |
|
| 1701 | + add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) ); |
|
| 1702 | + add_action( 'wp_ajax_wl_deactivation_feedback', array( $deactivator_feedback, 'wl_deactivation_feedback' ) ); |
|
| 1710 | 1703 | |
| 1711 | - if ( true === $value ) { |
|
| 1712 | - return $value; |
|
| 1713 | - } |
|
| 1704 | + /** |
|
| 1705 | + * Always allow the `wordlift/classification` block. |
|
| 1706 | + * |
|
| 1707 | + * @since 3.23.0 |
|
| 1708 | + */ |
|
| 1709 | + add_filter( 'allowed_block_types', function ( $value ) { |
|
| 1714 | 1710 | |
| 1715 | - return array_merge( (array) $value, array( 'wordlift/classification' ) ); |
|
| 1716 | - }, PHP_INT_MAX ); |
|
| 1711 | + if ( true === $value ) { |
|
| 1712 | + return $value; |
|
| 1713 | + } |
|
| 1717 | 1714 | |
| 1718 | - } |
|
| 1715 | + return array_merge( (array) $value, array( 'wordlift/classification' ) ); |
|
| 1716 | + }, PHP_INT_MAX ); |
|
| 1719 | 1717 | |
| 1720 | - /** |
|
| 1721 | - * Register all of the hooks related to the public-facing functionality |
|
| 1722 | - * of the plugin. |
|
| 1723 | - * |
|
| 1724 | - * @since 1.0.0 |
|
| 1725 | - * @access private |
|
| 1726 | - */ |
|
| 1727 | - private function define_public_hooks() { |
|
| 1718 | + } |
|
| 1728 | 1719 | |
| 1729 | - $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() ); |
|
| 1720 | + /** |
|
| 1721 | + * Register all of the hooks related to the public-facing functionality |
|
| 1722 | + * of the plugin. |
|
| 1723 | + * |
|
| 1724 | + * @since 1.0.0 |
|
| 1725 | + * @access private |
|
| 1726 | + */ |
|
| 1727 | + private function define_public_hooks() { |
|
| 1730 | 1728 | |
| 1731 | - // Register the entity post type. |
|
| 1732 | - $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' ); |
|
| 1729 | + $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() ); |
|
| 1733 | 1730 | |
| 1734 | - // Bind the link generation and handling hooks to the entity link service. |
|
| 1735 | - $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 ); |
|
| 1736 | - $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 ); |
|
| 1737 | - $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 ); |
|
| 1738 | - $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 ); |
|
| 1731 | + // Register the entity post type. |
|
| 1732 | + $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' ); |
|
| 1739 | 1733 | |
| 1740 | - $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); |
|
| 1741 | - $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); |
|
| 1742 | - $this->loader->add_action( 'wp_enqueue_scripts', $this->context_cards_service, 'enqueue_scripts' ); |
|
| 1734 | + // Bind the link generation and handling hooks to the entity link service. |
|
| 1735 | + $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 ); |
|
| 1736 | + $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 ); |
|
| 1737 | + $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 ); |
|
| 1738 | + $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 ); |
|
| 1743 | 1739 | |
| 1744 | - // Hook the content filter service to add entity links. |
|
| 1745 | - if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) { |
|
| 1746 | - $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' ); |
|
| 1747 | - } |
|
| 1740 | + $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); |
|
| 1741 | + $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); |
|
| 1742 | + $this->loader->add_action( 'wp_enqueue_scripts', $this->context_cards_service, 'enqueue_scripts' ); |
|
| 1748 | 1743 | |
| 1749 | - // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 1750 | - $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 1744 | + // Hook the content filter service to add entity links. |
|
| 1745 | + if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) { |
|
| 1746 | + $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' ); |
|
| 1747 | + } |
|
| 1751 | 1748 | |
| 1752 | - // Hook the ShareThis service. |
|
| 1753 | - $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 ); |
|
| 1754 | - $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 ); |
|
| 1749 | + // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 1750 | + $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 1755 | 1751 | |
| 1756 | - // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 1757 | - $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 1752 | + // Hook the ShareThis service. |
|
| 1753 | + $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 ); |
|
| 1754 | + $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 ); |
|
| 1758 | 1755 | |
| 1759 | - // Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service` |
|
| 1760 | - // in order to tweak WP's `WP_Query` to include entities in queries related |
|
| 1761 | - // to categories. |
|
| 1762 | - $this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 ); |
|
| 1756 | + // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 1757 | + $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 1763 | 1758 | |
| 1764 | - /* |
|
| 1759 | + // Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service` |
|
| 1760 | + // in order to tweak WP's `WP_Query` to include entities in queries related |
|
| 1761 | + // to categories. |
|
| 1762 | + $this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 ); |
|
| 1763 | + |
|
| 1764 | + /* |
|
| 1765 | 1765 | * Hook the `pre_get_posts` action to the `Wordlift_Entity_Page_Service` |
| 1766 | 1766 | * in order to tweak WP's `WP_Query` to show event related entities in reverse |
| 1767 | 1767 | * order of start time. |
| 1768 | 1768 | */ |
| 1769 | - $this->loader->add_action( 'pre_get_posts', $this->entity_page_service, 'pre_get_posts', 10, 1 ); |
|
| 1770 | - |
|
| 1771 | - $this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 ); |
|
| 1772 | - |
|
| 1773 | - // This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done. |
|
| 1774 | - $this->loader->add_action( 'save_post', $this->entity_type_adapter, 'save_post', 9, 3 ); |
|
| 1775 | - |
|
| 1776 | - // Analytics Script Frontend. |
|
| 1777 | - if ( $this->configuration_service->is_analytics_enable() ) { |
|
| 1778 | - $this->loader->add_action( 'wp_enqueue_scripts', $this->analytics_connect, 'enqueue_scripts', 10 ); |
|
| 1779 | - } |
|
| 1780 | - |
|
| 1781 | - } |
|
| 1782 | - |
|
| 1783 | - /** |
|
| 1784 | - * Run the loader to execute all of the hooks with WordPress. |
|
| 1785 | - * |
|
| 1786 | - * @since 1.0.0 |
|
| 1787 | - */ |
|
| 1788 | - public function run() { |
|
| 1789 | - $this->loader->run(); |
|
| 1790 | - } |
|
| 1791 | - |
|
| 1792 | - /** |
|
| 1793 | - * The name of the plugin used to uniquely identify it within the context of |
|
| 1794 | - * WordPress and to define internationalization functionality. |
|
| 1795 | - * |
|
| 1796 | - * @return string The name of the plugin. |
|
| 1797 | - * @since 1.0.0 |
|
| 1798 | - */ |
|
| 1799 | - public function get_plugin_name() { |
|
| 1800 | - return $this->plugin_name; |
|
| 1801 | - } |
|
| 1802 | - |
|
| 1803 | - /** |
|
| 1804 | - * The reference to the class that orchestrates the hooks with the plugin. |
|
| 1805 | - * |
|
| 1806 | - * @return Wordlift_Loader Orchestrates the hooks of the plugin. |
|
| 1807 | - * @since 1.0.0 |
|
| 1808 | - */ |
|
| 1809 | - public function get_loader() { |
|
| 1810 | - return $this->loader; |
|
| 1811 | - } |
|
| 1812 | - |
|
| 1813 | - /** |
|
| 1814 | - * Retrieve the version number of the plugin. |
|
| 1815 | - * |
|
| 1816 | - * @return string The version number of the plugin. |
|
| 1817 | - * @since 1.0.0 |
|
| 1818 | - */ |
|
| 1819 | - public function get_version() { |
|
| 1820 | - return $this->version; |
|
| 1821 | - } |
|
| 1822 | - |
|
| 1823 | - /** |
|
| 1824 | - * Load dependencies for WP-CLI. |
|
| 1825 | - * |
|
| 1826 | - * @throws Exception |
|
| 1827 | - * @since 3.18.0 |
|
| 1828 | - */ |
|
| 1829 | - private function load_cli_dependencies() { |
|
| 1830 | - |
|
| 1831 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'cli/class-wordlift-push-reference-data-command.php'; |
|
| 1832 | - |
|
| 1833 | - $push_reference_data_command = new Wordlift_Push_Reference_Data_Command( $this->relation_service, $this->entity_service, $this->sparql_service, $this->configuration_service, $this->entity_type_service ); |
|
| 1834 | - |
|
| 1835 | - WP_CLI::add_command( 'wl references push', $push_reference_data_command ); |
|
| 1836 | - |
|
| 1837 | - } |
|
| 1838 | - |
|
| 1839 | - /** |
|
| 1840 | - * Get the {@link \Wordlift_Dashboard_Service} to allow others to use its functions. |
|
| 1841 | - * |
|
| 1842 | - * @return \Wordlift_Dashboard_Service The {@link \Wordlift_Dashboard_Service} instance. |
|
| 1843 | - * @since 3.20.0 |
|
| 1844 | - */ |
|
| 1845 | - public function get_dashboard_service() { |
|
| 1846 | - |
|
| 1847 | - return $this->dashboard_service; |
|
| 1848 | - } |
|
| 1769 | + $this->loader->add_action( 'pre_get_posts', $this->entity_page_service, 'pre_get_posts', 10, 1 ); |
|
| 1770 | + |
|
| 1771 | + $this->loader->add_action( 'wl_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 ); |
|
| 1772 | + |
|
| 1773 | + // This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done. |
|
| 1774 | + $this->loader->add_action( 'save_post', $this->entity_type_adapter, 'save_post', 9, 3 ); |
|
| 1775 | + |
|
| 1776 | + // Analytics Script Frontend. |
|
| 1777 | + if ( $this->configuration_service->is_analytics_enable() ) { |
|
| 1778 | + $this->loader->add_action( 'wp_enqueue_scripts', $this->analytics_connect, 'enqueue_scripts', 10 ); |
|
| 1779 | + } |
|
| 1780 | + |
|
| 1781 | + } |
|
| 1782 | + |
|
| 1783 | + /** |
|
| 1784 | + * Run the loader to execute all of the hooks with WordPress. |
|
| 1785 | + * |
|
| 1786 | + * @since 1.0.0 |
|
| 1787 | + */ |
|
| 1788 | + public function run() { |
|
| 1789 | + $this->loader->run(); |
|
| 1790 | + } |
|
| 1791 | + |
|
| 1792 | + /** |
|
| 1793 | + * The name of the plugin used to uniquely identify it within the context of |
|
| 1794 | + * WordPress and to define internationalization functionality. |
|
| 1795 | + * |
|
| 1796 | + * @return string The name of the plugin. |
|
| 1797 | + * @since 1.0.0 |
|
| 1798 | + */ |
|
| 1799 | + public function get_plugin_name() { |
|
| 1800 | + return $this->plugin_name; |
|
| 1801 | + } |
|
| 1802 | + |
|
| 1803 | + /** |
|
| 1804 | + * The reference to the class that orchestrates the hooks with the plugin. |
|
| 1805 | + * |
|
| 1806 | + * @return Wordlift_Loader Orchestrates the hooks of the plugin. |
|
| 1807 | + * @since 1.0.0 |
|
| 1808 | + */ |
|
| 1809 | + public function get_loader() { |
|
| 1810 | + return $this->loader; |
|
| 1811 | + } |
|
| 1812 | + |
|
| 1813 | + /** |
|
| 1814 | + * Retrieve the version number of the plugin. |
|
| 1815 | + * |
|
| 1816 | + * @return string The version number of the plugin. |
|
| 1817 | + * @since 1.0.0 |
|
| 1818 | + */ |
|
| 1819 | + public function get_version() { |
|
| 1820 | + return $this->version; |
|
| 1821 | + } |
|
| 1822 | + |
|
| 1823 | + /** |
|
| 1824 | + * Load dependencies for WP-CLI. |
|
| 1825 | + * |
|
| 1826 | + * @throws Exception |
|
| 1827 | + * @since 3.18.0 |
|
| 1828 | + */ |
|
| 1829 | + private function load_cli_dependencies() { |
|
| 1830 | + |
|
| 1831 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'cli/class-wordlift-push-reference-data-command.php'; |
|
| 1832 | + |
|
| 1833 | + $push_reference_data_command = new Wordlift_Push_Reference_Data_Command( $this->relation_service, $this->entity_service, $this->sparql_service, $this->configuration_service, $this->entity_type_service ); |
|
| 1834 | + |
|
| 1835 | + WP_CLI::add_command( 'wl references push', $push_reference_data_command ); |
|
| 1836 | + |
|
| 1837 | + } |
|
| 1838 | + |
|
| 1839 | + /** |
|
| 1840 | + * Get the {@link \Wordlift_Dashboard_Service} to allow others to use its functions. |
|
| 1841 | + * |
|
| 1842 | + * @return \Wordlift_Dashboard_Service The {@link \Wordlift_Dashboard_Service} instance. |
|
| 1843 | + * @since 3.20.0 |
|
| 1844 | + */ |
|
| 1845 | + public function get_dashboard_service() { |
|
| 1846 | + |
|
| 1847 | + return $this->dashboard_service; |
|
| 1848 | + } |
|
| 1849 | 1849 | |
| 1850 | 1850 | } |