Flei WP Toolkit
Useful tools & snippets for WP theme development.
Clone this repository to a subfolder in your theme folder. Copy “flei_wp_toolkit.example.php” to a location outside of this folder but within your theme folder. Include it i.e. by using
require_once('flei_wp_toolkit.php') in your functions.php file.
Adjust the paths and comment those components from your “my_flei_wp_toolkit.php” that you don’t need.
To include snippets copy the respective .example.php files from snippets/ to a location in your theme folder and change their content according to your needs.
Tools & Improvements:
Adds an alerting red/yellow ribbon background to the WP admin bar when the production environment is detected, so the admin knows he’s working on the live version..
Removes various information in
<head></head> that are output by default:
Disables loading Google Fonts from Google servers in the admin area.
Just that, too.
Adds mime type so .svg images can be uploaded to media library.
Adds excerpt ability to pages and adjusts excerpt “more” text output.
Adds an extra item for every language to menu at location “primary_navigation” (language switcher).
Removes emoji shyte.
Adds a class “env-development” to
<body> if env == ‘development’.
Allows to add custom fields to menu items in the menu editor in the WP admin area.