[wordpress插件] WP Amazon Affiliate Change to Smile LinksWP Amazon会员更改为微笑链接

wordpress 插件 文章 2020-02-17 06:40 494 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Looks for a shortened amazon affiliate link like https://amzn.to/33GJdHb and converts it to the smile version (https://smile.amazon.com/dp/B00X0AWA6Eef=as_li_ss_tl?ie=UTF8&linkCode=

寻找缩短的亚马逊会员链接,例如https://amzn.to/33GJdHb并将其转换为微笑版本(https://smile.amazon.com/dp/B00X0AWA6Eef=as_li_ss_tl?ie=UTF8&linkCode=

ll1&tag=playwiththewe-20&linkId=d88644f0ca89b94b52f5710bf6750b0a&language=en_US) at runtime.

ll1&tag = playwiththewe-20&linkId = d88644f0ca89b94b52f5710bf6750b0a&language = zh_CN)。

This process can be slow so there is some caching.

这个过程可能很慢,所以需要一些缓存。

How the WordPress AmazonSmile plugin works – Long Version from http://thomasloughlin.com/amazon-smile-amazons-affiliate-program/

WordPress AmazonSmile插件的工作方式–来自http://thomasloughlin.com/amazon-smile-amazons-affiliate-program/ 的长版

Adds a filter so the content is passed to a function.

添加一个过滤器,以便将内容传递给函数。

Content is searched for a shortened Amazon Affiliate Link.

在内容中搜索缩短的亚马逊会员链接。

The ‘key’ is extracted from the url and checked against cache.

从网址中提取“键”,并对照缓存进行检查。

If the end url is not found, the full url is grabbed, converted to smile and thrown into cache.

如果未找到结束网址,则将获取完整网址,将其转换为微笑并扔入缓存。

It’s pretty simple to run, just drop it in the plugin directory and activate that’s all it takes.

运行非常简单,只需将其放在插件目录中,然后激活即可。

安装步骤

    1. Upload the complete directory to the /wp-content/plugins/ directory
    2. 将完整目录上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Test – You assume all risk in changing urls.
    6. 测试-您承担更改网址的所有风险。

下载地址
https://downloads.wordpress.org/plugin/amazon-affiliate-change-to-smile-link.zip
-EOF-

AI助手支持GPT4.0