Changeset 2854429
- Timestamp:
- 01/25/2023 02:43:50 PM (3 years ago)
- Location:
- cryptocurrency-widgets-pack
- Files:
-
- 91 added
- 2 deleted
- 5 edited
-
tags/2.0 (added)
-
tags/2.0/assets (added)
-
tags/2.0/assets/admin (added)
-
tags/2.0/assets/admin/cards (added)
-
tags/2.0/assets/admin/cards/card1.png (added)
-
tags/2.0/assets/admin/cards/card1hover.png (added)
-
tags/2.0/assets/admin/cards/card2.png (added)
-
tags/2.0/assets/admin/cards/card2hover.png (added)
-
tags/2.0/assets/admin/cards/card3.png (added)
-
tags/2.0/assets/admin/cards/card3hover.png (added)
-
tags/2.0/assets/admin/css (added)
-
tags/2.0/assets/admin/css/selectize.default.css (added)
-
tags/2.0/assets/admin/css/style.css (added)
-
tags/2.0/assets/admin/images (added)
-
tags/2.0/assets/admin/images/coingecko-logo.png (added)
-
tags/2.0/assets/admin/images/icon.png (added)
-
tags/2.0/assets/admin/images/star.png (added)
-
tags/2.0/assets/admin/js (added)
-
tags/2.0/assets/admin/js/autosize.min.js (added)
-
tags/2.0/assets/admin/js/common.js (added)
-
tags/2.0/assets/admin/js/es5.js (added)
-
tags/2.0/assets/admin/js/selectize.min.js (added)
-
tags/2.0/assets/pro-settings (added)
-
tags/2.0/assets/pro-settings/box-checked.png (added)
-
tags/2.0/assets/pro-settings/box-settings.png (added)
-
tags/2.0/assets/pro-settings/box-unchecked.png (added)
-
tags/2.0/assets/pro-settings/card-settings.png (added)
-
tags/2.0/assets/pro-settings/changelly-checked.png (added)
-
tags/2.0/assets/pro-settings/changelly-settings.png (added)
-
tags/2.0/assets/pro-settings/changelly-unchecked.png (added)
-
tags/2.0/assets/pro-settings/chart-checked.png (added)
-
tags/2.0/assets/pro-settings/chart-settings.png (added)
-
tags/2.0/assets/pro-settings/chart-unchecked.png (added)
-
tags/2.0/assets/pro-settings/converter-checked.png (added)
-
tags/2.0/assets/pro-settings/converter-settings.png (added)
-
tags/2.0/assets/pro-settings/converter-unchecked.png (added)
-
tags/2.0/assets/pro-settings/font-settings.png (added)
-
tags/2.0/assets/pro-settings/general-settings.png (added)
-
tags/2.0/assets/pro-settings/label-checked.png (added)
-
tags/2.0/assets/pro-settings/label-settings.png (added)
-
tags/2.0/assets/pro-settings/list-checked.png (added)
-
tags/2.0/assets/pro-settings/list-settings.png (added)
-
tags/2.0/assets/pro-settings/list-unchecked.png (added)
-
tags/2.0/assets/pro-settings/multi-checked.png (added)
-
tags/2.0/assets/pro-settings/multi-settings.png (added)
-
tags/2.0/assets/pro-settings/multi-unchecked.png (added)
-
tags/2.0/assets/pro-settings/news-checked.png (added)
-
tags/2.0/assets/pro-settings/news-settings.png (added)
-
tags/2.0/assets/pro-settings/news-unchecked.png (added)
-
tags/2.0/assets/pro-settings/option-settings.png (added)
-
tags/2.0/assets/pro-settings/realtime-settings.png (added)
-
tags/2.0/assets/pro-settings/table-settings.png (added)
-
tags/2.0/assets/pro-settings/text-checked.png (added)
-
tags/2.0/assets/pro-settings/text-settings.png (added)
-
tags/2.0/assets/pro-settings/text-unchecked.png (added)
-
tags/2.0/assets/pro-settings/ticker-color.png (added)
-
tags/2.0/assets/pro-settings/ticker-display.png (added)
-
tags/2.0/assets/pro-settings/widget-settings.png (added)
-
tags/2.0/assets/public (added)
-
tags/2.0/assets/public/css (added)
-
tags/2.0/assets/public/css/datatable-style.css (added)
-
tags/2.0/assets/public/css/style.css (added)
-
tags/2.0/assets/public/fonts (added)
-
tags/2.0/assets/public/fonts/massive-crypto.eot (added)
-
tags/2.0/assets/public/fonts/massive-crypto.svg (added)
-
tags/2.0/assets/public/fonts/massive-crypto.ttf (added)
-
tags/2.0/assets/public/fonts/massive-crypto.woff (added)
-
tags/2.0/assets/public/img (added)
-
tags/2.0/assets/public/img/crypto-logo.svg (added)
-
tags/2.0/assets/public/img/dual-ring-loader.svg (added)
-
tags/2.0/assets/public/img/error.png (added)
-
tags/2.0/assets/public/js (added)
-
tags/2.0/assets/public/js/common.js (added)
-
tags/2.0/assets/public/js/dataTables.responsive.min.js (added)
-
tags/2.0/assets/public/js/jquery.dataTables.min.js (added)
-
tags/2.0/cryptocurrency-widgets-pack.php (added)
-
tags/2.0/includes (added)
-
tags/2.0/includes/display.php (added)
-
tags/2.0/includes/duplicate.php (added)
-
tags/2.0/includes/premium.php (added)
-
tags/2.0/includes/settings.php (added)
-
tags/2.0/includes/shortcodes.php (added)
-
tags/2.0/languages (added)
-
tags/2.0/languages/cryptocurrency-widgets-pack.pot (added)
-
tags/2.0/languages/readme.txt (added)
-
tags/2.0/readme.txt (added)
-
trunk/assets/admin/js/autosize.min.js (added)
-
trunk/assets/admin/js/common.js (modified) (7 diffs)
-
trunk/assets/public/js/common.js (modified) (1 diff)
-
trunk/cryptocurrency-widgets-pack.php (modified) (21 diffs)
-
trunk/includes/display.php (added)
-
trunk/includes/mcwp-premium.php (deleted)
-
trunk/includes/mcwp-settings.php (deleted)
-
trunk/includes/premium.php (added)
-
trunk/includes/settings.php (added)
-
trunk/includes/shortcodes.php (added)
-
trunk/languages/cryptocurrency-widgets-pack.pot (modified) (18 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cryptocurrency-widgets-pack/trunk/assets/admin/js/common.js
r2751462 r2854429 2 2 $ = jQuery.noConflict(); 3 3 4 $('#crypto_custom_css').each(function(e) { 5 while($(this).outerHeight() < this.scrollHeight + parseFloat($(this).css("borderTopWidth")) + parseFloat($(this).css("borderBottomWidth"))) { 6 $(this).height($(this).height()+1); 7 }; 8 }).css('overflow','hidden'); 9 10 $('#crypto_custom_css').keyup(function(e) { 11 while($(this).outerHeight() < this.scrollHeight + parseFloat($(this).css("borderTopWidth")) + parseFloat($(this).css("borderBottomWidth"))) { 12 $(this).height($(this).height()+1); 13 }; 14 }); 4 autosize($('#crypto_custom_css')); 15 5 16 6 function select_all(el) { … … 79 69 control.clear(); 80 70 }); 81 71 82 72 $('.form-radio .img-pro').click(function(){ 83 73 $('.prodemo img').each(function(){ … … 99 89 $('label[for="crypto_background_color"]:first-child').show(); 100 90 } 101 91 102 92 if (this.value == 'ticker') { 103 93 $('.ticker-position').removeClass('cc-hide'); … … 122 112 $('.text-position').removeClass('cc-hide'); 123 113 } 124 114 125 115 $('.prodemo img').each(function(){ 126 116 var imgsrc = $(this).attr('src'); … … 129 119 }); 130 120 }); 131 121 132 122 $('.crypto-edit input[type=radio][name=crypto_ticker_position]').change(function() { 133 123 $('.crypto-edit input[type=radio][name=crypto_ticker_position]').each(function(){ … … 136 126 $(this).closest('label').find('img').attr('src',allimgsrc); 137 127 }); 138 128 139 129 var curimg = $(this).closest('label').find('img').attr('src'); 140 130 curimg = curimg.replace('.png','') + 'hover' + '.png'; … … 206 196 }) 207 197 }); 198 208 199 $(document).on('click', '.mcwp-notice .notice-dismiss, .mcwp-notice .mcwp-done', function() { 209 200 var $mcwprate = $(this).closest('.mcwp-notice'); -
cryptocurrency-widgets-pack/trunk/assets/public/js/common.js
r2751462 r2854429 184 184 { 185 185 targets: 0, 186 data: ' id',187 name: ' id',186 data: 'rank', 187 name: 'rank', 188 188 render: function(data, type, row, meta) { 189 189 return data; -
cryptocurrency-widgets-pack/trunk/cryptocurrency-widgets-pack.php
r2751469 r2854429 7 7 * Description: Price ticker, table, cards, label widget for all cryptocurrencies using Coingecko API. 8 8 * Requires PHP: 5.6 9 * Requires at least: 5.610 * Tested up to: 6. 011 * Version: 1.8.19 * Requires at least: 4.3.0 10 * Tested up to: 6.1.1 11 * Version: 2.0 12 12 * License: GPL v3 13 13 * Text Domain: cryptocurrency-widgets-pack … … 19 19 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 20 20 21 define('MCWP_VERSION', ' 1.8.1');21 define('MCWP_VERSION', '2.0'); 22 22 define('MCWP_PATH', plugin_dir_path(__FILE__)); 23 23 define('MCWP_URL', plugin_dir_url(__FILE__)); 24 24 25 register_activation_hook(__FILE__, array('MCWP_Crypto','activate')); 26 register_deactivation_hook(__FILE__, array('MCWP_Crypto','deactivate')); 25 require_once MCWP_PATH . 'includes/display.php'; 26 require_once MCWP_PATH . 'includes/shortcodes.php'; 27 27 28 28 29 if ( ! class_exists( 'MCWP_Crypto' ) ) { 29 30 class MCWP_Crypto { 30 31 private static $_instance = null; 32 public $allpostmetas = array( 33 'crypto_ticker', 34 'crypto_ticker_coin', 35 'crypto_ticker_position', 36 'crypto_bunch_select', 37 'crypto_speed', 38 'crypto_ticker_columns', 39 'crypto_card_columns', 40 'crypto_table_columns', 41 'crypto_background_color', 42 'crypto_text_color', 43 'crypto_custom_css' 44 ); 31 32 private static $_instance = null; 45 33 46 34 public static function get_instance() { … … 51 39 return self::$_instance; 52 40 } 53 54 public static function activate() { 55 global $wpdb; 41 42 public function __construct() { 43 global $wpdb; 44 45 if ( self::$_instance ) { 46 return; 47 } 48 49 self::$_instance = $this; 50 $this->wpdb = $wpdb; 51 $this->tablename = $this->wpdb->prefix . "mcwp_coins"; 52 53 $this->display = new MCWP_Display(); 54 $this->shortcode = new CryptoPack_Shortcodes(); 55 56 require_once(MCWP_PATH . 'includes/duplicate.php'); 57 58 add_action('admin_enqueue_scripts', array($this, 'admin_scripts')); 59 add_action('wp_enqueue_scripts', array($this, 'frontend_scripts')); 60 add_shortcode('cryptopack', array($this, 'shortcode')); 61 add_action('wp_footer', array($this, 'global_ticker')); 62 add_action('wp_ajax_mcwp_table', array($this, 'table_data')); 63 add_action('wp_ajax_nopriv_mcwp_table', array($this, 'table_data')); 64 65 $this->create_post_type(); 66 $this->upgrade_version(); 67 68 register_activation_hook(__FILE__, array($this, 'activate')); 69 register_deactivation_hook(__FILE__, array($this, 'deactivate')); 70 } 71 72 public static function activate() { 73 global $wpdb; 56 74 $charset_collate = $wpdb->get_charset_collate(); 57 75 $table_name = $wpdb->prefix . 'mcwp_coins'; … … 74 92 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 75 93 dbDelta( $sql ); 76 }77 78 public static function deactivate() {94 } 95 96 public static function deactivate() { 79 97 global $wpdb; 80 $table_name = $wpdb->prefix . 'mcwp_coins';98 $table_name = $wpdb->prefix . 'mcwp_coins'; 81 99 $wpdb->query("DROP TABLE IF EXISTS " . $table_name); 82 100 delete_transient('mcwp-data-time'); 83 }84 85 public function __construct() {86 global $wpdb;87 88 if ( self::$_instance ) {89 return;90 }91 92 self::$_instance = $this;93 $this->wpdb = $wpdb;94 $this->tablename = $this->wpdb->prefix . "mcwp_coins";95 $this->mcwp_includes();96 $this->upgrade_version();97 98 require_once(MCWP_PATH . 'includes/duplicate.php');99 100 add_action('admin_init', array($this, 'mcwp_admin_hooks'));101 add_action('admin_enqueue_scripts', array($this,'mcwp_scripts'));102 add_action('admin_enqueue_scripts', array($this,'mcwp_frontend_scripts'));103 add_action('wp_enqueue_scripts', array($this,'mcwp_frontend_scripts'));104 add_shortcode('cryptopack', array($this,'mcwp_shortcode'));105 add_action('wp_footer', array($this,'mcwp_tickerHeadFooter'));106 add_action('wp_ajax_mcwp_table', array($this,'mcwp_tables'));107 add_action('wp_ajax_nopriv_mcwp_table', array($this,'mcwp_tables'));108 }109 110 public function mcwp_admin_hooks() {111 add_filter('plugin_action_links', array($this,'mcwp_action_links'), 10, 2 );112 add_filter('plugin_row_meta', array($this,'mcwp_row_meta'), 10, 2 );113 114 if(!get_option('mcwp-notice')){115 add_option('mcwp-notice','1');116 }117 if(get_option('mcwp-notice') && get_option('mcwp-notice') != 0) {118 add_action('wp_ajax_mcwp_notice', array($this,'mcwp_notice_dismiss'));119 }120 121 if(!get_option('mcwp-top-notice')){122 add_option('mcwp-top-notice',strtotime(current_time('mysql')));123 }124 if(get_option('mcwp-top-notice') && get_option('mcwp-top-notice') != 0) {125 if( get_option('mcwp-top-notice') < strtotime('-3 days')) { //if greater than 3 days126 add_action('admin_notices', array($this,'mcwp_top_admin_notice'));127 add_action('wp_ajax_mcwp_top_notice', array($this,'mcwp_top_notice_dismiss'));128 }129 }130 101 } 131 102 … … 149 120 set_transient('mcwp_version', MCWP_VERSION); 150 121 } 151 152 122 153 123 if (version_compare($mcwp_installed_version, '1.6.1', '<')) { 154 124 155 $query = "ALTER TABLE " . $this->tablename . "ADD COLUMN img VARCHAR(150) NOT NULL AFTER rank";156 $this->wpdb->query($ query);125 $query = "ALTER TABLE %s ADD COLUMN img VARCHAR(150) NOT NULL AFTER rank"; 126 $this->wpdb->query($this->wpdb->prepare($query, [$this->tablename])); 157 127 delete_transient('mcwp-data-time'); 158 128 set_transient('mcwp_version', MCWP_VERSION); … … 160 130 161 131 } 162 163 public function mcwp_scripts(){ 164 wp_enqueue_style( 'wp-color-picker'); 165 wp_enqueue_script( 'wp-color-picker'); 166 wp_enqueue_style( 'mcwpa-crypto-css', MCWP_URL . 'assets/admin/css/style.css',array(),MCWP_VERSION,'all'); 167 wp_enqueue_style( 'mcwpa-crypto-select-css', MCWP_URL . 'assets/admin/css/selectize.default.css',array(),MCWP_VERSION,'all'); 168 wp_enqueue_script( 'mcwpa-crypto-es5', MCWP_URL . 'assets/admin/js/es5.js',array('jquery'), MCWP_VERSION,true); 169 wp_script_add_data( 'mcwpa-crypto-es5', 'conditional', 'lt IE 9' ); 170 wp_enqueue_script( 'mcw-crypto-select', MCWP_URL . 'assets/admin/js/selectize.min.js',array('jquery'), MCWP_VERSION,true); 171 wp_enqueue_script( 'mcwpa-crypto-common', MCWP_URL . 'assets/admin/js/common.js',array('jquery'), MCWP_VERSION,true); 172 } 173 174 public function mcwp_frontend_scripts(){ 175 176 177 wp_enqueue_style( 'mcwp-crypto-css', MCWP_URL . 'assets/public/css/style.css',array(),MCWP_VERSION,'all'); 178 wp_enqueue_style( 'mcwp-crypto-datatable-css', MCWP_URL . 'assets/public/css/datatable-style.css',array(),MCWP_VERSION,'all'); 179 wp_enqueue_script( 'mcwp-crypto-datatable-js', MCWP_URL . 'assets/public/js/jquery.dataTables.min.js',array('jquery'), MCWP_VERSION, true); 180 wp_enqueue_script( 'mcwp-crypto-datatable-resp', MCWP_URL . 'assets/public/js/dataTables.responsive.min.js',array('jquery'), MCWP_VERSION, true); 181 wp_register_script( 'mcwp-crypto-common', MCWP_URL . 'assets/public/js/common.js',array('jquery'), MCWP_VERSION,true); 182 wp_localize_script( 'mcwp-crypto-common', 'mcwpajax', array('url' => MCWP_URL, 'ajax_url' => admin_url('admin-ajax.php'))); 183 wp_enqueue_script( 'mcwp-crypto-common'); 184 } 185 186 public function mcwp_all_collection($cquery) { 132 133 public function admin_scripts() { 134 135 $screen = get_current_screen(); 136 137 wp_enqueue_style('wp-color-picker'); 138 wp_enqueue_script('wp-color-picker'); 139 wp_enqueue_style('mcwpa-crypto-css', MCWP_URL . 'assets/admin/css/style.css', array(), MCWP_VERSION, 'all'); 140 wp_enqueue_style('mcwpa-crypto-select-css', MCWP_URL . 'assets/admin/css/selectize.default.css', array(), MCWP_VERSION, 'all'); 141 wp_enqueue_script('mcwpa-crypto-es5', MCWP_URL . 'assets/admin/js/es5.js', array('jquery'), MCWP_VERSION, true); 142 wp_script_add_data('mcwpa-crypto-es5', 'conditional', 'lt IE 9' ); 143 wp_enqueue_script('mcw-autosize', MCWP_URL . 'assets/admin/js/autosize.min.js', array('jquery'), MCWP_VERSION, true); 144 wp_enqueue_script('mcw-crypto-select', MCWP_URL . 'assets/admin/js/selectize.min.js', array('jquery'), MCWP_VERSION, true); 145 wp_enqueue_script('mcwpa-crypto-common', MCWP_URL . 'assets/admin/js/common.js', array('jquery'), MCWP_VERSION, true); 146 147 if ($screen->post_type === 'mcwp' && $screen->base === 'post') { 148 $this->frontend_scripts(); 149 } 150 } 151 152 public function frontend_scripts() { 153 wp_enqueue_style('mcwp-crypto-css', MCWP_URL . 'assets/public/css/style.css',array(), MCWP_VERSION, 'all'); 154 wp_enqueue_style('mcwp-crypto-datatable-css', MCWP_URL . 'assets/public/css/datatable-style.css', array(), MCWP_VERSION, 'all'); 155 wp_enqueue_script('mcwp-crypto-datatable-js', MCWP_URL . 'assets/public/js/jquery.dataTables.min.js', array('jquery'), MCWP_VERSION, true); 156 wp_enqueue_script('mcwp-crypto-datatable-resp', MCWP_URL . 'assets/public/js/dataTables.responsive.min.js', array('jquery'), MCWP_VERSION, true); 157 wp_register_script('mcwp-crypto-common', MCWP_URL . 'assets/public/js/common.js', array('jquery'), MCWP_VERSION, true); 158 wp_localize_script('mcwp-crypto-common', 'mcwpajax', array('url' => MCWP_URL, 'ajax_url' => admin_url('admin-ajax.php'))); 159 wp_enqueue_script('mcwp-crypto-common'); 160 } 161 162 public function fetch_coins($cquery) { 187 163 188 164 $mcwp_data_time = get_transient('mcwp-data-time'); … … 190 166 //update old database 191 167 if($mcwp_data_time === false){ 192 $mcwp_request = wp_remote_get('https://api.blocksera.com/v1/tickers ');168 $mcwp_request = wp_remote_get('https://api.blocksera.com/v1/tickers?limit=2000&sort=market_cap_usd'); 193 169 $mcwp_body = wp_remote_retrieve_body($mcwp_request); 194 170 $mcwp_data = json_decode($mcwp_body); … … 198 174 $weeklyresult = $this->wpdb->get_results($wquery); 199 175 $output = []; 176 200 177 foreach($weeklyresult as $eachweek){ 201 178 $output[$eachweek->cid] = [ … … 204 181 ]; 205 182 } 206 $truncate = $this->wpdb->query('TRUNCATE ' .$this->tablename);183 $truncate = $this->wpdb->query('TRUNCATE ' . $this->tablename); 207 184 208 185 if($truncate){ 209 $prefix = "INSERT INTO ` ".$this->tablename."` (`cid`, `name`, `symbol`, `rank`, `img`, `price_usd`, `market_cap_usd`, `percent_change_24h`, `weekly`, `weekly_not_expire`) VALUES ";186 $prefix = "INSERT INTO `{$this->tablename}` (`cid`, `name`, `symbol`, `rank`, `img`, `price_usd`, `market_cap_usd`, `percent_change_24h`, `weekly`, `weekly_not_expire`) VALUES "; 210 187 211 188 $numItems = count($mcwp_data); … … 213 190 $qstring = []; 214 191 foreach ( $mcwp_data as $j => $coins ) { 215 if (!($coins->market_cap === null || $coins->market_cap_rank === null) && ($j < 2000)) {192 if (!($coins->market_cap === null || $coins->market_cap_rank === null)) { 216 193 if(array_key_exists($coins->id, $output)){ 217 $insweekly = '"'.$output[$coins->id]['weekly'].'"';218 $insweeklyexpire = '"'.$output[$coins->id]['weekly_not_expire'].'"';194 $insweekly = $output[$coins->id]['weekly']; 195 $insweeklyexpire = $output[$coins->id]['weekly_not_expire']; 219 196 } else { 220 $insweekly = ' ""';221 $insweeklyexpire = '"'.gmdate("Y-m-d H:i:s").'"';197 $insweekly = ''; 198 $insweeklyexpire = gmdate("Y-m-d H:i:s"); 222 199 } 223 200 … … 226 203 $coinssymbol = strtoupper($coins->symbol); 227 204 $coinsrank = $coins->market_cap_rank; 228 $coinsimg = '"'.(($coins->image != 'missing_large.png') ? explode('?',explode('images/',$coins->image)[1])[0] : 'error').'"';205 $coinsimg = (($coins->image != 'missing_large.png') ? explode('?', explode('images/', $coins->image)[1])[0] : 'error'); 229 206 $coinspriceusd = floatval($coins->current_price); 230 207 $coinsmarketcapusd = floatval($coins->market_cap); 231 208 $coinspercentchange24h = floatval($coins->price_change_percentage_24h); 232 209 233 $qstring[] = '("'.$coinsid.'", "'.$coinsname.'", "'.$coinssymbol.'", '.$coinsrank.', '.$coinsimg.', '.$coinspriceusd.', '.$coinsmarketcapusd.', '.$coinspercentchange24h.', '.$insweekly.', '.$insweeklyexpire.')';210 $qstring[] = array($coinsid, $coinsname, $coinssymbol, $coinsrank, $coinsimg, $coinspriceusd, $coinsmarketcapusd, $coinspercentchange24h, $insweekly, $insweeklyexpire); 234 211 } 235 212 } … … 238 215 239 216 foreach($qstring as $chunk) { 240 241 $query = $prefix .implode(',', $chunk);242 $ result = $this->wpdb->query($query);217 $placeholder = "(%s, %s, %s, %d, %s, %0.14f, %0.2f, %0.2f, %s, %s)"; 218 $query = $prefix . implode(", ", array_fill(0, count($chunk), $placeholder)); 219 $this->wpdb->query($this->wpdb->prepare($query, call_user_func_array('array_merge', $chunk))); 243 220 } 244 221 … … 252 229 } 253 230 } 254 231 255 232 $mcwp_data = $this->wpdb->get_results($cquery); 256 233 257 234 return $mcwp_data; 258 235 } 259 260 public function mcwp_image_id($image,$size = 'thumb') { 261 if($image == 'error'){ 262 return MCWP_URL.'assets/public/img/error.png'; 263 } else { 264 $image = str_replace('large/',$size.'/',$image); 265 return 'https://assets.coingecko.com/coins/images/'.$image; 266 } 267 } 268 269 public function mcwp_coinsyms() { 270 $query = "SELECT cid, name, symbol FROM " . $this->tablename; 271 $mcwp_coinsyms = array('cid' => array(), 'names' => array(), 'symbols' => array()); 272 $mcwp_data = $this->mcwp_all_collection($query); 273 foreach($mcwp_data as $mcwp_each_data) { 274 $mcwp_coinsyms['cid'][] = strtolower($mcwp_each_data->cid); 275 $mcwp_coinsyms['names'][] = strtolower($mcwp_each_data->name); 276 $mcwp_coinsyms['symbols'][] = strtolower($mcwp_each_data->symbol); 277 } 278 return $mcwp_coinsyms; 279 } 280 281 public function mcwp_tables_updates(){ 282 283 $mcwp_post_id = intval($_GET['mcwp_id']); 284 $allpostmetas = $this->allpostmetas; 285 for($k=0;$k<sizeof($allpostmetas);$k++){ 286 $temp = $allpostmetas[$k]; 287 ${$temp} = get_post_meta( $mcwp_post_id, $temp, true ); 288 } 289 290 $mcwp_coinsyms = $this->mcwp_coinsyms(); 291 $mcwp_cid = $mcwp_coinsyms['cid']; 292 $selectedcoins = array(); 293 294 if($crypto_bunch_select > 0){ 295 for($k=0;$k<sizeof($mcwp_cid);$k++){ 296 if($k < $crypto_bunch_select) { 297 array_push($selectedcoins,$mcwp_cid[$k]); 298 } 299 } 300 } else { 301 for($k=0;$k<sizeof($mcwp_cid);$k++){ 302 if(is_array($crypto_ticker_coin) && in_array($mcwp_cid[$k],$crypto_ticker_coin)){ 303 array_push($selectedcoins,$mcwp_cid[$k]); 304 } 305 } 306 } 307 308 $ORDERBY = $_GET['columns'][$_GET['order'][0]['column']]['name']; 309 $ORDERDIR = $_GET['order'][0]['dir']; 310 $START = $_GET['start']; 311 $LENGTH = $_GET['length']; 312 313 $query = 'SELECT * FROM `' . $this->tablename . '` WHERE `cid` IN ("' . implode('","', $selectedcoins) . '") ORDER BY '.$ORDERBY.' ' . $ORDERDIR . ' LIMIT '.$START.', '.$LENGTH; 314 315 $mcwp_names = array(); 316 $mcwp_data = $this->mcwp_all_collection($query); 317 318 $arr = []; 319 320 321 $eachcid = []; 322 foreach($mcwp_data as $mcwp_each_data) { 323 array_push($eachcid,$mcwp_each_data->cid); 324 } 325 $postcoins = implode(',',$eachcid); 326 $weekly = $this->mcwp_weekly_chart($postcoins); 327 328 foreach($mcwp_data as $mcwp_each_data) { 329 $key=array(); 330 $key['id'] = intval($mcwp_each_data->id); 331 $key['name'] = $mcwp_each_data->name; 332 $key['symbol'] = $mcwp_each_data->symbol; 333 $key['price'] = $mcwp_each_data->price_usd; 334 $key['mcap'] = $mcwp_each_data->market_cap_usd; 335 $key['change'] = $mcwp_each_data->percent_change_24h; 336 $key['weekly'] = $weekly[$mcwp_each_data->cid]; 337 $key['cid'] = $mcwp_each_data->cid; 338 $key['imgpath'] = $this->mcwp_image_id($mcwp_each_data->img); 339 if(is_array($crypto_table_columns) && in_array('coingecko',$crypto_table_columns)) { 340 $key['link'] = true; 341 } 342 $arr[] = $key; 343 344 } 345 346 $output = array( 347 'recordsTotal' => sizeof($selectedcoins), 348 'recordsFiltered' => sizeof($selectedcoins), 349 'draw'=> $_GET['draw'], 350 'data'=> $arr 351 ); 352 return $output; 353 } 354 public function mcwp_tables() { 355 356 $success = $this->mcwp_tables_updates(); 357 358 if($success){ 359 if ( !empty( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && strtolower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) == 'xmlhttprequest' ) { 360 $result = $success; 361 echo json_encode($result); 362 } else { 363 header( "location:" . $_SERVER["HTTP_REFERER"] ); 364 } 365 exit; 366 } 367 } 368 public function mcwp_weekly_chart($postcoins){ 236 237 public function weekly_chart($postcoins) { 369 238 //check sql 370 $query = "SELECT cid, symbol, weekly, weekly_not_expire FROM ` " . $this->tablename . "` WHERE `cid` IN ('" . implode("','", explode(",",$postcoins)) . "')";239 $query = "SELECT cid, symbol, weekly, weekly_not_expire FROM `{$this->tablename}` WHERE `cid` IN ('" . implode("','", explode(",", $postcoins)) . "')"; 371 240 $results = $this->wpdb->get_results($query); 372 241 373 242 $output = []; $expiredcoins = []; 374 243 foreach($results as $res) { 375 array_push($output, $res->cid);244 array_push($output, $res->cid); 376 245 377 246 //create list of coins to request and update to sql … … 380 249 381 250 if(($dateFromDatabase < $dateTwelveHoursAgo) || ($res->weekly == '')){ 382 array_push($expiredcoins, $res->cid);251 array_push($expiredcoins, $res->cid); 383 252 } 384 253 } 385 254 386 255 if(!empty($expiredcoins)){ 387 $url = 'https://api.blocksera.com/v1/tickers/weekly?coins='.strtolower(implode(',', $expiredcoins)).'&limit=24';256 $url = 'https://api.blocksera.com/v1/tickers/weekly?coins='.strtolower(implode(',', $expiredcoins)).'&limit=24'; 388 257 $mcwp_request = wp_remote_get($url); 389 258 $mcwp_body = wp_remote_retrieve_body($mcwp_request); … … 391 260 392 261 if(!is_wp_error($mcwp_request) && wp_remote_retrieve_response_code($mcwp_request) === 200 && !empty($mcwp_data)){ 393 foreach($expiredcoins as $j =>$sym){394 $weekquery = "UPDATE ` ".$this->tablename."` SET `weekly` = '" . implode(',', $mcwp_data->$sym) . "', `weekly_not_expire` = '" . gmdate("Y-m-d H:i:s") . "' WHERE `cid` = '".$expiredcoins[$j]."'";395 $weekresult = $this->wpdb->query($ weekquery);262 foreach($expiredcoins as $j => $sym) { 263 $weekquery = "UPDATE `{$this->tablename}` SET `weekly` = '%s', `weekly_not_expire` = '%s' WHERE `cid` = '%s'"; 264 $weekresult = $this->wpdb->query($this->wpdb->prepare($weekquery, [implode(',', $mcwp_data->$sym), gmdate("Y-m-d H:i:s"), $expiredcoins[$j]])); 396 265 } 397 266 } else { 398 foreach($expiredcoins as $j =>$sym){399 $weekquery = "UPDATE ` ".$this->tablename."` SET `weekly_not_expire` = '" . gmdate("Y-m-d H:i:s",strtotime("-55 minutes")) . "' WHERE `cid` = '".$expiredcoins[$j]."'";400 $weekresult = $this->wpdb->query($ weekquery);267 foreach($expiredcoins as $j => $sym) { 268 $weekquery = "UPDATE `{$this->tablename}` SET `weekly_not_expire` = '%s' WHERE `cid` = '%s'"; 269 $weekresult = $this->wpdb->query($this->wpdb->prepare($weekquery, [gmdate("Y-m-d H:i:s", strtotime("-55 minutes")), $expiredcoins[$j]])); 401 270 } 402 271 } … … 405 274 $newarr = []; 406 275 foreach($results as $res){ 407 $newarr[$res->cid] = (isset($mcwp_data->{$res->cid})) ? $mcwp_data->{$res->cid} : explode(',', $res->weekly);276 $newarr[$res->cid] = (isset($mcwp_data->{$res->cid})) ? $mcwp_data->{$res->cid} : explode(',', $res->weekly); 408 277 } 409 278 410 279 return $newarr; 411 280 } 412 public function mcwp_includes() { 281 282 public function create_post_type() { 283 413 284 function mcwp_hide_title() { 414 285 remove_post_type_support('mcwp', 'title'); 415 286 } 287 416 288 function mcwp_create_post_type() { 289 417 290 $labels = array( 418 291 'name' => _x( 'Cryptocurrency Widgets Pack', 'Post Type General Name', 'cryptocurrency-widgets-pack' ), … … 443 316 'filter_items_list' => __( 'Filter widgets list', 'cryptocurrency-widgets-pack' ), 444 317 ); 318 445 319 $args = array( 446 320 'label' => __( 'Cryptocurrency Widgets Pack', 'cryptocurrency-widgets-pack' ), … … 465 339 'capability_type' => 'page', 466 340 ); 467 register_post_type( 'mcwp', $args ); 468 } 469 470 add_action('init', 'mcwp_create_post_type' ); 341 342 register_post_type('mcwp', $args); 343 } 344 345 add_action('init', 'mcwp_create_post_type'); 471 346 add_action('admin_init', 'mcwp_hide_title'); 472 add_action('admin_menu', array( $this, 'mcwp_register_menu'), 12 ); 473 add_action('add_meta_boxes', array( $this, 'mcwp_crypto_widget_box' ) ); 474 add_action('save_post', array( $this, 'mcwp_crypto_widget_box_save' ) ); 475 add_filter('manage_mcwp_posts_columns', array($this,'mcwp_columns_content')); 476 add_action('manage_mcwp_posts_custom_column', array($this,'mcwp_custom_column'), 10, 2); 347 add_action('admin_menu', array($this->display, 'register_menu'), 12); 348 add_action('add_meta_boxes', array($this, 'widget_box')); 349 add_action('save_post', array($this, 'save_widget')); 350 351 add_filter('manage_mcwp_posts_columns', array($this, 'posts_columns_content')); 352 add_action('manage_mcwp_posts_custom_column', array($this, 'posts_custom_column'), 10, 2); 353 477 354 load_plugin_textdomain('cryptocurrency-widgets-pack', false, dirname(plugin_basename(__FILE__)) . '/languages' ); 478 355 } 479 356 480 public function mcwp_notice_dismiss(){ 481 update_option('mcwp-notice','0'); 482 exit(); 483 } 484 485 public function mcwp_top_notice_dismiss(){ 486 update_option('mcwp-top-notice','0'); 487 exit(); 488 } 489 490 public function mcwp_top_admin_notice(){ 491 ?> 492 <div class="mcwp-notice notice notice-success is-dismissible"> 493 <img class="mcwp-iconimg" src="<?php echo MCWP_URL; ?>assets/admin/images/icon.png" style="float:left;" /> 494 <p style="width:80%;"><?php _e('Enjoying our <strong>Cryptocurrency Widgets Pack?</strong> We hope you liked it! If you feel this plugin helped you, You can give us a 5 star rating!<br>It will motivate us to serve you more !','cryptocurrency-widgets-pack'); ?> </p> 495 <a href="https://wordpress.org/support/plugin/cryptocurrency-widgets-pack/reviews/#new-post" class="button button-primary" style="margin-right: 10px !important;color: black;background: white;box-shadow: none !important;text-shadow: none !important;border: 0 none !important;" target="_blank"><?php _e('Rate the Plugin!','cryptocurrency-widgets-pack'); ?> ⭐⭐⭐⭐⭐</a> 496 <a href="https://massivecryptopro.blocksera.com" class="button button-secondary" target="_blank"><?php _e('Go Pro','cryptocurrency-widgets-pack'); ?></a> 497 <span class="mcwp-done"><?php _e('Already Done','cryptocurrency-widgets-pack'); ?></span> 498 </div> 499 <?php 500 } 501 502 public function mcwp_action_links($actions, $plugin_file){ 503 if( false === strpos( $plugin_file, basename(__FILE__) ) ) return $actions; 504 505 $settings_link = '<a href="'.admin_url().'post-new.php?post_type=mcwp" style="font-weight:bold;">' . __('Add Widgets','cryptocurrency-widgets-pack') . '</a>'; 506 $faq_link = '<a target="_blank" href="https://massivecryptopro.blocksera.com/#faq" style="color:#eda600;font-weight:bold;">' . __('FAQ','cryptocurrency-widgets-pack') . '</a>'; 507 $gopro_link = '<a target="_blank" href="https://massivecryptopro.blocksera.com" style="color:#39b54a;font-weight:bold;">' . __('Go Pro','cryptocurrency-widgets-pack') . '</a>'; 508 509 array_unshift( $actions, $gopro_link ); 510 array_unshift( $actions, $faq_link ); 511 array_unshift( $actions, $settings_link ); 512 513 return $actions; 514 } 515 516 public function mcwp_row_meta( $meta, $plugin_file ){ 517 if( false === strpos( $plugin_file, basename(__FILE__) ) ) return $meta; 518 519 $meta[] = '<a href="https://blocksera.com/contact/" target="_blank">' . __('Support','cryptocurrency-widgets-pack') . '</a>'; 520 return $meta; 521 } 522 523 public function mcwp_register_menu() { 524 525 // Register plugin premium page 526 add_submenu_page( 527 'edit.php?post_type=mcwp', 528 __('Upgrade To PRO - Massive Cryptocurrency Widgets','cryptocurrency-widgets-pack'), 529 '<span style="color:greenyellow;">'.__('Upgrade to PRO ➤', 'cryptocurrency-widgets-pack').'</span>', 530 'manage_options', 531 'mcwp-premium', 532 array($this, 'mcwp_premium_page') 533 ); 534 } 535 536 public function mcwp_premium_page() { 537 include_once( MCWP_PATH . '/includes/mcwp-premium.php' ); 538 } 539 540 public function mcwp_columns_content($columns) { 357 public function widget_box() { 358 add_meta_box( 'mcwp_crypto_widget_box', __( 'Cryptocurrency Widgets Pack Settings', 'cryptocurrency-widgets-pack' ), array( $this, 'widget_settings' ), 'mcwp', 'normal', 'high' ); 359 add_meta_box( 'mcwp_crypto_widget_shortcode', __( 'Crypto Widgets Shortcode', 'cryptocurrency-widgets-pack' ), array( $this->display, 'shortcode' ), 'mcwp', 'side', 'high' ); 360 add_meta_box( 'mcwp_crypto_widget_pro', __( 'Rate the Plugin & Pro Features', 'cryptocurrency-widgets-pack' ), array( $this->display, 'pro' ), 'mcwp', 'side', 'low' ); 361 } 362 363 public function posts_columns_content($columns) { 541 364 $newcolumn = array(); 542 365 foreach($columns as $key => $title) { … … 547 370 $newcolumn[$key] = $title; 548 371 } 549 return $newcolumn;550 } 551 552 public function mcwp_custom_column($column, $post_id) {372 return $newcolumn; 373 } 374 375 public function posts_custom_column($column, $post_id) { 553 376 switch ($column) { 554 case 'type': 555 $type = get_post_meta($post_id, 'crypto_ticker', true); 556 _e(ucfirst($type), 'mcwp'); 557 break; 558 case 'shortcode': 559 echo '<code>[cryptopack id="' . $post_id . '"]</code>'; 560 break; 561 } 562 } 563 564 public function mcwp_crypto_widget_box() { 565 add_meta_box( 'mcwp_crypto_widget_box', __( 'Cryptocurrency Widgets Pack Settings', 'cryptocurrency-widgets-pack' ), array( $this, 'mcwp_crypto_widget_box_content' ), 'mcwp', 'normal', 'high' ); 566 add_meta_box( 'mcwp_crypto_widget_shortcode', __( 'Crypto Widgets Shortcode', 'cryptocurrency-widgets-pack' ), array( $this, 'mcwp_crypto_shortcode_content' ), 'mcwp', 'side', 'high' ); 567 add_meta_box( 'mcwp_crypto_widget_pro', __( 'Rate the Plugin & Pro Features', 'cryptocurrency-widgets-pack' ), array( $this, 'mcwp_crypto_shortcode_pro' ), 'mcwp', 'side', 'low' ); 568 } 569 570 public function mcwp_crypto_shortcode_pro( $post ) { 571 ?> 572 <div class="mcwp-pro"> 573 <h3><b><?php _e('Plugin Rating:','cryptocurrency-widgets-pack'); ?></b></h3> 574 <div class="mcwp-anime"> 575 <a href="https://wordpress.org/support/plugin/cryptocurrency-widgets-pack/reviews/#new-post" target="_blank"> 576 <span><img src="<?php echo MCWP_URL . 'assets/admin/images/star.png'; ?>" /></span> 577 <span><img src="<?php echo MCWP_URL . 'assets/admin/images/star.png'; ?>" /></span> 578 <span><img src="<?php echo MCWP_URL . 'assets/admin/images/star.png'; ?>" /></span> 579 <span><img src="<?php echo MCWP_URL . 'assets/admin/images/star.png'; ?>" /></span> 580 <span><img src="<?php echo MCWP_URL . 'assets/admin/images/star.png'; ?>" /></span> 581 </a> 582 </div> 583 <p><?php _e('Did Cryptocurrency Widgets Pack help you out? Please leave us a 5 star review.<br/>Thank you!','cryptocurrency-widgets-pack'); ?></p> 584 <div class="buy"><a target="_blank" href="https://wordpress.org/support/plugin/cryptocurrency-widgets-pack/reviews/#new-post"><?php _e('Write a Review','cryptocurrency-widgets-pack'); ?></a></div> 585 <hr> 586 <h3><?php _e('Massive Cryptocurrency Widgets | Crypto Plugin','cryptocurrency-widgets-pack'); ?></h3> 587 <a target="_blank" href="https://massivecryptopro.blocksera.com"><img style="max-width: 100%;" src="https://massivecryptopro.blocksera.com/wp-content/uploads/2020/08/mcw-banner.jpg" /></a> 588 <ul> 589 <li><?php _e('5,000+ Cryptocurrencies','cryptocurrency-widgets-pack'); ?></li> 590 <li><?php _e('Powered by Coingecko','cryptocurrency-widgets-pack'); ?></li> 591 <li><?php _e('Stylish crypto widgets','cryptocurrency-widgets-pack'); ?></li> 592 <li><?php _e('Feature-rich widget editor','cryptocurrency-widgets-pack'); ?></li> 593 <li><?php _e('Unlimited customizations','cryptocurrency-widgets-pack'); ?></li> 594 </ul> 595 <hr/> 596 <h3><?php _e('Coinpress - Cryptocurrency Pages for WordPress','cryptocurrency-widgets-pack'); ?></h3> 597 <a target="_blank" href="https://coinpress.blocksera.com"><img style="max-width: 100%;" src="https://massivecryptopro.blocksera.com/wp-content/uploads/2020/08/coinpress-banner.jpg" /></a> 598 <ul> 599 <li><?php _e('5,000+ Coin detail pages','cryptocurrency-widgets-pack'); ?></li> 600 <li><?php _e('Search, Currency Changer, Watchlist','cryptocurrency-widgets-pack'); ?></li> 601 <li><?php _e('Line & Candlestick charts','cryptocurrency-widgets-pack'); ?></li> 602 <li><?php _e('Historical Data & Markets','cryptocurrency-widgets-pack'); ?></li> 603 <li><?php _e('Social Feed & Comments','cryptocurrency-widgets-pack'); ?></li> 604 <li><?php _e('News section & Responsive Design','cryptocurrency-widgets-pack'); ?></li> 605 </ul> 606 <hr/> 607 <h3><?php _e('Massive Stock Market & Forex Widgets','cryptocurrency-widgets-pack'); ?></h3> 608 <a target="_blank" href="https://stockwidgets.blocksera.com"><img style="max-width: 100%;" src="https://massivecryptopro.blocksera.com/wp-content/uploads/2020/08/msf-banner.jpg" /></a> 609 <ul> 610 <li><?php _e('Global stock exchanges','cryptocurrency-widgets-pack'); ?></li> 611 <li><?php _e('Powered by Yahoo API','cryptocurrency-widgets-pack'); ?></li> 612 <li><?php _e('Up to 100,000 companies list','cryptocurrency-widgets-pack'); ?></li> 613 <li><?php _e('Powerful search option','cryptocurrency-widgets-pack'); ?></li> 614 <li><?php _e('Stylish widgets','cryptocurrency-widgets-pack'); ?></li> 615 <li><?php _e('Feature-rich widget editor','cryptocurrency-widgets-pack'); ?></li> 616 <li><?php _e('Unlimited customizations','cryptocurrency-widgets-pack'); ?></li> 617 </ul> 618 </div> 619 <?php 620 } 621 622 public function mcwp_crypto_shortcode_content( $post ) { 623 $dynamic_attr = '[cryptopack id="'.get_the_id().'"]'; 624 625 echo '<div class="mcwp-shortcode">' . __('Paste this shortcode anywhere like page, post or widgets','cryptocurrency-widgets-pack'); 626 627 echo '<br/><br/><div>'.$dynamic_attr.'</div></div>'; 628 echo '<div class="mcwp-pro-add"><a href="https://coinpress.blocksera.com" target="_blank">' . __("Create 5,000+ coin pages instantly", "cryptocurrency-widgets-pack") . '</a></div>'; 629 } 630 631 public function mcwp_crypto_widget_box_content( $post ) { 632 wp_nonce_field( plugin_basename( __FILE__ ), 'mcwp_crypto_widget_box_content_nonce' ); 633 634 $allpostmetas = $this->allpostmetas; 635 for($k=0;$k<sizeof($allpostmetas);$k++){ 636 $temp = $allpostmetas[$k]; 637 ${$temp} = get_post_meta( $post->ID, $temp, true ); 638 } 639 640 require_once(MCWP_PATH . 'includes/mcwp-settings.php'); 641 } 642 643 public function mcwp_crypto_widget_box_save( $post_id ) { 644 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) 377 case 'type': 378 $type = get_post_meta($post_id, 'crypto_ticker', true); 379 _e(ucfirst($type), 'mcwp'); 380 break; 381 case 'shortcode': 382 echo '<code>[cryptopack id="' . $post_id . '"]</code>'; 383 break; 384 } 385 } 386 387 public function widget_settings($post) { 388 389 wp_nonce_field(plugin_basename( __FILE__ ), 'mcwp_widget_nonce'); 390 $data = $this->shortcode->data($post->ID); 391 392 require_once(MCWP_PATH . 'includes/settings.php'); 393 } 394 395 public function save_widget($post_id) { 396 397 if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) 645 398 return; 646 399 647 if ( !isset($_POST['mcwp_crypto_widget_box_content_nonce']) || !wp_verify_nonce( $_POST['mcwp_crypto_widget_box_content_nonce'], plugin_basename( __FILE__ ) ))400 if (!isset($_POST['mcwp_widget_nonce']) || !wp_verify_nonce($_POST['mcwp_widget_nonce'], plugin_basename( __FILE__ ))) 648 401 return; 649 402 650 if ( 'page' == $_POST['post_type'] ) {651 if ( !current_user_can( 'edit_page', $post_id ))403 if ('page' == $_POST['post_type'] ) { 404 if (!current_user_can('edit_page', $post_id)) 652 405 return; 653 406 } else { 654 if ( !current_user_can( 'edit_post', $post_id ))407 if (!current_user_can('edit_post', $post_id)) 655 408 return; 656 409 } 657 $allpostmetas = $this->allpostmetas; 658 for($k=0;$k<sizeof($allpostmetas);$k++){ 410 411 $allpostmetas = $this->shortcode->allpostmetas; 412 413 for($k = 0; $k < sizeof($allpostmetas); $k++) { 414 659 415 $temp = $allpostmetas[$k]; 660 416 661 417 if($temp == 'crypto_ticker_coin' || $temp == 'crypto_ticker_columns' || $temp == 'crypto_card_columns' || $temp == 'crypto_table_columns'){ 662 418 $mcwptags = isset( $_POST[$temp] ) ? (array) $_POST[$temp] : array(); 663 $mcwptags = array_map( 'esc_attr', $mcwptags );664 $ {$temp}= $mcwptags;665 419 $mcwptags = array_map('sanitize_text_field', $mcwptags); 420 $value = $mcwptags; 421 666 422 } elseif ($temp == 'crypto_speed' || $temp == 'crypto_bunch_select') { 667 $ {$temp} = (int) $_POST[$temp];423 $value = intval($_POST[$temp]); 668 424 669 425 } elseif ($temp == 'crypto_text_color' || $temp == 'crypto_background_color') { 670 $ {$temp}= sanitize_hex_color($_POST[$temp]);426 $value = sanitize_hex_color($_POST[$temp]); 671 427 672 428 } elseif ($temp == 'crypto_custom_css'){ 673 $ {$temp} = trim( strip_tags($_POST[$temp] ));429 $value = trim(strip_tags($_POST[$temp])); 674 430 675 431 } else { 676 ${$temp} = sanitize_text_field($_POST[$temp]); 677 } 678 679 update_post_meta( $post_id, $temp, ${$temp} ); 680 } 681 } 682 683 public function is_edit_page($new_edit = null){ 684 global $pagenow; 685 //make sure we are on the backend 686 if (!is_admin()) return false; 687 688 689 if($new_edit == "edit") 690 return in_array( $pagenow, array( 'post.php', ) ); 691 elseif($new_edit == "new") //check for new post page 692 return in_array( $pagenow, array( 'post-new.php' ) ); 693 else //check for either new or edit 694 return in_array( $pagenow, array( 'post.php', 'post-new.php' ) ); 695 } 696 697 public function mcwp_shortcode($atts){ 432 $value = sanitize_text_field($_POST[$temp]); 433 } 434 435 update_post_meta($post_id, $temp, $value); 436 } 437 } 438 439 public function mcwp_coinsyms() { 440 441 $query = "SELECT cid, name, symbol FROM `{$this->tablename}` ORDER BY `rank` ASC"; 442 443 $output = array('cid' => array(), 'names' => array(), 'symbols' => array()); 444 $coins = $this->fetch_coins($query); 445 446 foreach($coins as $coin) { 447 $output['cid'][] = strtolower($coin->cid); 448 $output['names'][] = strtolower($coin->name); 449 $output['symbols'][] = strtolower($coin->symbol); 450 } 451 452 return $output; 453 } 454 455 public function shortcode($atts) { 456 698 457 $atts = shortcode_atts(array( 699 'id' => '',700 ), $atts, 'cryptopack');701 702 $mcwp_post_id = esc_attr((int)$atts['id']);458 'id' => '', 459 ), $atts, 'cryptopack'); 460 461 $mcwp_post_id = intval($atts['id']); 703 462 704 463 if((get_post_status( $mcwp_post_id ) != 'publish') && (!is_admin())) { … … 706 465 } 707 466 708 $allpostmetas = $this->allpostmetas; 709 for($k=0;$k<sizeof($allpostmetas);$k++){ 710 $temp = $allpostmetas[$k]; 711 ${$temp} = get_post_meta( $mcwp_post_id, $temp, true ); 712 } 467 $data = $this->shortcode->data($mcwp_post_id); 713 468 714 469 $mcwp_coinsyms = $this->mcwp_coinsyms(); 715 470 $mcwp_cid = $mcwp_coinsyms['cid']; 716 $selectedcoins = array(); 717 718 $output = ''; 719 720 if($crypto_bunch_select > 0){ 721 for($k=0;$k<sizeof($mcwp_cid);$k++){ 722 if($k < $crypto_bunch_select) { 723 array_push($selectedcoins,$mcwp_cid[$k]); 724 } 725 } 471 $selectedcoins = $this->shortcode->selectedCoins($mcwp_cid, $data); 472 473 $custom_css = ''; 474 if(!empty($selectedcoins)){ 475 476 $query = "SELECT * FROM `{$this->tablename}` WHERE `cid` IN (".implode(', ', array_fill(0, count($selectedcoins), '%s')).") ORDER BY `rank` ASC"; 477 $coins = $this->fetch_coins($this->wpdb->prepare($query, call_user_func_array('array_merge', [$selectedcoins]))); 478 479 if($data->crypto_custom_css != ''){ 480 481 $custom_css .= $data->crypto_custom_css; 482 } 483 484 $output = '<div class="mcwp-crypto" id="mcwp-'.$mcwp_post_id.'">'; 485 486 // ticker 487 if($data->crypto_ticker == 'ticker') 488 { 489 if(($data->crypto_ticker_position != 'header') && ($data->crypto_ticker_position != 'footer') || (is_admin())) 490 { 491 if($data->crypto_text_color !== ''){ 492 $custom_css .= '#mcwp-'.$mcwp_post_id.'.mcwp-crypto .cc-coin b { color: '.esc_attr($data->crypto_text_color).'; }'; 493 } 494 495 $output = $this->shortcode->ticker($output, $coins, $data); 496 } 497 498 // table 499 } elseif($data->crypto_ticker == 'table') { 500 501 $output = $this->shortcode->table($output, $selectedcoins, $data); 502 503 // card 504 } elseif($data->crypto_ticker == 'card') { 505 506 if($data->crypto_text_color !== '') { 507 $custom_css .= '#mcwp-'.$mcwp_post_id.'.mcwp-crypto div.mcwp-card * { color: '.esc_attr($data->crypto_text_color).'; }'; 508 } 509 510 $output = $this->shortcode->card($output, $selectedcoins, $coins, $data); 511 512 // label 513 } elseif($data->crypto_ticker == 'label') { 514 515 if($data->crypto_text_color !== '') { 516 $custom_css .= '#mcwp-'.$mcwp_post_id.'.mcwp-crypto div.mcwp-label * { color: '.esc_attr($data->crypto_text_color).'; }'; 517 } 518 519 $output = $this->shortcode->label($output, $selectedcoins, $coins, $data); 520 } 521 522 $output .= '</div>'; 523 726 524 } else { 727 for($k=0;$k<sizeof($mcwp_cid);$k++){ 728 if(is_array($crypto_ticker_coin) && in_array($mcwp_cid[$k],$crypto_ticker_coin)){ 729 array_push($selectedcoins,$mcwp_cid[$k]); 730 } 731 } 732 } 733 734 735 if(!empty($selectedcoins)){ 736 737 $query = 'SELECT * FROM `' . $this->tablename . '` WHERE `cid` IN ("' . implode('","', $selectedcoins) . '") ORDER BY `rank` ASC'; 738 $mcwp_data = $this->mcwp_all_collection($query); 739 740 if($crypto_custom_css != ''){ 741 $output .= '<style type="text/css">'."\n".$crypto_custom_css."\n".'</style>'; 742 } 743 $output .= '<div class="mcwp-crypto" id="mcwp-'.$mcwp_post_id.'">'; 744 745 746 // ticker 747 if($crypto_ticker == 'ticker'){ 748 if(($crypto_ticker_position != 'header') && ($crypto_ticker_position != 'footer') || (is_admin())) { 749 $output .= '<div class="mcwp-ticker mcwp-'. $crypto_ticker_position .'" data-speed="'.$crypto_speed.'">'; 750 751 if($crypto_text_color !== ''){ 752 $output .= '<style type="text/css"> 753 #mcwp-'.$mcwp_post_id.'.mcwp-crypto .cc-coin b { 754 color: '.$crypto_text_color.'; 755 } 756 </style>'; 757 758 $crypto_background_color = ($crypto_background_color == '') ? '#fff' : $crypto_background_color; 759 } 760 761 $output .= '<div class="cc-ticker cc-white-color"'; 762 if($crypto_background_color !== ''){ 763 $output .= ' style="background-color:'.$crypto_background_color.';"'; 764 } 765 $output .= '><ul class="cc-stats">'; 766 foreach($mcwp_data as $j=>$coins) { 767 $imagename = esc_attr($this->mcwp_image_id($coins->img)); 768 $coinscid = esc_attr($coins->cid); 769 $coinsname = esc_attr($coins->name); 770 $coinssymbol= esc_attr($coins->symbol); 771 $price = esc_attr($this->mcwp_currency_convert($coins->price_usd)); 772 773 $output .= '<li class="cc-coin"><div><img src="'.$imagename.'" alt="'.$coinscid.'">'; 774 $output .= '<b>'; 775 if(is_array($crypto_ticker_columns) && in_array('coingecko',$crypto_ticker_columns)) { 776 $output .= '<a rel="nofollow" href="https://coingecko.com/coins/'.$coinscid.'" target="_blank">'; 777 } 778 $output .= $coinsname . ' <span>('.$coinssymbol.')</span>'; 779 if(is_array($crypto_ticker_columns) && in_array('coingecko',$crypto_ticker_columns)) { 780 $output .= '</a>'; 781 } 782 $output .= ' <span>'.$price.'</span>'; 783 if(is_array($crypto_ticker_columns) && in_array('changes',$crypto_ticker_columns)) { 784 $output .= $this->mcwp_24h_percentage(esc_attr($coins->percent_change_24h),'span'); 785 } 786 $output .= '</b></div></li>'; 787 } 788 $output .= '</ul></div>'; 789 $output .= '</div>'; 790 } 791 792 // table 793 } elseif($crypto_ticker == 'table') { 794 795 $tablecoins = (sizeof($selectedcoins) > 50) ? 50 : sizeof($selectedcoins); 796 797 $theme = ($crypto_background_color !== '') ? 'custom' : 'light'; 798 $output .= '<svg style="width: 0; height: 0; opacity: 0; visibility: hidden;"> 799 <defs> 800 <linearGradient id="red" x1="1" x2="0" y1="1" y2="0"> 801 <stop offset="0" stop-color="white"></stop> 802 <stop offset="1" stop-color="#ef3e3e"></stop> 803 </linearGradient> 804 <linearGradient id="green" x1="1" x2="0" y1="1" y2="0"> 805 <stop offset="0" stop-color="white"></stop> 806 <stop offset="1" stop-color="#3cef3c"></stop> 807 </linearGradient> 808 </defs> 809 </svg>'; 810 $output .= '<table class="mcwp-datatable table-processing '.$theme.'" data-theme="'.$theme.'" data-color="'.$crypto_text_color.'" data-bgcolor="'.$crypto_background_color.'" data-length="'.$tablecoins.'"><thead><tr>'; 811 $output .= '<th>#</th><th>' . __('Name','cryptocurrency-widgets-pack') . '</th><th>' . __('Price','cryptocurrency-widgets-pack') . '</th><th>' . __('Market Cap','cryptocurrency-widgets-pack') . '</th><th>' . __('Change','cryptocurrency-widgets-pack') . '</th><th>' . __('Price Graph (24h)','cryptocurrency-widgets-pack') . '</th>'; 812 $output .= '</tr></thead><tbody>'; 813 814 for( $i = 0; $i < $tablecoins; $i++ ) { 815 $output .= '<tr><td colspan="56" height="30"><span></span></td></tr>'; 816 } 817 818 $output .= '</tbody></table>'; 819 820 // card 821 } elseif($crypto_ticker == 'card') { 822 823 if($crypto_text_color !== '') { 824 $output .= '<style type="text/css"> 825 #mcwp-'.$mcwp_post_id.'.mcwp-crypto div.mcwp-card * { 826 color: '.$crypto_text_color.'; 827 } 828 </style>'; 829 } 830 831 foreach($mcwp_data as $j=>$coins) { 832 if(in_array(strtolower($coins->cid),$selectedcoins)) { 833 $imagename = esc_attr($this->mcwp_image_id($coins->img)); 834 $coinscid = esc_attr($coins->cid); 835 $coinsname = esc_attr($coins->name); 836 $coinssymbol= esc_attr($coins->symbol); 837 $price = esc_attr($this->mcwp_currency_convert($coins->price_usd)); 838 839 $output .= (is_array($crypto_card_columns) && in_array('fullwidth',$crypto_card_columns)) ? '' : '<div class="cc-card-col">'; 840 $output .= '<div class="mcwp-card mcwp-card-1 mcwp-card-white"'; 841 if($crypto_background_color !== '') { 842 $output .= ' style="background-color:'.$crypto_background_color.';"'; 843 } 844 $output .= '><div class="bg"><img src="'.esc_attr($this->mcwp_image_id($coins->img,'large')).'" alt="'.$coinscid.'"></div>'; 845 $output .= '<div class="mcwp-card-head"><div><img src="'.$imagename.'" alt="'.$coinscid.'">'; 846 $output .= '<p>'; 847 if(is_array($crypto_card_columns) && in_array('coingecko',$crypto_card_columns)) { 848 $output .= '<a rel="nofollow" href="https://coingecko.com/coins/'.$coinscid.'" target="_blank">'; 849 } 850 $output .= $coinsname.' ('.$coinssymbol.')'; 851 if(is_array($crypto_card_columns) && in_array('coingecko',$crypto_card_columns)) { 852 $output .= '</a>'; 853 } 854 if(is_array($crypto_card_columns) && in_array('percentage',$crypto_card_columns)) { 855 $class = floatval($coins->percent_change_24h) > 0 ? "high" : "low"; 856 $output .= '<small class="'.$class.'">'.abs($coins->percent_change_24h).'</small></p>'; 857 } 858 $output .= '</p>'; 859 $output .= '</div></div><div class="mcwp-pricelabel">Price</div>'; 860 $output .= '<div class="mcwp-price">'.$price.'</div>'; 861 $output .= '</div>'; 862 $output .= (is_array($crypto_card_columns) && in_array('fullwidth',$crypto_card_columns)) ? '' : '</div>'; 863 } 864 } 865 // label 866 } elseif($crypto_ticker == 'label') { 867 868 if($crypto_text_color !== '') { 869 $output .= '<style type="text/css"> 870 #mcwp-'.$mcwp_post_id.'.mcwp-crypto div.mcwp-label * { 871 color: '.$crypto_text_color.'; 872 } 873 </style>'; 874 } 875 876 foreach($mcwp_data as $j=>$coins) { 877 if(in_array(strtolower($coins->cid),$selectedcoins)) { 878 $imagename = esc_attr($this->mcwp_image_id($coins->img)); 879 $coinscid = esc_attr($coins->cid); 880 $coinsname = esc_attr($coins->name); 881 $coinssymbol= esc_attr($coins->symbol); 882 $price = esc_attr($this->mcwp_currency_convert($coins->price_usd)); 883 884 $output .= (is_array($crypto_card_columns) && in_array('fullwidth',$crypto_card_columns)) ? '' : '<div class="cc-label-col">'; 885 $output .= '<div class="mcwp-label mcwp-label-1 mcwp-label-white"'; 886 if($crypto_background_color !== '') { 887 $output .= '" style="background-color:'.$crypto_background_color.';"'; 888 } 889 $output .= '><div class="mcwp-label-dn1-head"><div class="mcwp-card-head"><div><img src="'.$imagename.'" alt="'.$coinscid.'">'; 890 $output .= '<p>'; 891 if(is_array($crypto_card_columns) && in_array('coingecko',$crypto_card_columns)) { 892 $output .= '<a rel="nofollow" href="https://coingecko.com/coins/'.$coinscid.'" target="_blank">'; 893 } 894 $output .= $coinsname.' ('.$coinssymbol.')'; 895 if(is_array($crypto_card_columns) && in_array('coingecko',$crypto_card_columns)) { 896 $output .= '</a>'; 897 } 898 $output .= '</p>'; 899 $output .= '</div></div></div><div class="mcwp-label-dn1-body"><b>'.$price.'</b>'; 900 if(is_array($crypto_card_columns) && in_array('percentage',$crypto_card_columns)) { 901 $class = floatval($coins->percent_change_24h) > 0 ? "high" : "low"; 902 $output .= '<small class="'.$class.'">'.abs($coins->percent_change_24h).'</small>'; 903 } 904 $output .= '</div></div>'; 905 $output .= (is_array($crypto_card_columns) && in_array('fullwidth',$crypto_card_columns)) ? '' : '</div>'; 906 } 907 } 908 } 909 $output .= '</div>'; 910 } else { 911 $output .= $this->crypto_four_not_four(); 912 } 525 $output = $this->display->crypto_four_not_four(); 526 } 527 528 wp_register_style('mcwp-custom', false); 529 wp_enqueue_style('mcwp-custom'); 530 wp_add_inline_style('mcwp-custom', $custom_css); 531 913 532 return $output; 914 533 } 915 534 916 public function mcwp_tickerHeadFooter(){535 public function global_ticker() { 917 536 918 537 //get your custom posts ids as an array … … 925 544 ) 926 545 ); 546 547 $custom_css = ''; 927 548 928 549 //loop over each post 929 foreach($posts as $p) {550 foreach($posts as $p) { 930 551 //get the meta you need form each post 931 932 $crypto_ticker = esc_attr(get_post_meta($p->ID,"crypto_ticker",true)); 933 $crypto_ticker_coin =array_map('esc_attr',get_post_meta($p->ID,"crypto_ticker_coin",true) ); 934 $crypto_ticker_position = esc_attr(get_post_meta($p->ID,"crypto_ticker_position",true)); 935 $crypto_speed = esc_attr(get_post_meta($p->ID,"crypto_speed",true)); 936 $crypto_ticker_columns =array_map('esc_attr',get_post_meta($p->ID,"crypto_ticker_columns",true) ); 937 $crypto_text_color = esc_attr(get_post_meta($p->ID,"crypto_text_color",true)); 938 $crypto_background_color = esc_attr(get_post_meta($p->ID,"crypto_background_color",true)); 939 $crypto_bunch_select = esc_attr(get_post_meta($p->ID,"crypto_bunch_select",true)); 940 $crypto_custom_css = esc_attr(get_post_meta($p->ID,"crypto_custom_css",true)); 941 552 if(get_post_meta($p->ID, 'crypto_ticker', true) != 'ticker') { 553 continue; 554 } 555 942 556 $output = ''; 943 944 if($crypto_ticker == 'ticker') { 945 if(($crypto_ticker_position == 'header') || ($crypto_ticker_position == 'footer')) { 946 947 $mcwp_coinsyms = $this->mcwp_coinsyms(); 948 $mcwp_cid = $mcwp_coinsyms['cid']; 949 $selectedcoins = array(); 950 951 952 if($crypto_bunch_select > 0){ 953 for($k=0;$k<sizeof($mcwp_cid);$k++){ 954 if($k < $crypto_bunch_select) { 955 array_push($selectedcoins,$mcwp_cid[$k]); 956 } 957 } 958 } else { 959 for($k=0;$k<sizeof($mcwp_cid);$k++){ 960 if(is_array($crypto_ticker_coin) && in_array($mcwp_cid[$k],$crypto_ticker_coin)){ 961 array_push($selectedcoins,$mcwp_cid[$k]); 962 } 963 } 557 558 if(in_array(get_post_meta($p->ID, 'crypto_ticker_position', true), ['header', 'footer'])) { 559 560 $data = $this->shortcode->data($p->ID); 561 562 $mcwp_coinsyms = $this->mcwp_coinsyms(); 563 $mcwp_cid = $mcwp_coinsyms['cid']; 564 $selectedcoins = $this->shortcode->selectedCoins($mcwp_cid, $data); 565 566 567 if(!empty($selectedcoins)) 568 { 569 $query = "SELECT * FROM `{$this->tablename}` WHERE `cid` IN (".implode(', ', array_fill(0, count($selectedcoins), '%s')).") ORDER BY `rank` ASC"; 570 $coins = $this->fetch_coins($this->wpdb->prepare($query, call_user_func_array('array_merge', [$selectedcoins]))); 571 572 if($data->crypto_custom_css != '') { 573 $custom_css .= $data->crypto_custom_css; 964 574 } 965 966 967 if(!empty($selectedcoins)){ 968 969 $query = 'SELECT * FROM `' . $this->tablename . '` WHERE `cid` IN ("' . implode('","', $selectedcoins) . '") ORDER BY `rank` ASC'; 970 $mcwp_data = $this->mcwp_all_collection($query); 971 972 if($crypto_custom_css != ''){ 973 $output .= '<style type="text/css">'."\n".$crypto_custom_css."\n".'</style>'; 974 } 975 976 $output .= '<div class="mcwp-crypto" id="mcwp-'.$p->ID.'">'; 977 $output .= '<div class="mcwp-ticker mcwp-'. $crypto_ticker_position .'" data-speed="'.$crypto_speed.'">'; 978 if ($crypto_text_color !== '') { 979 $output .= '<style type="text/css"> 980 #mcwp-'.$p->ID.'.mcwp-crypto .cc-coin b { 981 color: '.$crypto_text_color.'; 982 } 983 </style>'; 984 985 $crypto_background_color = ($crypto_background_color == '') ? '#fff' : $crypto_background_color; 986 } 987 $output .= '<div class="cc-ticker cc-white-color"'; 988 if ($crypto_background_color !== '') { 989 $output .= ' style="background-color:'.$crypto_background_color.';"'; 990 } 991 $output .= '><ul class="cc-stats">'; 992 foreach($mcwp_data as $j=>$coins) { 993 $imagename = esc_attr($this->mcwp_image_id($coins->img)); 994 $coinscid = esc_attr($coins->cid); 995 $coinsname = esc_attr($coins->name); 996 $coinssymbol= esc_attr($coins->symbol); 997 $price = esc_attr($this->mcwp_currency_convert($coins->price_usd)); 998 999 $output .= '<li class="cc-coin"><div><img src="'.$imagename.'" alt="'.$coinscid.'">'; 1000 $output .= '<b>'; 1001 if(is_array($crypto_ticker_columns) && in_array('coingecko',$crypto_ticker_columns)) { 1002 $output .= '<a rel="nofollow" href="https://coingecko.com/coins/'.$coinscid.'" target="_blank">'; 1003 } 1004 $output .= $coinsname . ' <span>('.$coinssymbol.')</span>'; 1005 if(is_array($crypto_ticker_columns) && in_array('coingecko',$crypto_ticker_columns)) { 1006 $output .= '</a>'; 1007 } 1008 $output .= ' <span>'.$price.'</span>'; 1009 if(is_array($crypto_ticker_columns) && in_array('changes',$crypto_ticker_columns)) { 1010 $output .= $this->mcwp_24h_percentage(esc_attr($coins->percent_change_24h),'span'); 1011 } 1012 $output .= '</b></div></li>'; 1013 } 1014 $output .= '</ul></div></div></div>'; 1015 echo apply_filters('cwp_show_ticker', $output); 575 576 $output .= '<div class="mcwp-crypto" id="mcwp-'.$p->ID.'">'; 577 578 if($data->crypto_text_color !== ''){ 579 $custom_css .= '#mcwp-'.$p->ID.'.mcwp-crypto .cc-coin b { color: '.esc_attr($data->crypto_text_color).'; }'; 1016 580 } 1017 break; 1018 } 1019 } 581 582 $output = $this->shortcode->ticker($output, $coins, $data); 583 584 echo apply_filters('cwp_show_ticker', $output); 585 } 586 break; 587 } 588 589 wp_register_style('mcwp-custom-ticker', false); 590 wp_enqueue_style('mcwp-custom-ticker'); 591 wp_add_inline_style('mcwp-custom-ticker', $custom_css); 592 1020 593 echo $output; 1021 594 } 1022 595 } 1023 1024 public function mcwp_24h_percentage($percent,$tag){ 1025 $up = ($percent > 0) ? 'mcwpup' : 'mcwpdown'; 596 597 public function table_data() { 598 599 $allowed_orders = [ 600 'rank', 601 'name', 602 'price_usd', 603 'market_cap_usd', 604 'percent_change_24h', 605 ]; 606 607 //sanitization 608 $mcwp_post_id = intval($_GET['mcwp_id']); 609 610 $orderby = sanitize_text_field($_GET['columns'][intval($_GET['order'][0]['column'])]['name']); 611 $orderdir = sanitize_text_field($_GET['order'][0]['dir']); 612 $orderdir = 'DESC' === strtoupper($orderdir) ? 'DESC' : 'ASC'; 613 614 $orderby = in_array($orderby, $allowed_orders) ? $orderby : 'rank'; 615 $order = sanitize_sql_orderby("{$orderby} {$orderdir}"); 616 617 $start = intval($_GET['start']); 618 $length = intval($_GET['length']); 619 620 $data = $this->shortcode->data($mcwp_post_id); 621 622 $mcwp_coinsyms = $this->mcwp_coinsyms(); 623 $mcwp_cid = $mcwp_coinsyms['cid']; 624 $selectedcoins = $this->shortcode->selectedCoins($mcwp_cid, $data); 625 1026 626 $output = ''; 1027 $output .= '<'.$tag.' class="'.$up.'"> '.abs($percent).'%</'.$tag.'>'; 1028 1029 return $output; 1030 } 1031 1032 public function mcwp_currency_convert($price){ 1033 1034 if(($price >= 1) || ($price == 0)){ 1035 $price = number_format((float)$price,'2'); 1036 } else { 1037 $count = strspn(number_format($price,'10'), "0", strpos($price, ".")+1); 1038 $count = ($count > 5) ? 8 : 6; 1039 $price = number_format($price,$count); 1040 } 1041 1042 $output = '$ '.$price; 1043 return substr($output, -1) == '.' ? substr($output,0,-1) : $output; 1044 } 1045 1046 public function crypto_four_not_four(){ 1047 return '<div class="crypto-404">No Coins Selected</div>'; 1048 } 627 628 $query = "SELECT * FROM `{$this->tablename}` WHERE `cid` IN (\"" . implode('","', $selectedcoins) . "\") ORDER BY {$order} LIMIT %d, %d"; 629 630 $mcwp_names = []; 631 $coins = $this->fetch_coins($this->wpdb->prepare($query, [$start, $length])); 632 633 $arr = []; 634 635 636 $eachcid = []; 637 foreach($coins as $coin) { 638 array_push($eachcid, $coin->cid); 639 } 640 641 $postcoins = implode(',', $eachcid); 642 $weekly = $this->weekly_chart($postcoins); 643 644 foreach($coins as $coin) { 645 $key = []; 646 $key['rank'] = intval($coin->rank); 647 $key['name'] = esc_html($coin->name); 648 $key['symbol'] = esc_html($coin->symbol); 649 $key['price'] = esc_html($coin->price_usd); 650 $key['mcap'] = esc_html($coin->market_cap_usd); 651 $key['change'] = esc_html($coin->percent_change_24h); 652 $key['weekly'] = array_map('esc_html', $weekly[$coin->cid]); 653 $key['cid'] = esc_html($coin->cid); 654 $key['imgpath'] = esc_url($this->shortcode->mcwp_image_id($coin->img)); 655 656 if(is_array($data->crypto_table_columns) && in_array('coingecko', $data->crypto_table_columns)) { 657 $key['link'] = true; 658 } 659 660 $arr[] = $key; 661 } 662 663 $output = array( 664 'recordsTotal' => sizeof($selectedcoins), 665 'recordsFiltered' => sizeof($selectedcoins), 666 'draw'=> $_GET['draw'], 667 'data'=> $arr 668 ); 669 670 return wp_send_json($output); 671 } 672 1049 673 } 1050 1051 674 } 675 1052 676 function MCWP_Crypto() { 1053 677 return MCWP_Crypto::get_instance(); -
cryptocurrency-widgets-pack/trunk/languages/cryptocurrency-widgets-pack.pot
r2751462 r2854429 6 6 msgstr "" 7 7 "Project-Id-Version: Cryptocurrency Widgets Pack v1.5\n" 8 "POT-Creation-Date: 2020-08-28 16:17+0530\n" 8 "Report-Msgid-Bugs-To: Translator Name <[email protected]>\n" 9 "POT-Creation-Date: 2023-01-24 15:24+0530\n" 9 10 "PO-Revision-Date: \n" 10 11 "Last-Translator: Your Name <[email protected]>\n" 11 12 "Language-Team: Blocksera <[email protected]>\n" 12 " Report-Msgid-Bugs-To: Translator Name <[email protected]>\n"13 "Language: en_US\n" 13 14 "MIME-Version: 1.0\n" 14 15 "Content-Type: text/plain; charset=UTF-8\n" … … 22 23 "_nc:4c,1,2\n" 23 24 "X-Poedit-Basepath: ..\n" 24 "Language: en_US\n" 25 "X-Generator: Poedit 2.4.1\n" 25 "X-Generator: Poedit 3.2.2\n" 26 26 "X-Poedit-SearchPath-0: .\n" 27 27 28 #: cryptocurrency-widgets-pack.php: 41828 #: cryptocurrency-widgets-pack.php:290 29 29 msgctxt "Post Type General Name" 30 30 msgid "Cryptocurrency Widgets Pack" 31 31 msgstr "" 32 32 33 #: cryptocurrency-widgets-pack.php: 41933 #: cryptocurrency-widgets-pack.php:291 34 34 msgctxt "Post Type Singular Name" 35 35 msgid "Cryptocurrency Widgets Pack" 36 36 msgstr "" 37 37 38 #: cryptocurrency-widgets-pack.php: 42038 #: cryptocurrency-widgets-pack.php:292 39 39 msgid "Crypto Widgets" 40 40 msgstr "" 41 41 42 #: cryptocurrency-widgets-pack.php: 42142 #: cryptocurrency-widgets-pack.php:293 43 43 msgid "Post Type" 44 44 msgstr "" 45 45 46 #: cryptocurrency-widgets-pack.php: 42246 #: cryptocurrency-widgets-pack.php:294 47 47 msgid "Widget Archives" 48 48 msgstr "" 49 49 50 #: cryptocurrency-widgets-pack.php: 42350 #: cryptocurrency-widgets-pack.php:295 51 51 msgid "Widget Attributes" 52 52 msgstr "" 53 53 54 #: cryptocurrency-widgets-pack.php: 42454 #: cryptocurrency-widgets-pack.php:296 55 55 msgid "Parent Widget:" 56 56 msgstr "" 57 57 58 #: cryptocurrency-widgets-pack.php: 42558 #: cryptocurrency-widgets-pack.php:297 59 59 msgid "All Widgets" 60 60 msgstr "" 61 61 62 #: cryptocurrency-widgets-pack.php: 42662 #: cryptocurrency-widgets-pack.php:298 63 63 msgid "Add New Crypto Widget" 64 64 msgstr "" 65 65 66 #: cryptocurrency-widgets-pack.php: 42766 #: cryptocurrency-widgets-pack.php:299 67 67 msgid "Add New" 68 68 msgstr "" 69 69 70 #: cryptocurrency-widgets-pack.php: 42870 #: cryptocurrency-widgets-pack.php:300 71 71 msgid "New Widget" 72 72 msgstr "" 73 73 74 #: cryptocurrency-widgets-pack.php: 42974 #: cryptocurrency-widgets-pack.php:301 75 75 msgid "Edit Widget" 76 76 msgstr "" 77 77 78 #: cryptocurrency-widgets-pack.php: 43078 #: cryptocurrency-widgets-pack.php:302 79 79 msgid "View Widget" 80 80 msgstr "" 81 81 82 #: cryptocurrency-widgets-pack.php: 43182 #: cryptocurrency-widgets-pack.php:303 83 83 msgid "View Widgets" 84 84 msgstr "" 85 85 86 #: cryptocurrency-widgets-pack.php: 43286 #: cryptocurrency-widgets-pack.php:304 87 87 msgid "Search Widget" 88 88 msgstr "" 89 89 90 #: cryptocurrency-widgets-pack.php: 43390 #: cryptocurrency-widgets-pack.php:305 91 91 msgid "Not found" 92 92 msgstr "" 93 93 94 #: cryptocurrency-widgets-pack.php: 43494 #: cryptocurrency-widgets-pack.php:306 95 95 msgid "Not found in Trash" 96 96 msgstr "" 97 97 98 #: cryptocurrency-widgets-pack.php: 43598 #: cryptocurrency-widgets-pack.php:307 99 99 msgid "Featured Image" 100 100 msgstr "" 101 101 102 #: cryptocurrency-widgets-pack.php: 436102 #: cryptocurrency-widgets-pack.php:308 103 103 msgid "Set featured image" 104 104 msgstr "" 105 105 106 #: cryptocurrency-widgets-pack.php: 437106 #: cryptocurrency-widgets-pack.php:309 107 107 msgid "Remove featured image" 108 108 msgstr "" 109 109 110 #: cryptocurrency-widgets-pack.php: 438110 #: cryptocurrency-widgets-pack.php:310 111 111 msgid "Use as featured image" 112 112 msgstr "" 113 113 114 #: cryptocurrency-widgets-pack.php: 439114 #: cryptocurrency-widgets-pack.php:311 115 115 msgid "Insert into widget" 116 116 msgstr "" 117 117 118 #: cryptocurrency-widgets-pack.php: 440118 #: cryptocurrency-widgets-pack.php:312 119 119 msgid "Uploaded to this widget" 120 120 msgstr "" 121 121 122 #: cryptocurrency-widgets-pack.php: 441122 #: cryptocurrency-widgets-pack.php:313 123 123 msgid "Widgets list" 124 124 msgstr "" 125 125 126 #: cryptocurrency-widgets-pack.php: 442126 #: cryptocurrency-widgets-pack.php:314 127 127 msgid "Widgets list navigation" 128 128 msgstr "" 129 129 130 #: cryptocurrency-widgets-pack.php: 443130 #: cryptocurrency-widgets-pack.php:315 131 131 msgid "Filter widgets list" 132 132 msgstr "" 133 133 134 #: cryptocurrency-widgets-pack.php: 446134 #: cryptocurrency-widgets-pack.php:319 135 135 msgid "Cryptocurrency Widgets Pack" 136 136 msgstr "" 137 137 138 #: cryptocurrency-widgets-pack.php: 447138 #: cryptocurrency-widgets-pack.php:320 139 139 msgid "Post Type Description" 140 140 msgstr "" 141 141 142 #: cryptocurrency-widgets-pack.php:494 142 #: cryptocurrency-widgets-pack.php:357 143 msgid "Cryptocurrency Widgets Pack Settings" 144 msgstr "" 145 146 #: cryptocurrency-widgets-pack.php:358 147 msgid "Crypto Widgets Shortcode" 148 msgstr "" 149 150 #: cryptocurrency-widgets-pack.php:359 151 msgid "Rate the Plugin & Pro Features" 152 msgstr "" 153 154 #: cryptocurrency-widgets-pack.php:366 155 msgid "Shortcode" 156 msgstr "" 157 158 #: cryptocurrency-widgets-pack.php:367 includes/settings.php:21 159 msgid "Widget Type" 160 msgstr "" 161 162 #: includes/display.php:53 143 163 msgid "" 144 164 "Enjoying our <strong>Cryptocurrency Widgets Pack?</strong> We hope you " … … 147 167 msgstr "" 148 168 149 #: cryptocurrency-widgets-pack.php:495169 #: includes/display.php:54 150 170 msgid "Rate the Plugin!" 151 171 msgstr "" 152 172 153 #: cryptocurrency-widgets-pack.php:496 cryptocurrency-widgets-pack.php:507173 #: includes/display.php:55 includes/display.php:66 154 174 msgid "Go Pro" 155 175 msgstr "" 156 176 157 #: cryptocurrency-widgets-pack.php:497177 #: includes/display.php:56 158 178 msgid "Already Done" 159 179 msgstr "" 160 180 161 #: cryptocurrency-widgets-pack.php:505181 #: includes/display.php:64 162 182 msgid "Add Widgets" 163 183 msgstr "" 164 184 165 #: cryptocurrency-widgets-pack.php:506185 #: includes/display.php:65 166 186 msgid "FAQ" 167 187 msgstr "" 168 188 169 #: cryptocurrency-widgets-pack.php:519189 #: includes/display.php:78 170 190 msgid "Support" 171 191 msgstr "" 172 192 173 #: cryptocurrency-widgets-pack.php:528193 #: includes/display.php:87 174 194 msgid "Upgrade To PRO - Massive Cryptocurrency Widgets" 175 195 msgstr "" 176 196 177 #: cryptocurrency-widgets-pack.php:529197 #: includes/display.php:88 178 198 msgid "Upgrade to PRO ➤" 179 199 msgstr "" 180 200 181 #: cryptocurrency-widgets-pack.php:544 182 msgid "Shortcode" 183 msgstr "" 184 185 #: cryptocurrency-widgets-pack.php:545 includes/mcwp-settings.php:21 186 msgid "Widget Type" 187 msgstr "" 188 189 #: cryptocurrency-widgets-pack.php:565 190 msgid "Cryptocurrency Widgets Pack Settings" 191 msgstr "" 192 193 #: cryptocurrency-widgets-pack.php:566 194 msgid "Crypto Widgets Shortcode" 195 msgstr "" 196 197 #: cryptocurrency-widgets-pack.php:567 198 msgid "Rate the Plugin & Pro Features" 199 msgstr "" 200 201 #: cryptocurrency-widgets-pack.php:573 201 #: includes/display.php:102 202 msgid "Paste this shortcode anywhere like page, post or widgets" 203 msgstr "" 204 205 #: includes/display.php:105 206 msgid "Create 5,000+ coin pages instantly" 207 msgstr "" 208 209 #: includes/display.php:111 202 210 msgid "Plugin Rating:" 203 211 msgstr "" 204 212 205 #: cryptocurrency-widgets-pack.php:583213 #: includes/display.php:121 206 214 msgid "" 207 215 "Did Cryptocurrency Widgets Pack help you out? Please leave us a 5 star " … … 209 217 msgstr "" 210 218 211 #: cryptocurrency-widgets-pack.php:584219 #: includes/display.php:122 212 220 msgid "Write a Review" 213 221 msgstr "" 214 222 215 #: cryptocurrency-widgets-pack.php:586223 #: includes/display.php:124 216 224 msgid "Massive Cryptocurrency Widgets | Crypto Plugin" 217 225 msgstr "" 218 226 219 #: cryptocurrency-widgets-pack.php:589227 #: includes/display.php:127 220 228 msgid "5,000+ Cryptocurrencies" 221 229 msgstr "" 222 230 223 #: cryptocurrency-widgets-pack.php:590231 #: includes/display.php:128 224 232 msgid "Powered by Coingecko" 225 233 msgstr "" 226 234 227 #: cryptocurrency-widgets-pack.php:591235 #: includes/display.php:129 228 236 msgid "Stylish crypto widgets" 229 237 msgstr "" 230 238 231 #: cryptocurrency-widgets-pack.php:592 cryptocurrency-widgets-pack.php:615239 #: includes/display.php:130 includes/display.php:153 232 240 msgid "Feature-rich widget editor" 233 241 msgstr "" 234 242 235 #: cryptocurrency-widgets-pack.php:593 cryptocurrency-widgets-pack.php:616243 #: includes/display.php:131 includes/display.php:154 236 244 msgid "Unlimited customizations" 237 245 msgstr "" 238 246 239 #: cryptocurrency-widgets-pack.php:596247 #: includes/display.php:134 240 248 msgid "Coinpress - Cryptocurrency Pages for WordPress" 241 249 msgstr "" 242 250 243 #: cryptocurrency-widgets-pack.php:599251 #: includes/display.php:137 244 252 msgid "5,000+ Coin detail pages" 245 253 msgstr "" 246 254 247 #: cryptocurrency-widgets-pack.php:600255 #: includes/display.php:138 248 256 msgid "Search, Currency Changer, Watchlist" 249 257 msgstr "" 250 258 251 #: cryptocurrency-widgets-pack.php:601259 #: includes/display.php:139 252 260 msgid "Line & Candlestick charts" 253 261 msgstr "" 254 262 255 #: cryptocurrency-widgets-pack.php:602263 #: includes/display.php:140 256 264 msgid "Historical Data & Markets" 257 265 msgstr "" 258 266 259 #: cryptocurrency-widgets-pack.php:603267 #: includes/display.php:141 260 268 msgid "Social Feed & Comments" 261 269 msgstr "" 262 270 263 #: cryptocurrency-widgets-pack.php:604271 #: includes/display.php:142 264 272 msgid "News section & Responsive Design" 265 273 msgstr "" 266 274 267 #: cryptocurrency-widgets-pack.php:607275 #: includes/display.php:145 268 276 msgid "Massive Stock Market & Forex Widgets" 269 277 msgstr "" 270 278 271 #: cryptocurrency-widgets-pack.php:610279 #: includes/display.php:148 272 280 msgid "Global stock exchanges" 273 281 msgstr "" 274 282 275 #: cryptocurrency-widgets-pack.php:611283 #: includes/display.php:149 276 284 msgid "Powered by Yahoo API" 277 285 msgstr "" 278 286 279 #: cryptocurrency-widgets-pack.php:612287 #: includes/display.php:150 280 288 msgid "Up to 100,000 companies list" 281 289 msgstr "" 282 290 283 #: cryptocurrency-widgets-pack.php:613291 #: includes/display.php:151 284 292 msgid "Powerful search option" 285 293 msgstr "" 286 294 287 #: cryptocurrency-widgets-pack.php:614295 #: includes/display.php:152 288 296 msgid "Stylish widgets" 289 msgstr ""290 291 #: cryptocurrency-widgets-pack.php:625292 msgid "Paste this shortcode anywhere like page, post or widgets"293 msgstr ""294 295 #: cryptocurrency-widgets-pack.php:628296 msgid "Create 5,000+ coin pages instantly"297 msgstr ""298 299 #: cryptocurrency-widgets-pack.php:811300 msgid "Name"301 msgstr ""302 303 #: cryptocurrency-widgets-pack.php:811 includes/mcwp-premium.php:26304 msgid "Price"305 msgstr ""306 307 #: cryptocurrency-widgets-pack.php:811308 msgid "Market Cap"309 msgstr ""310 311 #: cryptocurrency-widgets-pack.php:811312 msgid "Change"313 msgstr ""314 315 #: cryptocurrency-widgets-pack.php:811316 msgid "Price Graph (24h)"317 297 msgstr "" 318 298 … … 325 305 msgstr "" 326 306 327 #: includes/ mcwp-premium.php:7307 #: includes/premium.php:7 328 308 msgid "Massive Cryptocurrency Widgets" 329 309 msgstr "" 330 310 331 #: includes/ mcwp-premium.php:8311 #: includes/premium.php:8 332 312 msgid "Upgrade" 333 313 msgstr "" 334 314 335 #: includes/ mcwp-premium.php:8315 #: includes/premium.php:8 336 316 msgid "plugin within a minute and unlock many features now!!!" 337 317 msgstr "" 338 318 339 #: includes/ mcwp-premium.php:20319 #: includes/premium.php:20 340 320 msgid "Free" 341 321 msgstr "" 342 322 343 #: includes/ mcwp-premium.php:21323 #: includes/premium.php:21 344 324 msgid "Pro" 345 325 msgstr "" 346 326 347 #: includes/ mcwp-premium.php:21327 #: includes/premium.php:21 348 328 msgid "Recommended" 349 329 msgstr "" 350 330 351 #: includes/mcwp-premium.php:32 331 #: includes/premium.php:26 includes/shortcodes.php:143 332 msgid "Price" 333 msgstr "" 334 335 #: includes/premium.php:32 352 336 msgid "Unlimited Cryptocurrencies" 353 337 msgstr "" 354 338 355 #: includes/ mcwp-premium.php:33339 #: includes/premium.php:33 356 340 msgid "" 357 341 "More than 5,000 cryptocurrencies available and new currencies are added " … … 359 343 msgstr "" 360 344 361 #: includes/ mcwp-premium.php:40345 #: includes/premium.php:40 362 346 msgid "Modern Layout" 363 347 msgstr "" 364 348 365 #: includes/ mcwp-premium.php:41349 #: includes/premium.php:41 366 350 msgid "" 367 351 "Supports modern layouts which are compatible with most OS, browsers and " … … 369 353 msgstr "" 370 354 371 #: includes/ mcwp-premium.php:48355 #: includes/premium.php:48 372 356 msgid "Shortcodes" 373 357 msgstr "" 374 358 375 #: includes/ mcwp-premium.php:49359 #: includes/premium.php:49 376 360 msgid "Shortcode can be easily copied and pasted anywhere on your site" 377 361 msgstr "" 378 362 379 #: includes/ mcwp-premium.php:56363 #: includes/premium.php:56 380 364 msgid "Auto Ticker Enable" 381 365 msgstr "" 382 366 383 #: includes/ mcwp-premium.php:57367 #: includes/premium.php:57 384 368 msgid "" 385 369 "Header, footer ticker showed on site, shortcode does not need to be placed" 386 370 msgstr "" 387 371 388 #: includes/ mcwp-premium.php:64372 #: includes/premium.php:64 389 373 msgid "Preview" 390 374 msgstr "" 391 375 392 #: includes/ mcwp-premium.php:65376 #: includes/premium.php:65 393 377 msgid "Widget preview is shown on the right side while editing" 394 378 msgstr "" 395 379 396 #: includes/ mcwp-premium.php:72380 #: includes/premium.php:72 397 381 msgid "Feature Rich Admin Panel" 398 382 msgstr "" 399 383 400 #: includes/ mcwp-premium.php:73384 #: includes/premium.php:73 401 385 msgid "" 402 386 "Customized admin panel to provide a feature-rich experience to create " … … 404 388 msgstr "" 405 389 406 #: includes/ mcwp-premium.php:80 includes/mcwp-settings.php:107390 #: includes/premium.php:80 includes/settings.php:107 407 391 msgid "Ticker Speed" 408 392 msgstr "" 409 393 410 #: includes/ mcwp-premium.php:81394 #: includes/premium.php:81 411 395 msgid "Ticker speed can be controlled easily" 412 396 msgstr "" 413 397 414 #: includes/ mcwp-premium.php:88398 #: includes/premium.php:88 415 399 msgid "Real Time Price Update" 416 400 msgstr "" 417 401 418 #: includes/ mcwp-premium.php:89402 #: includes/premium.php:89 419 403 msgid "Real time can be enabled or disabled for any widget" 420 404 msgstr "" 421 405 422 #: includes/ mcwp-premium.php:96406 #: includes/premium.php:96 423 407 msgid "Unlimited Fiat Currencies" 424 408 msgstr "" 425 409 426 #: includes/ mcwp-premium.php:97410 #: includes/premium.php:97 427 411 msgid "150+ fiat currency change options for all widgets" 428 412 msgstr "" 429 413 430 #: includes/ mcwp-premium.php:104414 #: includes/premium.php:104 431 415 msgid "Number Of Themes" 432 416 msgstr "" 433 417 434 #: includes/ mcwp-premium.php:105418 #: includes/premium.php:105 435 419 msgid "Beautiful default themes available for all widgets" 436 420 msgstr "" 437 421 438 #: includes/ mcwp-premium.php:112422 #: includes/premium.php:112 439 423 msgid "Top/Unlimited Coins" 440 424 msgstr "" 441 425 442 #: includes/ mcwp-premium.php:113426 #: includes/premium.php:113 443 427 msgid "" 444 428 "Coins - option to select top 100, 300 coins or all coins, also with remove " … … 446 430 msgstr "" 447 431 448 #: includes/ mcwp-premium.php:120432 #: includes/premium.php:120 449 433 msgid "Customize All Colors" 450 434 msgstr "" 451 435 452 #: includes/ mcwp-premium.php:121436 #: includes/premium.php:121 453 437 msgid "Custom text and background colors for all widgets" 454 438 msgstr "" 455 439 456 #: includes/ mcwp-premium.php:128440 #: includes/premium.php:128 457 441 msgid "Price Formats" 458 442 msgstr "" 459 443 460 #: includes/ mcwp-premium.php:129444 #: includes/premium.php:129 461 445 msgid "Price format option for all widgets" 462 446 msgstr "" 463 447 464 #: includes/ mcwp-premium.php:136448 #: includes/premium.php:136 465 449 msgid "Ticker Display Options" 466 450 msgstr "" 467 451 468 #: includes/ mcwp-premium.php:137452 #: includes/premium.php:137 469 453 msgid "" 470 454 "Display options - 24h change, 24h volume enable/disable, rounded corners" 471 455 msgstr "" 472 456 473 #: includes/ mcwp-premium.php:144457 #: includes/premium.php:144 474 458 msgid "Table Styles" 475 459 msgstr "" 476 460 477 #: includes/ mcwp-premium.php:145461 #: includes/premium.php:145 478 462 msgid "Table styles like light, dark, gloss, custom are available" 479 463 msgstr "" 480 464 481 #: includes/ mcwp-premium.php:152465 #: includes/premium.php:152 482 466 msgid "Pagination" 483 467 msgstr "" 484 468 485 #: includes/ mcwp-premium.php:153469 #: includes/premium.php:153 486 470 msgid "" 487 471 "Table row length to control no. of coins shown when the page loads. " … … 489 473 msgstr "" 490 474 491 #: includes/ mcwp-premium.php:160475 #: includes/premium.php:160 492 476 msgid "Link coin pages to the table" 493 477 msgstr "" 494 478 495 #: includes/ mcwp-premium.php:161479 #: includes/premium.php:161 496 480 msgid "Create any particular coin pages and link it to tables" 497 481 msgstr "" 498 482 499 #: includes/ mcwp-premium.php:168483 #: includes/premium.php:168 500 484 msgid "Charts View" 501 485 msgstr "" 502 486 503 #: includes/ mcwp-premium.php:169487 #: includes/premium.php:169 504 488 msgid "" 505 489 "Two type of option for chart view - line chart and candlestick which " … … 508 492 msgstr "" 509 493 510 #: includes/ mcwp-premium.php:176494 #: includes/premium.php:176 511 495 msgid "Chart Options" 512 496 msgstr "" 513 497 514 #: includes/ mcwp-premium.php:177498 #: includes/premium.php:177 515 499 msgid "" 516 500 "Chart features - smooth, non-smooth edges, Theme - light and dark, Chart " … … 518 502 msgstr "" 519 503 520 #: includes/ mcwp-premium.php:184504 #: includes/premium.php:184 521 505 msgid "Card & Label Designs" 522 506 msgstr "" 523 507 524 #: includes/ mcwp-premium.php:185508 #: includes/premium.php:185 525 509 msgid "" 526 510 "Card widgets, labels provides default six and three types of designs " … … 528 512 msgstr "" 529 513 530 #: includes/ mcwp-premium.php:192514 #: includes/premium.php:192 531 515 msgid "Card Display Options" 532 516 msgstr "" 533 517 534 #: includes/ mcwp-premium.php:193518 #: includes/premium.php:193 535 519 msgid "Cards, labels support full width option as well as round corners" 536 520 msgstr "" 537 521 538 #: includes/ mcwp-premium.php:200522 #: includes/premium.php:200 539 523 msgid "All Rounder Converter" 540 524 msgstr "" 541 525 542 #: includes/ mcwp-premium.php:201526 #: includes/premium.php:201 543 527 msgid "" 544 528 "Converter available with four types: crypto to fiat, fiat to crypto, crypto " … … 546 530 msgstr "" 547 531 548 #: includes/ mcwp-premium.php:208532 #: includes/premium.php:208 549 533 msgid "Auto/Manual Converter" 550 534 msgstr "" 551 535 552 #: includes/ mcwp-premium.php:209536 #: includes/premium.php:209 553 537 msgid "" 554 538 "Manual convert button can be added if the automatic conversion is not " … … 556 540 msgstr "" 557 541 558 #: includes/ mcwp-premium.php:216542 #: includes/premium.php:216 559 543 msgid "List Widgets" 560 544 msgstr "" 561 545 562 #: includes/ mcwp-premium.php:217546 #: includes/premium.php:217 563 547 msgid "Three Beautiful designs with animated spark line charts" 564 548 msgstr "" 565 549 566 #: includes/ mcwp-premium.php:224550 #: includes/premium.php:224 567 551 msgid "Box Widgets" 568 552 msgstr "" 569 553 570 #: includes/ mcwp-premium.php:225554 #: includes/premium.php:225 571 555 msgid "Five Beautiful designs with animated spark line charts" 572 556 msgstr "" 573 557 574 #: includes/ mcwp-premium.php:232558 #: includes/premium.php:232 575 559 msgid "Text Widgets" 576 560 msgstr "" 577 561 578 #: includes/ mcwp-premium.php:233562 #: includes/premium.php:233 579 563 msgid "" 580 564 "Add cryptocurrency data anywhere in articles, sidebars, etc., with static " … … 582 566 msgstr "" 583 567 584 #: includes/ mcwp-premium.php:240568 #: includes/premium.php:240 585 569 msgid "Changelly Widgets" 586 570 msgstr "" 587 571 588 #: includes/ mcwp-premium.php:241572 #: includes/premium.php:241 589 573 msgid "" 590 574 "Embed changelly widgets to your site for buy/sell and earn commissions on " … … 592 576 msgstr "" 593 577 594 #: includes/ mcwp-premium.php:248578 #: includes/premium.php:248 595 579 msgid "News Widgets" 596 580 msgstr "" 597 581 598 #: includes/ mcwp-premium.php:249582 #: includes/premium.php:249 599 583 msgid "" 600 584 "Add latest crypto news on your site with our elegant and responsive widgets" 601 585 msgstr "" 602 586 603 #: includes/ mcwp-premium.php:258587 #: includes/premium.php:258 604 588 msgid "Installed" 605 589 msgstr "" 606 590 607 #: includes/ mcwp-premium.php:264591 #: includes/premium.php:264 608 592 msgid "Upgrade Now" 609 593 msgstr "" 610 594 611 #: includes/ mcwp-settings.php:11595 #: includes/settings.php:11 612 596 msgid "Widget Title" 613 597 msgstr "" 614 598 615 #: includes/ mcwp-settings.php:25599 #: includes/settings.php:25 616 600 msgid "Ticker" 617 601 msgstr "" 618 602 619 #: includes/ mcwp-settings.php:28603 #: includes/settings.php:28 620 604 msgid "Table" 621 605 msgstr "" 622 606 623 #: includes/ mcwp-settings.php:31607 #: includes/settings.php:31 624 608 msgid "Card" 625 609 msgstr "" 626 610 627 #: includes/ mcwp-settings.php:34611 #: includes/settings.php:34 628 612 msgid "Label" 629 613 msgstr "" 630 614 631 #: includes/ mcwp-settings.php:42615 #: includes/settings.php:42 632 616 msgid "Coins" 633 617 msgstr "" 634 618 635 #: includes/ mcwp-settings.php:42619 #: includes/settings.php:42 636 620 msgid "Clear" 637 621 msgstr "" 638 622 639 #: includes/ mcwp-settings.php:45 includes/mcwp-settings.php:46623 #: includes/settings.php:45 includes/settings.php:46 640 624 msgid "Select a Cryptocurrency Coin" 641 625 msgstr "" 642 626 643 #: includes/ mcwp-settings.php:58627 #: includes/settings.php:58 644 628 msgid "or show top" 645 629 msgstr "" 646 630 647 #: includes/ mcwp-settings.php:67631 #: includes/settings.php:67 648 632 msgid "coins" 649 633 msgstr "" 650 634 651 #: includes/ mcwp-settings.php:73635 #: includes/settings.php:73 652 636 msgid "" 653 637 "Thank you for installing our plugin. We hope you will like it very much. " … … 655 639 msgstr "" 656 640 657 #: includes/ mcwp-settings.php:75641 #: includes/settings.php:75 658 642 msgid "I'll Rate Later" 659 643 msgstr "" 660 644 661 #: includes/ mcwp-settings.php:76645 #: includes/settings.php:76 662 646 msgid "Sure, I'll Rate" 663 647 msgstr "" 664 648 665 #: includes/ mcwp-settings.php:85649 #: includes/settings.php:85 666 650 msgid "Ticker Position" 667 651 msgstr "" 668 652 669 #: includes/ mcwp-settings.php:116 includes/mcwp-settings.php:127670 #: includes/ mcwp-settings.php:136653 #: includes/settings.php:116 includes/settings.php:127 654 #: includes/settings.php:136 671 655 msgid "Display Options" 672 656 msgstr "" 673 657 674 #: includes/ mcwp-settings.php:120658 #: includes/settings.php:120 675 659 msgid "24h Change" 676 660 msgstr "" 677 661 678 #: includes/ mcwp-settings.php:122 includes/mcwp-settings.php:131679 #: includes/ mcwp-settings.php:142662 #: includes/settings.php:122 includes/settings.php:131 663 #: includes/settings.php:142 680 664 msgid "Link to Coingecko" 681 665 msgstr "" 682 666 683 #: includes/ mcwp-settings.php:140667 #: includes/settings.php:140 684 668 msgid "Full Width" 685 669 msgstr "" 686 670 687 #: includes/mcwp-settings.php:147 671 #: includes/settings.php:144 672 msgid "Add 24h Change Percentage" 673 msgstr "" 674 675 #: includes/settings.php:149 688 676 msgid "Custom Text Color" 689 677 msgstr "" 690 678 691 #: includes/ mcwp-settings.php:155679 #: includes/settings.php:157 692 680 msgid "Custom Background Color" 693 681 msgstr "" 694 682 695 #: includes/ mcwp-settings.php:163683 #: includes/settings.php:165 696 684 msgid "Add Custom CSS" 697 685 msgstr "" 698 686 699 #: includes/ mcwp-settings.php:176 includes/mcwp-settings.php:228700 #: includes/ mcwp-settings.php:235 includes/mcwp-settings.php:242701 #: includes/ mcwp-settings.php:248 includes/mcwp-settings.php:254702 #: includes/ mcwp-settings.php:260 includes/mcwp-settings.php:266703 #: includes/ mcwp-settings.php:272 includes/mcwp-settings.php:278704 #: includes/ mcwp-settings.php:284 includes/mcwp-settings.php:290705 #: includes/ mcwp-settings.php:296 includes/mcwp-settings.php:302706 #: includes/ mcwp-settings.php:308 includes/mcwp-settings.php:314707 #: includes/ mcwp-settings.php:320 includes/mcwp-settings.php:326687 #: includes/settings.php:178 includes/settings.php:230 688 #: includes/settings.php:237 includes/settings.php:244 689 #: includes/settings.php:250 includes/settings.php:256 690 #: includes/settings.php:262 includes/settings.php:268 691 #: includes/settings.php:274 includes/settings.php:280 692 #: includes/settings.php:286 includes/settings.php:292 693 #: includes/settings.php:298 includes/settings.php:304 694 #: includes/settings.php:310 includes/settings.php:316 695 #: includes/settings.php:322 includes/settings.php:328 708 696 msgid "Available in Pro Version" 709 697 msgstr "" 710 698 711 #: includes/ mcwp-settings.php:178699 #: includes/settings.php:180 712 700 msgid "More Widgets (Pro)" 713 701 msgstr "" 714 702 715 #: includes/ mcwp-settings.php:332703 #: includes/settings.php:334 716 704 msgid "Publish or update to preview" 717 705 msgstr "" 706 707 #: includes/shortcodes.php:143 708 msgid "Name" 709 msgstr "" 710 711 #: includes/shortcodes.php:143 712 msgid "Market Cap" 713 msgstr "" 714 715 #: includes/shortcodes.php:143 716 msgid "Change" 717 msgstr "" 718 719 #: includes/shortcodes.php:143 720 msgid "Price Graph (24h)" 721 msgstr "" -
cryptocurrency-widgets-pack/trunk/readme.txt
r2751469 r2854429 4 4 Tags: cryptocurrency, bitcoin price, ticker, table, coinmarketcap, shortcodes, crypto widgets 5 5 Requires PHP: 5.6 6 Requires at least: 5.67 Tested up to: 6. 08 Stable tag: 1.8.16 Requires at least: 4.3.0 7 Tested up to: 6.1.1 8 Stable tag: 2.0 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 153 153 == Changelog == 154 154 155 = 2.0 [24-01-2023] = 156 * [Fix] Security Fixes 157 155 158 = 1.8.1 [04-07-2022] = 156 159 * [Improved] WordPress 6 Compatibility Update
Note: See TracChangeset
for help on using the changeset viewer.