Consume PHP variable
Predefined variables
public slug: string; // Plugin slug
public textDomain: string; // Plugin text domain, needed for i18n factory
public version: string; // Plugin version
public restUrl?: string; // REST API Url
public restNamespace?: string; // Plugin REST API namespace
public restRoot?: string; // REST API root path
public restQuery?: {}; // REST API query sent with each request to the backend (GET)
public restNonce?: string; // REST API authentication nonce
public publicUrl?: string; // Public url localhost:{your-port}/wp-content/plugins/your-plugin/publicAccess variables
() => {
const { optionStore } = useStores();
return <span>{optionStore.slug}</span>;
};Add own variable
Last updated