'example', 'title' => __( 'Example', 'import-users-from-csv-with-meta' ), 'content' => self::section_example(), ), array( 'id' => 'columns', 'title' => __( 'Columns position', 'import-users-from-csv-with-meta' ), 'content' => self::section_columns(), ), array( 'id' => 'id', 'title' => __( 'id (column id)', 'import-users-from-csv-with-meta' ), 'content' => self::section_id(), ), array( 'id' => 'passwords', 'title' => __( 'Passwords (column password and user_pass)', 'import-users-from-csv-with-meta' ), 'content' => self::section_passwords(), ), array( 'id' => 'roles', 'title' => __( 'Roles (column role)', 'import-users-from-csv-with-meta' ), 'content' => self::section_roles(), ), array( 'id' => 'serialized', 'title' => __( 'Serialized data', 'import-users-from-csv-with-meta' ), 'content' => self::section_serialized(), ), array( 'id' => 'lists', 'title' => __( 'Lists', 'import-users-from-csv-with-meta' ), 'content' => self::section_lists(), ), array( 'id' => 'arrays', 'title' => __( 'Arrays with string keys', 'import-users-from-csv-with-meta' ), 'content' => self::section_arrays(), ), array( 'id' => 'force_user_reset_password', 'title' => __( 'Force users to reset their passwords', 'import-users-from-csv-with-meta' ), 'content' => self::section_force_reset_password(), ), array( 'id' => 'wp_profile', 'title' => __( 'WordPress default profile data', 'import-users-from-csv-with-meta' ), 'content' => self::section_wp_profile(), ), array( 'id' => 'cron', 'title' => __( 'Cron', 'import-users-from-csv-with-meta' ), 'content' => self::section_cron(), ), ); $sections = apply_filters( 'acui_documentation_sections', $sections ); // backward compat: addons that used do_action('acui_documentation_after_plugins_activated') // to output raw rows should migrate to the acui_documentation_sections filter. // We keep the action alive inside a dedicated row so nothing breaks. if( has_action( 'acui_documentation_after_plugins_activated' ) ){ ob_start(); do_action( 'acui_documentation_after_plugins_activated' ); $legacy_html = ob_get_clean(); if( $legacy_html ){ $sections[] = array( 'id' => '_legacy_addons', 'title' => '', 'content' => $legacy_html, ); } } $sections[] = array( 'id' => 'hooks', 'title' => __( 'Hooks', 'import-users-from-csv-with-meta' ), 'content' => self::section_hooks(), ); $sections[] = array( 'id' => 'support', 'title' => __( 'Any question about it?', 'import-users-from-csv-with-meta' ), 'content' => self::section_support(), ); return $sections; } static function get_section( $id ){ foreach( self::get_sections() as $section ){ if( $section['id'] === $id ) return $section; } return null; } static function message(){ ?>


' . __( "You can name these first two columns whatever you want; only the order matters. In the rest of the columns, the order doesn't matter, but what you name them is what matters.", 'import-users-from-csv-with-meta' ) . '' . '
    ' . '
  1. ' . __( 'Username: you can leave it empty and the username will be generated randomly', 'import-users-from-csv-with-meta' ) . '
  2. ' . '
  3. ' . __( 'Email:', 'import-users-from-csv-with-meta' ) . ' ' . apply_filters( 'acui_documentation_email_message', sprintf( __( 'required, although you can use this addon to allow users to be imported without an associated email address.', 'import-users-from-csv-with-meta' ), 'https://import-wp.com/allow-no-email-addon/' ) ) . '
  4. ' . '
