PHP Classes

File: src/main.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   WP Vue Kit Plugin   src/main.js   Download  
File: src/main.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WP Vue Kit Plugin
Vue.js plugin to build WordPress user interfaces
Author: By
Last change:
Date: 11 months ago
Size: 941 bytes


Class file image Download
/** * External dependencies. */ import { createApp } from "vue"; import { createHooks } from "@wordpress/hooks"; /** * Internal dependencies. */ import App from "./App.vue"; import router from "./router"; import './i18n'; import "./styles/main.scss"; import i18nMixin from "./mixins/i18n"; import './utils/menu-fix'; import store from "./store"; // Create vue app instance. const app = createApp({ extends: App, mixins: [i18nMixin] }); app.use(router); app.use(store); app.config.devtools = process.env.NODE_ENV === "development"; // Finally Mount on the #wp-vue-kit div. app.mount("#wp-vue-kit"); // Add action/filter hooks injectable window.wpEmailerHooks = createHooks(); wpEmailerHooks.addFilter = (hookName, namespace, component, priority = 10) => { wpEmailerHooks.hooks.addFilter( hookName, namespace, components => { components.push(component); return components; }, priority ); };