Prototype implementatin of set_tainacan_admin_options filter. #659
This commit is contained in:
parent
92c81ed0a3
commit
f002916ffd
|
@ -87,7 +87,7 @@ export default (element) => {
|
||||||
|
|
||||||
// Mount only if the div exists and it is not already mounted
|
// Mount only if the div exists and it is not already mounted
|
||||||
if ( pageElement && pageElement.classList && !pageElement.classList.contains('has-mounted') ) {
|
if ( pageElement && pageElement.classList && !pageElement.classList.contains('has-mounted') ) {
|
||||||
|
console.log(pageElement.dataset);
|
||||||
/* Registers Extra Vue Plugins passed to the window.tainacan_extra_plugins */
|
/* Registers Extra Vue Plugins passed to the window.tainacan_extra_plugins */
|
||||||
if (typeof window.tainacan_extra_plugins != "undefined") {
|
if (typeof window.tainacan_extra_plugins != "undefined") {
|
||||||
for (let [extraVuePluginName, extraVuePluginObject] of Object.entries(window.tainacan_extra_plugins))
|
for (let [extraVuePluginName, extraVuePluginObject] of Object.entries(window.tainacan_extra_plugins))
|
||||||
|
|
|
@ -369,9 +369,10 @@ class Admin {
|
||||||
|
|
||||||
function admin_page() {
|
function admin_page() {
|
||||||
global $TAINACAN_BASE_URL;
|
global $TAINACAN_BASE_URL;
|
||||||
|
$admin_options = apply_filters('set_tainacan_admin_options', $_GET);
|
||||||
|
$admin_options = json_encode($admin_options);
|
||||||
// TODO move it to a separate file and start the Vue project
|
// TODO move it to a separate file and start the Vue project
|
||||||
echo "<div id='tainacan-admin-app' data-module='admin'></div>";
|
echo "<div id='tainacan-admin-app' data-module='admin' data-options='$admin_options'></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function register_user_meta() {
|
function register_user_meta() {
|
||||||
|
|
Loading…
Reference in New Issue