Skip to content

Instantly share code, notes, and snippets.

@garyconstable
Created May 23, 2018 22:26
Show Gist options
  • Save garyconstable/d65c3d168877d0cb8c7e7ce5a5af8d41 to your computer and use it in GitHub Desktop.
Save garyconstable/d65c3d168877d0cb8c7e7ce5a5af8d41 to your computer and use it in GitHub Desktop.
<?php
/*******************************************************************************
Add Centre meta box to the facilities - Centre plugin - facilities Post Type
*******************************************************************************/
if(!function_exists('add_bwm_facilities_centre_meta_box'))
{
function add_bwm_facilities_centre_meta_box()
{
add_meta_box("bwm_facilities_centre_meta_box", "BWM Cenres Content Override", "bwm_facilities_centre_meta_box_markup", array("facilities"), "normal", "high", null);
$vc = new Vc_Backend_Editor();
$vc->registerBackendJavascript();
$vc->registerBackendCss();
$vc->post = $post;
// B.C:
visual_composer()->registerAdminCss();
visual_composer()->registerAdminJavascript();
// meta box to render
add_meta_box(
'test_wpb_visual_composer',
__( 'test WPBakery Page Builder', 'test_js_composer' ),
array($vc,'renderEditor'),
array("facilities"),
'normal',
'high'
);
}
add_action("add_meta_boxes", "add_bwm_facilities_centre_meta_box");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment