mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-20 07:04:06 +09:00
Merge branch 'release/2.0.22'
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#um-metaboxes-general h2 sup {
|
||||
#um-metaboxes-general h1 sup {
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
font-weight: 400;
|
||||
|
||||
@@ -30,23 +30,7 @@ jQuery(document).ready(function() {
|
||||
|
||||
|
||||
jQuery(document).on('click', '#um_opt_in_start', function (e) {
|
||||
var obj = jQuery(this);
|
||||
var dismiss = jQuery(this).parents('.um-admin-notice').find( '.notice-dismiss' );
|
||||
jQuery(this).prop('disabled', true).attr('disabled', 'disabled');
|
||||
|
||||
wp.ajax.send( 'um_opt_in_notice', {
|
||||
data: {
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( data ) {
|
||||
dismiss.trigger('click');
|
||||
obj.prop('disabled', false).removeAttr( 'disabled' );
|
||||
},
|
||||
error: function( data ) {
|
||||
obj.prop('disabled', false).removeAttr( 'disabled' );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
jQuery(this).parents('.um-admin-notice').find( '.notice-dismiss' ).trigger('click');
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -349,6 +349,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
|
||||
/**
|
||||
* Render text field
|
||||
*
|
||||
* @param $field_data
|
||||
*
|
||||
* @return bool|string
|
||||
|
||||
@@ -362,7 +362,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
|
||||
<div id="um-metaboxes-general" class="wrap">
|
||||
|
||||
<h2>Ultimate Member <sup><?php echo ultimatemember_version; ?></sup></h2>
|
||||
<h1>Ultimate Member <sup><?php echo ultimatemember_version; ?></sup></h1>
|
||||
|
||||
<?php wp_nonce_field( 'um-metaboxes-general' ); ?>
|
||||
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
|
||||
@@ -31,7 +31,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
add_action( 'admin_notices', array( &$this, 'render_notices' ), 1 );
|
||||
|
||||
add_action( 'wp_ajax_um_dismiss_notice', array( &$this, 'dismiss_notice' ) );
|
||||
add_action( 'wp_ajax_um_opt_in_notice', array( &$this, 'opt_in_notice' ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -514,24 +513,18 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$optin_url = esc_url( add_query_arg( 'um_adm_action', 'opt_in' ) );
|
||||
|
||||
ob_start(); ?>
|
||||
|
||||
<p>
|
||||
<?php printf( __( 'Thanks for installing <strong>%s</strong>! We hope you like the plugin. To fund full-time development and support of the plugin we also sell extensions for %s via our website. If you subscribe to our mailing list we will email you a 20%% discount code for our <a href="%s" target="_blank">extensions bundle</a> (you\'ll need to confirm your opt-in via email before the discount code can be sent).', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_plugin_name, 'https://ultimatemember.com/core-extensions-bundle/' ); ?>
|
||||
<?php printf( __( 'Thanks for installing <strong>%s</strong>! We hope you like the plugin. To fund full-time development and support of the plugin we also sell extensions. If you subscribe to our mailing list we will send you a 20%% discount code for our <a href="%s" target="_blank">extensions bundle</a>.', 'ultimate-member' ), ultimatemember_plugin_name, 'https://ultimatemember.com/core-extensions-bundle/' ); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="javascript:void(0);" id="um_opt_in_start" class="button button-primary"><?php _e( 'Subscribe to mailing list', 'ultimate-member' ) ?></a>
|
||||
<a href="http://ultimatemember.com/discount/" target="_blank" id="um_opt_in_start" class="button button-primary"><?php _e( 'Claim 20% discount code', 'ultimate-member' ) ?></a>
|
||||
|
||||
<a href="javascript:void(0);" class="button-secondary um_opt_in_link"><?php _e( 'No thanks', 'ultimate-member' ) ?></a>
|
||||
</p>
|
||||
|
||||
<p class="description" style="font-size: 11px;">
|
||||
<?php printf( __( 'By clicking the subscribe button you are agree to join our mailing list. See our <a href="%s" target="_blank">privacy policy</a>', 'ultimate-member' ), 'https://ultimatemember.com/privacy-policy/' ); ?>
|
||||
</p>
|
||||
|
||||
<?php $message = ob_get_clean();
|
||||
|
||||
$this->add_notice( 'opt_in_notice', array(
|
||||
@@ -566,7 +559,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
if ( ! empty( $arr_inactive_license_keys ) ) {
|
||||
$this->add_notice( 'license_key', array(
|
||||
'class' => 'error',
|
||||
'message' => '<p>' . sprintf( __( 'There are %d inactive %s license keys for this site. This site is not authorized to get plugin updates. You can active this site on <a href="%s">www.UltimateMember.com</a>.', 'ultimate-member' ), count( $arr_inactive_license_keys ) , ultimatemember_plugin_name, 'https://ultimatemember.com' ) . '</p>',
|
||||
'message' => '<p>' . sprintf( __( 'There are %d inactive %s license keys for this site. This site is not authorized to get plugin updates. You can active this site on <a href="%s">www.ultimatemember.com</a>.', 'ultimate-member' ), count( $arr_inactive_license_keys ) , ultimatemember_plugin_name, 'https://ultimatemember.com' ) . '</p>',
|
||||
), 3 );
|
||||
}
|
||||
|
||||
@@ -715,54 +708,5 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
|
||||
|
||||
wp_send_json_success();
|
||||
}
|
||||
|
||||
|
||||
function opt_in_notice() {
|
||||
$nonce = isset( $_POST["nonce"] ) ? $_POST["nonce"] : "";
|
||||
if ( ! wp_verify_nonce( $nonce, "um-admin-nonce" ) ) {
|
||||
wp_send_json_error( esc_js( __( "Wrong Nonce", 'ultimate-member' ) ) );
|
||||
}
|
||||
|
||||
// Send a maximum of once per period
|
||||
$last_send = get_option( 'um_opt_in_last_send', false );
|
||||
if ( $last_send && $last_send > strtotime( '-1 day' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$data = array();
|
||||
|
||||
UM()->setup()->install_basics();
|
||||
|
||||
$data['email'] = get_option( 'admin_email' );
|
||||
$data['send_discount'] = ! get_option( '__ultimatemember_coupon_sent' ) ? 1 : 0;
|
||||
$data['unique_sitekey'] = get_option( '__ultimatemember_sitekey' );
|
||||
|
||||
$request = wp_remote_post( 'https://ultimatemember.com/?um_action=checkin', array(
|
||||
'method' => 'POST',
|
||||
'timeout' => 45,
|
||||
'redirection' => 5,
|
||||
'httpversion' => '1.0',
|
||||
'blocking' => true,
|
||||
'body' => $data,
|
||||
'user-agent' => 'UM/' . ultimatemember_version . '; ' . get_bloginfo( 'url' ),
|
||||
) );
|
||||
|
||||
if ( ! is_wp_error( $request ) ) {
|
||||
$request = json_decode( wp_remote_retrieve_body( $request ), true );
|
||||
}
|
||||
|
||||
$request = ( $request ) ? maybe_unserialize( $request ) : false;
|
||||
|
||||
if ( ! empty( $request['id'] ) && ! empty( $request['list_id'] ) ) {
|
||||
update_option( 'um_opt_in_last_send', time() );
|
||||
|
||||
if ( $request['discount_ready'] ) {
|
||||
update_option( '__ultimatemember_coupon_sent', 1 );
|
||||
}
|
||||
}
|
||||
|
||||
wp_send_json_success();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2381,6 +2381,7 @@ SOAP Client: <?php echo ( class_exists( 'SoapClient' ) ) ? 'Your
|
||||
SUHOSIN: <?php echo ( extension_loaded( 'suhosin' ) ) ? 'Your server has SUHOSIN installed.' : 'Your server does not have SUHOSIN installed.'; ?><?php echo "\n"; ?>
|
||||
GD Library: <?php echo ( extension_loaded( 'gd' ) && function_exists('gd_info') ) ? 'PHP GD library is installed on your web server.' : 'PHP GD library is NOT installed on your web server.'; ?><?php echo "\n"; ?>
|
||||
Mail: <?php echo ( function_exists('mail') ) ? 'PHP mail function exist on your web server.' : 'PHP mail function doesn\'t exist on your web server.'; ?><?php echo "\n"; ?>
|
||||
Exif: <?php echo ( extension_loaded( 'exif' ) && function_exists('exif_imagetype') ) ? 'PHP Exif library is installed on your web server.' : 'PHP Exif library is NOT installed on your web server.'; ?><?php echo "\n"; ?>
|
||||
|
||||
|
||||
--- Session Configurations ---
|
||||
|
||||
@@ -150,7 +150,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
||||
|
||||
$all_packages = $this->get_packages();
|
||||
foreach ( $all_packages as $package ) {
|
||||
if ( version_compare( $um_last_version_upgrade, $package, '<' ) ) {
|
||||
if ( version_compare( $um_last_version_upgrade, $package, '<' ) && version_compare( $package, ultimatemember_version, '<=' ) ) {
|
||||
$diff_packages[] = $package;
|
||||
}
|
||||
}
|
||||
@@ -402,28 +402,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Parse packages dir for packages files
|
||||
*/
|
||||
/*function set_update_versions_() {
|
||||
$update_versions = array();
|
||||
$handle = opendir( $this->packages_dir );
|
||||
if ( $handle ) {
|
||||
while ( false !== ( $filename = readdir( $handle ) ) ) {
|
||||
if ( $filename != '.' && $filename != '..' ) {
|
||||
var_dump( $filename );
|
||||
if ( is_dir( $this->packages_dir . DIRECTORY_SEPARATOR . $filename ) ) {
|
||||
$update_versions[] = $filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir( $handle );
|
||||
|
||||
usort( $update_versions, array( &$this, 'version_compare_sort' ) );
|
||||
|
||||
$this->update_packages = $update_versions;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -314,7 +314,7 @@ $ListTable->wpc_set_pagination_args( array( 'total_items' => count( $emails ), '
|
||||
<input type="hidden" name="page" value="um_options" />
|
||||
<input type="hidden" name="tab" value="email" />
|
||||
<?php if ( ! empty( $_GET['section'] ) ) { ?>
|
||||
<input type="hidden" name="section" value="<?php echo $_GET['section'] ?>" />
|
||||
<input type="hidden" name="section" value="<?php echo esc_attr( $_GET['section'] ) ?>" />
|
||||
<?php }
|
||||
|
||||
$ListTable->display(); ?>
|
||||
|
||||
@@ -62,8 +62,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
//gravity forms compatibility filter
|
||||
$all_caps = apply_filters( 'members_get_capabilities', array_keys( $all_caps ) );
|
||||
$fields = array();
|
||||
foreach ( array_keys( $all_caps ) as $cap ) {
|
||||
foreach ( $all_caps as $cap ) {
|
||||
if ( is_numeric( $cap ) ) {
|
||||
continue;
|
||||
}
|
||||
$fields[ $cap ] = $cap;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user