mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- added UM_LEGACY_BUILDER_OFF constant for future development;
This commit is contained in:
@@ -553,8 +553,12 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_enqueue_style( 'um_admin_common' );
|
||||
|
||||
if ( self::$um_cpt_form_screen ) {
|
||||
$this->load_builder();
|
||||
$this->load_modal();
|
||||
if ( defined( 'UM_LEGACY_BUILDER_OFF' ) && UM_LEGACY_BUILDER_OFF ) {
|
||||
// Do new assets.
|
||||
} else {
|
||||
$this->load_builder();
|
||||
$this->load_modal();
|
||||
}
|
||||
}
|
||||
|
||||
$this->load_forms();
|
||||
|
||||
@@ -188,15 +188,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
/**
|
||||
* Init the metaboxes
|
||||
*/
|
||||
function add_metabox() {
|
||||
public function add_metabox() {
|
||||
global $current_screen;
|
||||
|
||||
if ( $current_screen->id == 'um_form' ) {
|
||||
if ( 'um_form' === $current_screen->id ) {
|
||||
add_action( 'add_meta_boxes', array( &$this, 'add_metabox_form' ), 1 );
|
||||
add_action( 'save_post', array( &$this, 'save_metabox_form' ), 10, 2 );
|
||||
}
|
||||
|
||||
if ( $current_screen->id == 'um_directory' ) {
|
||||
} elseif ( 'um_directory' === $current_screen->id ) {
|
||||
add_action( 'add_meta_boxes', array( &$this, 'add_metabox_directory' ), 1 );
|
||||
add_action( 'save_post', array( &$this, 'save_metabox_directory' ), 10, 2 );
|
||||
}
|
||||
@@ -857,7 +855,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
* Add directory metabox
|
||||
*/
|
||||
public function add_metabox_directory() {
|
||||
add_meta_box('submitdiv', __( 'Publish', 'ultimate-member' ), array( &$this, 'custom_submitdiv' ), 'um_directory', 'side', 'high' );
|
||||
add_meta_box( 'submitdiv', __( 'Publish', 'ultimate-member' ), array( &$this, 'custom_submitdiv' ), 'um_directory', 'side', 'high' );
|
||||
add_meta_box( 'um-admin-form-general', __( 'General Options', 'ultimate-member' ), array( &$this, 'load_metabox_directory' ), 'um_directory', 'normal', 'default' );
|
||||
add_meta_box( 'um-admin-form-sorting', __( 'Sorting', 'ultimate-member' ), array( &$this, 'load_metabox_directory' ), 'um_directory', 'normal', 'default' );
|
||||
add_meta_box( 'um-admin-form-profile', __( 'Profile Card', 'ultimate-member' ), array( &$this, 'load_metabox_directory' ), 'um_directory', 'normal', 'default' );
|
||||
@@ -1017,16 +1015,19 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add form metabox
|
||||
*/
|
||||
public function add_metabox_form() {
|
||||
|
||||
add_meta_box( 'submitdiv', __( 'Publish', 'ultimate-member' ), array( $this, 'custom_submitdiv' ), 'um_form', 'side', 'high' );
|
||||
|
||||
add_meta_box( 'um-admin-form-mode', __( 'Select Form Type', 'ultimate-member' ), array( &$this, 'load_metabox_form' ), 'um_form', 'normal', 'default' );
|
||||
add_meta_box( 'um-admin-form-builder', __( 'Form Builder', 'ultimate-member' ), array( &$this, 'load_metabox_form' ), 'um_form', 'normal', 'default' );
|
||||
if ( defined( 'UM_LEGACY_BUILDER_OFF' ) && UM_LEGACY_BUILDER_OFF ) {
|
||||
// Do new metabox.
|
||||
} else {
|
||||
add_meta_box( 'um-admin-form-mode', __( 'Select Form Type', 'ultimate-member' ), array( &$this, 'load_metabox_form' ), 'um_form', 'normal', 'default' );
|
||||
add_meta_box( 'um-admin-form-builder', __( 'Form Builder', 'ultimate-member' ), array( &$this, 'load_metabox_form' ), 'um_form', 'normal', 'default' );
|
||||
}
|
||||
|
||||
add_meta_box( 'um-admin-form-shortcode', __( 'Shortcode', 'ultimate-member' ), array( &$this, 'load_metabox_form' ), 'um_form', 'side', 'default' );
|
||||
|
||||
add_meta_box( 'um-admin-form-register_customize', __( 'Customize this form', 'ultimate-member' ), array( &$this, 'load_metabox_form' ), 'um_form', 'side', 'default' );
|
||||
|
||||
@@ -32,6 +32,7 @@ define( 'UM_PATH', plugin_dir_path( __FILE__ ) );
|
||||
define( 'UM_PLUGIN', plugin_basename( __FILE__ ) );
|
||||
define( 'UM_VERSION', $plugin_data['Version'] );
|
||||
define( 'UM_PLUGIN_NAME', $plugin_data['Name'] );
|
||||
// define( 'UM_LEGACY_BUILDER_OFF', true );
|
||||
|
||||
require_once 'includes/class-functions.php';
|
||||
require_once 'includes/class-init.php';
|
||||
|
||||
Reference in New Issue
Block a user