@@ -29,892 +29,892 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | class Wordlift { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * The loader that's responsible for maintaining and registering all hooks that power |
|
| 34 | - * the plugin. |
|
| 35 | - * |
|
| 36 | - * @since 1.0.0 |
|
| 37 | - * @access protected |
|
| 38 | - * @var Wordlift_Loader $loader Maintains and registers all hooks for the plugin. |
|
| 39 | - */ |
|
| 40 | - protected $loader; |
|
| 41 | - |
|
| 42 | - /** |
|
| 43 | - * The unique identifier of this plugin. |
|
| 44 | - * |
|
| 45 | - * @since 1.0.0 |
|
| 46 | - * @access protected |
|
| 47 | - * @var string $plugin_name The string used to uniquely identify this plugin. |
|
| 48 | - */ |
|
| 49 | - protected $plugin_name; |
|
| 50 | - |
|
| 51 | - /** |
|
| 52 | - * The current version of the plugin. |
|
| 53 | - * |
|
| 54 | - * @since 1.0.0 |
|
| 55 | - * @access protected |
|
| 56 | - * @var string $version The current version of the plugin. |
|
| 57 | - */ |
|
| 58 | - protected $version; |
|
| 59 | - |
|
| 60 | - /** |
|
| 61 | - * The Thumbnail service. |
|
| 62 | - * |
|
| 63 | - * @since 3.1.5 |
|
| 64 | - * @access private |
|
| 65 | - * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service. |
|
| 66 | - */ |
|
| 67 | - private $thumbnail_service; |
|
| 68 | - |
|
| 69 | - /** |
|
| 70 | - * The UI service. |
|
| 71 | - * |
|
| 72 | - * @since 3.2.0 |
|
| 73 | - * @access private |
|
| 74 | - * @var \Wordlift_UI_Service $ui_service The UI service. |
|
| 75 | - */ |
|
| 76 | - private $ui_service; |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * The Schema service. |
|
| 80 | - * |
|
| 81 | - * @since 3.3.0 |
|
| 82 | - * @access private |
|
| 83 | - * @var \Wordlift_Schema_Service $schema_service The Schema service. |
|
| 84 | - */ |
|
| 85 | - private $schema_service; |
|
| 86 | - |
|
| 87 | - /** |
|
| 88 | - * The Entity service. |
|
| 89 | - * |
|
| 90 | - * @since 3.1.0 |
|
| 91 | - * @access protected |
|
| 92 | - * @var \Wordlift_Entity_Service $entity_service The Entity service. |
|
| 93 | - */ |
|
| 94 | - protected $entity_service; |
|
| 95 | - |
|
| 96 | - /** |
|
| 97 | - * The Topic Taxonomy service. |
|
| 98 | - * |
|
| 99 | - * @since 3.5.0 |
|
| 100 | - * @access private |
|
| 101 | - * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service. |
|
| 102 | - */ |
|
| 103 | - private $topic_taxonomy_service; |
|
| 104 | - |
|
| 105 | - /** |
|
| 106 | - * The User service. |
|
| 107 | - * |
|
| 108 | - * @since 3.1.7 |
|
| 109 | - * @access protected |
|
| 110 | - * @var \Wordlift_User_Service $user_service The User service. |
|
| 111 | - */ |
|
| 112 | - protected $user_service; |
|
| 113 | - |
|
| 114 | - /** |
|
| 115 | - * The Timeline service. |
|
| 116 | - * |
|
| 117 | - * @since 3.1.0 |
|
| 118 | - * @access private |
|
| 119 | - * @var \Wordlift_Timeline_Service $timeline_service The Timeline service. |
|
| 120 | - */ |
|
| 121 | - private $timeline_service; |
|
| 122 | - |
|
| 123 | - /** |
|
| 124 | - * The Redirect service. |
|
| 125 | - * |
|
| 126 | - * @since 3.2.0 |
|
| 127 | - * @access private |
|
| 128 | - * @var \Wordlift_Redirect_Service $redirect_service The Redirect service. |
|
| 129 | - */ |
|
| 130 | - private $redirect_service; |
|
| 131 | - |
|
| 132 | - /** |
|
| 133 | - * The Notice service. |
|
| 134 | - * |
|
| 135 | - * @since 3.3.0 |
|
| 136 | - * @access private |
|
| 137 | - * @var \Wordlift_Notice_Service $notice_service The Notice service. |
|
| 138 | - */ |
|
| 139 | - private $notice_service; |
|
| 140 | - |
|
| 141 | - /** |
|
| 142 | - * The Entity list customization. |
|
| 143 | - * |
|
| 144 | - * @since 3.3.0 |
|
| 145 | - * @access private |
|
| 146 | - * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service. |
|
| 147 | - */ |
|
| 148 | - private $entity_list_service; |
|
| 149 | - |
|
| 150 | - /** |
|
| 151 | - * The Entity Types Taxonomy Walker. |
|
| 152 | - * |
|
| 153 | - * @since 3.1.0 |
|
| 154 | - * @access private |
|
| 155 | - * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker |
|
| 156 | - */ |
|
| 157 | - private $entity_types_taxonomy_walker; |
|
| 158 | - |
|
| 159 | - /** |
|
| 160 | - * The ShareThis service. |
|
| 161 | - * |
|
| 162 | - * @since 3.2.0 |
|
| 163 | - * @access private |
|
| 164 | - * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service. |
|
| 165 | - */ |
|
| 166 | - private $sharethis_service; |
|
| 167 | - |
|
| 168 | - /** |
|
| 169 | - * The PrimaShop adapter. |
|
| 170 | - * |
|
| 171 | - * @since 3.2.3 |
|
| 172 | - * @access private |
|
| 173 | - * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter. |
|
| 174 | - */ |
|
| 175 | - private $primashop_adapter; |
|
| 176 | - |
|
| 177 | - /** |
|
| 178 | - * The WordLift Dashboard adapter. |
|
| 179 | - * |
|
| 180 | - * @since 3.4.0 |
|
| 181 | - * @access private |
|
| 182 | - * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service; |
|
| 183 | - */ |
|
| 184 | - private $dashboard_service; |
|
| 185 | - |
|
| 186 | - /** |
|
| 187 | - * The entity type service. |
|
| 188 | - * |
|
| 189 | - * @since 3.6.0 |
|
| 190 | - * @access private |
|
| 191 | - * @var \Wordlift_Entity_Post_Type_Service |
|
| 192 | - */ |
|
| 193 | - private $entity_post_type_service; |
|
| 194 | - |
|
| 195 | - /** |
|
| 196 | - * The entity link service used to mangle links to entities with a custom slug or even w/o a slug. |
|
| 197 | - * |
|
| 198 | - * @since 3.6.0 |
|
| 199 | - * @access private |
|
| 200 | - * @var \Wordlift_Entity_Link_Service |
|
| 201 | - */ |
|
| 202 | - private $entity_link_service; |
|
| 203 | - |
|
| 204 | - /** |
|
| 205 | - * A {@link Wordlift_Sparql_Service} instance. |
|
| 206 | - * |
|
| 207 | - * @var 3.6.0 |
|
| 208 | - * @access private |
|
| 209 | - * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance. |
|
| 210 | - */ |
|
| 211 | - private $sparql_service; |
|
| 212 | - |
|
| 213 | - /** |
|
| 214 | - * A {@link Wordlift_Import_Service} instance. |
|
| 215 | - * |
|
| 216 | - * @since 3.6.0 |
|
| 217 | - * @access private |
|
| 218 | - * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance. |
|
| 219 | - */ |
|
| 220 | - private $import_service; |
|
| 221 | - |
|
| 222 | - /** |
|
| 223 | - * A {@link Wordlift_Rebuild_Service} instance. |
|
| 224 | - * |
|
| 225 | - * @since 3.6.0 |
|
| 226 | - * @access private |
|
| 227 | - * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance. |
|
| 228 | - */ |
|
| 229 | - private $rebuild_service; |
|
| 230 | - |
|
| 231 | - /** |
|
| 232 | - * A {@link Wordlift_Jsonld_Service} instance. |
|
| 233 | - * |
|
| 234 | - * @since 3.7.0 |
|
| 235 | - * @access protected |
|
| 236 | - * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance. |
|
| 237 | - */ |
|
| 238 | - protected $jsonld_service; |
|
| 239 | - |
|
| 240 | - /** |
|
| 241 | - * |
|
| 242 | - * @since 3.7.0 |
|
| 243 | - * @access private |
|
| 244 | - * @var \Wordlift_Property_Factory $property_factory |
|
| 245 | - */ |
|
| 246 | - private $property_factory; |
|
| 247 | - |
|
| 248 | - /** |
|
| 249 | - * The 'Download Your Data' page. |
|
| 250 | - * |
|
| 251 | - * @since 3.6.0 |
|
| 252 | - * @access private |
|
| 253 | - * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page. |
|
| 254 | - */ |
|
| 255 | - private $download_your_data_page; |
|
| 256 | - |
|
| 257 | - /** |
|
| 258 | - * The install wizard page. |
|
| 259 | - * |
|
| 260 | - * @since 3.9.0 |
|
| 261 | - * @access private |
|
| 262 | - * @var \Wordlift_Admin_Setup $admin_setup The Install wizard. |
|
| 263 | - */ |
|
| 264 | - private $admin_setup; |
|
| 265 | - |
|
| 266 | - /** |
|
| 267 | - * The Content Filter Service hooks up to the 'the_content' filter and provides |
|
| 268 | - * linking of entities to their pages. |
|
| 269 | - * |
|
| 270 | - * @since 3.8.0 |
|
| 271 | - * @access private |
|
| 272 | - * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance. |
|
| 273 | - */ |
|
| 274 | - private $content_filter_service; |
|
| 275 | - |
|
| 276 | - /** |
|
| 277 | - * A {@link Wordlift_Key_Validation_Service} instance. |
|
| 278 | - * |
|
| 279 | - * @since 3.9.0 |
|
| 280 | - * @access private |
|
| 281 | - * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance. |
|
| 282 | - */ |
|
| 283 | - private $key_validation_service; |
|
| 284 | - |
|
| 285 | - /** |
|
| 286 | - * A {@link Wordlift_Rating_Service} instance. |
|
| 287 | - * |
|
| 288 | - * @since 3.10.0 |
|
| 289 | - * @access private |
|
| 290 | - * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance. |
|
| 291 | - */ |
|
| 292 | - private $rating_service; |
|
| 293 | - |
|
| 294 | - /** |
|
| 295 | - * A {@link Wordlift_Post_To_Jsonld_Converter} instance. |
|
| 296 | - * |
|
| 297 | - * @since 3.10.0 |
|
| 298 | - * @access protected |
|
| 299 | - * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance. |
|
| 300 | - */ |
|
| 301 | - protected $post_to_jsonld_converter; |
|
| 302 | - |
|
| 303 | - /** |
|
| 304 | - * A {@link Wordlift_Configuration_Service} instance. |
|
| 305 | - * |
|
| 306 | - * @since 3.10.0 |
|
| 307 | - * @access protected |
|
| 308 | - * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance. |
|
| 309 | - */ |
|
| 310 | - protected $configuration_service; |
|
| 311 | - |
|
| 312 | - /** |
|
| 313 | - * A {@link Wordlift_Entity_Type_Service} instance. |
|
| 314 | - * |
|
| 315 | - * @since 3.10.0 |
|
| 316 | - * @access protected |
|
| 317 | - * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance. |
|
| 318 | - */ |
|
| 319 | - protected $entity_type_service; |
|
| 320 | - |
|
| 321 | - /** |
|
| 322 | - * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance. |
|
| 323 | - * |
|
| 324 | - * @since 3.10.0 |
|
| 325 | - * @access protected |
|
| 326 | - * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance. |
|
| 327 | - */ |
|
| 328 | - protected $entity_post_to_jsonld_converter; |
|
| 329 | - |
|
| 330 | - /** |
|
| 331 | - * A {@link Wordlift_Postid_To_Jsonld_Converter} instance. |
|
| 332 | - * |
|
| 333 | - * @since 3.10.0 |
|
| 334 | - * @access protected |
|
| 335 | - * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance. |
|
| 336 | - */ |
|
| 337 | - protected $postid_to_jsonld_converter; |
|
| 338 | - |
|
| 339 | - /** |
|
| 340 | - * The {@link Wordlift_Admin_Status_Page} class. |
|
| 341 | - * |
|
| 342 | - * @since 3.9.8 |
|
| 343 | - * @access private |
|
| 344 | - * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class. |
|
| 345 | - */ |
|
| 346 | - private $status_page; |
|
| 347 | - |
|
| 348 | - /** |
|
| 349 | - * Define the core functionality of the plugin. |
|
| 350 | - * |
|
| 351 | - * Set the plugin name and the plugin version that can be used throughout the plugin. |
|
| 352 | - * Load the dependencies, define the locale, and set the hooks for the admin area and |
|
| 353 | - * the public-facing side of the site. |
|
| 354 | - * |
|
| 355 | - * @since 1.0.0 |
|
| 356 | - */ |
|
| 357 | - public function __construct() { |
|
| 358 | - |
|
| 359 | - $this->plugin_name = 'wordlift'; |
|
| 360 | - $this->version = '3.11.0-dev'; |
|
| 361 | - $this->load_dependencies(); |
|
| 362 | - $this->set_locale(); |
|
| 363 | - $this->define_admin_hooks(); |
|
| 364 | - $this->define_public_hooks(); |
|
| 365 | - |
|
| 366 | - } |
|
| 367 | - |
|
| 368 | - /** |
|
| 369 | - * Load the required dependencies for this plugin. |
|
| 370 | - * |
|
| 371 | - * Include the following files that make up the plugin: |
|
| 372 | - * |
|
| 373 | - * - Wordlift_Loader. Orchestrates the hooks of the plugin. |
|
| 374 | - * - Wordlift_i18n. Defines internationalization functionality. |
|
| 375 | - * - Wordlift_Admin. Defines all hooks for the admin area. |
|
| 376 | - * - Wordlift_Public. Defines all hooks for the public side of the site. |
|
| 377 | - * |
|
| 378 | - * Create an instance of the loader which will be used to register the hooks |
|
| 379 | - * with WordPress. |
|
| 380 | - * |
|
| 381 | - * @since 1.0.0 |
|
| 382 | - * @access private |
|
| 383 | - */ |
|
| 384 | - private function load_dependencies() { |
|
| 385 | - |
|
| 386 | - /** |
|
| 387 | - * The class responsible for orchestrating the actions and filters of the |
|
| 388 | - * core plugin. |
|
| 389 | - */ |
|
| 390 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php'; |
|
| 391 | - |
|
| 392 | - /** |
|
| 393 | - * The class responsible for defining internationalization functionality |
|
| 394 | - * of the plugin. |
|
| 395 | - */ |
|
| 396 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php'; |
|
| 397 | - |
|
| 398 | - /** |
|
| 399 | - * WordLift's supported languages. |
|
| 400 | - */ |
|
| 401 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php'; |
|
| 402 | - |
|
| 403 | - /** |
|
| 404 | - * Provide support functions to sanitize data. |
|
| 405 | - */ |
|
| 406 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php'; |
|
| 407 | - |
|
| 408 | - /** |
|
| 409 | - * The Redirect service. |
|
| 410 | - */ |
|
| 411 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php'; |
|
| 412 | - |
|
| 413 | - /** |
|
| 414 | - * The Log service. |
|
| 415 | - */ |
|
| 416 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php'; |
|
| 417 | - |
|
| 418 | - /** |
|
| 419 | - * The configuration service. |
|
| 420 | - */ |
|
| 421 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php'; |
|
| 422 | - |
|
| 423 | - /** |
|
| 424 | - * The entity post type service (this is the WordPress post type, not the entity schema type). |
|
| 425 | - */ |
|
| 426 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php'; |
|
| 427 | - |
|
| 428 | - /** |
|
| 429 | - * The entity type service (i.e. the schema type). |
|
| 430 | - */ |
|
| 431 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php'; |
|
| 432 | - |
|
| 433 | - /** |
|
| 434 | - * The entity link service. |
|
| 435 | - */ |
|
| 436 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php'; |
|
| 437 | - |
|
| 438 | - /** |
|
| 439 | - * The Query builder. |
|
| 440 | - */ |
|
| 441 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php'; |
|
| 442 | - |
|
| 443 | - /** |
|
| 444 | - * The Schema service. |
|
| 445 | - */ |
|
| 446 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php'; |
|
| 447 | - |
|
| 448 | - /** |
|
| 449 | - * The schema:url property service. |
|
| 450 | - */ |
|
| 451 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php'; |
|
| 452 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php'; |
|
| 453 | - |
|
| 454 | - /** |
|
| 455 | - * The UI service. |
|
| 456 | - */ |
|
| 457 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php'; |
|
| 458 | - |
|
| 459 | - /** |
|
| 460 | - * The Thumbnail service. |
|
| 461 | - */ |
|
| 462 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php'; |
|
| 463 | - |
|
| 464 | - /** |
|
| 465 | - * The Entity Types Taxonomy service. |
|
| 466 | - */ |
|
| 467 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php'; |
|
| 468 | - |
|
| 469 | - /** |
|
| 470 | - * The Entity service. |
|
| 471 | - */ |
|
| 472 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php'; |
|
| 473 | - |
|
| 474 | - // Add the entity rating service. |
|
| 475 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php'; |
|
| 476 | - |
|
| 477 | - /** |
|
| 478 | - * The User service. |
|
| 479 | - */ |
|
| 480 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php'; |
|
| 481 | - |
|
| 482 | - /** |
|
| 483 | - * The Timeline service. |
|
| 484 | - */ |
|
| 485 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php'; |
|
| 486 | - |
|
| 487 | - /** |
|
| 488 | - * The Topic Taxonomy service. |
|
| 489 | - */ |
|
| 490 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php'; |
|
| 491 | - |
|
| 492 | - /** |
|
| 493 | - * The SPARQL service. |
|
| 494 | - */ |
|
| 495 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php'; |
|
| 496 | - |
|
| 497 | - /** |
|
| 498 | - * The WordLift import service. |
|
| 499 | - */ |
|
| 500 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php'; |
|
| 501 | - |
|
| 502 | - /** |
|
| 503 | - * The WordLift URI service. |
|
| 504 | - */ |
|
| 505 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php'; |
|
| 506 | - |
|
| 507 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php'; |
|
| 508 | - |
|
| 509 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php'; |
|
| 510 | - |
|
| 511 | - /** |
|
| 512 | - * The WordLift rebuild service, used to rebuild the remote dataset using the local data. |
|
| 513 | - */ |
|
| 514 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php'; |
|
| 515 | - |
|
| 516 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php'; |
|
| 517 | - |
|
| 518 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php'; |
|
| 519 | - |
|
| 520 | - /** |
|
| 521 | - * Load the converters. |
|
| 522 | - */ |
|
| 523 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php'; |
|
| 524 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php'; |
|
| 525 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php'; |
|
| 526 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php'; |
|
| 527 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php'; |
|
| 528 | - |
|
| 529 | - /** |
|
| 530 | - * Load the content filter. |
|
| 531 | - */ |
|
| 532 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php'; |
|
| 533 | - |
|
| 534 | - /** |
|
| 535 | - * Load the JSON-LD service to publish entities using JSON-LD.s |
|
| 536 | - * |
|
| 537 | - * @since 3.8.0 |
|
| 538 | - */ |
|
| 539 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php'; |
|
| 540 | - |
|
| 541 | - /** |
|
| 542 | - * Load the WordLift key validation service. |
|
| 543 | - */ |
|
| 544 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php'; |
|
| 545 | - |
|
| 546 | - /** |
|
| 547 | - * The class responsible for defining all actions that occur in the admin area. |
|
| 548 | - */ |
|
| 549 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php'; |
|
| 550 | - |
|
| 551 | - /** |
|
| 552 | - * The class to customize the entity list admin page. |
|
| 553 | - */ |
|
| 554 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php'; |
|
| 555 | - |
|
| 556 | - /** |
|
| 557 | - * The Entity Types Taxonomy Walker (transforms checkboxes into radios). |
|
| 558 | - */ |
|
| 559 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php'; |
|
| 560 | - |
|
| 561 | - /** |
|
| 562 | - * The Notice service. |
|
| 563 | - */ |
|
| 564 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php'; |
|
| 565 | - |
|
| 566 | - /** |
|
| 567 | - * The PrimaShop adapter. |
|
| 568 | - */ |
|
| 569 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php'; |
|
| 570 | - |
|
| 571 | - /** |
|
| 572 | - * The WordLift Dashboard service. |
|
| 573 | - */ |
|
| 574 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php'; |
|
| 575 | - |
|
| 576 | - /** |
|
| 577 | - * The admin 'Install wizard' page. |
|
| 578 | - */ |
|
| 579 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php'; |
|
| 580 | - |
|
| 581 | - /** |
|
| 582 | - * The admin 'Download Your Data' page. |
|
| 583 | - */ |
|
| 584 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php'; |
|
| 585 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php'; |
|
| 32 | + /** |
|
| 33 | + * The loader that's responsible for maintaining and registering all hooks that power |
|
| 34 | + * the plugin. |
|
| 35 | + * |
|
| 36 | + * @since 1.0.0 |
|
| 37 | + * @access protected |
|
| 38 | + * @var Wordlift_Loader $loader Maintains and registers all hooks for the plugin. |
|
| 39 | + */ |
|
| 40 | + protected $loader; |
|
| 41 | + |
|
| 42 | + /** |
|
| 43 | + * The unique identifier of this plugin. |
|
| 44 | + * |
|
| 45 | + * @since 1.0.0 |
|
| 46 | + * @access protected |
|
| 47 | + * @var string $plugin_name The string used to uniquely identify this plugin. |
|
| 48 | + */ |
|
| 49 | + protected $plugin_name; |
|
| 50 | + |
|
| 51 | + /** |
|
| 52 | + * The current version of the plugin. |
|
| 53 | + * |
|
| 54 | + * @since 1.0.0 |
|
| 55 | + * @access protected |
|
| 56 | + * @var string $version The current version of the plugin. |
|
| 57 | + */ |
|
| 58 | + protected $version; |
|
| 59 | + |
|
| 60 | + /** |
|
| 61 | + * The Thumbnail service. |
|
| 62 | + * |
|
| 63 | + * @since 3.1.5 |
|
| 64 | + * @access private |
|
| 65 | + * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service. |
|
| 66 | + */ |
|
| 67 | + private $thumbnail_service; |
|
| 68 | + |
|
| 69 | + /** |
|
| 70 | + * The UI service. |
|
| 71 | + * |
|
| 72 | + * @since 3.2.0 |
|
| 73 | + * @access private |
|
| 74 | + * @var \Wordlift_UI_Service $ui_service The UI service. |
|
| 75 | + */ |
|
| 76 | + private $ui_service; |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * The Schema service. |
|
| 80 | + * |
|
| 81 | + * @since 3.3.0 |
|
| 82 | + * @access private |
|
| 83 | + * @var \Wordlift_Schema_Service $schema_service The Schema service. |
|
| 84 | + */ |
|
| 85 | + private $schema_service; |
|
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * The Entity service. |
|
| 89 | + * |
|
| 90 | + * @since 3.1.0 |
|
| 91 | + * @access protected |
|
| 92 | + * @var \Wordlift_Entity_Service $entity_service The Entity service. |
|
| 93 | + */ |
|
| 94 | + protected $entity_service; |
|
| 95 | + |
|
| 96 | + /** |
|
| 97 | + * The Topic Taxonomy service. |
|
| 98 | + * |
|
| 99 | + * @since 3.5.0 |
|
| 100 | + * @access private |
|
| 101 | + * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service. |
|
| 102 | + */ |
|
| 103 | + private $topic_taxonomy_service; |
|
| 104 | + |
|
| 105 | + /** |
|
| 106 | + * The User service. |
|
| 107 | + * |
|
| 108 | + * @since 3.1.7 |
|
| 109 | + * @access protected |
|
| 110 | + * @var \Wordlift_User_Service $user_service The User service. |
|
| 111 | + */ |
|
| 112 | + protected $user_service; |
|
| 113 | + |
|
| 114 | + /** |
|
| 115 | + * The Timeline service. |
|
| 116 | + * |
|
| 117 | + * @since 3.1.0 |
|
| 118 | + * @access private |
|
| 119 | + * @var \Wordlift_Timeline_Service $timeline_service The Timeline service. |
|
| 120 | + */ |
|
| 121 | + private $timeline_service; |
|
| 122 | + |
|
| 123 | + /** |
|
| 124 | + * The Redirect service. |
|
| 125 | + * |
|
| 126 | + * @since 3.2.0 |
|
| 127 | + * @access private |
|
| 128 | + * @var \Wordlift_Redirect_Service $redirect_service The Redirect service. |
|
| 129 | + */ |
|
| 130 | + private $redirect_service; |
|
| 131 | + |
|
| 132 | + /** |
|
| 133 | + * The Notice service. |
|
| 134 | + * |
|
| 135 | + * @since 3.3.0 |
|
| 136 | + * @access private |
|
| 137 | + * @var \Wordlift_Notice_Service $notice_service The Notice service. |
|
| 138 | + */ |
|
| 139 | + private $notice_service; |
|
| 140 | + |
|
| 141 | + /** |
|
| 142 | + * The Entity list customization. |
|
| 143 | + * |
|
| 144 | + * @since 3.3.0 |
|
| 145 | + * @access private |
|
| 146 | + * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service. |
|
| 147 | + */ |
|
| 148 | + private $entity_list_service; |
|
| 149 | + |
|
| 150 | + /** |
|
| 151 | + * The Entity Types Taxonomy Walker. |
|
| 152 | + * |
|
| 153 | + * @since 3.1.0 |
|
| 154 | + * @access private |
|
| 155 | + * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker |
|
| 156 | + */ |
|
| 157 | + private $entity_types_taxonomy_walker; |
|
| 158 | + |
|
| 159 | + /** |
|
| 160 | + * The ShareThis service. |
|
| 161 | + * |
|
| 162 | + * @since 3.2.0 |
|
| 163 | + * @access private |
|
| 164 | + * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service. |
|
| 165 | + */ |
|
| 166 | + private $sharethis_service; |
|
| 167 | + |
|
| 168 | + /** |
|
| 169 | + * The PrimaShop adapter. |
|
| 170 | + * |
|
| 171 | + * @since 3.2.3 |
|
| 172 | + * @access private |
|
| 173 | + * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter. |
|
| 174 | + */ |
|
| 175 | + private $primashop_adapter; |
|
| 176 | + |
|
| 177 | + /** |
|
| 178 | + * The WordLift Dashboard adapter. |
|
| 179 | + * |
|
| 180 | + * @since 3.4.0 |
|
| 181 | + * @access private |
|
| 182 | + * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service; |
|
| 183 | + */ |
|
| 184 | + private $dashboard_service; |
|
| 185 | + |
|
| 186 | + /** |
|
| 187 | + * The entity type service. |
|
| 188 | + * |
|
| 189 | + * @since 3.6.0 |
|
| 190 | + * @access private |
|
| 191 | + * @var \Wordlift_Entity_Post_Type_Service |
|
| 192 | + */ |
|
| 193 | + private $entity_post_type_service; |
|
| 194 | + |
|
| 195 | + /** |
|
| 196 | + * The entity link service used to mangle links to entities with a custom slug or even w/o a slug. |
|
| 197 | + * |
|
| 198 | + * @since 3.6.0 |
|
| 199 | + * @access private |
|
| 200 | + * @var \Wordlift_Entity_Link_Service |
|
| 201 | + */ |
|
| 202 | + private $entity_link_service; |
|
| 203 | + |
|
| 204 | + /** |
|
| 205 | + * A {@link Wordlift_Sparql_Service} instance. |
|
| 206 | + * |
|
| 207 | + * @var 3.6.0 |
|
| 208 | + * @access private |
|
| 209 | + * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance. |
|
| 210 | + */ |
|
| 211 | + private $sparql_service; |
|
| 212 | + |
|
| 213 | + /** |
|
| 214 | + * A {@link Wordlift_Import_Service} instance. |
|
| 215 | + * |
|
| 216 | + * @since 3.6.0 |
|
| 217 | + * @access private |
|
| 218 | + * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance. |
|
| 219 | + */ |
|
| 220 | + private $import_service; |
|
| 221 | + |
|
| 222 | + /** |
|
| 223 | + * A {@link Wordlift_Rebuild_Service} instance. |
|
| 224 | + * |
|
| 225 | + * @since 3.6.0 |
|
| 226 | + * @access private |
|
| 227 | + * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance. |
|
| 228 | + */ |
|
| 229 | + private $rebuild_service; |
|
| 230 | + |
|
| 231 | + /** |
|
| 232 | + * A {@link Wordlift_Jsonld_Service} instance. |
|
| 233 | + * |
|
| 234 | + * @since 3.7.0 |
|
| 235 | + * @access protected |
|
| 236 | + * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance. |
|
| 237 | + */ |
|
| 238 | + protected $jsonld_service; |
|
| 239 | + |
|
| 240 | + /** |
|
| 241 | + * |
|
| 242 | + * @since 3.7.0 |
|
| 243 | + * @access private |
|
| 244 | + * @var \Wordlift_Property_Factory $property_factory |
|
| 245 | + */ |
|
| 246 | + private $property_factory; |
|
| 247 | + |
|
| 248 | + /** |
|
| 249 | + * The 'Download Your Data' page. |
|
| 250 | + * |
|
| 251 | + * @since 3.6.0 |
|
| 252 | + * @access private |
|
| 253 | + * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page. |
|
| 254 | + */ |
|
| 255 | + private $download_your_data_page; |
|
| 256 | + |
|
| 257 | + /** |
|
| 258 | + * The install wizard page. |
|
| 259 | + * |
|
| 260 | + * @since 3.9.0 |
|
| 261 | + * @access private |
|
| 262 | + * @var \Wordlift_Admin_Setup $admin_setup The Install wizard. |
|
| 263 | + */ |
|
| 264 | + private $admin_setup; |
|
| 265 | + |
|
| 266 | + /** |
|
| 267 | + * The Content Filter Service hooks up to the 'the_content' filter and provides |
|
| 268 | + * linking of entities to their pages. |
|
| 269 | + * |
|
| 270 | + * @since 3.8.0 |
|
| 271 | + * @access private |
|
| 272 | + * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance. |
|
| 273 | + */ |
|
| 274 | + private $content_filter_service; |
|
| 275 | + |
|
| 276 | + /** |
|
| 277 | + * A {@link Wordlift_Key_Validation_Service} instance. |
|
| 278 | + * |
|
| 279 | + * @since 3.9.0 |
|
| 280 | + * @access private |
|
| 281 | + * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance. |
|
| 282 | + */ |
|
| 283 | + private $key_validation_service; |
|
| 284 | + |
|
| 285 | + /** |
|
| 286 | + * A {@link Wordlift_Rating_Service} instance. |
|
| 287 | + * |
|
| 288 | + * @since 3.10.0 |
|
| 289 | + * @access private |
|
| 290 | + * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance. |
|
| 291 | + */ |
|
| 292 | + private $rating_service; |
|
| 293 | + |
|
| 294 | + /** |
|
| 295 | + * A {@link Wordlift_Post_To_Jsonld_Converter} instance. |
|
| 296 | + * |
|
| 297 | + * @since 3.10.0 |
|
| 298 | + * @access protected |
|
| 299 | + * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance. |
|
| 300 | + */ |
|
| 301 | + protected $post_to_jsonld_converter; |
|
| 302 | + |
|
| 303 | + /** |
|
| 304 | + * A {@link Wordlift_Configuration_Service} instance. |
|
| 305 | + * |
|
| 306 | + * @since 3.10.0 |
|
| 307 | + * @access protected |
|
| 308 | + * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance. |
|
| 309 | + */ |
|
| 310 | + protected $configuration_service; |
|
| 311 | + |
|
| 312 | + /** |
|
| 313 | + * A {@link Wordlift_Entity_Type_Service} instance. |
|
| 314 | + * |
|
| 315 | + * @since 3.10.0 |
|
| 316 | + * @access protected |
|
| 317 | + * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance. |
|
| 318 | + */ |
|
| 319 | + protected $entity_type_service; |
|
| 320 | + |
|
| 321 | + /** |
|
| 322 | + * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance. |
|
| 323 | + * |
|
| 324 | + * @since 3.10.0 |
|
| 325 | + * @access protected |
|
| 326 | + * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance. |
|
| 327 | + */ |
|
| 328 | + protected $entity_post_to_jsonld_converter; |
|
| 329 | + |
|
| 330 | + /** |
|
| 331 | + * A {@link Wordlift_Postid_To_Jsonld_Converter} instance. |
|
| 332 | + * |
|
| 333 | + * @since 3.10.0 |
|
| 334 | + * @access protected |
|
| 335 | + * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance. |
|
| 336 | + */ |
|
| 337 | + protected $postid_to_jsonld_converter; |
|
| 338 | + |
|
| 339 | + /** |
|
| 340 | + * The {@link Wordlift_Admin_Status_Page} class. |
|
| 341 | + * |
|
| 342 | + * @since 3.9.8 |
|
| 343 | + * @access private |
|
| 344 | + * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class. |
|
| 345 | + */ |
|
| 346 | + private $status_page; |
|
| 347 | + |
|
| 348 | + /** |
|
| 349 | + * Define the core functionality of the plugin. |
|
| 350 | + * |
|
| 351 | + * Set the plugin name and the plugin version that can be used throughout the plugin. |
|
| 352 | + * Load the dependencies, define the locale, and set the hooks for the admin area and |
|
| 353 | + * the public-facing side of the site. |
|
| 354 | + * |
|
| 355 | + * @since 1.0.0 |
|
| 356 | + */ |
|
| 357 | + public function __construct() { |
|
| 358 | + |
|
| 359 | + $this->plugin_name = 'wordlift'; |
|
| 360 | + $this->version = '3.11.0-dev'; |
|
| 361 | + $this->load_dependencies(); |
|
| 362 | + $this->set_locale(); |
|
| 363 | + $this->define_admin_hooks(); |
|
| 364 | + $this->define_public_hooks(); |
|
| 365 | + |
|
| 366 | + } |
|
| 367 | + |
|
| 368 | + /** |
|
| 369 | + * Load the required dependencies for this plugin. |
|
| 370 | + * |
|
| 371 | + * Include the following files that make up the plugin: |
|
| 372 | + * |
|
| 373 | + * - Wordlift_Loader. Orchestrates the hooks of the plugin. |
|
| 374 | + * - Wordlift_i18n. Defines internationalization functionality. |
|
| 375 | + * - Wordlift_Admin. Defines all hooks for the admin area. |
|
| 376 | + * - Wordlift_Public. Defines all hooks for the public side of the site. |
|
| 377 | + * |
|
| 378 | + * Create an instance of the loader which will be used to register the hooks |
|
| 379 | + * with WordPress. |
|
| 380 | + * |
|
| 381 | + * @since 1.0.0 |
|
| 382 | + * @access private |
|
| 383 | + */ |
|
| 384 | + private function load_dependencies() { |
|
| 385 | + |
|
| 386 | + /** |
|
| 387 | + * The class responsible for orchestrating the actions and filters of the |
|
| 388 | + * core plugin. |
|
| 389 | + */ |
|
| 390 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php'; |
|
| 391 | + |
|
| 392 | + /** |
|
| 393 | + * The class responsible for defining internationalization functionality |
|
| 394 | + * of the plugin. |
|
| 395 | + */ |
|
| 396 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php'; |
|
| 397 | + |
|
| 398 | + /** |
|
| 399 | + * WordLift's supported languages. |
|
| 400 | + */ |
|
| 401 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php'; |
|
| 402 | + |
|
| 403 | + /** |
|
| 404 | + * Provide support functions to sanitize data. |
|
| 405 | + */ |
|
| 406 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php'; |
|
| 407 | + |
|
| 408 | + /** |
|
| 409 | + * The Redirect service. |
|
| 410 | + */ |
|
| 411 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php'; |
|
| 412 | + |
|
| 413 | + /** |
|
| 414 | + * The Log service. |
|
| 415 | + */ |
|
| 416 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php'; |
|
| 417 | + |
|
| 418 | + /** |
|
| 419 | + * The configuration service. |
|
| 420 | + */ |
|
| 421 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php'; |
|
| 422 | + |
|
| 423 | + /** |
|
| 424 | + * The entity post type service (this is the WordPress post type, not the entity schema type). |
|
| 425 | + */ |
|
| 426 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php'; |
|
| 427 | + |
|
| 428 | + /** |
|
| 429 | + * The entity type service (i.e. the schema type). |
|
| 430 | + */ |
|
| 431 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php'; |
|
| 432 | + |
|
| 433 | + /** |
|
| 434 | + * The entity link service. |
|
| 435 | + */ |
|
| 436 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php'; |
|
| 437 | + |
|
| 438 | + /** |
|
| 439 | + * The Query builder. |
|
| 440 | + */ |
|
| 441 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php'; |
|
| 442 | + |
|
| 443 | + /** |
|
| 444 | + * The Schema service. |
|
| 445 | + */ |
|
| 446 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php'; |
|
| 447 | + |
|
| 448 | + /** |
|
| 449 | + * The schema:url property service. |
|
| 450 | + */ |
|
| 451 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php'; |
|
| 452 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php'; |
|
| 453 | + |
|
| 454 | + /** |
|
| 455 | + * The UI service. |
|
| 456 | + */ |
|
| 457 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php'; |
|
| 458 | + |
|
| 459 | + /** |
|
| 460 | + * The Thumbnail service. |
|
| 461 | + */ |
|
| 462 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php'; |
|
| 463 | + |
|
| 464 | + /** |
|
| 465 | + * The Entity Types Taxonomy service. |
|
| 466 | + */ |
|
| 467 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php'; |
|
| 468 | + |
|
| 469 | + /** |
|
| 470 | + * The Entity service. |
|
| 471 | + */ |
|
| 472 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php'; |
|
| 473 | + |
|
| 474 | + // Add the entity rating service. |
|
| 475 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php'; |
|
| 476 | + |
|
| 477 | + /** |
|
| 478 | + * The User service. |
|
| 479 | + */ |
|
| 480 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php'; |
|
| 481 | + |
|
| 482 | + /** |
|
| 483 | + * The Timeline service. |
|
| 484 | + */ |
|
| 485 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php'; |
|
| 486 | + |
|
| 487 | + /** |
|
| 488 | + * The Topic Taxonomy service. |
|
| 489 | + */ |
|
| 490 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php'; |
|
| 491 | + |
|
| 492 | + /** |
|
| 493 | + * The SPARQL service. |
|
| 494 | + */ |
|
| 495 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php'; |
|
| 496 | + |
|
| 497 | + /** |
|
| 498 | + * The WordLift import service. |
|
| 499 | + */ |
|
| 500 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php'; |
|
| 501 | + |
|
| 502 | + /** |
|
| 503 | + * The WordLift URI service. |
|
| 504 | + */ |
|
| 505 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php'; |
|
| 506 | + |
|
| 507 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php'; |
|
| 508 | + |
|
| 509 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php'; |
|
| 510 | + |
|
| 511 | + /** |
|
| 512 | + * The WordLift rebuild service, used to rebuild the remote dataset using the local data. |
|
| 513 | + */ |
|
| 514 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php'; |
|
| 515 | + |
|
| 516 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php'; |
|
| 517 | + |
|
| 518 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php'; |
|
| 519 | + |
|
| 520 | + /** |
|
| 521 | + * Load the converters. |
|
| 522 | + */ |
|
| 523 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php'; |
|
| 524 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php'; |
|
| 525 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php'; |
|
| 526 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php'; |
|
| 527 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php'; |
|
| 528 | + |
|
| 529 | + /** |
|
| 530 | + * Load the content filter. |
|
| 531 | + */ |
|
| 532 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php'; |
|
| 533 | + |
|
| 534 | + /** |
|
| 535 | + * Load the JSON-LD service to publish entities using JSON-LD.s |
|
| 536 | + * |
|
| 537 | + * @since 3.8.0 |
|
| 538 | + */ |
|
| 539 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php'; |
|
| 540 | + |
|
| 541 | + /** |
|
| 542 | + * Load the WordLift key validation service. |
|
| 543 | + */ |
|
| 544 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php'; |
|
| 545 | + |
|
| 546 | + /** |
|
| 547 | + * The class responsible for defining all actions that occur in the admin area. |
|
| 548 | + */ |
|
| 549 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php'; |
|
| 550 | + |
|
| 551 | + /** |
|
| 552 | + * The class to customize the entity list admin page. |
|
| 553 | + */ |
|
| 554 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php'; |
|
| 555 | + |
|
| 556 | + /** |
|
| 557 | + * The Entity Types Taxonomy Walker (transforms checkboxes into radios). |
|
| 558 | + */ |
|
| 559 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php'; |
|
| 560 | + |
|
| 561 | + /** |
|
| 562 | + * The Notice service. |
|
| 563 | + */ |
|
| 564 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php'; |
|
| 565 | + |
|
| 566 | + /** |
|
| 567 | + * The PrimaShop adapter. |
|
| 568 | + */ |
|
| 569 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php'; |
|
| 570 | + |
|
| 571 | + /** |
|
| 572 | + * The WordLift Dashboard service. |
|
| 573 | + */ |
|
| 574 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php'; |
|
| 575 | + |
|
| 576 | + /** |
|
| 577 | + * The admin 'Install wizard' page. |
|
| 578 | + */ |
|
| 579 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php'; |
|
| 580 | + |
|
| 581 | + /** |
|
| 582 | + * The admin 'Download Your Data' page. |
|
| 583 | + */ |
|
| 584 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php'; |
|
| 585 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php'; |
|
| 586 | 586 | |
| 587 | - /** |
|
| 588 | - * The class responsible for defining all actions that occur in the public-facing |
|
| 589 | - * side of the site. |
|
| 590 | - */ |
|
| 591 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php'; |
|
| 587 | + /** |
|
| 588 | + * The class responsible for defining all actions that occur in the public-facing |
|
| 589 | + * side of the site. |
|
| 590 | + */ |
|
| 591 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php'; |
|
| 592 | 592 | |
| 593 | - /** |
|
| 594 | - * The shortcode abstract class. |
|
| 595 | - */ |
|
| 596 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php'; |
|
| 593 | + /** |
|
| 594 | + * The shortcode abstract class. |
|
| 595 | + */ |
|
| 596 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php'; |
|
| 597 | 597 | |
| 598 | - /** |
|
| 599 | - * The Timeline shortcode. |
|
| 600 | - */ |
|
| 601 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php'; |
|
| 598 | + /** |
|
| 599 | + * The Timeline shortcode. |
|
| 600 | + */ |
|
| 601 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php'; |
|
| 602 | 602 | |
| 603 | - /** |
|
| 604 | - * The Navigator shortcode. |
|
| 605 | - */ |
|
| 606 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php'; |
|
| 603 | + /** |
|
| 604 | + * The Navigator shortcode. |
|
| 605 | + */ |
|
| 606 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php'; |
|
| 607 | 607 | |
| 608 | - /** |
|
| 609 | - * The chord shortcode. |
|
| 610 | - */ |
|
| 611 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php'; |
|
| 608 | + /** |
|
| 609 | + * The chord shortcode. |
|
| 610 | + */ |
|
| 611 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php'; |
|
| 612 | 612 | |
| 613 | - /** |
|
| 614 | - * The geomap shortcode. |
|
| 615 | - */ |
|
| 616 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php'; |
|
| 613 | + /** |
|
| 614 | + * The geomap shortcode. |
|
| 615 | + */ |
|
| 616 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php'; |
|
| 617 | 617 | |
| 618 | - /** |
|
| 619 | - * The ShareThis service. |
|
| 620 | - */ |
|
| 621 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php'; |
|
| 618 | + /** |
|
| 619 | + * The ShareThis service. |
|
| 620 | + */ |
|
| 621 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php'; |
|
| 622 | 622 | |
| 623 | - $this->loader = new Wordlift_Loader(); |
|
| 623 | + $this->loader = new Wordlift_Loader(); |
|
| 624 | 624 | |
| 625 | - // Instantiate a global logger. |
|
| 626 | - global $wl_logger; |
|
| 627 | - $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' ); |
|
| 625 | + // Instantiate a global logger. |
|
| 626 | + global $wl_logger; |
|
| 627 | + $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' ); |
|
| 628 | 628 | |
| 629 | - // Create the configuration service. |
|
| 630 | - $this->configuration_service = new Wordlift_Configuration_Service(); |
|
| 629 | + // Create the configuration service. |
|
| 630 | + $this->configuration_service = new Wordlift_Configuration_Service(); |
|
| 631 | 631 | |
| 632 | - // Create an entity type service instance. It'll be later bound to the init action. |
|
| 633 | - $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() ); |
|
| 632 | + // Create an entity type service instance. It'll be later bound to the init action. |
|
| 633 | + $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() ); |
|
| 634 | 634 | |
| 635 | - // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions. |
|
| 636 | - $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() ); |
|
| 635 | + // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions. |
|
| 636 | + $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() ); |
|
| 637 | 637 | |
| 638 | - // Create an instance of the UI service. |
|
| 639 | - $this->ui_service = new Wordlift_UI_Service(); |
|
| 638 | + // Create an instance of the UI service. |
|
| 639 | + $this->ui_service = new Wordlift_UI_Service(); |
|
| 640 | 640 | |
| 641 | - // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events. |
|
| 642 | - $this->thumbnail_service = new Wordlift_Thumbnail_Service(); |
|
| 641 | + // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events. |
|
| 642 | + $this->thumbnail_service = new Wordlift_Thumbnail_Service(); |
|
| 643 | 643 | |
| 644 | - $this->sparql_service = new Wordlift_Sparql_Service(); |
|
| 644 | + $this->sparql_service = new Wordlift_Sparql_Service(); |
|
| 645 | 645 | |
| 646 | - // Create an instance of the Schema service. |
|
| 647 | - $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service ); |
|
| 648 | - $this->schema_service = new Wordlift_Schema_Service(); |
|
| 646 | + // Create an instance of the Schema service. |
|
| 647 | + $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service ); |
|
| 648 | + $this->schema_service = new Wordlift_Schema_Service(); |
|
| 649 | 649 | |
| 650 | - // Create an instance of the Notice service. |
|
| 651 | - $this->notice_service = new Wordlift_Notice_Service(); |
|
| 650 | + // Create an instance of the Notice service. |
|
| 651 | + $this->notice_service = new Wordlift_Notice_Service(); |
|
| 652 | 652 | |
| 653 | - // Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page. |
|
| 654 | - $this->entity_service = new Wordlift_Entity_Service( $this->ui_service ); |
|
| 653 | + // Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page. |
|
| 654 | + $this->entity_service = new Wordlift_Entity_Service( $this->ui_service ); |
|
| 655 | 655 | |
| 656 | - // Create an instance of the User service. |
|
| 657 | - $this->user_service = new Wordlift_User_Service(); |
|
| 656 | + // Create an instance of the User service. |
|
| 657 | + $this->user_service = new Wordlift_User_Service(); |
|
| 658 | 658 | |
| 659 | - // Create a new instance of the Timeline service and Timeline shortcode. |
|
| 660 | - $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service ); |
|
| 659 | + // Create a new instance of the Timeline service and Timeline shortcode. |
|
| 660 | + $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service ); |
|
| 661 | 661 | |
| 662 | - // Create a new instance of the Redirect service. |
|
| 663 | - $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service ); |
|
| 662 | + // Create a new instance of the Redirect service. |
|
| 663 | + $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service ); |
|
| 664 | 664 | |
| 665 | - // Initialize the shortcodes. |
|
| 666 | - new Wordlift_Navigator_Shortcode(); |
|
| 667 | - new Wordlift_Chord_Shortcode(); |
|
| 668 | - new Wordlift_Geomap_Shortcode(); |
|
| 669 | - new Wordlift_Timeline_Shortcode(); |
|
| 665 | + // Initialize the shortcodes. |
|
| 666 | + new Wordlift_Navigator_Shortcode(); |
|
| 667 | + new Wordlift_Chord_Shortcode(); |
|
| 668 | + new Wordlift_Geomap_Shortcode(); |
|
| 669 | + new Wordlift_Timeline_Shortcode(); |
|
| 670 | 670 | |
| 671 | - $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker(); |
|
| 671 | + $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker(); |
|
| 672 | 672 | |
| 673 | - $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service(); |
|
| 673 | + $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service(); |
|
| 674 | 674 | |
| 675 | - // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters. |
|
| 676 | - $this->sharethis_service = new Wordlift_ShareThis_Service(); |
|
| 675 | + // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters. |
|
| 676 | + $this->sharethis_service = new Wordlift_ShareThis_Service(); |
|
| 677 | 677 | |
| 678 | - // Create an instance of the PrimaShop adapter. |
|
| 679 | - $this->primashop_adapter = new Wordlift_PrimaShop_Adapter(); |
|
| 678 | + // Create an instance of the PrimaShop adapter. |
|
| 679 | + $this->primashop_adapter = new Wordlift_PrimaShop_Adapter(); |
|
| 680 | 680 | |
| 681 | - // Create an import service instance to hook later to WP's import function. |
|
| 682 | - $this->import_service = new Wordlift_Import_Service( $this->entity_post_type_service, $this->entity_service, $this->schema_service, $this->sparql_service, wl_configuration_get_redlink_dataset_uri() ); |
|
| 681 | + // Create an import service instance to hook later to WP's import function. |
|
| 682 | + $this->import_service = new Wordlift_Import_Service( $this->entity_post_type_service, $this->entity_service, $this->schema_service, $this->sparql_service, wl_configuration_get_redlink_dataset_uri() ); |
|
| 683 | 683 | |
| 684 | - $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] ); |
|
| 684 | + $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] ); |
|
| 685 | 685 | |
| 686 | - // Create a Rebuild Service instance, which we'll later bound to an ajax call. |
|
| 687 | - $this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service ); |
|
| 686 | + // Create a Rebuild Service instance, which we'll later bound to an ajax call. |
|
| 687 | + $this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service ); |
|
| 688 | 688 | |
| 689 | - $this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service ); |
|
| 689 | + $this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service ); |
|
| 690 | 690 | |
| 691 | - // Create the entity rating service. |
|
| 692 | - $this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service ); |
|
| 691 | + // Create the entity rating service. |
|
| 692 | + $this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service ); |
|
| 693 | 693 | |
| 694 | - // Create entity list customization (wp-admin/edit.php) |
|
| 695 | - $this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service ); |
|
| 694 | + // Create entity list customization (wp-admin/edit.php) |
|
| 695 | + $this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service ); |
|
| 696 | 696 | |
| 697 | - // Create a new instance of the Redirect service. |
|
| 698 | - $this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service ); |
|
| 697 | + // Create a new instance of the Redirect service. |
|
| 698 | + $this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service ); |
|
| 699 | 699 | |
| 700 | - $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service ); |
|
| 701 | - $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service ); |
|
| 700 | + $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service ); |
|
| 701 | + $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service ); |
|
| 702 | 702 | |
| 703 | - $attachment_service = new Wordlift_Attachment_Service(); |
|
| 703 | + $attachment_service = new Wordlift_Attachment_Service(); |
|
| 704 | 704 | |
| 705 | - // Instantiate the JSON-LD service. |
|
| 706 | - $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service ); |
|
| 707 | - $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 ); |
|
| 708 | - $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 ); |
|
| 709 | - $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 ); |
|
| 710 | - $this->jsonld_service = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter ); |
|
| 705 | + // Instantiate the JSON-LD service. |
|
| 706 | + $property_getter = Wordlift_Property_Getter_Factory::create( $this->entity_service ); |
|
| 707 | + $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 ); |
|
| 708 | + $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 ); |
|
| 709 | + $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 ); |
|
| 710 | + $this->jsonld_service = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter ); |
|
| 711 | 711 | |
| 712 | - // Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins). |
|
| 713 | - $this->key_validation_service = new Wordlift_Key_Validation_Service(); |
|
| 712 | + // Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins). |
|
| 713 | + $this->key_validation_service = new Wordlift_Key_Validation_Service(); |
|
| 714 | 714 | |
| 715 | - //** WordPress Admin */ |
|
| 716 | - $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service ); |
|
| 717 | - $this->status_page = new Wordlift_Admin_Status_Page(); |
|
| 715 | + //** WordPress Admin */ |
|
| 716 | + $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service ); |
|
| 717 | + $this->status_page = new Wordlift_Admin_Status_Page(); |
|
| 718 | 718 | |
| 719 | - // Create an instance of the install wizard. |
|
| 720 | - $this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service ); |
|
| 719 | + // Create an instance of the install wizard. |
|
| 720 | + $this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service ); |
|
| 721 | 721 | |
| 722 | - // Create an instance of the content filter service. |
|
| 723 | - $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service ); |
|
| 722 | + // Create an instance of the content filter service. |
|
| 723 | + $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service ); |
|
| 724 | 724 | |
| 725 | - // Load the debug service if WP is in debug mode. |
|
| 726 | - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { |
|
| 727 | - require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php'; |
|
| 728 | - new Wordlift_Debug_Service( $this->entity_service, $uri_service ); |
|
| 729 | - } |
|
| 725 | + // Load the debug service if WP is in debug mode. |
|
| 726 | + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { |
|
| 727 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php'; |
|
| 728 | + new Wordlift_Debug_Service( $this->entity_service, $uri_service ); |
|
| 729 | + } |
|
| 730 | 730 | |
| 731 | - } |
|
| 731 | + } |
|
| 732 | 732 | |
| 733 | - /** |
|
| 734 | - * Define the locale for this plugin for internationalization. |
|
| 735 | - * |
|
| 736 | - * Uses the Wordlift_i18n class in order to set the domain and to register the hook |
|
| 737 | - * with WordPress. |
|
| 738 | - * |
|
| 739 | - * @since 1.0.0 |
|
| 740 | - * @access private |
|
| 741 | - */ |
|
| 742 | - private function set_locale() { |
|
| 733 | + /** |
|
| 734 | + * Define the locale for this plugin for internationalization. |
|
| 735 | + * |
|
| 736 | + * Uses the Wordlift_i18n class in order to set the domain and to register the hook |
|
| 737 | + * with WordPress. |
|
| 738 | + * |
|
| 739 | + * @since 1.0.0 |
|
| 740 | + * @access private |
|
| 741 | + */ |
|
| 742 | + private function set_locale() { |
|
| 743 | 743 | |
| 744 | - $plugin_i18n = new Wordlift_i18n(); |
|
| 745 | - $plugin_i18n->set_domain( $this->get_plugin_name() ); |
|
| 744 | + $plugin_i18n = new Wordlift_i18n(); |
|
| 745 | + $plugin_i18n->set_domain( $this->get_plugin_name() ); |
|
| 746 | 746 | |
| 747 | - $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); |
|
| 747 | + $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); |
|
| 748 | 748 | |
| 749 | - } |
|
| 749 | + } |
|
| 750 | 750 | |
| 751 | - /** |
|
| 752 | - * Register all of the hooks related to the admin area functionality |
|
| 753 | - * of the plugin. |
|
| 754 | - * |
|
| 755 | - * @since 1.0.0 |
|
| 756 | - * @access private |
|
| 757 | - */ |
|
| 758 | - private function define_admin_hooks() { |
|
| 751 | + /** |
|
| 752 | + * Register all of the hooks related to the admin area functionality |
|
| 753 | + * of the plugin. |
|
| 754 | + * |
|
| 755 | + * @since 1.0.0 |
|
| 756 | + * @access private |
|
| 757 | + */ |
|
| 758 | + private function define_admin_hooks() { |
|
| 759 | 759 | |
| 760 | - $plugin_admin = new Wordlift_Admin( $this->get_plugin_name(), $this->get_version() ); |
|
| 760 | + $plugin_admin = new Wordlift_Admin( $this->get_plugin_name(), $this->get_version() ); |
|
| 761 | 761 | |
| 762 | - $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); |
|
| 763 | - $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); |
|
| 762 | + $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); |
|
| 763 | + $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' ); |
|
| 764 | 764 | |
| 765 | - // Hook the init action to the Topic Taxonomy service. |
|
| 766 | - $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 ); |
|
| 765 | + // Hook the init action to the Topic Taxonomy service. |
|
| 766 | + $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 ); |
|
| 767 | 767 | |
| 768 | - // Hook the deleted_post_meta action to the Thumbnail service. |
|
| 769 | - $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 ); |
|
| 768 | + // Hook the deleted_post_meta action to the Thumbnail service. |
|
| 769 | + $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 ); |
|
| 770 | 770 | |
| 771 | - // Hook the added_post_meta action to the Thumbnail service. |
|
| 772 | - $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 771 | + // Hook the added_post_meta action to the Thumbnail service. |
|
| 772 | + $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 773 | 773 | |
| 774 | - // Hook the updated_post_meta action to the Thumbnail service. |
|
| 775 | - $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 774 | + // Hook the updated_post_meta action to the Thumbnail service. |
|
| 775 | + $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 ); |
|
| 776 | 776 | |
| 777 | - // Hook posts inserts (or updates) to the user service. |
|
| 778 | - $this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 ); |
|
| 777 | + // Hook posts inserts (or updates) to the user service. |
|
| 778 | + $this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 ); |
|
| 779 | 779 | |
| 780 | - // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 781 | - $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 780 | + // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 781 | + $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 782 | 782 | |
| 783 | - // Register custom allowed redirect hosts. |
|
| 784 | - $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' ); |
|
| 785 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 786 | - $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' ); |
|
| 787 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 788 | - $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' ); |
|
| 789 | - // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 790 | - $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' ); |
|
| 783 | + // Register custom allowed redirect hosts. |
|
| 784 | + $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' ); |
|
| 785 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 786 | + $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' ); |
|
| 787 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 788 | + $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' ); |
|
| 789 | + // Hook the AJAX wordlift_redirect action to the Redirect service. |
|
| 790 | + $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' ); |
|
| 791 | 791 | |
| 792 | - // Hook save_post to the entity service to update custom fields (such as alternate labels). |
|
| 793 | - // We have a priority of 9 because we want to be executed before data is sent to Redlink. |
|
| 794 | - $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 ); |
|
| 795 | - $this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 ); |
|
| 792 | + // Hook save_post to the entity service to update custom fields (such as alternate labels). |
|
| 793 | + // We have a priority of 9 because we want to be executed before data is sent to Redlink. |
|
| 794 | + $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 ); |
|
| 795 | + $this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 ); |
|
| 796 | 796 | |
| 797 | - $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 ); |
|
| 798 | - $this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' ); |
|
| 797 | + $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 ); |
|
| 798 | + $this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' ); |
|
| 799 | 799 | |
| 800 | - // Entity listing customization (wp-admin/edit.php) |
|
| 801 | - // Add custom columns |
|
| 802 | - $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' ); |
|
| 803 | - $this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 ); |
|
| 804 | - // Add 4W selection |
|
| 805 | - $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' ); |
|
| 806 | - $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' ); |
|
| 807 | - |
|
| 808 | - $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' ); |
|
| 809 | - |
|
| 810 | - // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for |
|
| 811 | - // entities. |
|
| 812 | - $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 ); |
|
| 813 | - |
|
| 814 | - // Filter imported post meta. |
|
| 815 | - $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 ); |
|
| 816 | - |
|
| 817 | - // Notify the import service when an import starts and ends. |
|
| 818 | - $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 ); |
|
| 819 | - $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 ); |
|
| 820 | - |
|
| 821 | - // Hook the AJAX wl_rebuild action to the Rebuild Service. |
|
| 822 | - $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' ); |
|
| 823 | - |
|
| 824 | - // Hook the menu to the Download Your Data page. |
|
| 825 | - $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 ); |
|
| 826 | - $this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 ); |
|
| 827 | - |
|
| 828 | - // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links. |
|
| 829 | - $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 ); |
|
| 830 | - |
|
| 831 | - // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 832 | - $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 833 | - |
|
| 834 | - // Hook the AJAX wl_validate_key action to the Key Validation service. |
|
| 835 | - $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' ); |
|
| 836 | - |
|
| 837 | - // Hook the `admin_init` function to the Admin Setup. |
|
| 838 | - $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' ); |
|
| 839 | - |
|
| 840 | - } |
|
| 841 | - |
|
| 842 | - /** |
|
| 843 | - * Register all of the hooks related to the public-facing functionality |
|
| 844 | - * of the plugin. |
|
| 845 | - * |
|
| 846 | - * @since 1.0.0 |
|
| 847 | - * @access private |
|
| 848 | - */ |
|
| 849 | - private function define_public_hooks() { |
|
| 850 | - |
|
| 851 | - $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() ); |
|
| 852 | - |
|
| 853 | - // Register the entity post type. |
|
| 854 | - $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' ); |
|
| 855 | - |
|
| 856 | - // Bind the link generation and handling hooks to the entity link service. |
|
| 857 | - $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 ); |
|
| 858 | - $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', 10, 1 ); |
|
| 859 | - $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 ); |
|
| 860 | - $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 ); |
|
| 861 | - |
|
| 862 | - $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); |
|
| 863 | - $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); |
|
| 864 | - |
|
| 865 | - // Hook the content filter service to add entity links. |
|
| 866 | - $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' ); |
|
| 867 | - |
|
| 868 | - // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 869 | - $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 870 | - |
|
| 871 | - // Hook the ShareThis service. |
|
| 872 | - $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 ); |
|
| 873 | - $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 ); |
|
| 874 | - |
|
| 875 | - // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 876 | - $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 877 | - |
|
| 878 | - } |
|
| 879 | - |
|
| 880 | - /** |
|
| 881 | - * Run the loader to execute all of the hooks with WordPress. |
|
| 882 | - * |
|
| 883 | - * @since 1.0.0 |
|
| 884 | - */ |
|
| 885 | - public function run() { |
|
| 886 | - $this->loader->run(); |
|
| 887 | - } |
|
| 888 | - |
|
| 889 | - /** |
|
| 890 | - * The name of the plugin used to uniquely identify it within the context of |
|
| 891 | - * WordPress and to define internationalization functionality. |
|
| 892 | - * |
|
| 893 | - * @since 1.0.0 |
|
| 894 | - * @return string The name of the plugin. |
|
| 895 | - */ |
|
| 896 | - public function get_plugin_name() { |
|
| 897 | - return $this->plugin_name; |
|
| 898 | - } |
|
| 899 | - |
|
| 900 | - /** |
|
| 901 | - * The reference to the class that orchestrates the hooks with the plugin. |
|
| 902 | - * |
|
| 903 | - * @since 1.0.0 |
|
| 904 | - * @return Wordlift_Loader Orchestrates the hooks of the plugin. |
|
| 905 | - */ |
|
| 906 | - public function get_loader() { |
|
| 907 | - return $this->loader; |
|
| 908 | - } |
|
| 909 | - |
|
| 910 | - /** |
|
| 911 | - * Retrieve the version number of the plugin. |
|
| 912 | - * |
|
| 913 | - * @since 1.0.0 |
|
| 914 | - * @return string The version number of the plugin. |
|
| 915 | - */ |
|
| 916 | - public function get_version() { |
|
| 917 | - return $this->version; |
|
| 918 | - } |
|
| 800 | + // Entity listing customization (wp-admin/edit.php) |
|
| 801 | + // Add custom columns |
|
| 802 | + $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' ); |
|
| 803 | + $this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 ); |
|
| 804 | + // Add 4W selection |
|
| 805 | + $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' ); |
|
| 806 | + $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' ); |
|
| 807 | + |
|
| 808 | + $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' ); |
|
| 809 | + |
|
| 810 | + // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for |
|
| 811 | + // entities. |
|
| 812 | + $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 ); |
|
| 813 | + |
|
| 814 | + // Filter imported post meta. |
|
| 815 | + $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 ); |
|
| 816 | + |
|
| 817 | + // Notify the import service when an import starts and ends. |
|
| 818 | + $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 ); |
|
| 819 | + $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 ); |
|
| 820 | + |
|
| 821 | + // Hook the AJAX wl_rebuild action to the Rebuild Service. |
|
| 822 | + $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' ); |
|
| 823 | + |
|
| 824 | + // Hook the menu to the Download Your Data page. |
|
| 825 | + $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 ); |
|
| 826 | + $this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 ); |
|
| 827 | + |
|
| 828 | + // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links. |
|
| 829 | + $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 ); |
|
| 830 | + |
|
| 831 | + // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 832 | + $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 833 | + |
|
| 834 | + // Hook the AJAX wl_validate_key action to the Key Validation service. |
|
| 835 | + $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' ); |
|
| 836 | + |
|
| 837 | + // Hook the `admin_init` function to the Admin Setup. |
|
| 838 | + $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' ); |
|
| 839 | + |
|
| 840 | + } |
|
| 841 | + |
|
| 842 | + /** |
|
| 843 | + * Register all of the hooks related to the public-facing functionality |
|
| 844 | + * of the plugin. |
|
| 845 | + * |
|
| 846 | + * @since 1.0.0 |
|
| 847 | + * @access private |
|
| 848 | + */ |
|
| 849 | + private function define_public_hooks() { |
|
| 850 | + |
|
| 851 | + $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() ); |
|
| 852 | + |
|
| 853 | + // Register the entity post type. |
|
| 854 | + $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' ); |
|
| 855 | + |
|
| 856 | + // Bind the link generation and handling hooks to the entity link service. |
|
| 857 | + $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 ); |
|
| 858 | + $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', 10, 1 ); |
|
| 859 | + $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 ); |
|
| 860 | + $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 ); |
|
| 861 | + |
|
| 862 | + $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); |
|
| 863 | + $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); |
|
| 864 | + |
|
| 865 | + // Hook the content filter service to add entity links. |
|
| 866 | + $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' ); |
|
| 867 | + |
|
| 868 | + // Hook the AJAX wl_timeline action to the Timeline service. |
|
| 869 | + $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' ); |
|
| 870 | + |
|
| 871 | + // Hook the ShareThis service. |
|
| 872 | + $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 ); |
|
| 873 | + $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 ); |
|
| 874 | + |
|
| 875 | + // Hook the AJAX wl_jsonld action to the JSON-LD service. |
|
| 876 | + $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' ); |
|
| 877 | + |
|
| 878 | + } |
|
| 879 | + |
|
| 880 | + /** |
|
| 881 | + * Run the loader to execute all of the hooks with WordPress. |
|
| 882 | + * |
|
| 883 | + * @since 1.0.0 |
|
| 884 | + */ |
|
| 885 | + public function run() { |
|
| 886 | + $this->loader->run(); |
|
| 887 | + } |
|
| 888 | + |
|
| 889 | + /** |
|
| 890 | + * The name of the plugin used to uniquely identify it within the context of |
|
| 891 | + * WordPress and to define internationalization functionality. |
|
| 892 | + * |
|
| 893 | + * @since 1.0.0 |
|
| 894 | + * @return string The name of the plugin. |
|
| 895 | + */ |
|
| 896 | + public function get_plugin_name() { |
|
| 897 | + return $this->plugin_name; |
|
| 898 | + } |
|
| 899 | + |
|
| 900 | + /** |
|
| 901 | + * The reference to the class that orchestrates the hooks with the plugin. |
|
| 902 | + * |
|
| 903 | + * @since 1.0.0 |
|
| 904 | + * @return Wordlift_Loader Orchestrates the hooks of the plugin. |
|
| 905 | + */ |
|
| 906 | + public function get_loader() { |
|
| 907 | + return $this->loader; |
|
| 908 | + } |
|
| 909 | + |
|
| 910 | + /** |
|
| 911 | + * Retrieve the version number of the plugin. |
|
| 912 | + * |
|
| 913 | + * @since 1.0.0 |
|
| 914 | + * @return string The version number of the plugin. |
|
| 915 | + */ |
|
| 916 | + public function get_version() { |
|
| 917 | + return $this->version; |
|
| 918 | + } |
|
| 919 | 919 | |
| 920 | 920 | } |