| @@ -1,39 +1,20 @@ | ||
| 1 | 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 | |
| 2 | +/******************************************************************************************** | |
| 13 | 3 | * Plugin Name: Import Users |
| 14 | - * Description: Seamlessly create users and import from your CSV data with ease. | |
| 15 | - * Version: 2.0 | |
| 4 | + * Description: Seamlessly create users and import from your CSV data with ease. | |
| 5 | + * Version: 1.2 | |
| 16 | 6 | * Text Domain: Import-Users |
| 17 | 7 | * Domain Path: /languages |
| 18 | 8 | * Author: Smackcoders |
| 19 | - * Plugin URI: https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html | |
| 20 | - * Author URI: https://www.smackcoders.com/wordpress.html | |
| 21 | - * License: GPL v3 | |
| 9 | + * Plugin URI: https://goo.gl/kKWPui | |
| 10 | + * Author URI: https://goo.gl/kKWPui | |
| 22 | 11 | * |
| 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 | - */ | |
| 12 | + * Copyright (C) Smackcoders. - All Rights Reserved under Smackcoders Proprietary License | |
| 13 | + * Unauthorized copying of this file, via any medium is strictly prohibited | |
| 14 | + * Proprietary and confidential | |
| 15 | + * You can contact Smackcoders at email address info@smackcoders.com. | |
| 16 | + *******************************************************************************************/ | |
| 36 | 17 | |
| 37 | 18 | namespace Smackcoders\SMUSERS; |
| 38 | 19 | |
| 39 | 20 | if ( ! defined( 'ABSPATH' ) ) |
| @@ -38,24 +19,21 @@ | ||
| 38 | 19 | |
| 39 | 20 | if ( ! defined( 'ABSPATH' ) ) |
| 40 | 21 | exit; // Exit if accessed directly |
| 41 | 22 | |
| 42 | -require_once __DIR__ . '/SmackImportUserPlugin.php'; | |
| 43 | -require_once __DIR__ . '/SmackImportUserInstall.php'; | |
| 44 | -require_once __DIR__ . '/importExtensions/UsersImport.php'; | |
| 45 | -require_once __DIR__ . '/importExtensions/MediaHandling.php'; | |
| 46 | -require_once __DIR__ . '/importExtensions/BSIImport.php'; | |
| 47 | -require_once __DIR__ . '/importExtensions/ImportHelpers.php'; | |
| 48 | -require_once __DIR__ . '/importExtensions/BuddyImport.php'; | |
| 49 | -require_once __DIR__ . '/importExtensions/WPMembersImport.php'; | |
| 50 | -require_once __DIR__ . '/importExtensions/MultiroleImport.php'; | |
| 23 | +require_once('SmackImportUserPlugin.php'); | |
| 24 | +require_once('SmackImportUserInstall.php'); | |
| 25 | +require_once('importExtensions/UsersImport.php'); | |
| 26 | +require_once('importExtensions/MediaHandling.php'); | |
| 27 | +require_once('importExtensions/BSIImport.php'); | |
| 28 | +require_once('importExtensions/ImportHelpers.php'); | |
| 29 | +require_once('importExtensions/WPMembersImport.php'); | |
| 30 | +require_once('controllers/SendPassword.php'); | |
| 51 | 31 | |
| 52 | -require_once __DIR__ . '/controllers/SendPassword.php'; | |
| 53 | - | |
| 54 | 32 | class UserCSVHandler extends UsersImport{ |
| 55 | 33 | |
| 56 | 34 | private static $instance = null,$install; |
| 57 | - public $version = '2.0'; | |
| 35 | + public $version = '1.2'; | |
| 58 | 36 | |
| 59 | 37 | public function __construct(){ |
| 60 | 38 | $this->plugin = Plugin::getInstance(); |
| 61 | 39 | } |
| @@ -64,9 +42,8 @@ | ||
| 64 | 42 | if (UserCSVHandler::$instance == null) { |
| 65 | 43 | UserCSVHandler::$instance = new UserCSVHandler; |
| 66 | 44 | UserCSVHandler::$install = UserInstall::getInstance(); |
| 67 | 45 | add_filter( 'plugin_row_meta' . plugin_basename( __FILE__ ), array(UserCSVHandler::$install, 'plugin_row_meta'), 10, 2 ); |
| 68 | - add_action('plugin_action_links_' . plugin_basename( __FILE__ ), array(UserCSVHandler::$install, 'plugin_row_meta'), 10, 3); | |
| 69 | 46 | |
| 70 | 47 | if ( ! function_exists( 'is_plugin_active' ) ) { |
| 71 | 48 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 72 | 49 | } |
| @@ -73,19 +50,21 @@ | ||
| 73 | 50 | self::init_hooks(); |
| 74 | 51 | |
| 75 | 52 | return UserCSVHandler::$instance; |
| 76 | 53 | } |
| 77 | - return UserCSVHandler::$instance; | |
| 54 | + return UserCSVHandler::$instance; | |
| 78 | 55 | } |
| 79 | 56 | |
| 80 | 57 | public static function init_hooks() { |
| 81 | - add_action( 'admin_notices', array(UserCSVHandler::$instance,'admin_notice_importuser')); | |
| 58 | + | |
| 59 | + add_action( 'plugins_loaded', array( self, 'init' ), 0 ); | |
| 60 | + add_action( 'admin_notices', self::admin_notice_importuser() ); | |
| 82 | 61 | } |
| 83 | 62 | |
| 84 | - public static function admin_notice_importuser() { | |
| 63 | + public function admin_notice_importuser() { | |
| 85 | 64 | global $pagenow; |
| 86 | 65 | $active_plugins = get_option( "active_plugins" ); |
| 87 | - if ( $pagenow == 'plugins.php' && !in_array('wp-ultimate-csv-importer/wp-ultimate-csv-importer.php', $active_plugins) ) { | |
| 66 | + if ( $pagenow == 'plugins.php' && !in_array('wp-ultimate-csv-importer/index.php', $active_plugins) ) { | |
| 88 | 67 | ?> |
| 89 | 68 | <div class="notice notice-warning is-dismissible" > |
| 90 | 69 | <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> |
| 91 | 70 | <p> |
| @@ -98,10 +77,14 @@ | ||
| 98 | 77 | * Init UserSmCSVHandlerPro when WordPress Initialises. |
| 99 | 78 | */ |
| 100 | 79 | public function init() { |
| 101 | 80 | if(is_admin()) : |
| 81 | + // Init action. | |
| 102 | 82 | do_action( 'uci_init' ); |
| 103 | 83 | if(is_admin()) { |
| 84 | +#$this->includes(); | |
| 85 | + //SmUCIUserAdminAjax::smuci_ajax_events(); | |
| 86 | +# Removed: De-Register the media sizes | |
| 104 | 87 | } |
| 105 | 88 | endif; |
| 106 | 89 | } |
| 107 | 90 | } |