[wordpress插件] Cryptocurrency Portfolio Tracker加密货币投资组合追踪器

wordpress 插件 文章 2020-04-05 15:20 861 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Adds an admin screen to enter in your cryptocurrency purchases and then exposes a simple to use shortcode and simple API to output your cryptocurrency portfolio’s performance on the frontend.

添加一个管理屏幕以输入您的加密货币购买,然后公开一个易于使用的简码和简单的API,以在前端输出您的加密货币投资组合的表现。

Please note that this plugin makes use of a 3rd party service to retrieve cryptocurrency prices.

请注意,此插件利用第三方服务检索加密货币价格。

This means that a request is made to third party servers (coinmarketcap.com) requesting current cryptocurrency prices.

这意味着将向第三方服务器(coinmarketcap.com)发出请求,要求当前的加密货币价格。

See https://coinmarketcap.com/api/ for more information.

有关更多信息,请参见https://coinmarketcap.com/api/。

Simple usage:

简单用法:

Adding your portfolio

添加您的投资组合

    • Download, install and activate the plugin.
    • 下载,安装并激活插件。

    • Go to Settings > Cryptocurrency
    • 转到设置> 加密货币

    • Set your fiat currency (USD by default and you can optionally set it to use the euro)
    • 设置法定货币(默认为美元,您可以选择将其设置为使用欧元)

    • Populate your coin purchases and your cost bases.

    • 填充您的硬币购买和成本基础。

      You can enter multiple entries for the same currency (i.e. you have bought the same currency multiple times at different cost bases).

    • 您可以输入相同币种的多个条目(即您以不同的成本基础多次购买了相同币种)。

    • ???
    • ???

    • Profit!… or look and see how to output the table on the frontend.
    • 获利!…,或者看看如何在前端输出表格。

    Outputting the data

    输出数据

    Shortcode

    简码

    [cryptocurrency_table]

      [cryptocurrency_table]

    PHP API

    PHP API

    cryptocurrency_table();

      cryptocurrency_table();

    Filters

    过滤器

    For the sake of brevity, by default, the table outputs (1) the current price of each currency and does NOT output the last time the price was retrieved (see API section below), both of which can be toggled by adding

    为简洁起见,默认情况下,该表输出(1)每种货币的当前价格,并且不输出最后一次检索该价格的时间(请参见下面的API部分),都可以通过添加来切换两者

    the following:

    以下:

    Hiding the current price:

    隐藏当前价格:

    add_filter( 'cryptocurrency/show_current_price', '__return_false’ );

      add_filter('cryptocurrency / show_current_price','__return_false');

    Showing the last updated:

    显示最近更新:

    add_filter( 'cryptocurrency/show_last_updated', '__return_true' );

      add_filter('cryptocurrency / show_last_updated','__return_true');

    Changing how currency is displayed:

    更改货币显示方式:

    If you are using Euro as your fiat currency it defaults to outputting the € symbol after the amount, you can easily switch it to show the € symbol before by doing the following

    如果您使用欧元作为法定货币,则默认情况下会在金额之后输出€符号,您可以通过执行以下操作轻松地将其切换为显示€符号

    `

     `

    add_filter(‘cryptocurrency/currency_symbol_before’, function(){
        

    add_filter(“ cryptocurrency / currency_symbol_before”,function(){
        

    return ‘€’;

    返回“€”;

    } );

    });

    add_filter(‘cryptocurrency/currency_symbol_after’, ‘__return_null’ );
        

    add_filter(‘cryptocurrency / currency_symbol_after’,‘__ return_null’);
        

    `

    `

    API

    API

    This plugin uses the public API made available by coinmarketcap.com.

    此插件使用coinmarketcap.com提供的公共API。

    It is built to cache responses for 60 seconds so as to not flood the API.

    它被构建为可将响应缓存60秒,以免淹没API。

    The plugin injects the last updated date/time as part of the response object which can be exposed via a filter (see Filters above).

    该插件将最近更新的日期/时间作为响应对象的一部分注入,可以通过过滤器公开(请参见上面的过滤器)。

    Please make sure to follow their API rules.

    请确保遵循其API规则。

    See https://coinmarketcap.com/api/ for more information.

    有关更多信息,请参见https://coinmarketcap.com/api/。

    Release Notes

    发行说明

      • 0.0.17

        0.0.17

        update to support euro as the fiat currency

        更新以支持欧元作为法定货币

      • 0.0.16

        0.0.16

        add in a version checker, the plugin requires PHP 5.5 or greater

        添加版本检查器后,该插件需要PHP 5.5或更高版本

      • 0.0.15

        0.0.15

        bugfixes, analytics data

        错误修正,分析数据

      • 0.0.14

        0.0.14

        frontend updates for the shortcode (thanks /u/ZSsDesign)

        短代码的前端更新(感谢/ u / ZSsDesign)

      • 0.0.13

        0.0.13

        update plugin title (thanks /u/you-cant-twerk)

        更新插件标题(感谢/ u / you-cant-twerk)

      • 0.0.12

        0.0.12

        readme fix

        自述文件修复

      • 0.0.11

        0.0.11

        update readme to be more explicit that this plugin makes requests to a third party server.

        更新自述文件以更明确地表明此插件向第三方服务器发出请求。

      • 0.0.10

        0.0.10

        update language on purchase spend field

        更新购买支出字段上的语言

      • 0.0.9

        0.0.9

        don’t rely on composer’s autoloader, use spl’s

        不要依赖作曲家的自动加载器,请使用spl的

      • 0.0.8

        0.0.8

        fix for readme.txt

        修复readme.txt

      • 0.0.7

        0.0.7

        adding back composer.lock

        添加回composer.lock

        setting current price to be displayed by default

        将当前价格设置为默认显示

      • 0.0.6

        0.0.6

        move dependencies to dev-dependencies in composer.json

        将依赖关系移至composer.json中的dev-dependencies

      • 0.0.5

        0.0.5

        remove composer.lock to stop dependency recursion

        删除composer.lock以停止依赖项递归

      • 0.0.4

        0.0.4

        fix typo in documentation

        修复文档中的错字

      • 0.0.3

        0.0.3

        remove title from table

        从表格中删除标题

      • 0.0.2

        0.0.2

        adding translation template

        添加翻译模板

      • 0.0.1

        0.0.1

        initial release

        初始版本

      Roadmap

      路线图

      Things I’d like to add in the future

      我将来希望添加的内容

      – Ability to set and display data based on a specific currency (currently only supports USD).

      –能够基于特定货币设置和显示数据(当前仅支持美元)。

        • Translations, feel free to translate this into your own language, cryptocurrency is the text domain.
        • 翻译,请随时将其翻译成您自己的语言, cryptocurrency 是文本域。

安装步骤

This section describes how to install the plugin and get it working.

本节介绍如何安装插件并使其正常工作。

    1. Upload the plugin files to the /wp-content/plugins/cryptocurrency directory, or install the plugin through the WordPress plugins screen directly.
    2. 将插件文件上传到 / wp-content / plugins / cryptocurrency 目录,或直接通过WordPress插件屏幕安装插件。

    3. Activate the plugin through the ‘Plugins’ screen in WordPress
    4. 通过WordPress中的“插件”屏幕激活插件

    5. Use the Settings->Cryptocurrency screen to add your cryptocurrency portfolio
    6. 使用“设置”->“加密货币”屏幕添加您的加密货币投资组合

    7. Use the shortcode or API (examples for both above) to output your portfolio data
    8. 使用简码或API(以上两个示例)输出投资组合数据

下载地址
https://downloads.wordpress.org/plugin/cryptocurrency.0.0.17.zip
-EOF-

AI助手支持GPT4.0