Spry Custom Functions self-updates
Simple, small, and lightweight WordPress plugin that allows you to enter custom functions just like you would use functions.php in a theme. This solves the issue of not having a functions.php file for some page builders. There is no admin interface, so adding custom functions works just like adding them to functions.php via a code editor.
by Spry Web Tech · github.com/sprywebtech/spry-custom-functions
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/sprywebtech/spry-custom-functions/archive/refs/heads/main.zipShips its own WordPress updater (Plugin Update Checker), so new versions show up under Dashboard → Updates.
Custom Functions Plugin
Description
Simple, small, and lightweight WordPress plugin that allows you to enter custom functions just like you would use functions.php in a theme. This solves the issue of not having a functions.php file for some page builders. There is no admin interface, so adding custom functions works just like adding them to functions.php via a code editor.
Installation
- Download the plugin zip folder
- Log in to your WordPress admin panel
- Navigate to Plugins > Add New
- Click the "Upload Plugin" button at the top of the page
- Choose the plugin zip file and click "Install Now"
- After installation completes, click "Activate Plugin"
Usage
Once activated, you can add your custom functions in two ways:
Method 1: WordPress Plugin Editor
- Navigate to Plugins > Plugin Editor
- Select "Custom Functions Plugin" from the dropdown menu
- Add your custom PHP functions to the plugin file
- Click "Update File" to save your changes
Method 2: FTP/SFTP
- Connect to your server using FTP or SFTP
- Navigate to the plugin directory (typically wp-content/plugins/custom-functions-plugin/)
- Edit the main plugin file to add your custom functions
- Save and upload the edited file
Example
Add custom functions just as you would in a theme's functions.php file:
// Add a custom shortcode
function custom_greeting_shortcode() {
return '<p>Hello, WordPress world!</p>';
}
add_shortcode('greeting', 'custom_greeting_shortcode');
// Modify admin footer text
function custom_admin_footer_text() {
return 'Thank you for creating with WordPress | Custom Functions Plugin';
}
add_filter('admin_footer_text', 'custom_admin_footer_text');
Benefits
- Retain your custom functions when switching themes
- Add functionality without editing your theme's files
- Solve the issue of missing functions.php in some page builders
- Keep your custom functions organized in one place
Notes
- Always backup your site before adding custom PHP code
- Test your functions thoroughly to ensure they work as expected
- Invalid PHP code could cause errors on your site
Author
Doug Morris
License
This plugin is licensed under the GNU General Public License v2 or later, the same license used by WordPress.
Support
For support or feature requests, please use the GitHub repository's issue tracker or contact the plugin author directly.
Changelog
1.0.0
- Initial release
1.0.2
Added update checker
1.0.3
Added function to use the site icon as the logo for the login form.