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.
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');
- Add all wanted features.
- Document features incl. screenshots.
- Tests would be nice.
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."add_theme_support('gardener-remove-emoji');
- Remove emoji related things.
- Removes print_emoji_detection_script, print_emoji_styles.
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
aΜ
oraΜ
(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 aΜaΜoΜAΜAΜOΜ hej citattecken';.jpg
your file will be uploaded as/uploads/svenska-tecken-och-mellanslag-aaoaao-hej-citattecken.jpg
. Another example is the fileIngen-ko-paΜ-isen-1b-2.jpg
that will be changed toingen-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!).
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.
add_theme_support('gardener-hide-posts');
- Hide posts links from admin menu and from admin bar (New -> Post).
add_theme_support('gardener-hide-comments');
- Hide comments from admin menu.
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 theimage
argument.
- Uses image
- Arguments are optional.
This plugin is not unique. The following plugins are similar popular plugins:
- https://github.com/littlebizzy/speed-demon
- https://github.com/roots/soil
- https://github.com/wordplate/plate
- 0.4 Add feature
gardener-hide-comments
that hides the comments menu item. - 0.3 Use
login_headertext
instead oflogin_headertitle
becauselogin_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