承接 bonny/gardener 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

bonny/gardener

Composer 安装命令:

composer require bonny/gardener

包简介

Cleanup for WordPress frontend and backend

README 文档

README

🏡 🌳 🌻 Gardener 🌻 🌳 🏡
– Opinionated cleanup for WordPress

Gardener

one employed to care for the gardens or grounds of a home, business concern, or other property

https://www.merriam-webster.com/dictionary/gardener

Gardener is a WordPress plugin that adds theme support for an opinionated cleanup of the WordPress admin and frontend.

No feature is added or modified by default. Support for each feature must be added manually and if this plugin is uninstalled it will not break anything.

Installation and usage

Install using composer:

composer require bonny/gardener

(Or you can just download the plugin and place it in your wp plugins folder.)

Add support for wanted features in your functions.php:

add_theme_support('gardener-remove-emoji');
add_theme_support('gardener-relative-links');
add_theme_support('gardener-cleanup-upload-filenames');
add_theme_support('gardener-cleanup-dashboard');
add_theme_support('gardener-hide-posts');
add_theme_support('gardener-hide-comments');
add_theme_support('gardener-enhance-login-screen');

TODO

  • Add all wanted features.
  • Document features incl. screenshots.
  • Tests would be nice.

Features

Relative links

add_theme_support('gardener-relative-links');
  • Change links and images added in Gutenberg and TinyMCE to use relative paths, instead of absolute. This is a benefit when developing a website on several domains, so you don't have to change all links from http://beta.example.com/ to http://example.com/.
Screenshot "Coming soon."

Remove emoji

add_theme_support('gardener-remove-emoji');
  • Remove emoji related things.
  • Removes print_emoji_detection_script, print_emoji_styles.

Cleanup-upload-filenames

add_theme_support('gardener-cleanup-upload-filenames');

Make file names of media attachments work better with more server configs because for example MacOS does not treat UPPERCASE or lowercase chars different, but a Linux server will. So if you transfer uploads to a server suddenly they stop working and give you 404 errors.

When enabled this feature will

  • Only keep basic printable ASCII characters.
  • Remove international chars like "åäö".
  • Remove strange chars like or (they look very much like the Swedish letter åbut they are not).
  • Remove percent signs "%".
  • Make file names lowercase.
  • Example: instead of /uploads/svenska tecken och mellanslag åäöÅÄÖ hej citattecken';.jpg your file will be uploaded as /uploads/svenska-tecken-och-mellanslag-aaoaao-hej-citattecken.jpg. Another example is the file Ingen-ko-på-isen-1b-2.jpg that will be changed to ingen-ko-pa-isen-1b-2.jpg (Funny bonus story: the previous filename is from a real project and it was the whole reason why I started working on this feature!).

Cleanup dashboard

add_theme_support('gardener-cleanup-dashboard');
  • Removes unwanted dashboard meta boxes, like QuickPress, plugins, recent drafts, incoming links, news and events, WPML meta box if WPML is installed.
  • Removes the text "Thank you for creating with WordPress" at the bottom.
Screenshot Before cleaning up dashboard

cleanup-dashboard-before After cleaning up dashboard cleanup-dashboard-after

Hide posts

add_theme_support('gardener-hide-posts');
  • Hide posts links from admin menu and from admin bar (New -> Post).

Hide comments

add_theme_support('gardener-hide-comments');
  • Hide comments from admin menu.

Enhance login screen

add_theme_support('gardener-enhance-login-screen', [
    'message' => "Welcome to ACME Co website. Please login!",
    'image' => '84x84px-login-image.png',
    'image_width => 200,
    'image_height => 75,
]);
  • Changes link to wordpress.org to a link back to the homepage of the site.
  • Add support for local client image above login fields.
    • Uses image login-client-logo.png from theme folder if it exists, or any image using the image argument.
  • Arguments are optional.

Other similar plugins

This plugin is not unique. The following plugins are similar popular plugins:

Changelog

  • 0.4 Add feature gardener-hide-comments that hides the comments menu item.
  • 0.3 Use login_headertext instead of login_headertitle because login_headertitle is deprecated since WordPress version 5.2.0.
  • 0.2.1 Add support for custom login image size.
  • 0.2 Add support for feature hide posts.
  • 0.1 First version

bonny/gardener 适用场景与选型建议

bonny/gardener 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 386 次下载、GitHub Stars 达 12, 最近一次更新时间为 2019 年 04 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 bonny/gardener 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bonny/gardener 我们能提供哪些服务?
定制开发 / 二次开发

基于 bonny/gardener 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 2
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2019-04-17