' . '' . __( '(The next columns are totally customizable and you can use whatever you want. All rows must contains the same columns)', 'import-users-from-csv-with-meta' ) . '' . '' . __( '(User profile will be adapted to the kind of data you have selected)', 'import-users-from-csv-with-meta' ) . '' . '' . __( '(If you want to disable the extra profile information, please deactivate this plugin after making the import)', 'import-users-from-csv-with-meta' ) . ''; } static function section_id(){ return __( "You can use a column called id in order to make inserts or updates of an user using the ID used by WordPress in the wp_users table. We have two different cases:", 'import-users-from-csv-with-meta' ) . ''; } static function section_passwords(){ return __( "A string that contains user passwords. We have different options for this case:", 'import-users-from-csv-with-meta' ) . ''; } static function section_roles(){ return __( "Plugin can import roles from the CSV. This is how it works:", 'import-users-from-csv-with-meta' ) . '' . '' . __( "Notice: If the default new role is administrator in WordPress settings, role will not be set during a CSV file import with this plugin. Check it if all users are being imported as administrators and you have set another role in this plugin.", 'import-users-from-csv-with-meta' ) . ''; } static function section_serialized(){ return __( "Plugin can now import serialized data. You have to use the serialized string directly in the CSV cell in order the plugin will be able to understand it as an serialized data instead as any other string.", 'import-users-from-csv-with-meta' ); } static function section_lists(){ return __( "Plugin can import lists as an array. Use this separator:", 'import-users-from-csv-with-meta' ) . ' :: ' . __( "two colons, inside the cell in order to split the string in a list of items.", 'import-users-from-csv-with-meta' ); } static function section_arrays(){ return __( "Plugin can also import arrays with string keys. Use this separator:", 'import-users-from-csv-with-meta' ) . ' :: ' . __( "two colons, inside the cell, in order to split the string in a list of items. Every item should be split using => to separate the key from the value. For example:", 'import-users-from-csv-with-meta' ) . ' key1=>value1::key2=>value2::key3=>value3'; } static function section_force_reset_password(){ return '' . ''; } static function section_wp_profile(){ return __( "You can use those labels if you want to set data adapted to the WordPress default user columns (the ones who use the function", 'import-users-from-csv-with-meta' ) . ' wp_update_user)' . '
    ' . '
  1. user_nicename: ' . __( "A string that contains a URL-friendly name for the user. The default is the user's username.", 'import-users-from-csv-with-meta' ) . '
  2. ' . '
  3. user_url: ' . __( "A string containing the user's URL for the user's web site.", 'import-users-from-csv-with-meta' ) . '
  4. ' . '
  5. display_name: ' . __( "A string that will be shown on the site. Defaults to user's username.", 'import-users-from-csv-with-meta' ) . '
  6. ' . '
  7. nickname: ' . __( "The user's nickname, defaults to the user's username.", 'import-users-from-csv-with-meta' ) . '
  8. ' . '
  9. first_name: ' . __( "The user's first name.", 'import-users-from-csv-with-meta' ) . '
  10. ' . '
  11. last_name: ' . __( "The user's last name.", 'import-users-from-csv-with-meta' ) . '
  12. ' . '
  13. description: ' . __( "A string containing content about the user.", 'import-users-from-csv-with-meta' ) . '
  14. ' . '
  15. jabber: ' . __( "User's Jabber account.", 'import-users-from-csv-with-meta' ) . '
  16. ' . '
  17. aim: ' . __( "User's AOL IM account.", 'import-users-from-csv-with-meta' ) . '
  18. ' . '
  19. yim: ' . __( "User's Yahoo IM account.", 'import-users-from-csv-with-meta' ) . '
  20. ' . '
  21. user_registered: ' . __( "Using the WordPress format for this kind of data Y-m-d H:i:s.", 'import-users-from-csv-with-meta' ) . '
  22. ' . '
'; } static function section_cron(){ return __( 'The Cron tab allows you to make periodic imports using the WordPress cron scheduler.', 'import-users-from-csv-with-meta' ); } static function section_hooks(){ return __( 'If you are a developer, you can extend or use this plugin with all the hooks we provide, you have a list of them here', 'import-users-from-csv-with-meta' ); } static function section_example(){ return __( 'Download this', 'import-users-from-csv-with-meta' ) . ' .csv ' . __( 'file', 'import-users-from-csv-with-meta' ) . ' ' . __( 'to test', 'import-users-from-csv-with-meta' ); } static function section_support(){ return ''; } }