Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function initialize() |
||
42 | { |
||
43 | $this->addData('restApiNonce', wp_create_nonce('wp_rest')); |
||
44 | $this->addData('restApiBaseUrl', rest_url()); |
||
45 | $this->addData('restApiRouteUrl', rest_url('ee/v4.8.36/')); |
||
46 | $this->addData('restApiCollectionEndpoints', EED_Core_Rest_Api::getCollectionRoutesIndexedByModelName()); |
||
47 | $this->addData('restApiPrimaryKeys', EED_Core_Rest_Api::getPrimaryKeyNamesIndexedByModelName()); |
||
48 | $graphqlEndpoint = class_exists('WPGraphQL') ? trailingslashit(site_url()) . Router::$route : ''; |
||
49 | $this->addData('graphqlEndpoint', esc_url($graphqlEndpoint)); |
||
50 | $this->setInitialized(true); |
||
51 | } |
||
52 | } |
||
53 |