Changeset 2925475
- Timestamp:
- 06/13/2023 05:15:37 PM (3 years ago)
- Location:
- ethereum-price-tooltip/trunk
- Files:
-
- 2 edited
-
README.txt (modified) (3 diffs)
-
eth-price-tooltip.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ethereum-price-tooltip/trunk/README.txt
r2860657 r2925475 3 3 Tags: cryptocurrency, ethereum, finance, bitcoin, eth, tooltip 4 4 Requires at least: 4.0 5 Tested up to: 6. 15 Tested up to: 6.2 6 6 Requires PHP: 5.4 7 Stable tag: 1. 18 Donate link: https://plugins.club/ wordpress/ethereum-price-tooltip/7 Stable tag: 1.2 8 Donate link: https://plugins.club/free-wordpress-plugins/ethereum-price-tooltip/ 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 14 14 Plugin will find mentions of Ethereum in your texts and automatically add a tooltip to it with actual price in USD and EUR. No need to do any setting. 15 15 16  17 18 For Bitcoin please use [Bitcoin price tooltip](https://wordpress.org/plugins/bitcoin-price-tooltip/) 16 For Bitcoin please use [Bitcoin price tooltip](https://wordpress.org/free-wordpress-plugins/bitcoin-price-tooltip/) 19 17 20 18 == Screenshots == … … 24 22 == Changelog == 25 23 24 = 1.2 = 25 <a href tags are now completelly excluded 26 26 27 = 1.1 = 27 28 Replaced BitPay with CryptoCompare API -
ethereum-price-tooltip/trunk/eth-price-tooltip.php
r2850737 r2925475 3 3 Plugin Name: Ethereum Price Tooltip 4 4 Description: Plugin will find mentions of Ethereum in your texts and automatically add a toltip to it with actual price in USD and EUR. 5 Version: 1. 15 Version: 1.2 6 6 Author: plugins.club 7 Author URI: https://plugins.club/ wordpress/ethereum-price-tooltip/7 Author URI: https://plugins.club/free-wordpress-plugins/ethereum-price-tooltip/ 8 8 */ 9 9 … … 20 20 $ethAnswerEUR = $json->EUR; 21 21 22 for ($i = 0, $c = count($eth_in_text);$i < $c;$i++)23 {24 $the_content = preg_replace( '#' . $eth_in_text[$i] . '#iu', '<span class="tooltip" data-tooltip="' . $ethAnswerUsd . ' USD / ' . $ethAnswerEUR . ' EUR">' . $eth_in_text[$i] . '</span>', $the_content);22 foreach ($eth_in_text as $keyword) { 23 $pattern = '/(<a[^>]*>.*?<\/a>)|(?<!<\/a>|[\'"])(' . preg_quote($keyword, '/') . ')(?!<\/a>|\w|[\'"])/iu'; 24 $the_content = preg_replace($pattern, '$1<span class="tooltip" data-tooltip="' . $ethAnswerUsd . ' USD / ' . $ethAnswerEUR . ' EUR">$2</span>', $the_content); 25 25 } 26 26 27 27 return $the_content; 28 28 } 29 29 30 30 31 function add_eth_tooltip_css()
Note: See TracChangeset
for help on using the changeset viewer.