- small fixes

This commit is contained in:
Yurii Nalivaiko
2018-11-30 11:32:57 +02:00
parent a32ddcd13b
commit b0cd9c98c3
4 changed files with 6 additions and 19 deletions
@@ -30,8 +30,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
* Admin_Enqueue constructor.
*/
function __construct() {
$this->slug = 'ultimatemember';
$this->js_url = um_url . 'includes/admin/assets/js/';
$this->css_url = um_url . 'includes/admin/assets/css/';
+5 -12
View File
@@ -55,11 +55,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
ob_start();
foreach ( $this->form_data['fields'] as $field_data ) {
if ( isset( $field_data['type'] ) && 'hidden' == $field_data['type'] )
echo $this->render_form_row( $field_data );
if ( isset( $field_data['type'] ) && 'hidden' == $field_data['type'] ) {
echo $this->render_form_row( $field_data );
}
}
if ( empty( $this->form_data['without_wrapper'] ) ) { ?>
<table <?php echo $class_attr ?>>
@@ -248,14 +248,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
}
} else {
if ( method_exists( $this, 'render_' . $data['type'] ) ) {
$html .= call_user_func( array( &$this, 'render_' . $data['type'] ), $data );
} else {
$html .= $this->render_field_by_hook( $data );
}
$html .= $this->render_hidden( $data );
}
return $html;
@@ -326,7 +319,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
function render_hidden( $field_data ) {
if ( empty( $field_data['id'] ) )
return false;
return '';
$id = ( ! empty( $this->form_data['prefix_id'] ) ? $this->form_data['prefix_id'] : '' ) . '_' . $field_data['id'];
$id_attr = ' id="' . $id . '" ';
+1 -2
View File
@@ -20,14 +20,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
* @var string
*/
var $pagehook;
var $slug = 'ultimatemember';
/**
* Admin_Menu constructor.
*/
function __construct() {
$this->slug = 'ultimatemember';
add_action( 'admin_menu', array( &$this, 'primary_admin_menu' ), 0 );
add_action( 'admin_menu', array( &$this, 'secondary_menu_items' ), 1000 );
add_action( 'admin_menu', array( &$this, 'extension_menu' ), 9999 );
@@ -24,9 +24,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
* Admin_Metabox constructor.
*/
function __construct() {
$this->slug = 'ultimatemember';
$this->in_edit = false;
$this->edit_mode_value = null;