varunsridharan/wp-review-me

这个库允许开发者请求最终用户对其产品(主题/插件)进行评价

1.6 2021-04-11 07:53 UTC

This package is auto-updated.

Last update: 2024-08-29 04:37:26 UTC


README

这个库允许开发者请求最终用户对其产品(主题/插件)进行评价

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock available

安装

安装此扩展的首选方法是通过Composer

要安装WP_Review_Me库,请简单执行以下命令

$ composer require Varunsridharan/WP_Review_Me

上述命令将仅安装必要的文件,如果您想下载整个源代码,可以使用

$ composer require Varunsridharan/WP_Review_Me --prefer-source

您也可以使用Git 克隆整个仓库

$ git clone https://github.com/varunsridharan/wp-review-me.git

或者手动安装

下载WP_Review_Me.php:

$ wget https://raw.githubusercontent.com/varunsridharan/wp-review-me/master/class-wp-review-me.php

选项

用法

从Wordpress.org的插件/主题

$review_instance = new Varunsridharan\WordPress\Review_Me(array(
    'days_after' => 2,
    'slug' => 'your-plugin',
    'type' => 'plugin', # Use theme if you are using it in a theme
    'site' => 'wordpress',
    'rating' => 3 # review link will have a default count of rating 3 which sets rating to 3 in review form
));

从Codecanyon.net的插件

$review_instance = new Varunsridharan\WordPress\Review_Me(array(
    'days_after' => 2,
    'slug' => 'your-plugin',
    'site' => 'codecanyon',
    'item_id' => 'xxxxxxxx'
));

从themeforest.net的主题

$review_instance = new Varunsridharan\WordPress\Review_Me(array(
    'days_after' => 2,
    'slug' => 'your-plugin',
    'site' => 'themeforest',
    'item_id' => 'xxxxxxxx'
));

自定义通知回调

/**
 * $review_me is a instance of VS_WP_Review_Me Class
 */
function your_plugin_review_notice_add($review_me){
    // use your custom notice handle to add / display the notice
}

$review_instance = new Varunsridharan\WordPress\Review_Me(array(
    'days_after' => 2,
    'slug' => 'your-plugin',
    'type' => 'plugin', # Use theme if you are using it in a theme
    'site' => 'wordpress',
    'notice_callback' => 'your_plugin_review_notice_add'
));

示例输出

View 1

View 2

📝 更新日志

此项目的所有显著更改都将记录在此文件中。

格式基于Keep a Changelog,本项目遵循语义版本控制

查看CHANGELOG.md

🤝 贡献

如果您想帮忙,请查看问题列表。

📜 许可证 & 行为准则

📣 反馈

  • ⭐ 如果此项目对您有帮助,请对仓库进行评分! 😉
  • 如果您需要帮助或发现了一个错误,请创建一个问题

💰 赞助

在2013年爱上了开源,从那以后就没有回头路了!您可以在这里了解更多关于我的信息。如果您或您的公司使用了我的任何项目或喜欢我所做的事情,请考虑支持我。我打算长期坚持下去。

  • ☕ 咖啡时间,我们何不互相了解?只需$9.99就能为我买上一杯
  • ☕️☕️ 每月买我两杯咖啡怎么样?您只需支付$9.99
  • 🔰 我们热爱改进开源项目。支持一次性的开源维护1小时,只需$24.99
  • 🚀 您也喜欢开源工具吗?我也是!支持一次性的开源开发1小时,只需$49.99

连接 & 问候 👋

Varun Sridharan 用心打造