ConfigManager

Description

ConfigManager is a singleton class that loads the config from wp-js.config.ts

Example

import {ConfigManager} from "@quickdevelopment/wp-js";

ConfigManager.getInstance({ apiUrl: 'https://api.wordpress.org/wp-json/wp/v2', embed: true });

Hierarchy (view full)

Constructors

Properties

_instance: WPJSSingleton

Methods

  • Get the config

    Returns WPJSConfigOptions

    Example

    import { ConfigManager } from "@quickdevelopment/wp-js";

    const config = ConfigManager.getInstance();

    // It will return your earlier provided config
    console.log(config.getConfig());

Generated using TypeDoc