PluginProbe
Adminimize / 1.11.7
Adminimize v1.11.7
1.11.14 1.11.13 1.11.1 1.11.10 1.11.11 1.11.12 1.11.2 1.11.3 1.11.4 1.11.5 1.11.6 1.11.7 1.11.8 1.11.9 1.3 1.4.7 1.6 1.7.12 1.7.13 1.7.14 1.7.15 1.7.16 1.7.17 1.7.18 1.7.19 All 53 releases
adminimize / inc-options / im_export_options.php

im_export_options.php in Adminimize 1.11.7, at inc-options/im_export_options.php

102 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Adminimize
4 * @subpackage Im/Export options
5 * @author Frank Bültge
6 */
7 if ( ! function_exists( 'add_action' ) ) {
8 echo "Hi there! I'm just a part of plugin, not much I can do when called directly.";
9 exit;
10 }
11 global $wp_roles;
12 ?>
13
14 <div id="poststuff" class="ui-sortable meta-box-sortables">
15 <div class="postbox">
16 <h3 class="hndle ui-sortable-handle" title="<?php esc_attr_e( 'Click to toggle', 'adminimize' ); ?>"
17 id="import"><?php esc_attr_e( 'Export/Import Options', 'adminimize' ); ?></h3>
18
19 <div class="inside">
20
21 <h3><?php esc_attr_e( 'Export', 'adminimize' ); ?></h3>
22 <p><?php esc_attr_e( 'You can save a JSON formatted ".json" file with your settings.', 'adminimize' ); ?></p>
23 <label for="_mw_adminimize_choose_export" class="control-label">Export All Roles</label>
24 <input type="checkbox" id="adminimize-toggle" name="_mw_adminimize_choose_export" value="1"
25 class="adminimize-checkbox" checked="checked">
26 <label for="adminimize-toggle" class="switch"></label>
27 <form method="post" id="adminimize-export">
28 <p><input type="hidden" name="_mw_adminimize_export" value="true"/></p>
29 <p>
30 <?php wp_nonce_field( 'mw_adminimize_export_nonce', 'mw_adminimize_export_nonce' ); ?>
31 <?php
32 $submit_text = esc_html__( 'Export &raquo;', 'adminimize' );
33 submit_button( $submit_text, 'primary', '_mw_adminimize_save', false );
34 ?>
35 </p>
36 </form>
37 <br class="clear">
38 <form method="post" id="adminimize-export-role">
39 <p>
40 <label><?php esc_attr_e( 'Choose one or more roles:', 'adminimize' ); ?><br>
41 <select name="select_adminimize_roles[]" multiple id="mw_adminimize_export_select_roles">
42 <?php foreach ( $wp_roles->role_names as $role_name => $data ) : ?>
43 <option value="<?php echo $role_name; ?>"><?php echo $data; ?></option>
44 <?php endforeach; ?>
45 </select>
46 </label>
47 </p>
48 <p><input type="hidden" name="_mw_adminimize_export_role" value="true"/></p>
49 <p>
50 <?php wp_nonce_field( 'mw_adminimize_export_role_nonce', 'mw_adminimize_export_role_nonce' ); ?>
51 <?php
52 $submit_text = esc_html__( 'Export role(s) &raquo;', 'adminimize' );
53 submit_button( $submit_text, 'primary', '_mw_adminimize_save', false ); ?>
54 </p>
55 </form>
56 <br class="clear">
57
58 <h3><?php esc_attr_e( 'Import', 'adminimize' ) ?></h3>
59 <form name="import_options" enctype="multipart/form-data" method="post"
60 action="?page=<?php echo esc_attr( $_GET['page'] ); ?>">
61 <?php wp_nonce_field( 'mw_adminimize_nonce' ); ?>
62 <p><?php _e(
63 'Choose a Adminimize (<em>.json</em>) file to upload, then click <em>Upload file and import</em>.',
64 'adminimize'
65 );
66 esc_html_e( 'After import please reload the page to display also all global values from WordPress.', 'adminimize' ); ?>
67 </p>
68
69 <p>
70 <label for="datei_id">
71 <?php esc_html_e(
72 'Choose a ".json" file from your computer:', 'adminimize'
73 ) ?>
74 </label>
75 <input name="import_file" id="datei_id" type="file"/>
76 </p>
77
78 <p>
79 <?php wp_nonce_field( 'mw_adminimize_import_nonce', 'mw_adminimize_import_nonce' ); ?>
80 <input type="hidden" name="_mw_adminimize_action" value="_mw_adminimize_import"/>
81 <?php
82 $submit_text = esc_html__( 'Upload file and import &raquo;', 'adminimize' );
83 submit_button(
84 $text = $submit_text, $type = 'primary', $name = '_mw_adminimize_save', $wrap = false,
85 $other_attributes = null
86 );
87 ?>
88 </p>
89 </form>
90
91 <p>
92 <a class="alignright button adminimize-scroltop" href="#" style="margin:3px 0 0 30px;">
93 <?php esc_html_e( 'scroll to top', 'adminimize' ); ?>
94 </a>
95 <br class="clear"/>
96 </p>
97
98 </div>
99 </div>
100 </div>
101
102