Skip to content

Commit b5f677a

Browse files
author
Salil Kothadia
authored
Merge pull request #18 from tedc/patch-1
Fix activation fatal error
2 parents 2072e32 + ef8a3a6 commit b5f677a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

plugin.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
/**
1414
* WP_REST_Multiple_PostType_Controller class.
1515
*/
16-
if (!class_exists('WP_REST_Multiple_PostType_Controller')) {
17-
18-
require_once dirname(__FILE__) . '/lib/endpoints/class-wp-rest-multiple-posttype-controller.php';
19-
}
2016

2117
function init_wp_rest_multiple_posttype_endpoint() {
18+
if (!class_exists('WP_REST_Multiple_PostType_Controller')) {
19+
require_once dirname(__FILE__) . '/lib/endpoints/class-wp-rest-multiple-posttype-controller.php';
20+
}
2221
$controller = new WP_REST_Multiple_PostType_Controller();
2322
$controller->register_routes();
2423
}

0 commit comments

Comments
 (0)