-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsymbol-wallet-9.php
83 lines (80 loc) · 3.2 KB
/
symbol-wallet-9.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/*
Plugin Name: Symbol Wallet 9
Description: A simple symbol wallet with SSS Extension.
Author: curupo
Version: 0.1
*/
// Description
function admin_description()
{
echo '<h1>Symbol Wallet</h1>';
echo '<h2 class="h-margin">Usage</h2>';
echo '<blockquote>';
echo '<li><a href="https://www.google.com/chrome/">Google Chrome</a> and <a href="https://chrome.google.com/webstore/detail/sss-extension/llildiojemakefgnhhkmiiffonembcan">SSS extention</a> must be installed.</li>';
echo '<li>Register your wallet address.</li>';
echo "<li>Allow your site's domain. On the SSS Extention options screen.</li>";
echo '</blockquote>';
echo '<h2 class="h-margin">My Wallet</h2>';
echo '<div class="wrapper">';
echo ' <div class="account-card">';
echo ' <h2>Account Info</h2>';
echo ' <div class="container">';
echo ' <div>Address :</div>';
echo ' <div id="wallet-addr"></div>';
echo ' </div>';
echo ' <div class="container">';
echo ' <div id="wallet-xym"></div>';
echo ' </div>';
echo ' </div>';
echo ' <div class="sender-card">';
echo ' <h2>Send</h2>';
echo ' <div class="textfiled-wrapper">';
echo ' <div class="label">To : </div>';
echo ' <input type="text" id="form-addr" value="" />';
echo ' </div>';
echo ' <div class="textfiled-wrapper">';
echo ' <div class="label">Amount : <b></b></div>';
echo ' <input type="range" min="0" step="0.1" id="form-amount" />';
echo ' </div>';
echo ' <div class="textfiled-wrapper">';
echo ' <div class="label">Message : </div>';
echo ' <input type="text" id="form-message" />';
echo ' </div>';
echo ' <div class="textfiled-wrapper">';
echo ' <div class="label">';
echo ' <input type="button" onclick="handleSSS();" value="Sign with SSS"/>';
echo ' </div>';
echo ' </div>';
echo ' </div>';
echo '</div>';
echo '<div class="wrapper">';
echo ' <div class="tx-card">';
echo ' <h2>Transactions</h2>';
echo ' <div id="wallet-transactions"></div>';
echo ' </div>';
echo '</div>';
echo '<script type="text/javascript" src="https://xembook.github.io/nem2-browserify/symbol-sdk-pack-1.0.3.js"></script>';
echo '<script type="text/javascript" src="' . get_site_url() . '/wp-content/plugins/symbol-wallet-9/script.js"></script>';
echo '<link rel="stylesheet" href="' . get_site_url() . '/wp-content/plugins/symbol-wallet-9/style.css" type="text/css">';
echo '<h3 class="h-margin">Donate</h3>';
echo '<p>Donations are welcome.</p>';
echo '<blockquote>';
echo '<li>Developer: <a href="https://github.com/curupo">curupo</a></li>';
echo '<li>Wallet Address XYM to: NDAREPDYNBXQECIIOW7QDMESDDMA6NARURCR6KA</li>';
echo '</blockquote>';
}
// Wordpress Admin Menu
function symbol_wallet_9_setup_menu()
{
add_menu_page(
__('Symbol Wallet Plugin', 'textdomain'), // Page title
'Symbol Wallet', // Menu title
'manage_options',
'symbol-wallet-9', // Menu slug
'admin_description', // Execute eunction
'dashicons-shield-alt', // Menu icon
30 // Menu display position
);
}
add_action('admin_menu', 'symbol_wallet_9_setup_menu');