maybe_migrate_old_options( 'import_backend' ); $upload_dir = wp_upload_dir(); $sample_path = $upload_dir["path"] . '/test.csv'; $sample_url = plugin_dir_url( dirname( __FILE__ ) ) . 'test.csv'; if( ctype_digit( $settings->get( 'delete_users_assign_posts' ) ) ){ $delete_users_assign_posts_user_id = $settings->get( 'delete_users_assign_posts' ); $delete_users_assign_posts_user = get_user_by( 'id', $delete_users_assign_posts_user_id ); if( $delete_users_assign_posts_user ) { $delete_users_assign_posts_options = array( $delete_users_assign_posts_user_id => $delete_users_assign_posts_user->display_name); } else { $delete_users_assign_posts_options = array(); } $delete_users_assign_posts_option_selected = $delete_users_assign_posts_user_id; } else{ $delete_users_assign_posts_options = array( 0 => __( 'No user selected', 'import-users-from-csv-with-meta' ) ); $delete_users_assign_posts_option_selected = 0; } ?>
0%
', 'import-users-from-csv-with-meta' ); ?>
or you can choose directly a file from your host or from an external URL', 'import-users-from-csv-with-meta' ) ?> .

XLSX, XLS or ODS files with the File Formats addon.', 'import-users-from-csv-with-meta' ), 'https://import-wp.com/plugins/file-formats-addon/' ); ?>

select( array( 'options' => ACUI_Helper::get_editable_roles(), 'name' => 'role[]', 'show_option_all' => false, 'show_option_none' => true, 'multiple' => true, 'selected' => is_array( $settings->get( 'role' ) ) ? $settings->get( 'role' ) : array( $settings->get( 'role' ) ), 'style' => 'width:100%;' )); ?>

select( array( 'options' => array( 'leave' => __( 'Leave the old value for this metadata', 'import-users-from-csv-with-meta' ), 'delete' => __( 'Delete the metadata', 'import-users-from-csv-with-meta' ) ), 'name' => 'empty_cell_action', 'show_option_all' => false, 'show_option_none' => false, 'selected' => $settings->get( 'empty_cell_action' ), )); ?>

checkbox( array( 'name' => 'sends_email', 'label' => sprintf( __( 'Do you wish to send an email from this plugin with credentials and other data? (email template found here)', 'import-users-from-csv-with-meta' ), admin_url( 'tools.php?page=acui&tab=mail-options' ) ), 'current' => 'yes', 'compare_value' => $settings->get( 'sends_email' ) ) ); ?>

checkbox( array( 'name' => 'send_email_updated', 'label' => __( 'Do you wish to send this mail also to users that are being updated? (not just to the one which are being created)', 'import-users-from-csv-with-meta' ), 'current' => 'yes', 'compare_value' => $settings->get( 'send_email_updated' ) ) ); ?>

checkbox( array( 'name' => 'force_user_reset_password', 'label' => __( 'If a password is set to a user and you activate this option, the user will be forced to reset their password at their first login', 'import-users-from-csv-with-meta' ), 'current' => 'yes', 'compare_value' => $settings->get( 'force_user_reset_password' ) ) ); ?>

read the documentation before activating this option', 'import-users-from-csv-with-meta' ), admin_url( 'tools.php?page=acui&tab=doc#force_user_reset_password' ) ); ?>

select( array( 'options' => array( 'no' => __( 'No', 'import-users-from-csv-with-meta' ), 'yes' => __( 'Yes', 'import-users-from-csv-with-meta' ), ), 'name' => 'update_existing_users', 'show_option_all' => false, 'show_option_none' => false, 'selected' => $settings->get( 'update_existing_users' ), )); ?>
select( array( 'options' => array( 'no' => __( 'No', 'import-users-from-csv-with-meta' ), 'create' => __( 'No, but create a new user with a prefix in the username', 'import-users-from-csv-with-meta' ), 'yes' => __( 'Yes', 'import-users-from-csv-with-meta' ) ), 'name' => 'update_emails_existing_users', 'show_option_all' => false, 'show_option_none' => false, 'selected' => $settings->get( 'update_emails_existing_users' ), )); ?>

select( array( 'options' => array( 'no' => __( 'No', 'import-users-from-csv-with-meta' ), 'yes' => __( 'Yes, update and override existing roles', 'import-users-from-csv-with-meta' ), 'yes_no_override' => __( 'Yes, add new roles and do not override existing ones', 'import-users-from-csv-with-meta' ) ), 'name' => 'update_roles_existing_users', 'show_option_all' => false, 'show_option_none' => false, 'selected' => $settings->get( 'update_roles_existing_users' ), )); ?>
select( array( 'options' => array( 'no' => __( 'No, never update passwords for existing users', 'import-users-from-csv-with-meta' ), 'yes' => __( 'Yes, update passwords as described in documentation', 'import-users-from-csv-with-meta' ) ), 'name' => 'update_allow_update_passwords', 'show_option_all' => false, 'show_option_none' => false, 'selected' => $settings->get( 'update_allow_update_passwords' ), )); ?>
checkbox( array( 'name' => 'delete_users_not_present', 'current' => 'yes', 'compare_value' => $settings->get( 'delete_users_not_present' ) ) ); ?>
select( array( 'options' => $delete_users_assign_posts_options, 'name' => 'delete_users_assign_posts', 'show_option_all' => false, 'show_option_none' => __( 'Delete posts of deleted users without assigning them to another user, or type to search for a user to assign the posts to', 'import-users-from-csv-with-meta' ), 'selected' => $delete_users_assign_posts_option_selected, )); ?>

checkbox( array( 'name' => 'change_role_not_present', 'current' => 'yes', 'compare_value' => $settings->get( 'change_role_not_present' ) ) ); ?>
select( array( 'options' => ACUI_Helper::get_editable_roles(), 'name' => 'change_role_not_present_role', 'show_option_all' => false, 'show_option_none' => false, 'selected' => $settings->get( 'change_role_not_present_role' ), )); ?>

select( array( 'options' => array( 'no' => __( 'No, apply to all users regardless of their role', 'import-users-from-csv-with-meta' ), 'yes' => __( 'Yes, only users who have the role(s) of the imported users', 'import-users-from-csv-with-meta' ), ), 'name' => 'not_present_same_role', 'show_option_all' => false, 'show_option_none' => false, 'selected' => $settings->get( 'not_present_same_role' ), )); ?>

select( array( 'options' => array( 'no' => __( 'No, apply to all existing users', 'import-users-from-csv-with-meta' ), 'yes' => __( 'Yes, only affect users that were imported by this plugin', 'import-users-from-csv-with-meta' ), ), 'name' => 'not_present_only_imported', 'show_option_all' => false, 'show_option_none' => false, 'selected' => $settings->get( 'not_present_only_imported' ), )); ?>

0
0
0
0
0
'', 'value' => __( 'Delete posts of deleted users without assigning to any user', 'import-users-from-csv-with-meta' ) ) ); $search = sanitize_text_field( $_GET['search'] ); if( strlen( $search ) >= 3 ){ $blogusers = get_users( array( 'fields' => array( 'ID', 'display_name' ), 'search' => '*' . $search . '*' ) ); foreach ( $blogusers as $bloguser ) { $results[] = array( 'id' => $bloguser->ID, 'text' => $bloguser->display_name ); } } echo json_encode( array( 'results' => $results, 'more' => 'false' ) ); wp_die(); } } $acui_homepage = new ACUI_Homepage(); $acui_homepage->hooks();