Skip to content

Instantly share code, notes, and snippets.

@yasaryousuf
Created May 9, 2018 12:00
Show Gist options
  • Save yasaryousuf/3f7704fc626eb183b5c27352ff9c0d2f to your computer and use it in GitHub Desktop.
Save yasaryousuf/3f7704fc626eb183b5c27352ff9c0d2f to your computer and use it in GitHub Desktop.
<?php
add_action( "admin_init", array($self, 'custom_meta_box') );
function custom_meta_box() {
//add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args );
add_meta_box( 'registration_form_fields','Registration Form Fields',array($this, 'display_registration_fields'),'pfm_registration', 'normal', 'low' );
add_meta_box( 'notification_form', 'Notification Form',array($this, 'display_registration_notification'), 'pfm_registration', 'normal', 'high' );
add_meta_box( 'pfm_shortcode_on_right', 'Shortcode', array($this, 'display_shortcode_form'), 'pfm_registration', 'side', 'core' );
add_meta_box( 'member_list_on_pfm_member', 'Member List', array($this, 'display_member_list_on_pfm_member'), 'pfm_member', 'normal', '' );
add_meta_box( 'member_details_on_pfm_member', 'Member Details', array($this, 'display_member_details_on_pfm_member'), 'pfm_member', 'normal', '' );
}
function display_member_details_on_pfm_member()
{
(new PfmEditor)->render("", "member_details", "member_details");
}
function display_member_list_on_pfm_member()
{
(new PfmEditor)->render("", "member_list", "member_list");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment