PluginProbe
Import Users & Customers with Meta | WP Ultimate CSV Importer Add-on / 1.2.6
Import Users & Customers with Meta | WP Ultimate CSV Importer Add-on v1.2.6
2.0 1.7.1 1.2.9 1.3 1.4 1.4.1 1.4.2 1.4.3 1.5 1.6 1.7 trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8
import-users / import-users.php

import-users.php in Import Users & Customers with Meta | WP Ultimate CSV Importer Add-on 1.2.6, at import-users.php

118 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Import Users.
5 *
6 * Import Users plugin file.
7 *
8 * @package Smackcoders\SMUSERS
9 * @copyright Copyright (C) 2010-2020, Smackcoders Inc - info@smackcoders.com
10 * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3 or higher
11 *
12 * @wordpress-plugin
13 * Plugin Name: Import Users
14 * Description: Seamlessly create users and import from your CSV data with ease.
15 * Version: 1.2.6
16 * Text Domain: Import-Users
17 * Domain Path: /languages
18 * Author: Smackcoders
19 * Plugin URI: https://goo.gl/kKWPui
20 * Author URI: https://goo.gl/kKWPui
21 * License: GPL v3
22 *
23 * This program is free software: you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation, either version 3 of the License, or
26 * (at your option) any later version.
27 *
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
32 *
33 * You should have received a copy of the GNU General Public License
34 * along with this program. If not, see <http://www.gnu.org/licenses/>.
35 */
36
37 namespace Smackcoders\SMUSERS;
38
39 if ( ! defined( 'ABSPATH' ) )
40 exit; // Exit if accessed directly
41
42 require_once('SmackImportUserPlugin.php');
43 require_once('SmackImportUserInstall.php');
44 require_once('importExtensions/UsersImport.php');
45 require_once('importExtensions/MediaHandling.php');
46 require_once('importExtensions/BSIImport.php');
47 require_once('importExtensions/ImportHelpers.php');
48 require_once('importExtensions/WPMembersImport.php');
49 require_once('controllers/SendPassword.php');
50
51 class UserCSVHandler extends UsersImport{
52
53 private static $instance = null,$install;
54 public $version = '1.2.6';
55
56 public function __construct(){
57 $this->plugin = Plugin::getInstance();
58 }
59
60 public static function getInstance() {
61 if (UserCSVHandler::$instance == null) {
62 UserCSVHandler::$instance = new UserCSVHandler;
63 UserCSVHandler::$install = UserInstall::getInstance();
64 add_filter( 'plugin_row_meta' . plugin_basename( __FILE__ ), array(UserCSVHandler::$install, 'plugin_row_meta'), 10, 2 );
65 add_action('plugin_action_links_' . plugin_basename( __FILE__ ), array(UserCSVHandler::$install, 'plugin_row_meta'), 10, 3);
66
67 if ( ! function_exists( 'is_plugin_active' ) ) {
68 require_once ABSPATH . 'wp-admin/includes/plugin.php';
69 }
70 self::init_hooks();
71
72 return UserCSVHandler::$instance;
73 }
74 return UserCSVHandler::$instance;
75 }
76
77 public static function init_hooks() {
78 add_action( 'admin_notices', array(UserCSVHandler::$instance,'admin_notice_importuser'));
79 }
80
81 public static function admin_notice_importuser() {
82 global $pagenow;
83 $active_plugins = get_option( "active_plugins" );
84 if ( $pagenow == 'plugins.php' && !in_array('wp-ultimate-csv-importer/wp-ultimate-csv-importer.php', $active_plugins) ) {
85 ?>
86 <div class="notice notice-warning is-dismissible" >
87 <p> Import Users is an addon of <a href="https://wordpress.org/plugins/wp-ultimate-csv-importer" target="blank" style="cursor: pointer;text-decoration:none">WP Ultimate CSV Importer</a> plugin, kindly install it to continue using import users. </p>
88 <p>
89 </div>
90 <?php
91 }
92 }
93
94 /**
95 * Init UserSmCSVHandlerPro when WordPress Initialises.
96 */
97 public function init() {
98 if(is_admin()) :
99 // Init action.
100 do_action( 'uci_init' );
101 if(is_admin()) {
102 #$this->includes();
103 //SmUCIUserAdminAjax::smuci_ajax_events();
104 # Removed: De-Register the media sizes
105 }
106 endif;
107 }
108 }
109
110 add_action( 'plugins_loaded', 'Smackcoders\\SMUSERS\\onpluginsload' );
111 function onpluginsload(){
112 $plugin = UserCSVHandler::getInstance();
113 }
114 global $userimp_class;
115 $userimp_class = new UserCSVHandler();
116
117 ?>
118