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