diff --git a/components/Templates/class-pods_templates.php b/components/Templates/class-pods_templates.php index 9cada96f88..2363ed0a20 100644 --- a/components/Templates/class-pods_templates.php +++ b/components/Templates/class-pods_templates.php @@ -205,25 +205,45 @@ public function add_metaboxes( $post = false ) { wp_enqueue_script( $this->plugin_slug . '-handlebars-baldrick', $this->get_url( 'assets/js/handlebars.baldrick2.js', __FILE__ ), array( 'jquery' ), self::VERSION, true ); wp_enqueue_style( $this->plugin_slug . '-pod_reference-styles', $this->get_url( 'assets/css/styles-pod_reference.css', __FILE__ ), array(), self::VERSION ); + $metabox_callback = array( $this, 'render_metaboxes_custom' ); + // add metabox add_meta_box( - 'view_template', __( 'Template', 'pods' ), array( - $this, - 'render_metaboxes_custom', - ), '_pods_template', 'normal', 'high', array( + 'view_template', + __( 'Template', 'pods' ), + $metabox_callback, + '_pods_template', + 'normal', + 'high', + array( 'slug' => 'view_template', 'groups' => array(), ) ); add_meta_box( - 'pod_reference', __( 'Pod Reference', 'pods' ), array( - $this, - 'render_metaboxes_custom', - ), '_pods_template', 'side', 'default', array( + 'pod_reference', + __( 'Pod Reference', 'pods' ), + $metabox_callback, + '_pods_template', + 'side', + 'default', + array( 'slug' => 'pod_reference', 'groups' => array(), ) ); + add_meta_box( + 'pod_reference', + __( 'Magic Tag Reference', 'pods' ), + $metabox_callback, + '_pods_template', + 'side', + 'default', + array( + 'slug' => 'tag_reference', + 'groups' => array(), + ) + ); } diff --git a/components/Templates/includes/element-tag_reference.php b/components/Templates/includes/element-tag_reference.php new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/components/Templates/includes/element-tag_reference.php @@ -0,0 +1 @@ +