municipio/content-insights-for-editors
Composer 安装命令:
composer require municipio/content-insights-for-editors
包简介
Content Insights for Editors is a WordPress plugin.
README 文档
README
An easy way for content editors to keep track of their work and get notified when it is not working properly
Content Insights for Editors is a WordPress plugin
Table of Contents
Usage
Prerequisites
Content Insights for Editors uses matomo for visitor statistics and helsingborg-stad/broken-link-detector for analysing content.
Installing
The package can be downloaded manually and unzipped in the /wp-content/plugins/ directory or by using composer.
Install by running the following command:
composer require municipio/content-insights-for-editors
Example of how composer works here
When resources have been installed. The plugin can be activated by looking for a "Content Insights for Editors" entry in the plugins page and clicking on "Activate".
Hooks
Here are the hooks for customizing the plugin
Set the mail logo url
cife_notification_mail_logo_url
Example usage
add_action('cife_notification_mail_logo_url', function ($currentLogo) { $logo = get_field('logotype', 'option'); return wp_get_attachment_url($logo['id']); });
Adding a section to mail notification
cife_notification_mail_list_sections
Example usage
add_action('cife_notification_mail_list_sections', function($sections){ array_push($sections, [ 'section_header' => '', // string, Title rendered above section 'list' => [ [ 'url' => '', // string, list item url 'title' => '', // string, list item title 'value' => 0, // mixed, Value to display in the second column (OPTIONAL) ], ... ], 'list_header' => ['title' => '', 'value' => ''], // array, Explaining list.title and list.value 'no_items_text' => '', // string, Replace list if empty ]); return $sections; });
Modify which section template to use during render
cife_notification_mail_render_section
Example usage
add_action('cife_notification_mail_list_sections', function ( $template, $sectionVars ) { if ( $_sectionVars['id'] === 'most-viewed' && class_exists('\CustomerFeedback\App') ) { return CONTENT_INSIGHTS_FOR_EDITORS_MAIL_TEMPLATE_PATH . '/partials/section-3-cols-customer-feedback.template.php'; } return $template; // Absolute php file path });
Customizing content of mail notification
cife_notification_mail_vars
Exposed variables
'logo' // string, Logourl showed in top of email 'intro_header' // string, Title showen in top of email 'intro_text' // string, Text showen in top of email 'button_cta_text' // string, NULL to hide 'button_cta_url' // string, NULL to hide
Example usage
add_action('cife_notification_mail_vars', function ($html_vars) { $html_vars['logo'] = "..."; return $html_vars; });
Develop
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See Usage for notes on how to use the plugin in production.
Local prerequisites
Content Insights for Editors uses matomo for visitor statistics and helsingborg-stad/broken-link-detector for analysing content.
Local installation
The plugin can be installed with composer or by cloning this repo from github into the /wp-content/plugins/ directory of your WordPress installation.
With composer
Add this to your composer.json
"repositories": [
{
"type": "path",
"url": "/my/local/path/content-insights-for-editors"
},
...
]
"require": {
...
"content-insights-for-editors": "dev-master"
},
And this to install helsingborg-stad/broken-link-detector
"repositories": [
{
"type": "vcs",
"url": "git@github.com:helsingborg-stad/broken-link-detector.git",
"no-api": true
},
...
]
"require": {
...
"helsingborg-stad/broken-link-detector": "^1.3",
},
Then run
composer install
Example of how composer works here
Contributing
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
See the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
municipio/content-insights-for-editors 适用场景与选型建议
municipio/content-insights-for-editors 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.33k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2020 年 03 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「analytics」 「broken links」 「editors」 「matomo」 「content insights」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 municipio/content-insights-for-editors 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 municipio/content-insights-for-editors 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 municipio/content-insights-for-editors 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Adds tracking of broken external links to the SilverStripe CMS
Link Field Type for Craft CMS
Set Links with a specific language parameter
Links element Silverstripe
Analytics chooser extensions for site settings.
A Laravel Nova Card to show Fathom Analytics stats.
统计信息
- 总下载量: 2.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 16
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-or-later
- 更新时间: 2020-03-29