Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

Commit c4bf2d7

Browse files
committed
Added: Upload Button
1 parent 7a9f1de commit c4bf2d7

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

redux-core/inc/extensions/import_export/import_export/class-redux-import-export.php

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ class="button-secondary">
8989
class="button-secondary">
9090
<?php esc_html_e( 'Import from URL', 'redux-framework' ); ?>
9191
</a>
92+
93+
<a
94+
href="#"
95+
id="redux-import-upload"
96+
class="button-secondary">
97+
<?php esc_html_e( 'Upload file', 'redux-framework' ); ?>
98+
</a>
99+
<input type="file" id="redux-import-upload-file" multiple size="50" style='display:none;'>
92100
</p>
93101
<div id="redux-import-code-wrapper">
94102
<p class="description" id="import-code-description">
@@ -99,18 +107,18 @@ class="button-secondary">
99107
<textarea
100108
id="import-code-value"
101109
name="<?php echo esc_attr( $this->parent->args['opt_name'] ); ?>[import_code]"
102-
class="large-text no-update" rows="3"></textarea>
110+
class="large-text no-update" rows="2"></textarea>
103111
</div>
104112
<div id="redux-import-link-wrapper">
105113
<p class="description" id="import-link-description">
106114
<?php // phpcs:ignore WordPress.NamingConventions.ValidHookName ?>
107115
<?php echo esc_html( apply_filters( 'redux-import-link-description', esc_html__( 'Input the URL to another sites options set and hit Import to load the options from that site.', 'redux-framework' ) ) ); ?>
108116
</p>
109-
<input
117+
<textarea
110118
class="large-text no-update"
111119
id="import-link-value"
112120
name="<?php echo esc_attr( $this->parent->args['opt_name'] ); ?>[import_link]"
113-
rows="2" />
121+
rows="2"></textarea>
114122
</div>
115123
<p id="redux-import-action">
116124
<input
@@ -138,19 +146,23 @@ class="button-primary"
138146
</div>
139147
<?php $link = admin_url( 'admin-ajax.php?action=redux_download_options-' . $this->parent->args['opt_name'] . '&secret=' . $secret ); ?>
140148
<p>
141-
<button id="redux-export-code-copy" class="button-secondary" data-secret="<?php echo esc_attr( $secret ); ?>" data-copy="<?php esc_attr_e( 'Copy Data', 'redux-framework' ); ?>" data-copied="<?php esc_attr_e( 'Data Copied!', 'redux-framework' ); ?>">
149+
<a data-secret="<?php echo $secret; ?>" id="redux-export-code-copy" class="button-secondary">
142150
<?php esc_html_e( 'Copy Data', 'redux-framework' ); ?>
143-
</button>
151+
</a>
144152
<a href="<?php echo esc_url( $link ); ?>" id="redux-export-code-dl" class="button-primary">
145-
<?php esc_html_e( 'Export File', 'redux-framework' ); ?>
153+
<?php esc_html_e( 'Download Data File', 'redux-framework' ); ?>
146154
</a>
147-
<a href="javascript:void(0);" id="redux-export-link" class="button-secondary" data-copy="<?php esc_attr_e( 'Copy Export URL', 'redux-framework' ); ?>" data-copied="<?php esc_attr_e( 'URL Copied!', 'redux-framework' ); ?>" data-url="<?php echo esc_url( $link ); ?>">
155+
<a href="javascript:void(0);" id="redux-export-link" class="button-secondary">
148156
<?php esc_html_e( 'Copy Export URL', 'redux-framework' ); ?>
149157
</a>
150158
</p>
151159
<p></p>
152-
<textarea class="large-text no-update" id="redux-export-code" rows="1"></textarea>
153-
160+
<textarea class="large-text no-update" id="redux-export-code" rows="2"></textarea>
161+
<textarea
162+
class="large-text no-update"
163+
id="redux-export-link-value"
164+
data-url="<?php echo esc_url( $link ); ?>"
165+
rows="2"><?php echo esc_url( $link ); ?></textarea>
154166
<?php
155167
}
156168

0 commit comments

Comments
 (0)