PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.2.4
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.2.4
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
darkify / admin / ta-framework / fields / backup / backup.php

backup.php in Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) 1.2.4, at admin/ta-framework/fields/backup/backup.php

44 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) {
2 die; } // Cannot access directly.
3 /**
4 *
5 * Field: backup
6 *
7 * @since 1.0.0
8 * @version 1.0.0
9 */
10 if ( ! class_exists( 'DRK_LITE_Field_backup' ) ) {
11 class DRK_LITE_Field_backup extends DRK_LITE_Fields {
12
13 public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14 parent::__construct( $field, $value, $unique, $where, $parent );
15 }
16
17 public function render() {
18
19 $unique = $this->unique;
20 $nonce = wp_create_nonce( 'drk_lite_backup_nonce' );
21 $export = add_query_arg(
22 array(
23 'action' => 'drk_lite-export',
24 'unique' => $unique,
25 'nonce' => $nonce,
26 ),
27 admin_url( 'admin-ajax.php' )
28 );
29
30 echo wp_kses_post( $this->field_before() );
31
32 echo '<textarea name="drk_lite_import_data" class="drk_lite-import-data"></textarea>';
33 echo '<button type="submit" class="button button-primary drk_lite-confirm drk_lite-import" data-unique="' . esc_attr( $unique ) . '" data-nonce="' . esc_attr( $nonce ) . '">' . esc_html__( 'Import', 'darkify' ) . '</button>';
34 echo '<hr />';
35 echo '<textarea readonly="readonly" class="drk_lite-export-data">' . esc_attr( wp_json_encode( get_option( $unique ) ) ) . '</textarea>';
36 echo '<a href="' . esc_url( $export ) . '" class="button button-primary drk_lite-export" target="_blank">' . esc_html__( 'Export & Download', 'darkify' ) . '</a>';
37 echo '<hr />';
38 echo '<button type="submit" name="drk_lite_transient[reset]" value="reset" class="button drk_lite-warning-primary drk_lite-confirm drk_lite-reset" data-unique="' . esc_attr( $unique ) . '" data-nonce="' . esc_attr( $nonce ) . '">' . esc_html__( 'Reset', 'darkify' ) . '</button>';
39
40 echo wp_kses_post( $this->field_after() );
41 }
42 }
43 }
44