定制 10quality/wpmvc-addon-reviewer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

10quality/wpmvc-addon-reviewer

Composer 安装命令:

composer require 10quality/wpmvc-addon-reviewer

包简介

This addon will show a review notice to an admin user, suggesting them to review the plugin or theme built in Wordpress MVC.

README 文档

README

Latest Stable Version Total Downloads License

Review notice

Add-on for Wordpress MVC.

This addon will show a review notice to an admin user, suggesting them to review the plugin or theme.

The addon will manage responses and reminders to make the notice not as intrusive.

Install

Run the following composer command at your project's root:

composer require 10quality/wpmvc-addon-reviewer

Configuration

Add your project's root folder name inside the paths settings, like:

    'paths' => [

        'base'          => __DIR__ . '/../',
        'controllers'   => __DIR__ . '/../Controllers/',
        'views'         => __DIR__ . '/../../assets/views/',
        'log'           => WP_CONTENT . '/wpmvc/log',
        'root_folder'   => 'your-plugin-folder-name',

    ],

This will enable localization.

Add the following inside the addons settings:

    'addons' => [
        'WPMVC\Addons\Reviewer\ReviewerAddon',
    ],

This will enable the addon files.

Add an extra reviewer settings:

    'reviewer' => [

        // Enables reviewer
        'enabled'       => true,
        // Name to display in notice
        'name'          => 'Project name',
        // Display interval in minutes
        'interval'      => 43200,

    ],
Setting Type Description
enabled bool Enables or disables the reviewer addon.
name string Project name that will display inside the notice.
interval int Interval in minutes. This is the time the addon will wait until the notice is displayed (for example 43200, will mean that it will display after 30 days). This interval is also used when the user selects to be reminded later.
url string OPTIONAL, the review URL the addon will redirect the user to. If nothing is present, the addon will asume it is a Wordpress.org review and will build the url using the textdomain set in the localize settings.

Settings using a custom review url:

    'reviewer' => [

        // Enables reviewer
        'enabled'       => true,
        // Name to display in notice
        'name'          => 'Project name',
        // Display interval in minutes
        'interval'      => 43200,
        // Review url
        'url'           => 'https://mydomain.com/my-product/review'

    ],

Wordpress Hooks

Filter:wpmvc_addon_reviewer_img_{namespace}

wpmvc_addon_reviewer_img_{namespace}

Allows to filter and replace the default stars.svg display in the notice, for the image of your choice.

Replace {namespace} with your Wordpress MVC project's namespace (With caps).

Parameter Type Description
$image_url string Review image url. Recommended resolution (150px x 150px).

Usage example (namespace is TestPlugin):

add_filter( 'wpmvc_addon_reviewer_img_TestPlugin', function( $url ) {
    // 150px x 150px
    return 'https://www.domain.com/path-to/image.png';
} );

Coding Guidelines

PSR-2 coding guidelines.

License

GPLv3 License. (c) 2019 10 Quality.

统计信息

  • 总下载量: 71
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固