Changeset 2509051
- Timestamp:
- 04/04/2021 07:53:58 PM (5 years ago)
- Location:
- cryptocurrency-prices/trunk
- Files:
-
- 7 edited
-
cryptocurrency-prices.php (modified) (1 diff)
-
css/cp_dark.css (modified) (1 diff)
-
css/cp_light.css (modified) (1 diff)
-
includes/admin.class.php (modified) (1 diff)
-
includes/currencytickerwidget.class.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cryptocurrency-prices/trunk/cryptocurrency-prices.php
r2509050 r2509051 1 1 <?php 2 3 2 /** 4 5 3 * @package Cryptocurrency All-in-One 6 7 4 */ 8 9 5 /* 10 11 6 Plugin Name: Cryptocurrency All-in-One 12 13 7 Plugin URI: https://zwaply.com/ 14 15 8 Description: Provides multiple cryptocurrency features: accepting payments, displaying prices and exchange rates, cryptocurrency calculator, accepting donations. 16 17 9 Version: 3.0.19 18 19 10 Author: Zwaply 20 21 11 Author URI: https://zwaply.com/ 22 23 12 Text Domain: cryprocurrency-prices 24 25 13 Domain Path: /languages/ 26 27 14 License: GPL2 or later 28 29 15 */ 30 31 16 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 32 33 17 //define plugin url global 34 35 18 define('CCPS_URL', plugin_dir_url( __FILE__ )); 36 37 19 //include source files 38 39 20 require_once( dirname( __FILE__ ) . '/includes/currencyall.class.php' ); 40 41 21 require_once( dirname( __FILE__ ) . '/includes/cryptodonation.class.php' ); 42 43 22 require_once( dirname( __FILE__ ) . '/includes/ethereum.class.php' ); 44 45 23 require_once( dirname( __FILE__ ) . '/includes/widget.class.php' ); 46 47 24 require_once( dirname( __FILE__ ) . '/includes/currencytickerwidget.class.php' ); 48 49 25 require_once( dirname( __FILE__ ) . '/includes/common.class.php' ); 50 51 26 require_once( dirname( __FILE__ ) . '/includes/cryptocurrency-ajax.php' ); 52 53 27 if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) { 54 55 28 require_once( dirname( __FILE__ ) . '/includes/admin.class.php' ); 56 57 29 add_action( 'init', array( 'CCPS_Admin', 'init' ) ); 58 59 30 } 60 61 31 //define suported shortcodes 62 63 32 add_shortcode( 'allcurrencies', array( 'CCPS_Currency_All', 'cp_all_currencies_shortcode' ) ); 64 65 33 add_shortcode( 'cryptodonation', array( 'CCPS_Crypto_Donation', 'cp_cryptodonation_shortcode') ); 66 67 34 add_shortcode( 'cryptoethereum', array( 'CCPS_Ethereum', 'cp_ethereum_shortcode' ) ); 68 69 35 add_shortcode( 'currencyticker', array( 'CCPS_Ticker_Widget', 'shortcode' ) ); 70 71 36 //this plugin requires js libraries 72 73 37 add_action( 'wp_enqueue_scripts', array( 'CCPS_Common', 'cp_load_scripts') ); 74 75 38 //handle plugin activation 76 77 39 register_activation_hook( __FILE__, array( 'CCPS_Common', 'cp_plugin_activate') ); 78 79 40 //add widget support 80 81 41 add_action('widgets_init', array( 'CCPS_Common', 'cp_widgets_init') ); 82 83 42 //add custom stylesheet 84 85 43 add_action('wp_head', array( 'CCPS_Common', 'cp_custom_styles'), 100); 86 87 44 add_action( 'wp_enqueue_scripts', array( 'CCPS_Common', 'cp_enqueue_styles'), 15 ); 88 89 45 //add admin stylesheet 90 91 46 add_action( 'admin_enqueue_scripts', array( 'CCPS_Common', 'cp_enqueue_admin_styles'), 15 ); 92 93 47 //add translation 94 95 48 add_action('plugins_loaded', array( 'CCPS_Common', 'cp_load_textdomain')); -
cryptocurrency-prices/trunk/css/cp_dark.css
r2509050 r2509051 1 1 /* table styles */ 2 3 4 5 2 table.cp-table{ 6 7 8 9 3 margin: 10px 0px 10px 0px; 10 11 12 13 4 padding: 0px; 14 15 16 17 5 border: 0px; 18 19 20 21 6 font-size: 16px; 22 23 24 25 7 line-height: normal; 26 27 28 29 8 background-color: #111111; 30 31 32 33 9 color: #eeeeee; 34 35 36 37 10 } 38 39 40 41 11 table.cp-table tr:nth-child(even) { 42 43 44 45 12 background-color: #222222; 46 47 48 49 13 } 50 51 52 53 14 table.cp-table tr:hover { 54 55 56 57 15 background-color: #000000; 58 59 60 61 16 color: #ffffff; 62 63 64 65 17 } 66 67 68 69 18 table.cp-table a{ 70 71 72 73 19 color: #ffffff; 74 75 76 77 20 } 78 79 80 81 21 table.cp-table td, 82 83 84 85 22 table.cp-table th { 86 87 88 89 23 border: 0px; 90 91 92 93 24 padding: 6px 10px 6px 10px; 94 95 96 97 25 } 98 99 100 101 26 table.cp-table th { 102 103 104 105 27 padding: 12px 10px 12px 10px; 106 107 108 109 28 font-weight: bold; 110 111 112 113 29 background-color: #444444; 114 115 116 117 30 color: #ffffff; 118 119 120 121 31 } 122 123 124 125 32 table.cp-table td img { 126 127 128 129 33 width: 24px; 130 131 132 133 34 } 134 135 136 137 35 table.cp-table .change-dec { 138 139 140 141 36 color: #dd4433; 142 143 144 145 37 } 146 147 148 149 38 table.cp-table .change-inc { 150 151 152 153 39 color: #009933; 154 155 156 157 40 } 158 159 160 161 41 table.cp-table button { 162 163 164 165 42 padding: 0 1.1rem; 166 167 168 169 43 } 170 171 172 173 44 /* form styles */ 174 175 176 177 45 form.cp-form{ 178 179 180 181 46 margin: 10px 0px 10px 0px; 182 183 184 185 47 padding: 0px; 186 187 188 189 48 border: 0px; 190 191 192 193 49 font-size: 18px; 194 195 196 197 50 } 198 199 200 201 51 form.cp-form table{ 202 203 204 205 52 margin: 0px; 206 207 208 209 53 padding: 0px; 210 211 212 213 54 border: 0px; 214 215 216 217 55 } 218 219 220 221 56 form.cp-form table td, 222 223 224 225 57 form.cp-form table th{ 226 227 228 229 58 border: 0px; 230 231 232 233 59 padding: 6px 10px 6px 10px; 234 235 236 237 60 } 238 239 240 241 61 form.cp-form input, 242 243 244 245 62 form.cp-form input:focus, 246 247 248 249 63 form.cp-form input[type="submit"], 250 251 252 253 64 form.cp-form select{ 254 255 256 257 65 display: inline-block; 258 259 260 261 66 width: auto; 262 263 264 265 67 padding: 16px 10px 16px 10px; 266 267 268 269 68 margin: 0px; 270 271 272 273 69 border: 0px; 274 275 276 277 70 -webkit-border-radius: 5px; 278 279 280 281 71 -moz-border-radius: 5px; 282 283 284 285 72 border-radius: 5px; 286 287 288 289 73 font-size: 18px; 290 291 292 293 74 line-height: normal; 294 295 296 297 75 background-color: #000000; 298 299 300 301 76 color: #ffffff; 302 303 304 305 77 box-shadow: none; 306 307 308 309 78 } 310 311 312 313 79 form.cp-form input[type="submit"]{ 314 315 316 317 80 padding: 16px 20px 16px 20px; 318 319 320 321 81 background-color: #000000; 322 323 324 325 82 } 326 327 328 329 83 form.cp-form label{ 330 331 332 333 84 font-size: 18px; 334 335 336 337 85 color: #111111; 338 339 340 341 86 } 342 343 344 345 87 form.cp-form-chart{ 346 347 348 349 88 margin: 0px; 350 351 352 353 89 font-size: 14px; 354 355 356 357 90 } 358 359 360 361 91 form.cp-form-chart select{ 362 363 364 365 92 padding: 6px 4px 6px 4px; 366 367 368 369 93 margin: 0px; 370 371 372 373 94 font-size: 14px; 374 375 376 377 95 } 378 379 380 381 96 form.cp-form-chart label{ 382 383 384 385 97 font-size: 14px; 386 387 388 389 98 color: #111111; 390 391 392 393 99 } 394 395 396 397 398 399 400 401 100 .cp-ticker-widget{ 402 403 404 405 101 padding: 20px 0px 10px 0px; 406 407 408 409 102 text-align: center; 410 411 412 413 103 font-size: 14px; 414 415 416 417 104 background-color: #000000; 418 419 420 421 105 } 422 423 424 425 106 .cp-ticker-widget.changes-up{ 426 427 428 429 107 background-color: #008000; 430 431 432 433 108 } 434 435 436 437 109 .cp-ticker-widget.changes-down{ 438 439 440 441 110 background-color: #ff0000; 442 443 444 445 111 } 446 447 448 449 112 .cp-ticker-widget .cp-ticker-widget-icon{ 450 451 113 text-align: center; 452 453 114 } 454 455 456 457 115 .cp-ticker-widget .cp-ticker-widget-icon img{ 458 459 116 display: inline-block; 460 461 117 max-width: 100%; 462 463 464 465 118 } 466 467 468 469 119 .cp-ticker-widget .cp-ticker-widget-name{ 470 471 472 473 120 font-size: 24px; 474 475 476 477 121 font-weight: bold; 478 479 480 481 122 color: #ffffff; 482 483 484 485 123 } 486 487 488 489 124 .cp-ticker-widget .cp-ticker-widget-pricing{ 490 491 492 493 125 color: #ffffff; 494 495 496 497 126 } 498 499 500 501 127 .cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-price{ 502 503 504 505 128 margin-bottom: 10px; 506 507 508 509 129 font-size: 20px; 510 511 512 513 130 font-weight: bold; 514 515 516 517 131 } 518 519 520 521 132 .cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-change .changes-up{ 522 523 524 525 133 color: #0f9d58; 526 527 528 529 134 } 530 531 532 533 135 .cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-change .changes-down{ 534 535 536 537 136 color: #ff0000; 538 539 540 541 137 } 542 543 544 545 138 .cp-ticker-widget .cp-ticker-widget-period{ 546 547 548 549 139 border: 1px solid #000000; 550 551 552 553 140 font-size: 12px; 554 555 556 557 141 } -
cryptocurrency-prices/trunk/css/cp_light.css
r2509050 r2509051 1 1 /* table styles */ 2 3 4 5 2 table.cp-table{ 6 7 8 9 3 margin: 10px 0px 10px 0px; 10 11 12 13 4 padding: 0px; 14 15 16 17 5 border: 0px; 18 19 20 21 6 font-size: 16px; 22 23 24 25 7 line-height: normal; 26 27 28 29 8 background-color: #ffffff; 30 31 32 33 9 color: #111111; 34 35 36 37 10 } 38 39 40 41 11 table.cp-table tr:nth-child(even) { 42 43 44 45 12 background-color: #f0f0f0; 46 47 48 49 13 } 50 51 52 53 14 table.cp-table tr:hover { 54 55 56 57 15 background-color: #ffffff; 58 59 60 61 16 color: #000000; 62 63 64 65 17 } 66 67 68 69 18 table.cp-table a{ 70 71 72 73 19 color: #000000; 74 75 76 77 20 } 78 79 80 81 21 table.cp-table td, 82 83 84 85 22 table.cp-table th { 86 87 88 89 23 border: 0px; 90 91 92 93 24 padding: 6px 10px 6px 10px; 94 95 96 97 25 } 98 99 100 101 26 table.cp-table th { 102 103 104 105 27 padding: 12px 10px 12px 10px; 106 107 108 109 28 font-weight: bold; 110 111 112 113 29 background-color: #dddddd; 114 115 116 117 30 color: #000000; 118 119 120 121 31 } 122 123 124 125 32 table.cp-table td img { 126 127 128 129 33 width: 24px; 130 131 132 133 34 } 134 135 136 137 35 table.cp-table .change-dec { 138 139 140 141 36 color: #dd4433; 142 143 144 145 37 } 146 147 148 149 38 table.cp-table .change-inc { 150 151 152 153 39 color: #009933; 154 155 156 157 40 } 158 159 160 161 41 table.cp-table button { 162 163 164 165 42 padding: 0 1.1rem; 166 167 168 169 43 } 170 171 172 173 44 table.cp-table a { 174 175 45 text-decoration: none !important; 176 177 46 cursor: pointer; 178 179 47 } 180 181 182 183 48 /* form styles */ 184 185 186 187 49 form.cp-form{ 188 189 190 191 50 margin: 10px 0px 10px 0px; 192 193 194 195 51 padding: 0px; 196 197 198 199 52 border: 0px; 200 201 202 203 53 font-size: 18px; 204 205 206 207 54 } 208 209 210 211 55 form.cp-form table{ 212 213 214 215 56 margin: 0px; 216 217 218 219 57 padding: 0px; 220 221 222 223 58 border: 0px; 224 225 226 227 59 } 228 229 230 231 60 form.cp-form table td, 232 233 234 235 61 form.cp-form table th{ 236 237 238 239 62 border: 0px; 240 241 242 243 63 padding: 6px 10px 6px 10px; 244 245 246 247 64 } 248 249 250 251 65 form.cp-form input, 252 253 254 255 66 form.cp-form input:focus, 256 257 258 259 67 form.cp-form input[type="submit"], 260 261 262 263 68 form.cp-form select{ 264 265 266 267 69 display: inline-block; 268 269 270 271 70 width: auto; 272 273 274 275 71 padding: 16px 10px 16px 10px; 276 277 278 279 72 margin: 0px; 280 281 282 283 73 border: 0px; 284 285 286 287 74 -webkit-border-radius: 5px; 288 289 290 291 75 -moz-border-radius: 5px; 292 293 294 295 76 border-radius: 5px; 296 297 298 299 77 font-size: 18px; 300 301 302 303 78 line-height: normal; 304 305 306 307 79 background-color: #ffffff; 308 309 310 311 80 color: #000000; 312 313 314 315 81 box-shadow: none; 316 317 318 319 82 } 320 321 322 323 83 form.cp-form input[type="submit"]{ 324 325 326 327 84 padding: 16px 20px 16px 20px; 328 329 330 331 85 background-color: #dddddd; 332 333 334 335 86 } 336 337 338 339 87 form.cp-form label{ 340 341 342 343 88 font-size: 18px; 344 345 346 347 89 color: #000000; 348 349 350 351 90 } 352 353 354 355 91 form.cp-form-chart{ 356 357 358 359 92 margin: 0px; 360 361 362 363 93 font-size: 14px; 364 365 366 367 94 } 368 369 370 371 95 form.cp-form-chart select{ 372 373 374 375 96 padding: 6px 4px 6px 4px; 376 377 378 379 97 margin: 0px; 380 381 382 383 98 font-size: 14px; 384 385 386 387 99 } 388 389 390 391 100 form.cp-form-chart label{ 392 393 394 395 101 font-size: 14px; 396 397 398 399 102 color: #000000; 400 401 402 403 103 } 404 405 406 407 408 409 410 411 104 .cp-ticker-widget{ 412 413 414 415 105 padding: 10px 0px 10px 0px; 416 417 418 419 106 text-align: center; 420 421 422 423 107 font-size: 14px; 424 425 426 427 108 background-color: #ffffff; 428 429 430 431 109 } 432 433 434 435 110 .cp-ticker-widget.changes-up{ 436 437 438 439 111 background-color: #008000; 440 441 442 443 112 } 444 445 446 447 113 .cp-ticker-widget.changes-down{ 448 449 450 451 114 background-color: #ff0000; 452 453 454 455 115 } 456 457 458 459 116 .cp-ticker-widget .cp-ticker-widget-icon{ 460 461 117 text-align: center; 462 463 118 } 464 465 466 467 119 .cp-ticker-widget .cp-ticker-widget-icon img{ 468 469 120 display: inline-block; 470 471 121 max-width: 100%; 472 473 474 475 122 } 476 477 478 479 123 .cp-ticker-widget .cp-ticker-widget-name{ 480 481 482 483 124 font-size: 24px; 484 485 486 487 125 font-weight: bold; 488 489 490 491 126 color: #000000; 492 493 494 495 127 } 496 497 498 499 128 .cp-ticker-widget .cp-ticker-widget-pricing{ 500 501 502 503 129 color: #000000; 504 505 506 507 130 } 508 509 510 511 131 .cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-price{ 512 513 514 515 132 margin-bottom: 10px; 516 517 518 519 133 font-size: 20px; 520 521 522 523 134 font-weight: bold; 524 525 526 527 135 } 528 529 530 531 136 .cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-change .changes-up{ 532 533 534 535 137 color: #008000; 536 537 538 539 138 } 540 541 542 543 139 .cp-ticker-widget .cp-ticker-widget-pricing .cp-ticker-widget-pricing-change .changes-down{ 544 545 546 547 140 color: #ff0000; 548 549 550 551 141 } 552 553 554 555 142 .cp-ticker-widget .cp-ticker-widget-period{ 556 557 558 559 143 border: 1px solid #000000; 560 561 562 563 144 font-size: 12px; 564 565 566 567 145 } -
cryptocurrency-prices/trunk/includes/admin.class.php
r2509050 r2509051 1 1 <?php 2 3 2 class CCPS_Admin { 4 5 3 const NONCE = 'cp-admin-settings'; 6 7 4 private static $initiated = false; 8 9 5 public static function init() { 10 11 6 if ( ! self::$initiated ) { 12 13 7 self::init_hooks(); 14 15 8 } 16 17 } 18 9 } 19 10 public static function init_hooks() { 20 21 11 self::$initiated = true; 22 23 12 //add admin menu 24 25 13 add_action( 'admin_menu', array( 'CCPS_Admin', 'register_menu_page' ) ); 26 27 14 add_action( 'admin_init', array( 'CCPS_Admin', 'dismiss_notices' ) ); 28 29 15 add_action( 'admin_notices', array( 'CCPS_Admin', 'admin_notices' ) ); 30 31 16 add_action( 'admin_print_footer_scripts', array( 'CCPS_Admin', 'admin_scripts' ) ); 32 33 } 34 17 } 35 18 public static function admin_notices() { 36 37 19 /* 38 39 20 if ( get_option( 'cryptocurrency-hide-update-notice-3.0.12' ) != true ) { 40 41 21 ?> 42 43 22 <div class="notice notice-info is-dismissible"> 44 45 23 <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 47 24 <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 49 25 </div> 50 51 26 <?php 52 53 27 } 54 55 28 */ 56 57 29 if ( get_option( 'cryptocurrency-hide-affiliate-notice2' ) != true ) { 58 59 30 ?> 60 61 31 <div class="notice notice-info is-dismissible"> 62 63 32 <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 33 <p style="font-size: 16px;"> 66 67 34 68 69 35 <?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 36 </p> 72 73 37 <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 75 38 </div> 76 77 39 <?php 78 79 40 } 80 81 41 } 82 83 42 public static function dismiss_notices() { 84 85 43 /* 86 87 44 if ( isset( $_GET['action'] ) && 'cryptocurrency-dismiss-update-notice' === $_GET['action'] ) { 88 89 45 update_option( 'cryptocurrency-hide-update-notice-3.0.12', true ); 90 91 46 } 92 93 47 */ 94 95 48 if ( isset( $_GET['action'] ) && 'cryptocurrency-hide-affiliate-notice2' === $_GET['action'] ) { 96 97 49 update_option( 'cryptocurrency-hide-affiliate-notice2', true ); 98 99 50 } 100 101 51 } 102 103 52 public static function admin_scripts() { 104 105 53 ?> 106 107 54 <script> 108 109 55 (function($){ 110 111 56 $('a[href*="zwaply.com/affiliate-login"]').each(function(i,elm){ 112 113 57 var $elm = $(elm); 114 115 58 if(!$elm.attr('target')){ 116 117 59 $elm.attr('target','_blank'); 118 119 60 } 120 121 61 }) 122 123 62 })(jQuery) 124 125 63 </script> 126 127 64 <?php 128 129 65 } 130 131 66 public static function register_menu_page() { 132 133 67 add_menu_page( 134 135 68 // __( 'Cyptocurrency All-in-One', 'cryptocurrency' ), 136 137 69 // __( 'Cyptocurrency', 'cryptocurrency' ), 138 139 70 __( 'Cyptocurrency', 'cryptocurrency' ), 140 141 71 __( 'Cyptocurrency', 'cryptocurrency' ), 142 143 72 'manage_options', 144 145 73 'settings', 146 147 74 // array('CCPS_Admin', 'cryptocurrency_prices_admin'), 148 149 75 array('CCPS_Admin', 'cryptocurrency_prices_admin_settings'), 150 151 76 CCPS_URL.'images/admin-icon.png', 152 153 77 81 154 155 78 // 'settings', 156 157 79 // __( 'Settings', 'cryptocurrency' ), 158 159 80 // __( 'Settings', 'cryptocurrency' ), 160 161 81 // 'manage_options', 162 163 82 // 'settings', 164 165 83 // array('CCPS_Admin', 'cryptocurrency_prices_admin_settings') 166 167 84 ); 168 169 85 add_submenu_page( 170 171 86 'settings', 172 173 87 __( 'Help', 'cryptocurrency' ), 174 175 88 __( 'Help', 'cryptocurrency' ), 176 177 89 'manage_options', 178 179 90 'cryptocurrency-prices', 180 181 91 array('CCPS_Admin', 'cryptocurrency_prices_admin_help') 182 183 92 ); 184 185 93 add_submenu_page( 186 187 94 'settings', 188 189 95 __( 'Crypto Resources', 'cryptocurrency' ), 190 191 96 __( 'Crypto Resources', 'cryptocurrency' ), 192 193 97 'manage_options', 194 195 98 'resources', 196 197 99 array('CCPS_Admin', 'cryptocurrency_prices_admin_resources') 198 199 100 ); 200 201 101 // add_submenu_page( 202 203 102 // 'settings', 204 205 103 // __( 'Settings', 'cryptocurrency' ), 206 207 104 // __( 'Settings', 'cryptocurrency' ), 208 209 105 // 'manage_options', 210 211 106 // 'settings', 212 213 107 // array('CCPS_Admin', 'cryptocurrency_prices_admin_settings') 214 215 108 // ); 216 217 109 global $submenu; 218 219 110 $url = 'https://zwaply.com/affiliate-login/'; 220 221 111 $submenu['settings'][] = array(__( 'Affiliate Panel', 'cryptocurrency' ), 'manage_options', $url); 222 223 112 add_submenu_page( 224 225 113 'settings', 226 227 114 __( 'Premium and Updates', 'cryptocurrency' ), 228 229 115 __( 'Premium and Updates', 'cryptocurrency' ), 230 231 116 'manage_options', 232 233 117 'premium', 234 235 118 array('CCPS_Admin', 'cryptocurrency_prices_admin_premium') 236 237 119 ); 238 239 } 240 120 } 241 121 public static function cryptocurrency_prices_admin(){ 242 243 122 //self::cryptocurrency_prices_admin_help(); 244 245 } 246 123 } 247 124 public static function cryptocurrency_prices_admin_resources(){ 248 249 125 //check if user has admin capability 250 251 126 if (current_user_can( 'manage_options' )){ 252 253 echo ' 254 127 echo ' 255 128 <div class="wrap cryptocurrency-admin"> 256 257 129 <h1>Cyptocurrency Resources:</h1> 258 259 130 <p>You will find a list of resources, specially selected for the users of Cyptocurrency All-in-One.</p> 260 261 131 <h2>Buy Bitcoin and other cryptocurrency</h2> 262 263 132 <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 265 133 <a href="https://cex.io/r/1/byankov/1">Buy Bitcoin and excnahge it to other cryptocurrency at CEX.IO</a><br /> 266 267 134 <h2>Create Bitcoin and altcoin wallets</h2> 268 269 135 <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 271 136 <a href="https://trezor.io/">Hardware wallet TREZOR. Very secure but costs money. Works for receiving donations and payments.</a><br /> 272 273 137 <a href="https://bitcoin.org/en/download ">Official bitcoin software wallet (hot wallet). Relatively secure. Works for receiving donations and payments.</a><br /> 274 275 138 <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 277 139 <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 140 <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 281 141 <h2>Trade and exchange cryptocurrency</h2> 282 283 142 <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 143 <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 287 144 <a href="https://yobit.io/?bonus=srtAb">Exchange with many coins and low fees for trading - YObit.net</a><br /> 288 289 145 <a href="https://cex.io/r/0/byankov/0">Trusted exchange site - CEX.IO</a><br /> 290 291 146 <a href="https://creditstocks.com/cryptocurrency-prices/list-of-all-cryptocurrencies/">List of all cryptocurrencies</a><br /> 292 293 147 <h2>Publish cryptocurrency article</h2> 294 295 148 <a href="https://creditstocks.com/submit-article-creditstocks-com/">Publish cryptocurrency or finance article at CreditStocks.com - free</a><br /> 296 297 149 <a href="http://satoshijournal.com/submit-an-article/">Publish cryptocurrency or finance article at SatochiJournal.com - free</a><br /> 298 299 150 <h2>Cryptocurrency mining</h2> 300 301 151 <a href="http://www.whattomine.com/">Mining calculator - What to mine</a><br /> 302 303 152 <a href="https://www.cryptocompare.com/mining/calculator/btc">Mining calculator - Bitcoin</a><br /> 304 305 153 <a href="https://www.cryptocompare.com/mining/calculator/eth">Mining calculator - Ethereum</a><br /> 306 307 154 <h2>Development resources</h2> 308 309 155 <a href="https://github.com/BoyanBorislavovYankov/Blockchain-Payload-Tools">Publish documents, articles and other data forever on Ethereum blockchain</a><br /> 310 311 156 <a href="https://theethereum.wiki/w/index.php/ERC20_Token_Standard">ERC20 - Ethereum token standard</a><br /> 312 313 157 <a href="https://infura.io/">Infura - Open and free to use Ethereum node</a><br /> 314 315 158 <a href="https://coinmarketcap.com/api/">Free data API about cryptocurrencies - CoinMarketCap</a><br /> 316 317 159 <a href="https://www.cryptocompare.com/api/">Free data API about cryptocurrencies - CryptoCompare</a><br /> 318 319 160 <h2>Crypto community</h2> 320 321 161 <a href="https://web.facebook.com/groups/469221573283979/">Knights of Satoshi - Facebook group</a><br /> 322 323 162 <a href="https://bitcointalk.org/">BitcoinTalk.org - the largest Bitcoin and cryptocurrency forum</a> 324 325 163 <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 327 164 </div> 328 329 '; 330 331 } 332 333 } 334 165 '; 166 } 167 } 335 168 public static function cryptocurrency_prices_admin_settings(){ 336 337 169 //check if user has admin capability 338 339 170 if (current_user_can( 'manage_options' )){ 340 341 171 $admin_message_html = ''; 342 343 172 if (isset($_POST['cryptocurrency-prices-zwaply-affiliate-id'])){ 344 345 //check nonce 346 347 check_admin_referer( self::NONCE ); 348 173 //check nonce 174 check_admin_referer( self::NONCE ); 349 175 $sanitized_ethereum_api = sanitize_text_field($_POST['cryptocurrency-prices-zwaply-affiliate-id']); 350 351 176 update_option('cryptocurrency-prices-zwaply-affiliate-id', $sanitized_ethereum_api); 352 353 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 354 355 } 356 177 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 178 } 357 179 if (isset($_POST['cp_coinmarketcap_api_key'])){ 358 359 //check nonce 360 361 check_admin_referer( self::NONCE ); 362 180 //check nonce 181 check_admin_referer( self::NONCE ); 363 182 $sanitized_coinmarketcap_api_key = sanitize_text_field($_POST['cp_coinmarketcap_api_key']); 364 365 183 update_option('cp_coinmarketcap_api_key', $sanitized_coinmarketcap_api_key); 366 367 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 368 369 } 370 184 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 185 } 371 186 if (isset($_POST['cryptocurrency-prices-default-css']) and $_POST['cryptocurrency-prices-default-css']!=''){ 372 373 //check nonce 374 375 check_admin_referer( self::NONCE ); 376 187 //check nonce 188 check_admin_referer( self::NONCE ); 377 189 $sanitized_cryptocurrency_prices_default_css = sanitize_text_field($_POST['cryptocurrency-prices-default-css']); 378 379 190 update_option('cryptocurrency-prices-default-css', $sanitized_cryptocurrency_prices_default_css); 380 381 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 382 383 } 384 191 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 192 } 385 193 if (isset($_POST['cryptocurrency-prices-show-trade-button'])){ 386 387 //check nonce 388 389 check_admin_referer( self::NONCE ); 390 194 //check nonce 195 check_admin_referer( self::NONCE ); 391 196 $show_trade_button = 'yes' === $_POST['cryptocurrency-prices-show-trade-button'] ? 'yes' : 'no'; 392 393 197 update_option('cryptocurrency-prices-show-trade-button', $show_trade_button); 394 395 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 396 397 } 398 198 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 199 } 399 200 if (isset($_POST['ethereum-api'])){ 400 401 //check nonce 402 403 check_admin_referer( self::NONCE ); 404 201 //check nonce 202 check_admin_referer( self::NONCE ); 405 203 $sanitized_ethereum_api = sanitize_text_field($_POST['ethereum-api']); 406 407 204 update_option('ethereum-api', $sanitized_ethereum_api); 408 409 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 410 411 } 412 205 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 206 } 413 207 if (isset($_POST['cryptocurrency-prices-css'])){ 414 415 //check nonce 416 417 check_admin_referer( self::NONCE ); 418 208 //check nonce 209 check_admin_referer( self::NONCE ); 419 210 $sanitized_cryptocurrency_prices_css = sanitize_text_field($_POST['cryptocurrency-prices-css']); 420 421 211 update_option('cryptocurrency-prices-css', $sanitized_cryptocurrency_prices_css); 422 423 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 424 425 } 426 212 $admin_message_html = '<div class="notice notice-success"><p>Plugin settings have been updated!</p></div>'; 213 } 427 214 //delete_option( 'cryptocurrency-prices-default-css' ); //remove setting 428 429 215 $default_css_selected_light = ''; 430 431 216 $default_css_selected_dark = ''; 432 433 217 if (get_option('cryptocurrency-prices-default-css') == 'light'){ 434 435 218 $default_css_selected_light = 'selected="selected"'; 436 437 219 } elseif (get_option('cryptocurrency-prices-default-css') == 'dark'){ 438 439 220 $default_css_selected_dark = 'selected="selected"'; 440 441 } 442 221 } 443 222 $show_trade_button_option_yes = ''; 444 445 223 $show_trade_button_option_no = ''; 446 447 224 if (get_option('cryptocurrency-prices-show-trade-button') == 'yes'){ 448 449 225 $show_trade_button_option_yes = 'selected="selected"'; 450 451 226 } elseif (get_option('cryptocurrency-prices-show-trade-button') == 'no'){ 452 453 227 $show_trade_button_option_no = 'selected="selected"'; 454 455 } 456 457 echo ' 458 228 } 229 echo ' 459 230 <div class="wrap cryptocurrency-admin"> 460 461 231 '.$admin_message_html.' 462 463 232 <h1>Cyptocurrency All-in-One Settings:</h1> 464 465 233 <h2>Place the widget on your blog:</h2> 466 467 234 <p>Just paste [allcurrencies] in your Theme, and at the bottom of all your posts.</p> 468 469 235 <p>This is what you’ll see:</p> 470 471 236 <img src="'. plugin_dir_url( __FILE__ ) . 'images/screenshot-9.png' .'"> 472 473 237 <br><br> 474 475 238 <hr> 476 477 239 <form action="" method="post"> 478 479 240 <h2>Affiliate:</h2> 480 481 241 <label>Your Zwaply.com username: </label> 482 483 242 <div style="display: inline-block;"> 484 485 243 <label for="cryptocurrency-prices-zwaply-affiliate-id"> 486 487 244 <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 489 245 </label> 490 491 246 <span><span class="description"><a href="https://zwaply.com/register/" target="_blank">Get yours here to start earning crypto</a></span></span> 492 493 247 </div> 494 495 248 <!-- 496 497 249 <h2>CoinMarketCap Api:</h2> 498 499 250 <p> 500 501 251 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 503 252 </p> 504 505 253 <label>Your free CoinMarketCap API key: </label> 506 507 254 <div style="display: inline-block;"> 508 509 255 <label for="cp_coinmarketcap_api_key"> 510 511 256 <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 513 257 </label> 514 515 258 </div> 516 517 259 --> 518 519 260 <h2>Design:</h2> 520 521 261 <label>Show Trade button: </label> 522 523 262 <select name="cryptocurrency-prices-show-trade-button"> 524 525 263 <option value="yes" '.$show_trade_button_option_yes.'>Yes</option> 526 527 264 <option value="no" '.$show_trade_button_option_no.'>No</option> 528 529 265 </select> 530 531 266 <p></p> 532 533 267 <label>Use default design (includes default CSS): </label> 534 535 268 <select name="cryptocurrency-prices-default-css"> 536 537 269 <option value="0">no</option> 538 539 270 <option value="light" '.$default_css_selected_light.'>light</option> 540 541 271 <option value="dark" '.$default_css_selected_dark.'>dark</option> 542 543 272 </select> 544 545 273 <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 547 274 <textarea name="cryptocurrency-prices-css" rows="5" cols="50">'.get_option('cryptocurrency-prices-css').'</textarea> 548 549 275 <!--<h2>Ethereum blockchain node API URL:</h2> 550 551 276 <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 553 277 <input type="text" name="ethereum-api" value="'.get_option('ethereum-api').'" /> --> 554 555 278 <br /><br /> 556 557 279 '.wp_nonce_field( self::NONCE ).' 558 559 280 <input type="submit" value="Save options" /> 560 561 281 </form> 562 563 282 <br /> 564 565 283 <h4> 566 567 284 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 569 285 </h4> 570 571 286 </div> 572 573 '; 574 575 } 576 577 } 578 287 '; 288 } 289 } 579 290 public static function cryptocurrency_prices_admin_premium(){ 580 581 291 echo ' 582 583 292 <div class="wrap cryptocurrency-admin"> 584 585 293 <h1>Cyptocurrency All-in-One Premium Version and Updates::</h1> 586 587 294 '; 588 589 295 echo ' 590 591 296 <h2>Get premium version</h2> 592 593 297 <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 595 298 <h2>Premium version updates</h2> 596 597 299 <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 599 300 <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 601 301 '; 602 603 302 echo ' 604 605 303 </div> 606 607 304 '; 608 609 } 610 305 } 611 306 public static function cryptocurrency_prices_admin_help(){ 612 613 307 //set the active tab 614 615 308 $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'exchange'; 616 617 309 echo ' 618 619 310 <div class="wrap cryptocurrency-admin"> 620 621 311 <h1>Cyptocurrency All-in-One Help:</h1> 622 623 312 '; 624 625 313 echo ' 626 627 314 <h2 class="nav-tab-wrapper"> 628 629 315 <a href="?page=cryptocurrency-prices&tab=exchange" class="nav-tab">Exchange rates</a> 630 631 316 <a href="?page=cryptocurrency-prices&tab=calculator" class="nav-tab">Calculator</a> 632 633 317 <a href="?page=cryptocurrency-prices&tab=candlestick_chart" class="nav-tab">Price chart</a> 634 635 318 <a href="?page=cryptocurrency-prices&tab=ticker_widget" class="nav-tab">Ticker widget</a> 636 637 319 <a href="?page=cryptocurrency-prices&tab=list_cryptocurrencies" class="nav-tab">List all cryptocurrencies</a> 638 639 320 <a href="?page=cryptocurrency-prices&tab=orders_payments" class="nav-tab">Orders, payments</a> 640 641 321 <a href="?page=cryptocurrency-prices&tab=donations" class="nav-tab">Donations</a> 642 643 322 <a href="?page=cryptocurrency-prices&tab=ethereum" class="nav-tab">Ethereum Node</a> 644 645 323 <a href="?page=cryptocurrency-prices&tab=others" class="nav-tab">Other features</a> 646 647 324 </h2> 648 649 325 '; 650 651 326 if ($active_tab == 'exchange'){ 652 653 echo ' 654 327 echo ' 655 328 <h2>To display cryptocurrency exchange rates (premium version only):</h2> 656 657 329 <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 659 330 [currencyprice currency1="btc" currency2="usd,eur,ltc,eth,jpy,gbp,chf,aud,cad"]<br /> 660 661 331 [currencyprice currency1="ltc" currency2="usd,eur,btc"] 662 663 332 <p>You can also call the prices from the theme like this:</p> 664 665 333 '.htmlspecialchars('<?php echo do_shortcode(\'[currencyprice currency1="btc" currency2="usd,eur"]\'); ?>').' 666 667 334 <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 669 335 <p><a href="https://creditstocks.com/cryptocurrency-prices/current-litecoin-price/" target="_blank">Live demo</a></p> 670 671 '; 672 673 } 674 336 '; 337 } 675 338 if ($active_tab == 'calculator'){ 676 677 echo ' 678 339 echo ' 679 340 <h2>To display cryptocurrency calculator (premium version only):</h2> 680 681 341 <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 683 342 [currencycalculator currency1="btc" currency2="usd,eur,ltc,eth,jpy,gbp,chf,aud,cad"]<br /> 684 685 343 [currencycalculator currency1="ltc" currency2="usd,eur,btc"] 686 687 344 <p>You can also call the calculator from the theme like this:</p> 688 689 345 '.htmlspecialchars('<?php echo do_shortcode(\'[currencycalculator currency1="btc" currency2="usd,eur"]\'); ?>').' 690 691 346 <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 693 347 <p><a href="https://creditstocks.com/cryptocurrency-prices/current-litecoin-price/" target="_blank">Live demo</a></p> 694 695 '; 696 697 } 698 348 '; 349 } 699 350 if ($active_tab == 'candlestick_chart'){ 700 701 echo ' 702 351 echo ' 703 352 <h2>To display cryptocurrency candlestick price chart (premium version only):</h2> 704 705 353 <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 707 354 [currencychart currency1="btc" currency2="usd"]<br /> 708 709 355 [currencychart currency1="dash" currency2="btc" defaultperiod="1year"] 710 711 356 <p>You can also call the chart from the theme like this:</p> 712 713 357 '.htmlspecialchars('<?php echo do_shortcode(\'[currencychart currency1="btc" currency2="usd"]\'); ?>').' 714 715 358 <p><a href="https://creditstocks.com/cryptocurrency-prices/current-bitcoin-price/" target="_blank">Live demo</a></p> 716 717 '; 718 719 } 720 359 '; 360 } 721 361 if ($active_tab == 'ticker_widget'){ 722 723 echo ' 724 362 echo ' 725 363 <h2>Cryptocurrency ticker widget - a badge with the logo, price, and 24h change of one cryptocurrency:</h2> 726 727 364 <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 729 365 [currencyticker currency="eth"]<br /> 730 731 366 <p><a href="https://creditstocks.com/cryptocurrency-prices/current-bitcoin-price/" target="_blank">Live demo</a></p> 732 733 '; 734 735 } 736 367 '; 368 } 737 369 if ($active_tab == 'list_cryptocurrencies'){ 738 739 echo ' 740 370 echo ' 741 371 <h2>To display a list of all cryptocurrencies</h2> 742 743 372 <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 745 373 [allcurrencies]<br /> 746 747 374 [allcurrencies basecurrency="eur"]<br /> 748 749 375 [allcurrencies limit="100" perpage="10"]<br /> 750 751 376 [allcurrencies basecurrency="eur" locale="de-DE"] 752 753 377 <p>You can also call the list from the theme like this:</p> 754 755 378 '.htmlspecialchars('<?php echo do_shortcode(\'[allcurrencies]\'); ?>').' 756 757 379 <p><a href="https://creditstocks.com/cryptocurrency-prices/list-of-all-cryptocurrencies/" target="_blank">Live demo</a></p> 758 759 '; 760 761 } 762 380 '; 381 } 763 382 if ($active_tab == 'orders_payments'){ 764 765 echo ' 766 383 echo ' 767 384 <h2>To accept cryptocurrency orders and payments (premium version only):</h2> 768 769 385 <p>Supported currencies for payments are:</p> 770 771 386 <ul> 772 773 387 <li>Bitcoin (BTC) (default),</li> 774 775 388 <li>Ethereum (ETH),</li> 776 777 389 <li>Litecoin (LTC),</li> 778 779 390 <li>Bitcoin Cash (BCH),</li> 780 781 391 <li>Zcash (ZEC).</li> 782 783 392 </ul> 784 785 393 <p> 786 787 394 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 789 395 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 791 396 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 793 397 Exapmle shortcodes: 794 795 398 </p> 796 797 399 [cryptopayment item="Advertising services" amount="0.003" currency="BTC"]<br /> 798 799 400 [cryptopayment item="Publish a PR article" amount="50 USD" currency="BTC"]<br /> 800 801 401 [cryptopayment item="Publish a PR article" amount="10 EUR" currency="ETH"] 802 803 402 <p><a href="https://creditstocks.com/payment-demo/" target="_blank">Live demo</a></p> 804 805 '; 806 807 } 808 403 '; 404 } 809 405 if ($active_tab == 'donations'){ 810 811 echo ' 812 406 echo ' 813 407 <h2>To accept cryptocurrency donations:</h2> 814 815 408 <p>Add a shortcode to the text of the pages or posts where you want to accept donations. Supported currencies are:</p> 816 817 409 <ul> 818 819 410 <li>Bitcoin (BTC) (default),</li> 820 821 411 <li>Ethereum (ETH),</li> 822 823 412 <li>Litecoin (LTC),</li> 824 825 413 <li>Monero (XMR),</li> 826 827 414 <li>Bitcoin Cash (BCH),</li> 828 829 415 <li>Zcash (ZEC).</li> 830 831 416 </ul> 832 833 417 <p>Exapmle shortcodes (do not forget to put your wallet address):</p> 834 835 418 [cryptodonation address="1ABwGVwbna6DnHgPefSiakyzm99VXVwQz9"]<br /> 836 837 419 [cryptodonation address="0xc85c5bef5a9fd730a429b0e04c69b60d9ef4c64b" currency="eth"]<br /> 838 839 420 [cryptodonation address="463tWEBn5XZJSxLU6uLQnQ2iY9xuNcDbjLSjkn3XAXHCbLrTTErJrBWYgHJQyrCwkNgYvyV3z8zctJLPCZy24jvb3NiTcTJ" paymentid="a1be1fb24f1e493eaebce2d8c92dc68552c165532ef544b79d9d36d1992cff07" currency="xmr"] 840 841 421 <p>You can also call the donations from the theme like this:</p> 842 843 422 '.htmlspecialchars('<?php echo do_shortcode(\'[cryptodonation address="1ABwGVwbna6DnHgPefSiakyzm99VXVwQz9"]\'); ?>').' 844 845 423 <p><a href="https://creditstocks.com/donate/" target="_blank">Live demo</a></p> 846 847 '; 848 849 } 850 424 '; 425 } 851 426 if ($active_tab == 'ethereum'){ 852 853 echo ' 854 427 echo ' 855 428 <h2>Ethereum node integration:</h2> 856 857 429 <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 859 430 [cryptoethereum feature="balance"]<br /> 860 861 431 [cryptoethereum feature="block"] 862 863 432 <p>Notice: Beware mixed content browser restriction! If your web site uses https, the node must also use https.</p> 864 865 433 <p><a href="https://creditstocks.com/ethereum/" target="_blank">Live demo</a></p> 866 867 '; 868 869 } 870 434 '; 435 } 871 436 if ($active_tab == 'others'){ 872 873 echo ' 874 437 echo ' 875 438 <h2>Instructions to use the plugin in a widget:</h2> 876 877 439 <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 879 440 [currencyprice currency1="btc" currency2="usd,eur"] 880 881 '; 882 883 } 884 441 '; 442 } 885 443 echo ' 886 887 444 </div> 888 889 445 '; 890 891 } 892 446 } 893 447 } -
cryptocurrency-prices/trunk/includes/currencytickerwidget.class.php
r2509050 r2509051 1 1 <?php 2 3 4 5 2 class CCPS_Ticker_Widget extends WP_Widget { 6 7 8 9 10 11 12 13 3 public function __construct() { 14 15 16 17 4 $widget_ops = array('classname' => 'cp_ticker_widget', 'description' => __('Shows cryptocurrency ticker.', 'cryptocurrency')); 18 19 20 21 5 parent::__construct('cp_ticker_widget', __('CP Ticker Widget', 'cryptocurrency'), $widget_ops); 22 23 24 25 6 } 26 27 28 29 30 31 32 33 7 public function widget( $args, $instance ) { 34 35 36 37 8 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); 38 39 40 41 9 42 43 44 45 10 $currency = strtolower(trim($instance['currency'])); 46 47 48 49 11 echo $args['before_widget']; 50 51 52 53 12 if ( ! empty( $title ) ) { 54 55 56 57 13 echo $args['before_title'] . $title . $args['after_title']; 58 59 60 61 14 } ?> 62 63 64 65 15 <div class="textwidget"> 66 67 68 69 16 <?php 70 71 72 73 17 echo self::get_badge($currency); 74 75 76 77 18 ?> 78 79 80 81 19 </div> 82 83 84 85 20 <?php 86 87 88 89 21 echo $args['after_widget']; 90 91 92 93 22 } 94 95 96 97 98 99 100 101 23 public function update( $new_instance, $old_instance ) { 102 103 104 105 24 $instance = $old_instance; 106 107 108 109 25 $instance['title'] = strip_tags($new_instance['title']); 110 111 112 113 26 $instance['currency'] = $new_instance['currency']; 114 115 116 117 27 return $instance; 118 119 120 121 28 } 122 123 124 125 126 127 128 129 29 public function form( $instance ) { 130 131 132 133 30 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) ); 134 135 136 137 31 $title = strip_tags($instance['title']); 138 139 140 141 32 $currency = esc_textarea($instance['currency']); 142 143 144 145 33 ?> 146 147 148 149 34 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'cryptocurrency'); ?></label> 150 151 152 153 35 <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> 154 155 156 157 158 159 160 161 36 <p><label for="<?php echo $this->get_field_id( 'text' ); ?>"><?php _e( 'Cryptocurrency (i.e BTC):', 'cryptocurrency' ); ?></label> 162 163 164 165 37 <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> 166 167 168 169 38 <?php 170 171 172 173 39 } 174 175 176 177 40 178 179 180 181 41 function get_badge($currency){ 182 183 184 185 42 186 187 188 189 43 $html = ' 190 191 192 193 44 <div class="cp-ticker-widget" id="cp-ticker-widget-'.$currency.'"> 194 195 196 197 45 <div class="cp-ticker-widget-name">Loading data...</div> 198 199 200 201 46 </div> 202 203 204 205 47 <script type="text/javascript"> 206 207 208 209 48 loadTicker(); //load ticker initially 210 211 212 213 49 setInterval(loadTicker, 30000); //update ticker initially periodically 214 215 216 217 50 218 219 220 221 51 function loadTicker(){ 222 223 224 225 52 //get data 226 227 228 229 53 var apiUrl = \'https://api.coincap.io/v2/assets\'; 230 231 232 233 54 jQuery.get( apiUrl, function( dataCurrencies ) { 234 235 236 237 55 //console.log(dataCurrencies); 238 239 240 241 56 console.log("Data loaded"); 242 243 244 245 57 246 247 248 249 58 var currency = \''.$currency.'\'; 250 251 252 253 59 254 255 256 257 60 //find currency 258 259 260 261 61 for (var currencyId in dataCurrencies.data) { 262 263 264 265 62 var data = dataCurrencies.data[currencyId]; 266 267 268 269 63 270 271 272 273 64 if (data.symbol == currency.toUpperCase()){ 274 275 276 277 65 //currency found 278 279 280 281 66 282 283 284 285 67 var currencyName = data.name; 286 287 288 289 68 var currencySymbol = data.symbol; 290 291 292 293 69 var currency_price = parseFloat(data.priceUsd); 294 295 296 297 70 if (currency_price > 10){ 298 299 300 301 71 var currency_price_string = currency_price.toFixed(2); 302 303 304 305 72 } else { 306 307 308 309 73 var currency_price_string = currency_price.toFixed(8); 310 311 312 313 74 } 314 315 316 317 75 var currency_percent_change_24h = parseFloat(data.changePercent24Hr).toFixed(2); 318 319 320 321 76 if (currency_percent_change_24h > 0){ 322 323 324 325 77 var currency_change_24h_color = \'changes-up\'; 326 327 328 329 78 var currency_change_24h_symbol = \'⇧\'; 330 331 332 333 79 } else { 334 335 336 337 80 var currency_change_24h_color = \'changes-down\'; 338 339 340 341 81 var currency_change_24h_symbol = \'⇩\'; 342 343 344 345 82 } 346 347 348 349 83 var lastPrice = jQuery(\'#cp-ticker-widget-\'+currency+\' .cp-ticker-widget-pricing-price span\').html(); 350 351 352 353 84 if (lastPrice !== undefined){ 354 355 356 357 85 //console.log(lastPrice + \' \' + currency_price_string); 358 359 360 361 86 if (currency_price_string > lastPrice){ 362 363 364 365 87 jQuery(\'#cp-ticker-widget-\'+currency).toggleClass(\'changes-up\'); 366 367 368 369 88 setTimeout(function(){ jQuery(\'#cp-ticker-widget-\'+currency).toggleClass(\'changes-up\') }, 300); 370 371 372 373 89 } else if (currency_price_string < lastPrice){ 374 375 376 377 90 jQuery(\'#cp-ticker-widget-\'+currency).toggleClass(\'changes-down\'); 378 379 380 381 91 setTimeout(function(){ jQuery(\'#cp-ticker-widget-\'+currency).toggleClass(\'changes-down\') }, 300); 382 383 384 385 92 } 386 387 388 389 93 } 390 391 392 393 94 394 395 396 397 95 var tickerHtml = \'\'+ 398 399 400 401 96 \'<div class="cp-ticker-widget-icon">\'+ 402 403 404 405 97 \'<img src="'.CCPS_URL.'images/coins128x128/\'+currencySymbol.toLowerCase()+\'.png" alt="\'+data.name+\'">\'+ 406 407 408 409 98 \'</div>\'+ 410 411 412 413 99 \'<div class="cp-ticker-widget-name">\'+currencyName+\'</div>\'+ 414 415 416 417 100 \'<div class="cp-ticker-widget-pricing">\'+ 418 419 420 421 101 \'<div class="cp-ticker-widget-pricing-price">\'+ 422 423 424 425 102 \'<i class="fa fa-usd" aria-hidden="true"></i>\'+ 426 427 428 429 103 \'<span>\'+currency_price_string+\'</span>\'+ 430 431 432 433 104 \'</div>\'+ 434 435 436 437 105 \'<div class="cp-ticker-widget-pricing-change">\'+ 438 439 440 441 106 \'<span class="\'+currency_change_24h_color+\'">\'+ 442 443 444 445 107 \'\'+currency_change_24h_symbol+\' \'+currency_percent_change_24h+\'%\'+ 446 447 448 449 108 \'</span>\'+ 450 451 452 453 109 \' <span class="cp-ticker-widget-period">24H</span>\'+ 454 455 456 457 110 \'</div>\'+ 458 459 460 461 111 \'</div>\'; 462 463 464 465 112 466 467 468 469 113 jQuery(\'#cp-ticker-widget-\'+currency).html(tickerHtml); 470 471 472 473 114 } 474 475 476 477 115 } 478 479 480 481 116 }); 482 483 484 485 117 486 487 488 489 118 } 490 491 492 493 119 </script> 494 495 496 497 120 '; 498 499 500 501 121 502 503 504 505 122 return $html; 506 507 508 509 123 } 510 511 512 513 124 514 515 516 517 125 public function shortcode( $atts ){ 518 519 520 521 126 if (isset($atts['currency']) and $atts['currency']!=''){ 522 523 524 525 127 $currency = $atts['currency']; 526 527 528 529 128 } else { 530 531 532 533 129 $currency = 'btc'; 534 535 536 537 130 } 538 539 540 541 542 543 544 545 131 $html = self::get_badge($currency); 546 547 548 549 132 550 551 552 553 133 return $html; 554 555 556 557 134 } 558 559 560 561 135 } -
cryptocurrency-prices/trunk/index.php
r2509050 r2509051 1 1 <?php 2 3 2 // Silence is golden. 4 -
cryptocurrency-prices/trunk/readme.txt
r2509050 r2509051 1 1 === Cryptocurrency All-in-One === 2 2 3 4 5 3 Contributors: Zwaply 6 7 4 Donate link: https://zwaply.com/ 8 9 5 Tags: crypto, crypto price, crypto currencies, crypto ticker, bitcoin, binance, crypto plugin, cryptocurrency plugin, crypto ticker plugin, bitcoin price, ethereum price, btc price 10 11 6 Requires at least: 3.0 12 13 7 Tested up to: 5.7.0 14 15 8 Stable tag: 3.0.19 16 17 9 Requires PHP: 5.6.39 18 19 10 License: GPLv2 or later 20 21 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html 22 12 23 24 25 13 Cryptocurrency features: displaying prices and exchange rates, candlestick price chart, calculator, accepting orders and payments, accepting donations. 26 14 27 28 29 15 == Description == 30 16 31 32 33 17 Update: 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. 34 18 35 36 37 19 Because 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. 38 20 39 40 41 21 Signup to create your affiliate account at Zwaply (https://zwaply.com/register) and place your username in your admin panel. That’s it. 42 22 43 44 45 23 P.S. If you don’t want to earn crypto, just remove the Trade button from the Settings page. 46 24 47 48 49 25 Notice: 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/) 50 26 51 52 53 27 = Cryptocurrency All-in-One free version features: = 54 28 55 56 57 29 * coin market cap - list of all cryptocurrencies with prices and option to earn crypto, 58 30 59 60 61 31 * cryptocurrency ticker widget and shortcode - a live update badge with the logo, price, and 24h change of one cryptocurrency, 62 32 63 64 65 33 * accept donations: Bitcoin (BTC), Ethereum (ETH), Litecon (LTC), Monero (XMR), Bitcoin Cash (BCH), Zcash (ZEC), 66 34 67 68 69 35 * cyptocurrency resources - helpful resources list in your WordPress admin, 70 36 71 72 73 37 * Ethereum node support: address balance, view block, 74 38 75 76 77 39 * custom designs themes: light, dark, and option to write your own CSS. 78 40 79 80 81 41 * plugin translations: German, Italian, .pot file provided. 82 42 83 84 85 43 = Cryptocurrency All-in-One premium version features: = 86 44 87 88 89 45 * all free version features plus: 90 46 91 92 93 47 * coin market cap – full features, 94 48 95 96 97 49 * easily accept orders and payments: Bitcoin (BTC), Ethereum (ETH), Litecon (LTC), Bitcoin Cash (BCH), Zcash (ZEC), 98 50 99 100 101 51 * display prices and exchange rates (all cryptocurrencies), 102 52 103 104 105 53 * cryptocurrency to fiat calculator (all cryptocurrencies), 106 54 107 108 109 55 * display candlestick price charts (all cryptocurrencies), 110 56 111 112 113 57 [Get premium now](https://creditstocks.com/cryptocurrency-one-wordpress-plugin/) 114 58 115 116 117 59 = Instructions to display a "Coin Market Capitalization" list of all cryptocurrencies on your web site. = 118 60 119 120 121 61 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: 122 62 123 124 125 63 `[allcurrencies]` 126 64 127 128 129 65 `[allcurrencies basecurrency="eur"]` 130 66 131 132 133 67 `[allcurrencies limit="100" perpage="10"]` 134 68 135 136 137 69 `[allcurrencies basecurrency="eur" locale="de-DE"]` 138 70 139 140 141 71 [Live demo](https://creditstocks.com/cryptocurrency-prices/list-of-all-cryptocurrencies/) 142 72 143 144 145 73 = Instructions to display a "Cryptocurrency ticker widget" on your web site. = 146 74 147 148 149 75 Cryptocurrency 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: 150 76 151 152 153 77 `[currencyticker currency="eth"]` 154 78 155 156 157 79 = Instructions to accept cryptocurrency orders and payments on your web site. (Premium version only) = 158 80 159 160 161 81 Supported 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. 162 82 163 164 165 83 Setup: 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. 166 84 167 168 169 85 Exapmle shortcodes: 170 86 171 172 173 87 `[cryptopayment item="Advertising services" amount="0.003" currency="BTC"]` 174 88 175 176 177 89 `[cryptopayment item="Publish a PR article" amount="50 USD" currency="BTC"]` 178 90 179 180 181 91 `[cryptopayment item="Publish a PR article" amount="10 EUR" currency="ETH"]` 182 92 183 184 185 93 [Live demo](https://creditstocks.com/payment-demo/) 186 94 187 188 189 95 = Instructions to accept cryptocurrency donations on your web site. = 190 96 191 192 193 97 Add a shortcode to the text of the pages or posts where you want to accept donations. 194 98 195 196 197 99 Supported 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): 198 100 199 200 201 101 `[cryptodonation address="1ABwGVwbna6DnHgPefSiakyzm99VXVwQz9"]` 202 102 203 204 205 103 `[cryptodonation address="0xc85c5bef5a9fd730a429b0e04c69b60d9ef4c64b" currency="eth"]` 206 104 207 208 209 105 `[cryptodonation address="463tWEBn5XZJSxLU6uLQnQ2iY9xuNcDbjLSjkn3XAXHCbLrTTErJrBWYgHJQyrCwkNgYvyV3z8zctJLPCZy24jvb3NiTcTJ" paymentid="a1be1fb24f1e493eaebce2d8c92dc68552c165532ef544b79d9d36d1992cff07" currency="xmr"]` 210 106 211 212 213 107 [Live demo](https://creditstocks.com/donate/) 214 108 215 216 217 109 = Instructions to display cryptocurrency exchange rates in a nicely formatted table. (Premium version only) = 218 110 219 220 221 111 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: 222 112 223 224 225 113 `[currencyprice currency1="btc" currency2="usd,eur,ltc,eth,jpy,gbp,chf,aud,cad"]` 226 114 227 228 229 115 `[currencyprice currency1="ltc" currency2="usd,eur,btc"]` 230 116 231 232 233 117 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, NXT, LANA. Fiat currencies conversion supported: AUD, USD, CAD, GBP, EUR, CHF, JPY, CNY. 234 118 235 236 237 119 [Live demo](https://creditstocks.com/cryptocurrency-prices/current-litecoin-price/) 238 120 239 240 241 121 = Instructions to display cryptocurrency calculator. (Premium version only) = 242 122 243 244 245 123 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: 246 124 247 248 249 125 `[currencycalculator currency1="btc" currency2="usd,eur,ltc,eth,jpy,gbp,chf,aud,cad"]` 250 126 251 252 253 127 `[currencycalculator currency1="ltc" currency2="usd,eur,btc"]` 254 128 255 256 257 129 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, NXT, LANA. Partial suport for over 1000 cryptocurrencies. Fiat currencies conversion supported: AUD, USD, CAD, GBP, EUR, CHF, JPY, CNY. 258 130 259 260 261 131 [Live demo](https://creditstocks.com/cryptocurrency-prices/current-litecoin-price/) 262 132 263 264 265 133 = Instructions to display cryptocurrency candlestick price chart (Premium version only) = 266 134 267 268 269 135 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: 270 136 271 272 273 137 `[currencychart currency1="btc" currency2="usd"]` 274 138 275 276 277 139 `[currencychart currency1="dash" currency2="btc" defaultperiod="1year"]` 278 140 279 280 281 141 [Live demo](https://creditstocks.com/cryptocurrency-prices/current-bitcoin-price/) 282 142 283 284 285 143 = Instructions for Ethereum node integration = 286 144 287 288 289 145 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: 290 146 291 292 293 147 `[cryptoethereum feature="balance"]` 294 148 295 296 297 149 `[cryptoethereum feature="block"]` 298 150 299 300 301 151 Notice: Beware mixed content browser restriction! If your web site uses https, the node must also use https. 302 152 303 304 305 153 [Live demo](https://creditstocks.com/ethereum/) 306 154 307 308 309 155 = Instructions to use the plugin in a widget or from the theme = 310 156 311 312 313 157 To use the plugin in a widget, use the provided "CP Shortcode Widget" and put the shortcode in the "Content" section. 314 158 315 316 317 159 You can also call all plugin features directly from the theme - see the plugin settings page for PHP samples. 318 160 319 320 321 161 This plugin uses data from third party public APIs. By installing this plugin you agree with their terms: 322 162 323 324 325 163 For free and premium versions: [CoinCap.io Public API](https://docs.coincap.io/) - no API key required. 326 164 327 328 329 165 For premium version only: [CryptoCompare Public API](https://www.cryptocompare.com/api/) - no API key required, [Google Charts API](https://developers.google.com/chart/terms). 330 166 331 332 333 167 Special thanks to: Boyan Yankov, Emil Samsarov, theox89, Wayne M. 334 168 335 336 337 169 [Publish your documents on Ethereum blockchain](https://github.com/BoyanBorislavovYankov/Blockchain-Payload-Tools) 338 170 339 340 341 171 == Installation == 342 172 343 344 345 173 1. Unzip the `cryptocurrency-prices.zip` folder. 346 174 347 348 349 175 2. Upload the `cryptocurrency-prices` folder to your `/wp-content/plugins` directory. 350 176 351 352 353 177 3. In your WordPress dashboard, head over to the *Plugins* section. 354 178 355 356 357 179 4. Activate *Cryptocurrency Prices*. 358 180 359 360 361 181 == Frequently Asked Questions == 362 182 363 364 365 183 = Can I show the plugin from the theme code or from another plugin? = 366 184 367 368 369 185 Yes. You can use a PHP code, which handles and shows the plugin shortcode - see the plugin settings page for PHP sample. 370 186 371 372 373 187 = Can I show the plugin in a widget? = 374 188 375 376 377 189 Yes! Use the provided "CP Shortcode Widget" and put the shortcode in the "Content" section, for example: [currencyprice currency1="btc" currency2="usd,eur"]. 378 190 379 380 381 191 = The plugin does not work - I just see the shortcode? = 382 192 383 384 385 193 Make 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. 386 194 387 388 389 195 = Why yhe design / layout / styles are broken or look bad? = 390 196 391 392 393 197 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. Try with the default theme, maybe there is an issue with the theme. Try to enable / disable the styles from the plugin admin. 394 198 395 396 397 199 = The plugin does not work - I see no data or an error message? = 398 200 399 400 401 201 Try to activate compatibility mode from the plugin settings. It may be due to data provider server downtime. 402 202 403 404 405 203 = How to style the plugin? / I don't like the design? = 406 204 407 408 409 205 This 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. 410 206 411 412 413 207 = Can the plugin cache the data? = 414 208 415 416 417 209 The plugin itself does not cache the data. But it is compatible with caching plugins. 418 210 419 420 421 211 == Screenshots == 422 212 423 424 425 213 == Changelog == 426 214 427 428 429 215 = 3.0.18 = 430 216 431 432 433 217 * Back to live 434 435 218 * Backend messages updates. 436 219 437 438 439 220 = 3.0.17 = 440 221 441 442 443 222 * Bugfixes and minor improvements. 444 223 445 446 447 224 = 3.0.16 = 448 225 449 450 451 226 * Bugfixes and minor improvements. 452 227 453 454 455 228 = 3.0.15 = 456 229 457 458 459 230 * Bugfixes and minor improvements. We changed our API to api.coincap.io. 460 231 461 462 463 232 = 3.0.14 = 464 233 465 466 467 234 * We changed our API to Coingecko.com. 468 235 469 470 471 236 * Fixed some reported bugs on the trade coin URL. 472 237 473 474 475 238 = 3.0.13 = 476 239 477 478 479 240 * CoinMarketCap Public API changed to the Professional API v2 480 241 481 482 483 242 = 3.0.12 = 484 243 485 486 487 244 * Some style changes. 488 245 489 490 491 246 * Added coin trade option via Zwaply.com 492 247 493 494 495 248 = 3.0.11 = 496 249 497 498 499 250 * Bugfixes. Plugin developer changed. 500 251 501 502 503 252 = 3.0.10 = 504 253 505 506 507 254 * Added live update feature for cryptocurrency ticker widget. 508 255 509 510 511 256 = 3.0.9 = 512 257 513 514 515 258 * Coin market cap list is now responsive. Added ticker widget shortcode. Updated list of cryptocurrency resources. Other minor improvements. 516 259 517 518 519 260 = 3.0.8 = 520 261 521 522 523 262 * Added cryptocurrency ticker widget feature that supports bitcoin and almost all altcoins. Improved coin image library. 524 263 525 526 527 264 = 3.0.7 = 528 265 529 530 531 266 * Bugfixes. 532 267 533 534 535 268 = 3.0.6 = 536 269 537 538 539 270 * Bugfixes and minor improvements. 540 271 541 542 543 272 = 3.0.5 = 544 273 545 546 547 274 * Added support of BCH (Bictoin Cash) payments and donations. Added default period parameter support to currencychart shortcode. Improved coin market cap list of cryptocurrencies. 548 275 549 550 551 276 = 3.0.4 = 552 277 553 554 555 278 * Added Cyptocurrency Resources in plugin admin. Improved list of currencies "allcurrencies". 556 279 557 558 559 280 = 3.0.3 = 560 281 561 562 563 282 * Added GDPR compliance of the payment form. Added more settings to "allcurrencies"" shortcode. Improved help section and readme. 564 283 565 566 567 284 = 3.0.2 = 568 285 569 570 571 286 * Improved CoinMarketCap list of currencies. Added CSS styles to the free version. 572 287 573 574 575 288 = 3.0.1 = 576 289 577 578 579 290 * Added volume to price chart. Added admin help to free version. 580 291 581 582 583 292 = 3.0 = 584 293 585 586 587 294 * Refactored plugin to use CoinMarketCap API. Created free plugin version again. Features that rely on CryptoCompare API moved to premium version. 588 295 589 590 591 296 = 2.7 = 592 297 593 594 595 298 * Refactored "allcurrencies" shortcode - coin market cap view with pagination, sorting, search. Discontinied the free plugin version, offered only as a premium plugin. 596 299 597 598 599 300 = 2.6.4 = 600 301 601 602 603 302 * Added DataTables support for the "allcurrencies" shortcode - pagination, sorting, search. 604 303 605 606 607 304 = 2.6.3 = 608 305 609 610 611 306 * Added captcha support for payments. 612 307 613 614 615 308 = 2.6.2 = 616 309 617 618 619 310 * Bugfixes. Added feature for ZCash (ZEC) payments in the premium version. 620 311 621 622 623 312 = 2.6.1 = 624 313 625 626 627 314 * Bugfixes. Added feature for altcoin payments in the premium version (ETH, LTC). 628 315 629 630 631 316 = 2.6 = 632 317 633 634 635 318 * Many improvements. Free and premium plugin versions. 636 319 637 638 639 320 = 2.5.5 = 640 321 641 642 643 322 * Added default CSS. 644 323 645 646 647 324 = 2.5.4 = 648 325 649 650 651 326 * Fixed bugs. Improved plugin styling capabilities. 652 327 653 654 655 328 = 2.5.3 = 656 329 657 658 659 330 * Plugin is now translatable. German translation is provided. Minor improvements. 660 331 661 662 663 332 = 2.5.2 = 664 333 665 666 667 334 * Added support of parameters for [allcurrencies] shortcode. 668 335 669 670 671 336 = 2.5.1 = 672 337 673 674 675 338 * Added support for Ethereum block viewer by connecting to an Ethereum blockchain node. Other minor improvements. 676 339 677 678 679 340 = 2.5 = 680 341 681 682 683 342 * Added Ethereum blockchain node support with web3.js. Removed Counterparty support. Bugfixes. 684 343 685 686 687 344 = 2.4.5 = 688 345 689 690 691 346 * 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). 692 347 693 694 695 348 = 2.4.4 = 696 349 697 698 699 350 * Added a feature for accepting donations in Ethereum (ETH). Improved help section. 700 351 701 702 703 352 = 2.4.3 = 704 353 705 706 707 354 * Bugfixes and improvements of the payments module. Some code rewritten in OOP. 708 355 709 710 711 356 = 2.4.2 = 712 357 713 714 715 358 * Minor improvements of the payments module. 716 359 717 718 719 360 = 2.4.1 = 720 361 721 722 723 362 * Minor improvements. 724 363 725 726 727 364 = 2.4 = 728 365 729 730 731 366 * Added a basic feature for accepting payments in BTC. 732 367 733 734 735 368 = 2.3.4 = 736 369 737 738 739 370 * Added support for multiple charts per page. Added Bitcoin Cash (BCC / BCH) cryptocurrency with its icons supported. 740 371 741 742 743 372 = 2.3.3 = 744 373 745 746 747 374 * 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 748 375 749 750 751 376 = 2.3.2 = 752 377 753 754 755 378 * Added feature to support custom CSS. Fixed minor bugs. 756 379 757 758 759 380 = 2.3.1 = 760 381 761 762 763 382 * Added feature to show only calculator or prices table. Added compatibility mode for servers without CURL support. Fixed minor bugs. 764 383 765 766 767 384 = 2.3 = 768 385 769 770 771 386 * Changed plugin name. Added better widget support. Improved plugin administration. Improved readme. 772 387 773 774 775 388 = 2.2 = 776 389 777 778 779 390 * Added coins list feature. Improved plugin code architecture. 780 391 781 782 783 392 = 2.1.1 = 784 393 785 786 787 394 * Improved price formatting and support of currencies with smaller prices. Added Lana coin icon. 788 395 789 790 791 396 = 2.1 = 792 397 793 794 795 398 * Added cryptocurrency charts feature. Added icons for many currencies: GBP, JPY, XRP, DASH, ZEC, etc. 796 399 797 798 799 400 = 2.0 = 800 401 801 802 803 402 * 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! 804 403 805 806 807 404 = 1.1 = 808 405 809 810 811 406 * Bugs fixed - you need to update. 812 407 813 814 815 408 = 1.0 = 816 409 817 818 819 410 * Plugin released. Everything is new! 820 411 821 822 823 412 == Upgrade Notice == 824 413 825 826 827 414 = 3.0.14 = 828 415 829 830 831 416 We changed our API to Coingecko.com. 832 417 833 834 835 418 Fixed some reported bugs on the trade coin URL. 419 420 = 3.0.19 = 421 422 Updated for the later version of WordPress, fixed bugs, and minor improvements.
Note: See TracChangeset
for help on using the changeset viewer.