Plugin Directory

Changeset 2509050


Ignore:
Timestamp:
04/04/2021 07:48:05 PM (5 years ago)
Author:
zwaply
Message:

Version 3.0.19 released.

Location:
cryptocurrency-prices/trunk
Files:
1 added
16 edited

Legend:

Unmodified
Added
Removed
  • cryptocurrency-prices/trunk/cryptocurrency-prices.php

    r2309580 r2509050  
    11<?php
     2
    23/**
     4
    35 * @package Cryptocurrency All-in-One
     6
    47 */
     8
    59/*
     10
    611Plugin Name: Cryptocurrency All-in-One
     12
    713Plugin URI: https://zwaply.com/
     14
    815Description: Provides multiple cryptocurrency features: accepting payments, displaying prices and exchange rates, cryptocurrency calculator, accepting donations.
    9 Version: 3.0.18
     16
     17Version: 3.0.19
     18
    1019Author: Zwaply
     20
    1121Author URI: https://zwaply.com/
     22
    1223Text Domain: cryprocurrency-prices
     24
    1325Domain Path: /languages/
     26
    1427License: GPL2 or later
     28
    1529*/
     30
    1631if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     32
    1733//define plugin url global
     34
    1835define('CCPS_URL', plugin_dir_url( __FILE__ ));
     36
    1937//include source files
     38
    2039require_once( dirname( __FILE__ ) . '/includes/currencyall.class.php' );
     40
    2141require_once( dirname( __FILE__ ) . '/includes/cryptodonation.class.php' );
     42
    2243require_once( dirname( __FILE__ ) . '/includes/ethereum.class.php' );
     44
    2345require_once( dirname( __FILE__ ) . '/includes/widget.class.php' );
     46
    2447require_once( dirname( __FILE__ ) . '/includes/currencytickerwidget.class.php' );
     48
    2549require_once( dirname( __FILE__ ) . '/includes/common.class.php' );
     50
    2651require_once( dirname( __FILE__ ) . '/includes/cryptocurrency-ajax.php' );
     52
    2753if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
     54
    2855  require_once( dirname( __FILE__ ) . '/includes/admin.class.php' );
     56
    2957    add_action( 'init', array( 'CCPS_Admin', 'init' ) );
     58
    3059}
     60
    3161//define suported shortcodes
     62
    3263add_shortcode( 'allcurrencies', array( 'CCPS_Currency_All', 'cp_all_currencies_shortcode' ) );
     64
    3365add_shortcode( 'cryptodonation', array( 'CCPS_Crypto_Donation', 'cp_cryptodonation_shortcode') );
     66
    3467add_shortcode( 'cryptoethereum', array( 'CCPS_Ethereum', 'cp_ethereum_shortcode' ) );
     68
    3569add_shortcode( 'currencyticker', array( 'CCPS_Ticker_Widget', 'shortcode' ) );
     70
    3671//this plugin requires js libraries
     72
    3773add_action( 'wp_enqueue_scripts', array( 'CCPS_Common', 'cp_load_scripts') );
     74
    3875//handle plugin activation
     76
    3977register_activation_hook( __FILE__, array( 'CCPS_Common', 'cp_plugin_activate') );
     78
    4079//add widget support
     80
    4181add_action('widgets_init', array( 'CCPS_Common', 'cp_widgets_init') );
     82
    4283//add custom stylesheet
     84
    4385add_action('wp_head', array( 'CCPS_Common', 'cp_custom_styles'), 100);
     86
    4487add_action( 'wp_enqueue_scripts', array( 'CCPS_Common', 'cp_enqueue_styles'), 15 );
     88
    4589//add admin stylesheet
     90
    4691add_action( 'admin_enqueue_scripts', array( 'CCPS_Common', 'cp_enqueue_admin_styles'), 15 );
     92
    4793//add translation
     94
    4895add_action('plugins_loaded', array( 'CCPS_Common', 'cp_load_textdomain'));
  • cryptocurrency-prices/trunk/css/cp_dark.css

    r1977635 r2509050  
    11/* table styles */
    22
     3
     4
    35table.cp-table{
    46
     7
     8
    59    margin: 10px 0px 10px 0px;
    610
     11
     12
    713  padding: 0px;
    814
     15
     16
    917  border: 0px;
    1018
     19
     20
    1121  font-size: 16px;
    1222
     23
     24
    1325  line-height: normal;
    1426
     27
     28
    1529  background-color: #111111;
    1630
     31
     32
    1733  color: #eeeeee;
    1834
    19 }
     35
     36
     37}
     38
     39
    2040
    2141table.cp-table tr:nth-child(even) {
    2242
     43
     44
    2345    background-color: #222222;
    2446
    25 }
     47
     48
     49}
     50
     51
    2652
    2753table.cp-table tr:hover {
    2854
     55
     56
    2957    background-color: #000000;
    3058
     59
     60
    3161  color: #ffffff;
    3262
    33 }
     63
     64
     65}
     66
     67
    3468
    3569table.cp-table a{
    3670
     71
     72
    3773  color: #ffffff;
    3874
    39 }
     75
     76
     77}
     78
     79
    4080
    4181table.cp-table td,
    4282
     83
     84
    4385table.cp-table th {
    4486
     87
     88
    4589    border: 0px;
    4690
     91
     92
    4793    padding: 6px 10px 6px 10px;
    4894
    49 }
     95
     96
     97}
     98
     99
    50100
    51101table.cp-table th {
    52102
     103
     104
    53105    padding: 12px 10px 12px 10px;
    54106
     107
     108
    55109  font-weight: bold;
    56110
     111
     112
    57113  background-color: #444444;
    58114
     115
     116
    59117  color: #ffffff;
    60118
    61 }
     119
     120
     121}
     122
     123
    62124
    63125table.cp-table td img {
    64126
     127
     128
    65129    width: 24px;
    66130
    67 }
     131
     132
     133}
     134
     135
    68136
    69137table.cp-table .change-dec {
    70138
     139
     140
    71141  color: #dd4433;
    72142
    73 }
     143
     144
     145}
     146
     147
    74148
    75149table.cp-table .change-inc {
    76150
     151
     152
    77153  color: #009933;
    78154
    79 }
     155
     156
     157}
     158
     159
    80160
    81161table.cp-table button {
    82162
     163
     164
    83165  padding: 0 1.1rem;
    84166
    85 }
     167
     168
     169}
     170
     171
    86172
    87173/* form styles */
    88174
     175
     176
    89177form.cp-form{
    90178
     179
     180
    91181  margin: 10px 0px 10px 0px;
    92182
     183
     184
    93185  padding: 0px;
    94186
     187
     188
    95189  border: 0px;
    96190
     191
     192
    97193  font-size: 18px;
    98194
    99 }
     195
     196
     197}
     198
     199
    100200
    101201form.cp-form table{
    102202
     203
     204
    103205  margin: 0px;
    104206
     207
     208
    105209  padding: 0px;
    106210
     211
     212
    107213  border: 0px;
    108214
    109 }
     215
     216
     217}
     218
     219
    110220
    111221form.cp-form table td,
    112222
     223
     224
    113225form.cp-form table th{
    114226
     227
     228
    115229    border: 0px;
    116230
     231
     232
    117233    padding: 6px 10px 6px 10px;
    118234
    119 }
     235
     236
     237}
     238
     239
    120240
    121241form.cp-form input,
    122242
     243
     244
    123245form.cp-form input:focus,
    124246
     247
     248
    125249form.cp-form input[type="submit"],
    126250
     251
     252
    127253form.cp-form select{
    128254
     255
     256
    129257  display: inline-block;
    130258
     259
     260
    131261  width: auto;
    132262
     263
     264
    133265  padding: 16px 10px 16px 10px;
    134266
     267
     268
    135269  margin: 0px;
    136270
     271
     272
    137273  border: 0px;
    138274
     275
     276
    139277  -webkit-border-radius: 5px;
    140278
     279
     280
    141281  -moz-border-radius: 5px;
    142282
     283
     284
    143285  border-radius: 5px;
    144286
     287
     288
    145289  font-size: 18px;
    146290
     291
     292
    147293  line-height: normal;
    148294
     295
     296
    149297  background-color: #000000;
    150298
     299
     300
    151301  color: #ffffff;
    152302
     303
     304
    153305  box-shadow: none;
    154306
    155 }
     307
     308
     309}
     310
     311
    156312
    157313form.cp-form input[type="submit"]{
    158314
     315
     316
    159317  padding: 16px 20px 16px 20px;
    160318
     319
     320
    161321  background-color: #000000;
    162322
    163 }
     323
     324
     325}
     326
     327
    164328
    165329form.cp-form label{
    166330
     331
     332
    167333  font-size: 18px;
    168334
     335
     336
    169337  color: #111111;
    170338
    171 }
     339
     340
     341}
     342
     343
    172344
    173345form.cp-form-chart{
    174346
     347
     348
    175349  margin: 0px;
    176350
     351
     352
    177353  font-size: 14px;
    178354
    179 }
     355
     356
     357}
     358
     359
    180360
    181361form.cp-form-chart select{
    182362
     363
     364
    183365  padding: 6px 4px 6px 4px;
    184366
     367
     368
    185369  margin: 0px;
    186370
     371
     372
    187373  font-size: 14px;
    188374
    189 }
     375
     376
     377}
     378
     379
    190380
    191381form.cp-form-chart label{
    192382
     383
     384
    193385  font-size: 14px;
    194386
     387
     388
    195389  color: #111111;
    196390
    197 }
     391
     392
     393}
     394
     395
     396
     397
    198398
    199399
     
    201401.cp-ticker-widget{
    202402
     403
     404
    203405  padding: 20px 0px 10px 0px;
    204406
     407
     408
    205409  text-align: center;
    206410
     411
     412
    207413  font-size: 14px;
    208414
     415
     416
    209417  background-color: #000000;
    210418
    211 }
     419
     420
     421}
     422
     423
    212424
    213425.cp-ticker-widget.changes-up{
    214426
     427
     428
    215429  background-color: #008000;
    216430
    217 }
     431
     432
     433}
     434
     435
    218436
    219437.cp-ticker-widget.changes-down{
    220438
     439
     440
    221441  background-color: #ff0000;
    222442
    223 }
     443
     444
     445}
     446
     447
    224448
    225449.cp-ticker-widget .cp-ticker-widget-icon{
    226450
    227 }
     451  text-align: center;
     452
     453}
     454
     455
    228456
    229457.cp-ticker-widget .cp-ticker-widget-icon img{
    230458
     459  display: inline-block;
     460
    231461  max-width: 100%;
    232462
    233 }
     463
     464
     465}
     466
     467
    234468
    235469.cp-ticker-widget .cp-ticker-widget-name{
    236470
     471
     472
    237473  font-size: 24px;
    238474
     475
     476
    239477  font-weight: bold;
    240478
     479
     480
    241481  color: #ffffff;
    242482
    243 }
     483
     484
     485}
     486
     487
    244488
    245489.cp-ticker-widget .cp-ticker-widget-pricing{
    246490
     491
     492
    247493  color: #ffffff;
    248494
    249 }
     495
     496
     497}
     498
     499
    250500
    251501.cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-price{
    252502
     503
     504
    253505  margin-bottom: 10px;
    254506
     507
     508
    255509  font-size: 20px;
    256510
     511
     512
    257513  font-weight: bold;
    258514
    259 }
     515
     516
     517}
     518
     519
    260520
    261521.cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-change .changes-up{
    262522
     523
     524
    263525  color: #0f9d58;
    264526
    265 }
     527
     528
     529}
     530
     531
    266532
    267533.cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-change .changes-down{
    268534
     535
     536
    269537  color: #ff0000;
    270538
    271 }
     539
     540
     541}
     542
     543
    272544
    273545.cp-ticker-widget .cp-ticker-widget-period{
    274546
     547
     548
    275549  border: 1px solid #000000;
    276550
     551
     552
    277553  font-size: 12px;
    278554
    279 }
     555
     556
     557}
  • cryptocurrency-prices/trunk/css/cp_light.css

    r2088812 r2509050  
    11/* table styles */
    22
     3
     4
    35table.cp-table{
    46
     7
     8
    59    margin: 10px 0px 10px 0px;
    610
     11
     12
    713  padding: 0px;
    814
     15
     16
    917  border: 0px;
    1018
     19
     20
    1121  font-size: 16px;
    1222
     23
     24
    1325  line-height: normal;
    1426
     27
     28
    1529  background-color: #ffffff;
    1630
     31
     32
    1733  color: #111111;
    1834
    19 }
     35
     36
     37}
     38
     39
    2040
    2141table.cp-table tr:nth-child(even) {
    2242
     43
     44
    2345    background-color: #f0f0f0;
    2446
    25 }
     47
     48
     49}
     50
     51
    2652
    2753table.cp-table tr:hover {
    2854
     55
     56
    2957    background-color: #ffffff;
    3058
    31   color: #000000;
    32 
    33 }
     59
     60
     61  color: #000000;
     62
     63
     64
     65}
     66
     67
    3468
    3569table.cp-table a{
    3670
    37   color: #000000;
    38 
    39 }
     71
     72
     73  color: #000000;
     74
     75
     76
     77}
     78
     79
    4080
    4181table.cp-table td,
    4282
     83
     84
    4385table.cp-table th {
    4486
     87
     88
    4589    border: 0px;
    4690
     91
     92
    4793    padding: 6px 10px 6px 10px;
    4894
    49 }
     95
     96
     97}
     98
     99
    50100
    51101table.cp-table th {
    52102
     103
     104
    53105    padding: 12px 10px 12px 10px;
    54106
     107
     108
    55109  font-weight: bold;
    56110
     111
     112
    57113  background-color: #dddddd;
    58114
    59   color: #000000;
    60 
    61 }
     115
     116
     117  color: #000000;
     118
     119
     120
     121}
     122
     123
    62124
    63125table.cp-table td img {
    64126
     127
     128
    65129    width: 24px;
    66130
    67 }
     131
     132
     133}
     134
     135
    68136
    69137table.cp-table .change-dec {
    70138
     139
     140
    71141  color: #dd4433;
    72142
    73 }
     143
     144
     145}
     146
     147
    74148
    75149table.cp-table .change-inc {
    76150
     151
     152
    77153  color: #009933;
    78154
    79 }
     155
     156
     157}
     158
     159
    80160
    81161table.cp-table button {
    82162
     163
     164
    83165  padding: 0 1.1rem;
    84166
    85 }
     167
     168
     169}
     170
     171
    86172
    87173table.cp-table a {
     174
    88175  text-decoration: none !important;
     176
    89177  cursor: pointer;
    90 }
     178
     179}
     180
     181
    91182
    92183/* form styles */
    93184
     185
     186
    94187form.cp-form{
    95188
     189
     190
    96191  margin: 10px 0px 10px 0px;
    97192
     193
     194
    98195  padding: 0px;
    99196
     197
     198
    100199  border: 0px;
    101200
     201
     202
    102203  font-size: 18px;
    103204
    104 }
     205
     206
     207}
     208
     209
    105210
    106211form.cp-form table{
    107212
     213
     214
    108215  margin: 0px;
    109216
     217
     218
    110219  padding: 0px;
    111220
     221
     222
    112223  border: 0px;
    113224
    114 }
     225
     226
     227}
     228
     229
    115230
    116231form.cp-form table td,
    117232
     233
     234
    118235form.cp-form table th{
    119236
     237
     238
    120239    border: 0px;
    121240
     241
     242
    122243    padding: 6px 10px 6px 10px;
    123244
    124 }
     245
     246
     247}
     248
     249
    125250
    126251form.cp-form input,
    127252
     253
     254
    128255form.cp-form input:focus,
    129256
     257
     258
    130259form.cp-form input[type="submit"],
    131260
     261
     262
    132263form.cp-form select{
    133264
     265
     266
    134267  display: inline-block;
    135268
     269
     270
    136271  width: auto;
    137272
     273
     274
    138275  padding: 16px 10px 16px 10px;
    139276
     277
     278
    140279  margin: 0px;
    141280
     281
     282
    142283  border: 0px;
    143284
     285
     286
    144287  -webkit-border-radius: 5px;
    145288
     289
     290
    146291  -moz-border-radius: 5px;
    147292
     293
     294
    148295  border-radius: 5px;
    149296
     297
     298
    150299  font-size: 18px;
    151300
     301
     302
    152303  line-height: normal;
    153304
     305
     306
    154307  background-color: #ffffff;
    155308
    156   color: #000000;
     309
     310
     311  color: #000000;
     312
     313
    157314
    158315  box-shadow: none;
    159316
    160 }
     317
     318
     319}
     320
     321
    161322
    162323form.cp-form input[type="submit"]{
    163324
     325
     326
    164327  padding: 16px 20px 16px 20px;
    165328
     329
     330
    166331  background-color: #dddddd;
    167332
    168 }
     333
     334
     335}
     336
     337
    169338
    170339form.cp-form label{
    171340
     341
     342
    172343  font-size: 18px;
    173344
    174   color: #000000;
    175 
    176 }
     345
     346
     347  color: #000000;
     348
     349
     350
     351}
     352
     353
    177354
    178355form.cp-form-chart{
    179356
     357
     358
    180359  margin: 0px;
    181360
     361
     362
    182363  font-size: 14px;
    183364
    184 }
     365
     366
     367}
     368
     369
    185370
    186371form.cp-form-chart select{
    187372
     373
     374
    188375  padding: 6px 4px 6px 4px;
    189376
     377
     378
    190379  margin: 0px;
    191380
     381
     382
    192383  font-size: 14px;
    193384
    194 }
     385
     386
     387}
     388
     389
    195390
    196391form.cp-form-chart label{
    197392
     393
     394
    198395  font-size: 14px;
    199396
    200   color: #000000;
    201 
    202 }
     397
     398
     399  color: #000000;
     400
     401
     402
     403}
     404
     405
     406
     407
    203408
    204409
     
    206411.cp-ticker-widget{
    207412
     413
     414
    208415  padding: 10px 0px 10px 0px;
    209416
     417
     418
    210419  text-align: center;
    211420
     421
     422
    212423  font-size: 14px;
    213424
     425
     426
    214427  background-color: #ffffff;
    215428
    216 }
     429
     430
     431}
     432
     433
    217434
    218435.cp-ticker-widget.changes-up{
    219436
     437
     438
    220439  background-color: #008000;
    221440
    222 }
     441
     442
     443}
     444
     445
    223446
    224447.cp-ticker-widget.changes-down{
    225448
     449
     450
    226451  background-color: #ff0000;
    227452
    228 }
     453
     454
     455}
     456
     457
    229458
    230459.cp-ticker-widget .cp-ticker-widget-icon{
    231460
    232 }
     461  text-align: center;
     462
     463}
     464
     465
    233466
    234467.cp-ticker-widget .cp-ticker-widget-icon img{
    235468
     469  display: inline-block;
     470
    236471  max-width: 100%;
    237472
    238 }
     473
     474
     475}
     476
     477
    239478
    240479.cp-ticker-widget .cp-ticker-widget-name{
    241480
     481
     482
    242483  font-size: 24px;
    243484
     485
     486
    244487  font-weight: bold;
    245488
    246   color: #000000;
    247 
    248 }
     489
     490
     491  color: #000000;
     492
     493
     494
     495}
     496
     497
    249498
    250499.cp-ticker-widget .cp-ticker-widget-pricing{
    251500
    252   color: #000000;
    253 
    254 }
     501
     502
     503  color: #000000;
     504
     505
     506
     507}
     508
     509
    255510
    256511.cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-price{
    257512
     513
     514
    258515  margin-bottom: 10px;
    259516
     517
     518
    260519  font-size: 20px;
    261520
     521
     522
    262523  font-weight: bold;
    263524
    264 }
     525
     526
     527}
     528
     529
    265530
    266531.cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-change .changes-up{
    267532
     533
     534
    268535  color: #008000;
    269536
    270 }
     537
     538
     539}
     540
     541
    271542
    272543.cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-change .changes-down{
    273544
     545
     546
    274547  color: #ff0000;
    275548
    276 }
     549
     550
     551}
     552
     553
    277554
    278555.cp-ticker-widget .cp-ticker-widget-period{
    279556
     557
     558
    280559  border: 1px solid #000000;
    281560
     561
     562
    282563  font-size: 12px;
    283564
    284 }
     565
     566
     567}
  • cryptocurrency-prices/trunk/includes/admin.class.php

    r2309580 r2509050  
    11<?php
     2
    23class CCPS_Admin {
     4
    35  const NONCE = 'cp-admin-settings';
     6
    47  private static $initiated = false;
     8
    59  public static function init() {
     10
    611    if ( ! self::$initiated ) {
     12
    713            self::init_hooks();
     14
    815        }
     16
    917  }
     18
    1019    public static function init_hooks() {
     20
    1121    self::$initiated = true;
     22
    1223    //add admin menu
     24
    1325    add_action( 'admin_menu', array( 'CCPS_Admin', 'register_menu_page' ) );
     26
    1427        add_action( 'admin_init', array( 'CCPS_Admin', 'dismiss_notices' ) );
     28
    1529        add_action( 'admin_notices', array( 'CCPS_Admin', 'admin_notices' ) );
     30
    1631        add_action( 'admin_print_footer_scripts', array( 'CCPS_Admin', 'admin_scripts' ) );
     32
    1733  }
     34
    1835    public static function admin_notices() {
     36
     37        /*
     38
    1939        if ( get_option( 'cryptocurrency-hide-update-notice-3.0.12' ) != true ) {
     40
    2041            ?>
     42
    2143    <div class="notice notice-info is-dismissible">
     44
    2245        <p><?php _e( 'Thanks for updating Cryptocurrency. With this new version, you can now EARN CRYPTO! Rush to <a target="_blank" href="https://zwaply.com/register/">create your Zwaply username</a> and start earning crypto. <a target="_blank" href="https://zwaply.com/zwaply-for-web/">Learn more about Zwaply</a>.', 'cryptocurrency-prices' ); ?></p>
     46
    2347        <p style="margin-bottom:10px;font-size: 8pt;"><a href="<?php echo admin_url( '?action=cryptocurrency-dismiss-update-notice' ); ?>"><?php _e( 'Dismiss notice', 'crypto-coin-ticker' ); ?></a></p>
     48
    2449    </div>
     50
    2551            <?php
     52
    2653        }
    27         if ( get_option( 'cryptocurrency-hide-affiliate-notice' ) != true ) {
     54
     55        */
     56
     57        if ( get_option( 'cryptocurrency-hide-affiliate-notice2' ) != true ) {
     58
    2859            ?>
     60
    2961    <div class="notice notice-info is-dismissible">
    30         <p><?php _e( 'Cryptocurrency Plugin: If you want to get 5% off for a lifetime fees of trades on binance, use this link to signup <a href="https://www.binance.com/en/register?ref=W643BRI2">https://www.binance.com/en/register?ref=W643BRI2</a>.', 'cryptocurrency-prices' ); ?></p>
    31         <p style="margin-bottom:10px;font-size: 8pt;"><a href="<?php echo admin_url( '?action=cryptocurrency-hide-affiliate-notice' ); ?>"><?php _e( 'Dismiss notice', 'crypto-coin-ticker' ); ?></a></p>
     62
     63        <a href="https://accounts.binance.com/en/register?ref=WZH1ARU9"><img src="<?php echo CCPS_URL; ?>images/binance.png" alt="Get 5% off on Binance" style="display: inline-block; float: left; margin: 12px 15px 0px 0px;" /></a>
     64
     65        <p style="font-size: 16px;">
     66
     67           
     68
     69            <?php _e( 'Get 5% off in your commission every time you trade on Binance if you signup with this unique link: <a href="https://accounts.binance.com/en/register?ref=WZH1ARU9">https://accounts.binance.com/en/register?ref=WZH1ARU9</a>.', 'cryptocurrency-prices' ); ?>
     70
     71        </p>
     72
     73        <p style="margin-bottom:10px;font-size: 8pt;"><a href="<?php echo admin_url( '?action=cryptocurrency-hide-affiliate-notice2' ); ?>"><?php _e( 'Dismiss notice', 'crypto-coin-ticker' ); ?></a></p>
     74
    3275    </div>
     76
    3377            <?php
     78
    3479        }
     80
    3581    }
     82
    3683    public static function dismiss_notices() {
     84
     85        /*
     86
    3787        if ( isset( $_GET['action'] ) && 'cryptocurrency-dismiss-update-notice' === $_GET['action'] ) {
     88
    3889            update_option( 'cryptocurrency-hide-update-notice-3.0.12', true );
     90
    3991        }
    40         if ( isset( $_GET['action'] ) && 'cryptocurrency-hide-affiliate-notice' === $_GET['action'] ) {
    41             update_option( 'cryptocurrency-hide-affiliate-notice', true );
     92
     93        */
     94
     95        if ( isset( $_GET['action'] ) && 'cryptocurrency-hide-affiliate-notice2' === $_GET['action'] ) {
     96
     97            update_option( 'cryptocurrency-hide-affiliate-notice2', true );
     98
    4299        }
     100
    43101    }
     102
    44103    public static function admin_scripts() {
     104
    45105        ?>
     106
    46107    <script>
     108
    47109    (function($){
     110
    48111      $('a[href*="zwaply.com/affiliate-login"]').each(function(i,elm){
     112
    49113        var $elm = $(elm);
     114
    50115        if(!$elm.attr('target')){
     116
    51117          $elm.attr('target','_blank');
     118
    52119        }
     120
    53121      })
     122
    54123    })(jQuery)
     124
    55125    </script>
     126
    56127    <?php
     128
    57129    }
     130
    58131  public static function register_menu_page() {
     132
    59133    add_menu_page(
     134
    60135      // __( 'Cyptocurrency All-in-One', 'cryptocurrency' ),
     136
    61137      // __( 'Cyptocurrency', 'cryptocurrency' ),
     138
    62139      __( 'Cyptocurrency', 'cryptocurrency' ),
     140
    63141      __( 'Cyptocurrency', 'cryptocurrency' ),
     142
    64143      'manage_options',
     144
    65145      'settings',
     146
    66147      // array('CCPS_Admin', 'cryptocurrency_prices_admin'),
     148
    67149      array('CCPS_Admin', 'cryptocurrency_prices_admin_settings'),
     150
    68151      CCPS_URL.'images/admin-icon.png',
     152
    69153      81
     154
    70155      // 'settings',
     156
    71157      // __( 'Settings', 'cryptocurrency' ),
     158
    72159      // __( 'Settings', 'cryptocurrency' ),
     160
    73161      // 'manage_options',
     162
    74163      // 'settings',
     164
    75165      // array('CCPS_Admin', 'cryptocurrency_prices_admin_settings')
     166
    76167    );
     168
    77169    add_submenu_page(
     170
    78171      'settings',
     172
    79173      __( 'Help', 'cryptocurrency' ),
     174
    80175      __( 'Help', 'cryptocurrency' ),
     176
    81177      'manage_options',
     178
    82179      'cryptocurrency-prices',
     180
    83181      array('CCPS_Admin', 'cryptocurrency_prices_admin_help')
     182
    84183    );
     184
    85185    add_submenu_page(
     186
    86187      'settings',
     188
    87189      __( 'Crypto Resources', 'cryptocurrency' ),
     190
    88191      __( 'Crypto Resources', 'cryptocurrency' ),
     192
    89193      'manage_options',
     194
    90195      'resources',
     196
    91197      array('CCPS_Admin', 'cryptocurrency_prices_admin_resources')
     198
    92199    );
     200
    93201    // add_submenu_page(
     202
    94203    //   'settings',
     204
    95205    //   __( 'Settings', 'cryptocurrency' ),
     206
    96207    //   __( 'Settings', 'cryptocurrency' ),
     208
    97209    //   'manage_options',
     210
    98211    //   'settings',
     212
    99213    //   array('CCPS_Admin', 'cryptocurrency_prices_admin_settings')
     214
    100215    // );
     216
    101217    global $submenu;
     218
    102219    $url = 'https://zwaply.com/affiliate-login/';
     220
    103221    $submenu['settings'][] = array(__( 'Affiliate Panel', 'cryptocurrency' ), 'manage_options', $url);
     222
    104223    add_submenu_page(
     224
    105225      'settings',
     226
    106227      __( 'Premium and Updates', 'cryptocurrency' ),
     228
    107229      __( 'Premium and Updates', 'cryptocurrency' ),
     230
    108231      'manage_options',
     232
    109233      'premium',
     234
    110235      array('CCPS_Admin', 'cryptocurrency_prices_admin_premium')
     236
    111237    );
     238
    112239  }
     240
    113241  public static function cryptocurrency_prices_admin(){
     242
    114243    //self::cryptocurrency_prices_admin_help();
     244
    115245  }
     246
    116247  public static function cryptocurrency_prices_admin_resources(){
     248
    117249    //check if user has admin capability
     250
    118251    if (current_user_can( 'manage_options' )){
    119       echo '
     252
     253      echo '
     254
    120255      <div class="wrap cryptocurrency-admin">
     256
    121257        <h1>Cyptocurrency Resources:</h1>
     258
    122259        <p>You will find a list of resources, specially selected for the users of Cyptocurrency All-in-One.</p>
     260
    123261        <h2>Buy Bitcoin and other cryptocurrency</h2>
     262
     263        <a href="https://accounts.binance.com/en/register?ref=WZH1ARU9">Get 5% off in your commission every time you trade on Binance if you signup with this unique link: https://accounts.binance.com/en/register?ref=WZH1ARU9</a><br />
     264
    124265        <a href="https://cex.io/r/1/byankov/1">Buy Bitcoin and excnahge it to other cryptocurrency at CEX.IO</a><br />
     266
    125267        <h2>Create Bitcoin and altcoin wallets</h2>
     268
    126269        <a href="https://www.ledgerwallet.com/products/ledger-nano-s">Hardware wallet Ledger Nano S. Very secure but costs money.  Works for receiving donations and payments.</a><br />
     270
    127271        <a href="https://trezor.io/">Hardware wallet TREZOR. Very secure but costs money.  Works for receiving donations and payments.</a><br />
     272
    128273        <a href="https://bitcoin.org/en/download ">Official bitcoin software wallet (hot wallet). Relatively secure. Works for receiving donations and payments.</a><br />
     274
    129275        <a href="https://cex.io/r/0/byankov/0">Exchange site CEX.IO - allows one bitcoin wallet and one wallet for every altcoin. Very easy to use. Works for receiving donations.</a><br />
     276
    130277        <a href="https://yobit.io/?bonus=srtAb">Exchange site YoBit.net - allows one bitcoin wallet and one wallet for every altcoin. Very easy to use. Works for receiving donations.</a><br />
     278
     279        <a href="https://accounts.binance.com/en/register?ref=WZH1ARU9">Get 5% off in your commission every time you trade on Binance if you signup with this unique link: https://accounts.binance.com/en/register?ref=WZH1ARU9</a><br />
     280
    131281        <h2>Trade and exchange cryptocurrency</h2>
     282
    132283        <a href="https://zwaply.com/">Zwaply.com - a trading solution that delivers on top of IM apps. Instant, non-custodial, secure, and private crypto exchange</a><br />
     284
     285        <a href="https://accounts.binance.com/en/register?ref=WZH1ARU9">Get 5% off in your commission every time you trade on Binance if you signup with this unique link: https://accounts.binance.com/en/register?ref=WZH1ARU9</a><br />
     286
    133287        <a href="https://yobit.io/?bonus=srtAb">Exchange with many coins and low fees for trading - YObit.net</a><br />
     288
    134289        <a href="https://cex.io/r/0/byankov/0">Trusted exchange site - CEX.IO</a><br />
     290
    135291        <a href="https://creditstocks.com/cryptocurrency-prices/list-of-all-cryptocurrencies/">List of all cryptocurrencies</a><br />
    136         More trading tools - coming soon<br />
     292
    137293        <h2>Publish cryptocurrency article</h2>
     294
    138295        <a href="https://creditstocks.com/submit-article-creditstocks-com/">Publish cryptocurrency or finance article at CreditStocks.com - free</a><br />
     296
    139297        <a href="http://satoshijournal.com/submit-an-article/">Publish cryptocurrency or finance article at SatochiJournal.com - free</a><br />
     298
    140299        <h2>Cryptocurrency mining</h2>
     300
    141301        <a href="http://www.whattomine.com/">Mining calculator - What to mine</a><br />
     302
    142303        <a href="https://www.cryptocompare.com/mining/calculator/btc">Mining calculator - Bitcoin</a><br />
     304
    143305        <a href="https://www.cryptocompare.com/mining/calculator/eth">Mining calculator - Ethereum</a><br />
     306
    144307        <h2>Development resources</h2>
     308
    145309        <a href="https://github.com/BoyanBorislavovYankov/Blockchain-Payload-Tools">Publish documents, articles and other data forever on Ethereum blockchain</a><br />
     310
    146311        <a href="https://theethereum.wiki/w/index.php/ERC20_Token_Standard">ERC20 - Ethereum token standard</a><br />
     312
    147313        <a href="https://infura.io/">Infura - Open and free to use Ethereum node</a><br />
     314
    148315        <a href="https://coinmarketcap.com/api/">Free data API about cryptocurrencies - CoinMarketCap</a><br />
     316
    149317        <a href="https://www.cryptocompare.com/api/">Free data API about cryptocurrencies - CryptoCompare</a><br />
     318
    150319        <h2>Crypto community</h2>
     320
    151321        <a href="https://web.facebook.com/groups/469221573283979/">Knights of Satoshi - Facebook group</a><br />
     322
    152323        <a href="https://bitcointalk.org/">BitcoinTalk.org - the largest Bitcoin and cryptocurrency forum</a>
     324
    153325        <p><small>* The list is not a recommendation ot the listed services. This is just a list of what we use - you may decide to use them or not at your own risk. Some links may be links to external services, affiliate links, or links that do not work anymore.</small></p>
     326
    154327      </div>
    155       ';
    156     }
     328
     329      ';
     330
     331    }
     332
    157333  }
     334
    158335  public static function cryptocurrency_prices_admin_settings(){
     336
    159337    //check if user has admin capability
     338
    160339    if (current_user_can( 'manage_options' )){
     340
    161341      $admin_message_html = '';
     342
    162343      if (isset($_POST['cryptocurrency-prices-zwaply-affiliate-id'])){
     344
    163345        //check nonce
     346
    164347        check_admin_referer( self::NONCE );
     348
    165349        $sanitized_ethereum_api = sanitize_text_field($_POST['cryptocurrency-prices-zwaply-affiliate-id']);
     350
    166351        update_option('cryptocurrency-prices-zwaply-affiliate-id', $sanitized_ethereum_api);
     352
    167353        $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>';
     354
    168355      }
     356
    169357      if (isset($_POST['cp_coinmarketcap_api_key'])){
     358
    170359        //check nonce
     360
    171361        check_admin_referer( self::NONCE );
     362
    172363        $sanitized_coinmarketcap_api_key = sanitize_text_field($_POST['cp_coinmarketcap_api_key']);
     364
    173365        update_option('cp_coinmarketcap_api_key', $sanitized_coinmarketcap_api_key);
     366
    174367        $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>';
     368
    175369      }
     370
    176371      if (isset($_POST['cryptocurrency-prices-default-css']) and $_POST['cryptocurrency-prices-default-css']!=''){
     372
    177373        //check nonce
     374
    178375        check_admin_referer( self::NONCE );
     376
    179377        $sanitized_cryptocurrency_prices_default_css = sanitize_text_field($_POST['cryptocurrency-prices-default-css']);
     378
    180379        update_option('cryptocurrency-prices-default-css', $sanitized_cryptocurrency_prices_default_css);
     380
    181381        $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>';
     382
    182383      }
     384
    183385      if (isset($_POST['cryptocurrency-prices-show-trade-button'])){
     386
    184387        //check nonce
     388
    185389        check_admin_referer( self::NONCE );
     390
    186391        $show_trade_button = 'yes' === $_POST['cryptocurrency-prices-show-trade-button'] ? 'yes' : 'no';
     392
    187393        update_option('cryptocurrency-prices-show-trade-button', $show_trade_button);
     394
    188395        $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>';
     396
    189397      }
     398
    190399      if (isset($_POST['ethereum-api'])){
     400
    191401        //check nonce
     402
    192403        check_admin_referer( self::NONCE );
     404
    193405        $sanitized_ethereum_api = sanitize_text_field($_POST['ethereum-api']);
     406
    194407        update_option('ethereum-api', $sanitized_ethereum_api);
     408
    195409        $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>';
     410
    196411      }
     412
    197413      if (isset($_POST['cryptocurrency-prices-css'])){
     414
    198415        //check nonce
     416
    199417        check_admin_referer( self::NONCE );
     418
    200419        $sanitized_cryptocurrency_prices_css = sanitize_text_field($_POST['cryptocurrency-prices-css']);
     420
    201421        update_option('cryptocurrency-prices-css', $sanitized_cryptocurrency_prices_css);
     422
    202423        $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>';
     424
    203425      }
     426
    204427      //delete_option( 'cryptocurrency-prices-default-css' ); //remove setting
     428
    205429      $default_css_selected_light = '';
     430
    206431      $default_css_selected_dark = '';
     432
    207433      if (get_option('cryptocurrency-prices-default-css') == 'light'){
     434
    208435        $default_css_selected_light = 'selected="selected"';
     436
    209437      } elseif (get_option('cryptocurrency-prices-default-css') == 'dark'){
     438
    210439        $default_css_selected_dark = 'selected="selected"';
     440
    211441      }
     442
    212443      $show_trade_button_option_yes = '';
     444
    213445      $show_trade_button_option_no = '';
     446
    214447      if (get_option('cryptocurrency-prices-show-trade-button') == 'yes'){
     448
    215449        $show_trade_button_option_yes = 'selected="selected"';
     450
    216451      } elseif (get_option('cryptocurrency-prices-show-trade-button') == 'no'){
     452
    217453        $show_trade_button_option_no = 'selected="selected"';
     454
    218455      }
    219       echo '
     456
     457      echo '
     458
    220459      <div class="wrap cryptocurrency-admin">
     460
    221461        '.$admin_message_html.'
     462
    222463        <h1>Cyptocurrency All-in-One Settings:</h1>
     464
    223465        <h2>Place the widget on your blog:</h2>
     466
    224467        <p>Just paste [allcurrencies] in your Theme, and at the bottom of all your posts.</p>
     468
    225469        <p>This is what you’ll see:</p>
     470
    226471        <img src="'. plugin_dir_url( __FILE__ ) . 'images/screenshot-9.png' .'">
     472
    227473        <br><br>
     474
    228475        <hr>
     476
    229477        <form action="" method="post">
     478
    230479          <h2>Affiliate:</h2>
     480
    231481          <label>Your Zwaply.com username: </label>
     482
    232483          <div style="display: inline-block;">
     484
    233485          <label for="cryptocurrency-prices-zwaply-affiliate-id">
     486
    234487            <input class="cryptocurrency-prices-zwaply-affiliate-id" id="cryptocurrency-prices-zwaply-affiliate-id" name="cryptocurrency-prices-zwaply-affiliate-id" type="text" value="'.get_option('cryptocurrency-prices-zwaply-affiliate-id').'">
     488
    235489          </label>
     490
    236491          <span><span class="description"><a href="https://zwaply.com/register/" target="_blank">Get yours here to start earning crypto</a></span></span>
     492
    237493          </div>
     494
    238495          <!--
     496
    239497          <h2>CoinMarketCap Api:</h2>
     498
    240499          <p>
     500
    241501            Our plugin uses Coingecko\'s API (www.coingecko.com). If you\'d like to use CoinMarketCap\'s API, please register for a free api key here <a href="https://pro.coinmarketcap.com/" target="_blank">https://pro.coinmarketcap.com</a>  and save the key in the Settings page.
     502
    242503          </p>
     504
    243505          <label>Your free CoinMarketCap API key: </label>
     506
    244507          <div style="display: inline-block;">
     508
    245509          <label for="cp_coinmarketcap_api_key">
     510
    246511            <input class="cp_coinmarketcap_api_key" id="cp_coinmarketcap_api_key" name="cp_coinmarketcap_api_key" type="text" value="'.get_option('cp_coinmarketcap_api_key').'">
     512
    247513          </label>
     514
    248515          </div>
     516
    249517          -->
     518
    250519          <h2>Design:</h2>
     520
    251521          <label>Show Trade button: </label>
     522
    252523          <select name="cryptocurrency-prices-show-trade-button">
     524
    253525            <option value="yes" '.$show_trade_button_option_yes.'>Yes</option>
     526
    254527            <option value="no" '.$show_trade_button_option_no.'>No</option>
     528
    255529          </select>
     530
    256531          <p></p>
     532
    257533          <label>Use default design (includes default CSS): </label>
     534
    258535          <select name="cryptocurrency-prices-default-css">
     536
    259537            <option value="0">no</option>
     538
    260539            <option value="light" '.$default_css_selected_light.'>light</option>
     540
    261541            <option value="dark" '.$default_css_selected_dark.'>dark</option>
     542
    262543          </select>
     544
    263545          <p>Write your custom CSS code here to style the plugin. Check the <a href="https://wordpress.org/support/plugin/cryptocurrency-prices/" target="_blank">support forum</a> for examples.</p>
     546
    264547          <textarea name="cryptocurrency-prices-css" rows="5" cols="50">'.get_option('cryptocurrency-prices-css').'</textarea>
     548
    265549          <!--<h2>Ethereum blockchain node API URL:</h2>
     550
    266551          <p>You need to set it up, if you will use the ethereum blockchain features. Example URLs http://localhost:8545 for your own node or register for a public node https://mainnet.infura.io/[your key].</p>
     552
    267553          <input type="text" name="ethereum-api" value="'.get_option('ethereum-api').'" /> -->
     554
    268555          <br /><br />
     556
    269557          '.wp_nonce_field( self::NONCE ).'       
     558
    270559          <input type="submit" value="Save options" />
     560
    271561        </form>
     562
    272563        <br />
     564
    273565        <h4>
     566
    274567        P.S. IF YOU WANT TO GET 5% OFF FOR A LIFETIME FEES OF TRADES ON BINANCE, USE THIS LINK TO SIGNUP: <a href="https://www.binance.com/en/register?ref=W643BRI2">https://www.binance.com/en/register?ref=W643BRI2</a>
     568
    275569        </h4>
     570
    276571      </div>
    277       ';
    278     }
     572
     573      ';
     574
     575    }
     576
    279577  }
     578
    280579  public static function cryptocurrency_prices_admin_premium(){
     580
    281581    echo '
     582
    282583    <div class="wrap cryptocurrency-admin">
     584
    283585    <h1>Cyptocurrency All-in-One Premium Version and Updates::</h1>
     586
    284587    ';
     588
    285589    echo '
     590
    286591    <h2>Get premium version</h2>
     592
    287593    <p>The premium version has a lot more features than the free version + free support. To get the premium version visit this page <a href="https://creditstocks.com/cryptocurrency-one-wordpress-plugin/">https://creditstocks.com/cryptocurrency-one-wordpress-plugin/</a><p>
     594
    288595    <h2>Premium version updates</h2>
     596
    289597    <p>The premium version of the plugin is constantly updated. Updates include new features, improvements of existing features and security improvements. It is highly recommended that you keep your plugin updated.</p>
     598
    290599    <p>Premium version updates are manual. To check your current version, visit the <a href="plugins.php" target="_blank">Plugins page</a>. To purchase updates, visit the plugin web site: <a href="https://creditstocks.com/cryptocurrency-one-wordpress-plugin/" target="_blank">https://creditstocks.com/cryptocurrency-one-wordpress-plugin/</a></p>
     600
    291601    ';
     602
    292603    echo '
     604
    293605    </div>
     606
    294607    ';
     608
    295609  }
     610
    296611  public static function cryptocurrency_prices_admin_help(){
     612
    297613    //set the active tab
     614
    298615    $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'exchange';
     616
    299617    echo '
     618
    300619    <div class="wrap cryptocurrency-admin">
     620
    301621      <h1>Cyptocurrency All-in-One Help:</h1>
     622
    302623    ';
     624
    303625    echo '
     626
    304627      <h2 class="nav-tab-wrapper">
     628
    305629          <a href="?page=cryptocurrency-prices&tab=exchange" class="nav-tab">Exchange rates</a>
     630
    306631          <a href="?page=cryptocurrency-prices&tab=calculator" class="nav-tab">Calculator</a>
     632
    307633          <a href="?page=cryptocurrency-prices&tab=candlestick_chart" class="nav-tab">Price chart</a>
     634
    308635          <a href="?page=cryptocurrency-prices&tab=ticker_widget" class="nav-tab">Ticker widget</a>
     636
    309637          <a href="?page=cryptocurrency-prices&tab=list_cryptocurrencies" class="nav-tab">List all cryptocurrencies</a>
     638
    310639          <a href="?page=cryptocurrency-prices&tab=orders_payments" class="nav-tab">Orders, payments</a>
     640
    311641          <a href="?page=cryptocurrency-prices&tab=donations" class="nav-tab">Donations</a>
     642
    312643          <a href="?page=cryptocurrency-prices&tab=ethereum" class="nav-tab">Ethereum Node</a>
     644
    313645          <a href="?page=cryptocurrency-prices&tab=others" class="nav-tab">Other features</a>
     646
    314647      </h2>
     648
    315649    ';
     650
    316651    if ($active_tab == 'exchange'){
    317       echo '
     652
     653      echo '
     654
    318655        <h2>To display cryptocurrency exchange rates (premium version only):</h2>
     656
    319657        <p>To show cryptocurrency prices, add a shortcode to the text of the pages or posts where you want the cryptocurrency prices to apperar. Exapmle shortcodes:</p>
     658
    320659        [currencyprice currency1="btc" currency2="usd,eur,ltc,eth,jpy,gbp,chf,aud,cad"]<br />
     660
    321661        [currencyprice currency1="ltc" currency2="usd,eur,btc"]
     662
    322663        <p>You can also call the prices from the theme like this:</p>
     664
    323665        '.htmlspecialchars('<?php echo do_shortcode(\'[currencyprice currency1="btc" currency2="usd,eur"]\'); ?>').'
     666
    324667        <p>Most cryptocurrencies are supported and the major ones also have icons: Bitcoin BTC, Ethereum ETH, XRP, DASH, LTC, ETC, XMR, XEM, REP, MAID, PIVX, GNT, DCR, ZEC, STRAT, BCCOIN, FCT, STEEM, WAVES, GAME, DOGE, ROUND, DGD, LISK, SNGLS, ICN, BCN, XLM, BTS, ARDR, 1ST, PPC, NAV, XCP, NXT, LANA. Partial suport for over 1000 cryptocurrencies. Fiat currencies conversion supported: AUD, USD, CAD, GBP, EUR, CHF, JPY, CNY.</p>
     668
    325669        <p><a href="https://creditstocks.com/cryptocurrency-prices/current-litecoin-price/" target="_blank">Live demo</a></p>
    326       ';
    327     }
     670
     671      ';
     672
     673    }
     674
    328675    if ($active_tab == 'calculator'){
    329       echo '
     676
     677      echo '
     678
    330679        <h2>To display cryptocurrency calculator (premium version only):</h2>
     680
    331681        <p>To show cryptocurrency calculator, add a shortcode to the text of the pages or posts where you want the calculator prices to apperar. Exapmle shortcodes:</p>
     682
    332683        [currencycalculator currency1="btc" currency2="usd,eur,ltc,eth,jpy,gbp,chf,aud,cad"]<br />
     684
    333685        [currencycalculator currency1="ltc" currency2="usd,eur,btc"]
     686
    334687        <p>You can also call the calculator from the theme like this:</p>
     688
    335689        '.htmlspecialchars('<?php echo do_shortcode(\'[currencycalculator currency1="btc" currency2="usd,eur"]\'); ?>').'
     690
    336691        <p>Most cryptocurrencies are supported and the major ones also have icons: Bitcoin BTC, Ethereum ETH, XRP, DASH, LTC, ETC, XMR, XEM, REP, MAID, PIVX, GNT, DCR, ZEC, STRAT, BCCOIN, FCT, STEEM, WAVES, GAME, DOGE, ROUND, DGD, LISK, SNGLS, ICN, BCN, XLM, BTS, ARDR, 1ST, PPC, NAV, XCP, NXT, LANA. Partial suport for over 1000 cryptocurrencies. Fiat currencies conversion supported: AUD, USD, CAD, GBP, EUR, CHF, JPY, CNY.</p>
     692
    337693        <p><a href="https://creditstocks.com/cryptocurrency-prices/current-litecoin-price/" target="_blank">Live demo</a></p>
    338       ';
    339     }
     694
     695      ';
     696
     697    }
     698
    340699    if ($active_tab == 'candlestick_chart'){
    341       echo '
     700
     701      echo '
     702
    342703        <h2>To display cryptocurrency candlestick price chart (premium version only):</h2>
     704
    343705        <p>To show cryptocurrency candlestick chart graphic, add a shortcode to the text of the pages or posts where you want the chart to apperar. Set the cryptocurrency that you want on the chart as currency1 and the base currency as currency2. Supported periods are 1hour, 24hours, 7days, 30days, 1year. Exapmle shortcodes:</p>
     706
    344707        [currencychart currency1="btc" currency2="usd"]<br />
     708
    345709        [currencychart currency1="dash" currency2="btc" defaultperiod="1year"]
     710
    346711        <p>You can also call the chart from the theme like this:</p>
     712
    347713        '.htmlspecialchars('<?php echo do_shortcode(\'[currencychart currency1="btc" currency2="usd"]\'); ?>').'
     714
    348715        <p><a href="https://creditstocks.com/cryptocurrency-prices/current-bitcoin-price/" target="_blank">Live demo</a></p>
    349       ';
    350     }
     716
     717      ';
     718
     719    }
     720
    351721    if ($active_tab == 'ticker_widget'){
    352       echo '
     722
     723      echo '
     724
    353725        <h2>Cryptocurrency ticker widget - a badge with the logo, price, and 24h change of one cryptocurrency:</h2>
     726
    354727        <p>To show the cryptocurrency ticker widget go to Appearance / Widgets and add the widget to the widget area where you want it to appear. Set the cryptocurrency you wan to show - for example BTC. Or add the following shortcode to the text of the pages or posts where you want the widget to appear. Exapmle shortcodes:</p>
     728
    355729        [currencyticker currency="eth"]<br />
     730
    356731        <p><a href="https://creditstocks.com/cryptocurrency-prices/current-bitcoin-price/" target="_blank">Live demo</a></p>
    357       ';
    358     }
     732
     733      ';
     734
     735    }
     736
    359737    if ($active_tab == 'list_cryptocurrencies'){
    360       echo '
     738
     739      echo '
     740
    361741        <h2>To display a list of all cryptocurrencies</h2>
     742
    362743        <p>Add a shortcode to the text of the pages or posts where you want to display CoinMarketCap style list of all cryptocurrencies. The list is paginated, sortable, searchable. The shortcode supports selecting the base currency for showing the prices, default is USD. You can set the total number of cryptocurrencies (default 500), the cryptocurrencies per page (default 100), the number format locale. Exapmle shortcodes:</p>
     744
    363745        [allcurrencies]<br />
     746
    364747        [allcurrencies basecurrency="eur"]<br />
     748
    365749        [allcurrencies limit="100" perpage="10"]<br />
     750
    366751        [allcurrencies basecurrency="eur" locale="de-DE"]
     752
    367753        <p>You can also call the list from the theme like this:</p>
     754
    368755        '.htmlspecialchars('<?php echo do_shortcode(\'[allcurrencies]\'); ?>').'
     756
    369757        <p><a href="https://creditstocks.com/cryptocurrency-prices/list-of-all-cryptocurrencies/" target="_blank">Live demo</a></p>
    370       ';
    371     }
     758
     759      ';
     760
     761    }
     762
    372763    if ($active_tab == 'orders_payments'){
    373       echo '
     764
     765      echo '
     766
    374767        <h2>To accept cryptocurrency orders and payments (premium version only):</h2>
     768
    375769        <p>Supported currencies for payments are:</p>
     770
    376771        <ul>
     772
    377773          <li>Bitcoin (BTC) (default),</li>
     774
    378775          <li>Ethereum (ETH),</li>
     776
    379777          <li>Litecoin (LTC),</li>
     778
    380779          <li>Bitcoin Cash (BCH),</li>
     780
    381781          <li>Zcash (ZEC).</li>
     782
    382783        </ul>
     784
    383785        <p>
     786
    384787          Open the plugin settings and under "Payment settings" fill in your BTC (or other cryptocurrency) wallet addresses to receive payments and an email for receiving payment notifications.<br /> 
     788
    385789          The plugin does not store your wallet\'s private keys. It uses one of the addresses from the provided list for every payment, by rotating all addresses and starting over from the first one. The different addresses are used to idenfiry if a specific payment has been made. You must provide enough addresses - more than the number of payments you will receive a day. <br />
     790
    386791          Add a shortcode to the text of the pages or posts where you want to accept payments (typically these pages would contain a product or service that you are offering). The amount may be in BTC (default), Ethereum (ETH), Litecon (LTC) or in fiat currency (USD, EUR, etc), which will be converted it to the selected cryptocurrency.<br />
     792
    387793          Exapmle shortcodes:
     794
    388795        </p>
     796
    389797        [cryptopayment item="Advertising services" amount="0.003" currency="BTC"]<br />
     798
    390799        [cryptopayment item="Publish a PR article" amount="50 USD" currency="BTC"]<br />
     800
    391801        [cryptopayment item="Publish a PR article" amount="10 EUR" currency="ETH"]
     802
    392803        <p><a href="https://creditstocks.com/payment-demo/" target="_blank">Live demo</a></p>
    393       ';
    394     }
     804
     805      ';
     806
     807    }
     808
    395809    if ($active_tab == 'donations'){
    396       echo '
     810
     811      echo '
     812
    397813        <h2>To accept cryptocurrency donations:</h2>
     814
    398815        <p>Add a shortcode to the text of the pages or posts where you want to accept donations. Supported currencies are:</p>
     816
    399817        <ul>
     818
    400819          <li>Bitcoin (BTC) (default),</li>
     820
    401821          <li>Ethereum (ETH),</li>
     822
    402823          <li>Litecoin (LTC),</li>
     824
    403825          <li>Monero (XMR),</li>
     826
    404827          <li>Bitcoin Cash (BCH),</li>
     828
    405829          <li>Zcash (ZEC).</li>
     830
    406831        </ul>
     832
    407833        <p>Exapmle shortcodes (do not forget to put your wallet address):</p>
     834
    408835        [cryptodonation address="1ABwGVwbna6DnHgPefSiakyzm99VXVwQz9"]<br />
     836
    409837        [cryptodonation address="0xc85c5bef5a9fd730a429b0e04c69b60d9ef4c64b" currency="eth"]<br />
     838
    410839        [cryptodonation address="463tWEBn5XZJSxLU6uLQnQ2iY9xuNcDbjLSjkn3XAXHCbLrTTErJrBWYgHJQyrCwkNgYvyV3z8zctJLPCZy24jvb3NiTcTJ" paymentid="a1be1fb24f1e493eaebce2d8c92dc68552c165532ef544b79d9d36d1992cff07" currency="xmr"]
     840
    411841        <p>You can also call the donations from the theme like this:</p>
     842
    412843        '.htmlspecialchars('<?php echo do_shortcode(\'[cryptodonation address="1ABwGVwbna6DnHgPefSiakyzm99VXVwQz9"]\'); ?>').'
     844
    413845        <p><a href="https://creditstocks.com/donate/" target="_blank">Live demo</a></p>
    414       ';
    415     }
     846
     847      ';
     848
     849    }
     850
    416851    if ($active_tab == 'ethereum'){
    417       echo '
     852
     853      echo '
     854
    418855        <h2>Ethereum node integration:</h2>
     856
    419857        <p>Currently supported features are: check Ethereum address balance, view ethereum block. Before using the shortcodes you need to fill in your Ethereum node API URL in the plugin settings (http://localhost:8545 or a public node at infura.io). Exapmle shortcodes:</p>
     858
    420859        [cryptoethereum feature="balance"]<br />
     860
    421861        [cryptoethereum feature="block"]
     862
    422863        <p>Notice: Beware mixed content browser restriction! If your web site uses https, the node must also use https.</p>
     864
    423865        <p><a href="https://creditstocks.com/ethereum/" target="_blank">Live demo</a></p>
    424       ';
    425     }
     866
     867      ';
     868
     869    }
     870
    426871    if ($active_tab == 'others'){
    427       echo '
     872
     873      echo '
     874
    428875        <h2>Instructions to use the plugin in a widget:</h2>
     876
    429877        <p>To use the plugin in a widget, use the provided "CP Shortcode Widget" and put the shortcode in the "Content" section, for example:</p>
     878
    430879        [currencyprice currency1="btc" currency2="usd,eur"]
    431       ';
    432     }
     880
     881      ';
     882
     883    }
     884
    433885    echo '   
     886
    434887    </div>
     888
    435889    ';
     890
    436891  }
     892
    437893}
  • cryptocurrency-prices/trunk/includes/currencytickerwidget.class.php

    r2305243 r2509050  
    11<?php
    22
     3
     4
    35class CCPS_Ticker_Widget extends WP_Widget {
    46
    57
    68
     9
     10
     11
     12
    713    public function __construct() {
    814
     15
     16
    917        $widget_ops = array('classname' => 'cp_ticker_widget', 'description' => __('Shows cryptocurrency ticker.', 'cryptocurrency'));
    1018
     19
     20
    1121        parent::__construct('cp_ticker_widget', __('CP Ticker Widget', 'cryptocurrency'), $widget_ops);
    1222
     23
     24
    1325    }
    1426
    1527
    1628
     29
     30
     31
     32
    1733    public function widget( $args, $instance ) {
    1834
     35
     36
    1937        $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
    2038
     39
     40
    2141       
    2242
     43
     44
    2345        $currency = strtolower(trim($instance['currency']));
    2446
     47
     48
    2549        echo $args['before_widget'];
    2650
     51
     52
    2753        if ( ! empty( $title ) ) {
    2854
     55
     56
    2957            echo $args['before_title'] . $title . $args['after_title'];
    3058
     59
     60
    3161        } ?>
    3262
     63
     64
    3365            <div class="textwidget">
    3466
     67
     68
    3569        <?php
    3670
     71
     72
    3773          echo self::get_badge($currency);
    3874
     75
     76
    3977        ?>
    4078
     79
     80
    4181      </div>
    4282
     83
     84
    4385        <?php
    4486
     87
     88
    4589        echo $args['after_widget'];
    4690
     91
     92
    4793    }
    4894
    4995
    5096
     97
     98
     99
     100
    51101    public function update( $new_instance, $old_instance ) {
    52102
     103
     104
    53105        $instance = $old_instance;
    54106
     107
     108
    55109        $instance['title'] = strip_tags($new_instance['title']);
    56110
     111
     112
    57113        $instance['currency'] =  $new_instance['currency'];
    58114
     115
     116
    59117        return $instance;
    60118
     119
     120
    61121    }
    62122
    63123
    64124
     125
     126
     127
     128
    65129    public function form( $instance ) {
    66130
     131
     132
    67133        $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) );
    68134
     135
     136
    69137        $title = strip_tags($instance['title']);
    70138
     139
     140
    71141        $currency = esc_textarea($instance['currency']);
    72142
     143
     144
    73145    ?>
    74146
     147
     148
    75149        <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'cryptocurrency'); ?></label>
    76150
     151
     152
    77153        <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
    78154
    79155
    80156
     157
     158
     159
     160
    81161        <p><label for="<?php echo $this->get_field_id( 'text' ); ?>"><?php _e( 'Cryptocurrency (i.e BTC):', 'cryptocurrency' ); ?></label>
    82162
     163
     164
    83165        <input class="widefat" id="<?php echo $this->get_field_id('currency'); ?>" name="<?php echo $this->get_field_name('currency'); ?> type="text" value="<?php echo esc_attr($currency); ?>" /></p>
    84166
     167
     168
    85169    <?php
    86170
     171
     172
    87173    }
    88174
     175
     176
    89177 
    90178
     179
     180
    91181  function get_badge($currency){
    92182
     183
     184
    93185     
    94186
     187
     188
    95189    $html = '
    96190
     191
     192
    97193      <div class="cp-ticker-widget" id="cp-ticker-widget-'.$currency.'">
    98194
     195
     196
    99197        <div class="cp-ticker-widget-name">Loading data...</div>
    100198
     199
     200
    101201      </div>
    102 CCPS_URL
     202
     203
     204
    103205      <script type="text/javascript">
    104206
     207
     208
    105209        loadTicker(); //load ticker initially
    106210
    107         setInterval(loadTicker, 3000);  //update ticker initially periodically
     211
     212
     213        setInterval(loadTicker, 30000);  //update ticker initially periodically
     214
     215
    108216
    109217       
    110218
     219
     220
    111221        function loadTicker(){
    112222
     223
     224
    113225          //get data
    114226
     227
     228
    115229          var apiUrl = \'https://api.coincap.io/v2/assets\';
    116230
     231
     232
    117233          jQuery.get( apiUrl, function( dataCurrencies ) {
    118234
     235
     236
    119237            //console.log(dataCurrencies);
    120238
     239
     240
    121241            console.log("Data loaded");
    122242
     243
     244
    123245 
    124246
     247
     248
    125249            var currency = \''.$currency.'\';
    126250
     251
     252
    127253 
    128254
     255
     256
    129257            //find currency
    130258
     259
     260
    131261            for (var currencyId in dataCurrencies.data) {
    132262
     263
     264
    133265              var data = dataCurrencies.data[currencyId];
    134266
     267
     268
    135269             
    136270
     271
     272
    137273              if (data.symbol == currency.toUpperCase()){
    138274
     275
     276
    139277                //currency found
    140278
     279
     280
    141281               
    142282
     283
     284
    143285                var currencyName = data.name;
    144286
     287
     288
    145289                var currencySymbol = data.symbol;
    146290
     291
     292
    147293                var currency_price = parseFloat(data.priceUsd);
    148294
     295
     296
    149297                if (currency_price > 10){
    150298
     299
     300
    151301                  var currency_price_string = currency_price.toFixed(2);
    152302
     303
     304
    153305                } else {
    154306
     307
     308
    155309                  var currency_price_string = currency_price.toFixed(8);
    156310
     311
     312
    157313                }
    158314
     315
     316
    159317                var currency_percent_change_24h = parseFloat(data.changePercent24Hr).toFixed(2);
    160318
     319
     320
    161321                if (currency_percent_change_24h > 0){
    162322
     323
     324
    163325                  var currency_change_24h_color = \'changes-up\';
    164326
     327
     328
    165329                  var currency_change_24h_symbol = \'&#8679;\';
    166330
     331
     332
    167333                } else {
    168334
     335
     336
    169337                  var currency_change_24h_color = \'changes-down\';
    170338
     339
     340
    171341                  var currency_change_24h_symbol = \'&#8681;\';
    172342
     343
     344
    173345                }
    174346
     347
     348
    175349                var lastPrice = jQuery(\'#cp-ticker-widget-\'+currency+\' .cp-ticker-widget-pricing-price span\').html();
    176350
     351
     352
    177353                if (lastPrice !== undefined){
    178354
     355
     356
    179357                  //console.log(lastPrice + \' \' + currency_price_string);
    180358
     359
     360
    181361                  if (currency_price_string > lastPrice){
    182362
     363
     364
    183365                    jQuery(\'#cp-ticker-widget-\'+currency).toggleClass(\'changes-up\');
    184366
     367
     368
    185369                    setTimeout(function(){ jQuery(\'#cp-ticker-widget-\'+currency).toggleClass(\'changes-up\') }, 300);
    186370
     371
     372
    187373                  } else if (currency_price_string < lastPrice){
    188374
     375
     376
    189377                    jQuery(\'#cp-ticker-widget-\'+currency).toggleClass(\'changes-down\');
    190378
     379
     380
    191381                    setTimeout(function(){ jQuery(\'#cp-ticker-widget-\'+currency).toggleClass(\'changes-down\') }, 300);                 
    192382
     383
     384
    193385                  }
    194386
     387
     388
    195389                }
    196390
     391
     392
    197393               
    198394
     395
     396
    199397                var tickerHtml = \'\'+
    200398
     399
     400
    201401                \'<div class="cp-ticker-widget-icon">\'+
    202402
     403
     404
    203405                  \'<img src="'.CCPS_URL.'images/coins128x128/\'+currencySymbol.toLowerCase()+\'.png" alt="\'+data.name+\'">\'+
    204406
     407
     408
    205409                \'</div>\'+
    206410
     411
     412
    207413                \'<div class="cp-ticker-widget-name">\'+currencyName+\'</div>\'+
    208414
     415
     416
    209417                \'<div class="cp-ticker-widget-pricing">\'+
    210418
     419
     420
    211421                  \'<div class="cp-ticker-widget-pricing-price">\'+
    212422
     423
     424
    213425                    \'<i class="fa fa-usd" aria-hidden="true"></i>\'+
    214426
     427
     428
    215429                    \'<span>\'+currency_price_string+\'</span>\'+
    216430
     431
     432
    217433                  \'</div>\'+
    218434
     435
     436
    219437                  \'<div class="cp-ticker-widget-pricing-change">\'+
    220438
     439
     440
    221441                    \'<span class="\'+currency_change_24h_color+\'">\'+
    222442
     443
     444
    223445                      \'\'+currency_change_24h_symbol+\' \'+currency_percent_change_24h+\'%\'+
    224446
     447
     448
    225449                    \'</span>\'+
    226450
     451
     452
    227453                    \' <span class="cp-ticker-widget-period">24H</span>\'+
    228454
     455
     456
    229457                  \'</div>\'+
    230458
     459
     460
    231461                \'</div>\';
    232462
     463
     464
    233465                       
    234466
     467
     468
    235469                jQuery(\'#cp-ticker-widget-\'+currency).html(tickerHtml);
    236470
     471
     472
    237473              }
    238474
     475
     476
    239477            }
    240478
     479
     480
    241481          });
    242482
     483
     484
    243485       
    244486
     487
     488
    245489        }
    246490
     491
     492
    247493      </script>
    248494
     495
     496
    249497    ';
    250498
     499
     500
    251501   
    252502
     503
     504
    253505    return $html;
    254506
     507
     508
    255509  }
    256510
     511
     512
    257513 
    258514
     515
     516
    259517  public function shortcode( $atts ){
    260518
     519
     520
    261521    if (isset($atts['currency']) and $atts['currency']!=''){
    262522
     523
     524
    263525      $currency = $atts['currency'];
    264526
     527
     528
    265529    } else {
    266530
     531
     532
    267533      $currency = 'btc';
    268534
     535
     536
    269537    }
    270538
    271539
    272540
     541
     542
     543
     544
    273545    $html = self::get_badge($currency);
    274546
     547
     548
    275549 
    276550
     551
     552
    277553    return $html;
    278554
     555
     556
    279557  }
    280558
     559
     560
    281561}
  • cryptocurrency-prices/trunk/index.php

    r1866217 r2509050  
    11<?php
     2
    23// Silence is golden.
     4
  • cryptocurrency-prices/trunk/readme.txt

    r2309580 r2509050  
    11=== Cryptocurrency All-in-One ===
    22
     3
     4
    35Contributors: Zwaply
     6
    47Donate link: https://zwaply.com/
    5 Tags: bitcoin, cryptocurrency, bitcoin, ethereum, ripple, exchange, prices, rates, trading, payments, orders, token, btc, eth, etc, ltc, zec, xmr, ppc, dsh, candlestick, usd, eur
     8
     9Tags: crypto, crypto price, crypto currencies, crypto ticker, bitcoin, binance, crypto plugin, cryptocurrency plugin, crypto ticker plugin, bitcoin price, ethereum price, btc price
     10
    611Requires at least: 3.0
    7 Tested up to: 5.4.1
    8 Stable tag: 3.0.18
     12
     13Tested up to: 5.7.0
     14
     15Stable tag: 3.0.19
     16
    917Requires PHP: 5.6.39
     18
    1019License: GPLv2 or later
     20
    1121License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1222
     23
     24
    1325Cryptocurrency features: displaying prices and exchange rates, candlestick price chart, calculator, accepting orders and payments, accepting donations.
    1426
     27
     28
    1529== Description ==
    1630
     31
     32
    1733Update: Finally bloggers can earn crypto with their blogs! In our recent update you’ll see a Trade button next to a crypto currency. When your readers make a crypto-to-crypto exchange, you’ll make a commission (50% of what we make) in the receiving coin.
    1834
     35
     36
    1937Because we’re deep believers in the crypto revolution, we’re working around the clock to bring to life new widgets and creative formats to help bloggers like you make lots of crypto.
    2038
     39
     40
    2141Signup to create your affiliate account at Zwaply (https://zwaply.com/register) and place your username in your admin panel. That’s it.
    2242
     43
     44
    2345P.S. If you don’t want to earn crypto, just remove the Trade button from the Settings page.
    2446
     47
     48
    2549Notice: From major version 3.0 some of the old features are only available in the premium version. [Get premium now](https://creditstocks.com/cryptocurrency-one-wordpress-plugin/)
    2650
     51
     52
    2753= Cryptocurrency All-in-One free version features: =
    2854
    29 * coin market cap - list of all cryptocurrencies with prices and market capitalization,
     55
     56
     57* coin market cap - list of all cryptocurrencies with prices and option to earn crypto,
     58
     59
    3060
    3161* cryptocurrency ticker widget and shortcode - a live update badge with the logo, price, and 24h change of one cryptocurrency,
    3262
     63
     64
    3365* accept donations: Bitcoin (BTC), Ethereum (ETH), Litecon (LTC), Monero (XMR), Bitcoin Cash (BCH), Zcash (ZEC),
    3466
     67
     68
    3569* cyptocurrency resources - helpful resources list in your WordPress admin,
    3670
     71
     72
    3773* Ethereum node support: address balance, view block,
    3874
     75
     76
    3977* custom designs themes: light, dark, and option to write your own CSS.
    4078
     79
     80
    4181* plugin translations: German, Italian, .pot file provided.
    4282
     83
     84
    4385= Cryptocurrency All-in-One premium version features: =
    4486
     87
     88
    4589* all free version features plus:
    4690
     91
     92
     93* coin market cap – full features,
     94
     95
     96
    4797* easily accept orders and payments: Bitcoin (BTC), Ethereum (ETH), Litecon (LTC), Bitcoin Cash (BCH), Zcash (ZEC),
    4898
     99
     100
    49101* display prices and exchange rates (all cryptocurrencies),
    50102
     103
     104
    51105* cryptocurrency to fiat calculator (all cryptocurrencies),
    52106
     107
     108
    53109* display candlestick price charts (all cryptocurrencies),
    54110
     111
     112
    55113[Get premium now](https://creditstocks.com/cryptocurrency-one-wordpress-plugin/)
    56114
     115
     116
    57117= Instructions to display a "Coin Market Capitalization" list of all cryptocurrencies on your web site. =
    58118
     119
     120
    59121Add a shortcode to the text of the pages or posts where you want to display CoinMarketCap style list of all cryptocurrencies. The list is paginated, sortable, searchable. The shortcode supports selecting the base currency for showing the prices, default is USD. You can set the total number of cryptocurrencies (default 500), the cryptocurrencies per page (default 100), the number format locale. Exapmle shortcodes:
    60122
     123
     124
    61125`[allcurrencies]`
    62126
     127
     128
    63129`[allcurrencies basecurrency="eur"]`
    64130
     131
     132
    65133`[allcurrencies limit="100" perpage="10"]`
    66134
     135
     136
    67137`[allcurrencies basecurrency="eur" locale="de-DE"]`
    68138
     139
     140
    69141[Live demo](https://creditstocks.com/cryptocurrency-prices/list-of-all-cryptocurrencies/)
    70142
     143
     144
    71145= Instructions to display a "Cryptocurrency ticker widget" on your web site. =
    72146
     147
     148
    73149Cryptocurrency ticker widget - a live update badge with the logo, price, and 24h change of one cryptocurrency. To show the cryptocurrency ticker widget go to Appearance / Widgets and add the widget to the widget area where you want it to appear. Set the cryptocurrency you wan to show - for example BTC. Or add the following shortcode to the text of the pages or posts where you want the widget to appear. Exapmle shortcodes:
    74150
     151
     152
    75153`[currencyticker currency="eth"]`
    76154
     155
     156
    77157= Instructions to accept cryptocurrency orders and payments on your web site. (Premium version only) =
    78158
     159
     160
    79161Supported currencies for payments are: Bitcoin (BTC) (default), Ethereum (ETH), Litecoin (LTC), Bitcoin Cash (BCH), Zcash (ZEC). No middleman - works with any wallet, no exchange or API required and no extra fees. High security - the plugin does not store your wallet's private keys, captcha support.
    80162
     163
     164
    81165Setup: Open the plugin settings and under "Payment settings" fill in your BTC (or other cryptocurrency) wallet addresses to receive payments and an email for receiving payment notifications. The plugin uses one of the addresses from the provided list of addresses for every payment, by rotating all of them and starting over from the first one. The different addresses are used to idenfiry if a specific payment has been made. You must provide enough addresses - more than the number of payments you will receive a day. Add a shortcode to the text of the pages or posts where you want to accept payments (typically these pages would contain a product or service that you are offering). The amount may be in BTC (default), altcoins or in fiat currency (USD, EUR, etc), which will be converted it to the selected cryptocurrency. You can also setup the form for GDPR compliance in the plugin settings.
    82166
     167
     168
    83169Exapmle shortcodes:
    84170
     171
     172
    85173`[cryptopayment item="Advertising services" amount="0.003" currency="BTC"]`
    86174
     175
     176
    87177`[cryptopayment item="Publish a PR article" amount="50 USD" currency="BTC"]`
    88178
     179
     180
    89181`[cryptopayment item="Publish a PR article" amount="10 EUR" currency="ETH"]`
    90182
     183
     184
    91185[Live demo](https://creditstocks.com/payment-demo/)
    92186
     187
     188
    93189= Instructions to accept cryptocurrency donations on your web site. =
    94190
     191
     192
    95193Add a shortcode to the text of the pages or posts where you want to accept donations.
    96194
     195
     196
    97197Supported currencies are: Bitcoin (BTC) (default), Ethereum (ETH), Litecoin (LTC), Bitcoin Cash (BCH), Monero (XMR), Zcash (ZEC). Exapmle shortcodes (do not forget to put your wallet address):
    98198
     199
     200
    99201`[cryptodonation address="1ABwGVwbna6DnHgPefSiakyzm99VXVwQz9"]`
    100202
     203
     204
    101205`[cryptodonation address="0xc85c5bef5a9fd730a429b0e04c69b60d9ef4c64b" currency="eth"]`
    102206
     207
     208
    103209`[cryptodonation address="463tWEBn5XZJSxLU6uLQnQ2iY9xuNcDbjLSjkn3XAXHCbLrTTErJrBWYgHJQyrCwkNgYvyV3z8zctJLPCZy24jvb3NiTcTJ" paymentid="a1be1fb24f1e493eaebce2d8c92dc68552c165532ef544b79d9d36d1992cff07" currency="xmr"]`
    104210
     211
     212
    105213[Live demo](https://creditstocks.com/donate/)
    106214
     215
     216
    107217= Instructions to display cryptocurrency exchange rates in a nicely formatted table. (Premium version only) =
    108218
     219
     220
    109221To show cryptocurrency prices, add a shortcode to the text of the pages or posts where you want the cryptocurrency prices to apperar. Exapmle shortcodes:
    110222
     223
     224
    111225`[currencyprice currency1="btc" currency2="usd,eur,ltc,eth,jpy,gbp,chf,aud,cad"]`
    112226
     227
     228
    113229`[currencyprice currency1="ltc" currency2="usd,eur,btc"]`
    114230
     231
     232
    115233Most cryptocurrencies are supported and the major ones also have icons: Bitcoin BTC, Ethereum ETH, XRP, DASH, LTC, ETC, XMR, XEM, REP, MAID, PIVX, GNT, DCR, ZEC, STRAT, BCCOIN, FCT, STEEM, WAVES, GAME, DOGE, ROUND, DGD, LISK, SNGLS, ICN, BCN, XLM, BTS, ARDR, 1ST, PPC, NAV, NXT, LANA. Fiat currencies conversion supported: AUD, USD, CAD, GBP, EUR, CHF, JPY, CNY.
    116234
     235
     236
    117237[Live demo](https://creditstocks.com/cryptocurrency-prices/current-litecoin-price/)
    118238
     239
     240
    119241= Instructions to display cryptocurrency calculator. (Premium version only) =
    120242
     243
     244
    121245To show cryptocurrency calculator, add a shortcode to the text of the pages or posts where you want the calculator prices to apperar. Exapmle shortcodes:
    122246
     247
     248
    123249`[currencycalculator currency1="btc" currency2="usd,eur,ltc,eth,jpy,gbp,chf,aud,cad"]`
    124250
     251
     252
    125253`[currencycalculator currency1="ltc" currency2="usd,eur,btc"]`
    126254
     255
     256
    127257Most cryptocurrencies are supported and the major ones also have icons: Bitcoin BTC, Ethereum ETH, XRP, DASH, LTC, ETC, XMR, XEM, REP, MAID, PIVX, GNT, DCR, ZEC, STRAT, BCCOIN, FCT, STEEM, WAVES, GAME, DOGE, ROUND, DGD, LISK, SNGLS, ICN, BCN, XLM, BTS, ARDR, 1ST, PPC, NAV, NXT, LANA. Partial suport for over 1000 cryptocurrencies. Fiat currencies conversion supported: AUD, USD, CAD, GBP, EUR, CHF, JPY, CNY.
    128258
     259
     260
    129261[Live demo](https://creditstocks.com/cryptocurrency-prices/current-litecoin-price/)
    130262
     263
     264
    131265= Instructions to display cryptocurrency candlestick price chart (Premium version only) =
    132266
     267
     268
    133269To show cryptocurrency candlestick chart graphic, add a shortcode to the text of the pages or posts where you want the chart to apperar. Set the cryptocurrency that you want on the chart as currency1 and the base currency as currency2. Supported periods are 1hour, 24hours, 7days, 30days, 1year. Exapmle shortcodes:
    134270
     271
     272
    135273`[currencychart currency1="btc" currency2="usd"]`
    136274
     275
     276
    137277`[currencychart currency1="dash" currency2="btc" defaultperiod="1year"]`
    138278
     279
     280
    139281[Live demo](https://creditstocks.com/cryptocurrency-prices/current-bitcoin-price/)
    140282
     283
     284
    141285= Instructions for Ethereum node integration =
    142286
     287
     288
    143289Currently supported features are: check Ethereum address balance, view ethereum block. Before using the shortcodes you need to fill in your Ethereum node API URL in the plugin settings (http://localhost:8545 or a public node at infura.io). Exapmle shortcodes:
    144290
     291
     292
    145293`[cryptoethereum feature="balance"]`
    146294
     295
     296
    147297`[cryptoethereum feature="block"]`
    148298
     299
     300
    149301Notice: Beware mixed content browser restriction! If your web site uses https, the node must also use https.
    150302
     303
     304
    151305[Live demo](https://creditstocks.com/ethereum/)
    152306
     307
     308
    153309= Instructions to use the plugin in a widget or from the theme =
    154310
     311
     312
    155313To use the plugin in a widget, use the provided "CP Shortcode Widget" and put the shortcode in the "Content" section.
    156314
     315
     316
    157317You can also call all plugin features directly from the theme - see the plugin settings page for PHP samples.
    158318
     319
     320
    159321This plugin uses data from third party public APIs. By installing this plugin you agree with their terms:
    160322
     323
     324
    161325For free and premium versions: [CoinCap.io Public API](https://docs.coincap.io/) - no API key required.
    162326
     327
     328
    163329For premium version only: [CryptoCompare Public API](https://www.cryptocompare.com/api/) - no API key required, [Google Charts API](https://developers.google.com/chart/terms).
    164330
     331
     332
    165333Special thanks to: Boyan Yankov, Emil Samsarov, theox89, Wayne M.
    166334
     335
     336
    167337[Publish your documents on Ethereum blockchain](https://github.com/BoyanBorislavovYankov/Blockchain-Payload-Tools)
    168338
     339
     340
    169341== Installation ==
    170342
     343
     344
    1713451. Unzip the `cryptocurrency-prices.zip` folder.
    172346
     347
     348
    1733492. Upload the `cryptocurrency-prices` folder to your `/wp-content/plugins` directory.
    174350
     351
     352
    1753533. In your WordPress dashboard, head over to the *Plugins* section.
    176354
     355
     356
    1773574. Activate *Cryptocurrency Prices*.
    178358
     359
     360
    179361== Frequently Asked Questions ==
    180362
     363
     364
    181365= Can I show the plugin from the theme code or from another plugin? =
    182366
     367
     368
    183369Yes. You can use a PHP code, which handles and shows the plugin shortcode - see the plugin settings page for PHP sample.
    184370
     371
     372
    185373= Can I show the plugin in a widget? =
    186374
     375
     376
    187377Yes! Use the provided "CP Shortcode Widget" and put the shortcode in the "Content" section, for example: [currencyprice currency1="btc" currency2="usd,eur"].
    188378
     379
     380
    189381= The plugin does not work - I just see the shortcode? =
    190382
     383
     384
    191385Make sure you have activated the plugin. Try to add the shortcode to a page to see if it works. If you use a widget - add the shortcode in the widget provided by the plugin. If you call the plugin from the theme, make sure the code is integrated correctly. Make sure you paste the shortcode as plain text or in text mode, otherwise you may copy and paste invisible html code together with it. 
    192386
     387
     388
    193389= Why yhe design / layout / styles are broken or look bad? =
    194390
     391
     392
    195393Make sure you paste the shortcode as plain text or in text mode, otherwise you may copy and paste invisible html code together with it. Try with the default theme, maybe there is an issue with the theme. Try to enable / disable the styles from the plugin admin.
    196394
     395
     396
    197397= The plugin does not work - I see no data or an error message? =
    198398
     399
     400
    199401Try to activate compatibility mode from the plugin settings. It may be due to data provider server downtime.
    200402
     403
     404
    201405= How to style the plugin? / I don't like the design? =
    202406
     407
     408
    203409This plugin is provided with design styles that you can set in the admin. You can also write CSS code for custom styles - use the "Custom design" field in the plugin settings.
    204410
     411
     412
    205413= Can the plugin cache the data? =
    206414
     415
     416
    207417The plugin itself does not cache the data. But it is compatible with caching plugins.   
    208418
     419
     420
    209421== Screenshots ==
    210422
     423
     424
    211425== Changelog ==
    212426
     427
     428
    213429= 3.0.18 =
    214430
     431
     432
    215433* Back to live
     434
    216435* Backend messages updates.
    217436
     437
     438
    218439= 3.0.17 =
    219440
     441
     442
    220443* Bugfixes and minor improvements.
    221444
     445
     446
    222447= 3.0.16 =
    223448
     449
     450
    224451* Bugfixes and minor improvements.
    225452
     453
     454
    226455= 3.0.15 =
    227456
     457
     458
    228459* Bugfixes and minor improvements. We changed our API to api.coincap.io.
    229460
     461
     462
    230463= 3.0.14 =
    231464
     465
     466
    232467* We changed our API to Coingecko.com.
    233468
     469
     470
    234471* Fixed some reported bugs on the trade coin URL.
    235472
     473
     474
    236475= 3.0.13 =
    237476
     477
     478
    238479* CoinMarketCap Public API changed to the Professional API v2
    239480
     481
     482
    240483= 3.0.12 =
    241484
     485
     486
    242487* Some style changes.
    243488
     489
     490
    244491* Added coin trade option via Zwaply.com
    245492
     493
     494
    246495= 3.0.11 =
    247496
     497
     498
    248499* Bugfixes. Plugin developer changed.
    249500
     501
     502
    250503= 3.0.10 =
    251504
     505
     506
    252507* Added live update feature for cryptocurrency ticker widget.
    253508
     509
     510
    254511= 3.0.9 =
    255512
     513
     514
    256515* Coin market cap list is now responsive. Added ticker widget shortcode. Updated list of cryptocurrency resources. Other minor improvements.
    257516
     517
     518
    258519= 3.0.8 =
    259520
     521
     522
    260523* Added cryptocurrency ticker widget feature that supports bitcoin and almost all altcoins. Improved coin image library.
    261524
     525
     526
    262527= 3.0.7 =
    263528
     529
     530
    264531* Bugfixes.
    265532
     533
     534
    266535= 3.0.6 =
    267536
     537
     538
    268539* Bugfixes and minor improvements.
    269540
     541
     542
    270543= 3.0.5 =
    271544
     545
     546
    272547* Added support of BCH (Bictoin Cash) payments and donations. Added default period parameter support to currencychart shortcode. Improved coin market cap list of cryptocurrencies.
    273548
     549
     550
    274551= 3.0.4 =
    275552
     553
     554
    276555* Added Cyptocurrency Resources in plugin admin. Improved list of currencies "allcurrencies".
    277556
     557
     558
    278559= 3.0.3 =
    279560
     561
     562
    280563* Added GDPR compliance of the payment form. Added more settings to "allcurrencies"" shortcode. Improved help section and readme.
    281564
     565
     566
    282567= 3.0.2 =
    283568
     569
     570
    284571* Improved CoinMarketCap list of currencies. Added CSS styles to the free version.
    285572
     573
     574
    286575= 3.0.1 =
    287576
     577
     578
    288579* Added volume to price chart. Added admin help to free version.
    289580
     581
     582
    290583= 3.0 =
    291584
     585
     586
    292587* Refactored plugin to use CoinMarketCap API. Created free plugin version again. Features that rely on CryptoCompare API moved to premium version.
    293588
     589
     590
    294591= 2.7 =
    295592
     593
     594
    296595* Refactored "allcurrencies" shortcode - coin market cap view with pagination, sorting, search. Discontinied the free plugin version, offered only as a premium plugin.
    297596
     597
     598
    298599= 2.6.4 =
    299600
     601
     602
    300603* Added DataTables support for the "allcurrencies" shortcode - pagination, sorting, search.
    301604
     605
     606
    302607= 2.6.3 =
    303608
     609
     610
    304611* Added captcha support for payments.
    305612
     613
     614
    306615= 2.6.2 =
    307616
     617
     618
    308619* Bugfixes. Added feature for ZCash (ZEC) payments in the premium version.
    309620
     621
     622
    310623= 2.6.1 =
    311624
     625
     626
    312627* Bugfixes. Added feature for altcoin payments in the premium version (ETH, LTC).
    313628
     629
     630
    314631= 2.6 =
    315632
     633
     634
    316635* Many improvements. Free and premium plugin versions.
    317636
     637
     638
    318639= 2.5.5 =
    319640
     641
     642
    320643* Added default CSS.
    321644
     645
     646
    322647= 2.5.4 =
    323648
     649
     650
    324651* Fixed bugs. Improved plugin styling capabilities.
    325652
     653
     654
    326655= 2.5.3 =
    327656
     657
     658
    328659* Plugin is now translatable. German translation is provided. Minor improvements.
    329660
     661
     662
    330663= 2.5.2 =
    331664
     665
     666
    332667* Added support of parameters for [allcurrencies] shortcode.
    333668
     669
     670
    334671= 2.5.1 =
    335672
     673
     674
    336675* Added support for Ethereum block viewer by connecting to an Ethereum blockchain node. Other minor improvements.
    337676
     677
     678
    338679= 2.5 =
    339680
     681
     682
    340683* Added Ethereum blockchain node support with web3.js. Removed Counterparty support. Bugfixes.
    341684
     685
     686
    342687= 2.4.5 =
    343688
     689
     690
    344691* Improved cryptocurrency payments: amount can be specified in fiat currency, multiple payment forms supported on single page, orders can be deleted.  Added a feature for accepting donations in Litecon (LTC), Monero (XMR), Zcash (ZEC).
    345692
     693
     694
    346695= 2.4.4 =
    347696
     697
     698
    348699* Added a feature for accepting donations in Ethereum (ETH). Improved help section.
    349700
     701
     702
    350703= 2.4.3 =
    351704
     705
     706
    352707* Bugfixes and improvements of the payments module. Some code rewritten in OOP.
    353708
     709
     710
    354711= 2.4.2 =
    355712
     713
     714
    356715* Minor improvements of the payments module.
    357716
     717
     718
    358719= 2.4.1 =
    359720
     721
     722
    360723* Minor improvements.
    361724
     725
     726
    362727= 2.4 =
    363728
     729
     730
    364731* Added a basic feature for accepting payments in BTC.
    365732
     733
     734
    366735= 2.3.4 =
    367736
     737
     738
    368739* Added support for multiple charts per page. Added Bitcoin Cash (BCC / BCH) cryptocurrency with its icons supported.
    369740
     741
     742
    370743= 2.3.3 =
    371744
     745
     746
    372747* Added 30 more cryptocurrencies with their icons supported: dgb, iot, btcd, xpy, prc, craig, xbs, ybc, dank, give, kobo, geo, ac, anc, arg, aur, bitb, blk, xmy, moon, sxc, qtl, btm, bnt, cvc, pivx, ubq, lenin, bat, plbt
    373748
     749
     750
    374751= 2.3.2 =
    375752
     753
     754
    376755* Added feature to support custom CSS. Fixed minor bugs.
    377756
     757
     758
    378759= 2.3.1 =
    379760
     761
     762
    380763* Added feature to show only calculator or prices table. Added compatibility mode for servers without CURL support. Fixed minor bugs.
    381764
     765
     766
    382767= 2.3 =
    383768
     769
     770
    384771* Changed plugin name. Added better widget support. Improved plugin administration. Improved readme.
    385772
     773
     774
    386775= 2.2 =
    387776
     777
     778
    388779* Added coins list feature. Improved plugin code architecture.
    389780
     781
     782
    390783= 2.1.1 =
    391784
     785
     786
    392787* Improved price formatting and support of currencies with smaller prices. Added Lana coin icon.
    393788
     789
     790
    394791= 2.1 =
    395792
     793
     794
    396795* Added cryptocurrency charts feature. Added icons for many currencies: GBP, JPY, XRP, DASH, ZEC, etc.
    397796
     797
     798
    398799= 2.0 =
    399800
     801
     802
    400803* Major release with many new features: more cryptocurrencies, fiat currencies support, cryptocurrency donations support, counterparty assets explorer support. The new version is backward compatible - you need to update!
    401804
     805
     806
    402807= 1.1 =
    403808
     809
     810
    404811* Bugs fixed - you need to update.
    405812
     813
     814
    406815= 1.0 =
    407816
     817
     818
    408819* Plugin released.  Everything is new!
    409820
     821
     822
    410823== Upgrade Notice ==
    411824
     825
     826
    412827= 3.0.14 =
    413828
     829
     830
    414831We changed our API to Coingecko.com.
    415832
     833
     834
    416835Fixed some reported bugs on the trade coin URL.
Note: See TracChangeset for help on using the changeset viewer.