' . $this->render_field_label( $data );
if ( method_exists( $this, 'render_' . $data['type'] ) ) {
@@ -150,7 +152,7 @@ if ( ! class_exists( 'Admin_Forms' ) ) {
} else {
if ( strpos( $this->form_data['class'], 'um-top-label' ) !== false ) {
- $html .= '
| ' . $this->render_field_label( $data ) . ' |
';
diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php
index ccae94c4..2ef86377 100644
--- a/includes/admin/core/class-admin-settings.php
+++ b/includes/admin/core/class-admin-settings.php
@@ -27,6 +27,8 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
//custom content for licenses tab
add_filter( 'um_settings_section_licenses__content', array( $this, 'settings_licenses_tab' ), 10, 2 );
+ add_filter( 'um_settings_section_install_info__content', array( $this, 'settings_install_info_tab' ), 10, 2 );
+
add_filter( 'um_settings_structure', array( $this, 'sorting_licenses_options' ), 9999, 1 );
@@ -45,6 +47,8 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
//invalid licenses notice
add_action( 'admin_notices', array( $this, 'check_wrong_licenses' ) );
+
+ add_action( 'admin_init', array( &$this, 'um_download_install_info' ) );
}
@@ -1085,7 +1089,15 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
'default' => UM()->um_get_default( 'uninstall_on_delete' ),
)
)
- )
+ ),
+ 'install_info' => array(
+ 'title' => __( 'Install Info', 'ultimate-member' ),
+ 'fields' => array(
+ array(
+ 'type' => 'install_info',
+ ),
+ )
+ ),
) );
}
@@ -1176,7 +1188,7 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
do_action( "um_settings_page_before_" . $current_tab . "_" . $current_subtab . "_content" );
- if ( 'licenses' == $current_tab ) {
+ if ( 'licenses' == $current_tab || 'install_info' == $current_tab ) {
do_action( "um_settings_page_" . $current_tab . "_" . $current_subtab . "_before_section" );
$section_fields = $this->get_section_fields( $current_tab, $current_subtab );
@@ -1787,6 +1799,362 @@ if ( ! class_exists( 'Admin_Settings' ) ) {
return $section;
}
+
+ function settings_install_info_tab( $html, $section_fields ) {
+ global $wpdb;
+
+ if ( ! class_exists( '\Browser' ) )
+ require_once um_path . 'includes/lib/browser.php';
+
+ // Detect browser
+ $browser = new \Browser();
+
+ // Get theme info
+ $theme_data = wp_get_theme();
+ $theme = $theme_data->Name . ' ' . $theme_data->Version;
+
+ // Identify Hosting Provider
+ $host = um_get_host();
+
+ um_fetch_user( get_current_user_id() );
+
+ if ( isset( $this->content ) ) {
+ echo $this->content;
+ } else { ?>
+
+ Install Info
+
+
+
+ ';
- } else {
- echo '—';
- }
+ echo ! empty( $item['_um_is_custom'] ) ? __( 'Yes', 'ultimate-member' ) : __( 'No', 'ultimate-member' );
}
function column_admin_access( $item ) {
- if ( ! empty( $item['_um_can_access_wpadmin'] ) ) {
- echo '';
- } else {
- echo __( 'No', 'ultimate-member' );
- }
+ echo ! empty( $item['_um_can_access_wpadmin'] ) ? __( 'Yes', 'ultimate-member' ) : __( 'No', 'ultimate-member' );
}
|