Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kelvintechnical/simple-greeting_plugin
https://github.com/kelvintechnical/simple-greeting_plugin
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/kelvintechnical/simple-greeting_plugin
- Owner: kelvintechnical
- Created: 2024-11-04T01:06:43.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T01:17:41.000Z (3 months ago)
- Last Synced: 2024-11-05T00:34:09.894Z (3 months ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple Greeting Plugin
Description
Simple Greeting Plugin is my first PHP and WordPress project! This plugin displays a personalized, time-based greeting message in the WordPress admin dashboard. Users can set a custom message in the plugin settings, making each visit to the dashboard unique.
Features
-
Time-Based Greeting: Displays “Good Morning,” “Good Afternoon,” or “Good Evening” based on the current time. -
Customizable Message: Easily set a custom greeting message from the WordPress settings. -
Admin Notice: Shows the greeting as a dismissible admin notice at the top of the dashboard.
What I Learned
This project helped me learn essential PHP and WordPress concepts, including:
-
PHP Syntax and Functions: Usingecho
to display output, defining functions, and conditionally setting messages based on time. -
WordPress Hooks: Leveragingadd_action()
to display content in specific areas of WordPress, like the admin dashboard. -
Settings API: Creating a custom settings page withregister_setting()
andadd_options_page()
, and saving/retrieving options withget_option()
. -
Sanitization and Security: Implementing functions likeesc_attr()
to ensure safe output and usingget_option()
for secure data handling.
How to Use
-
Installation:
- Download or clone the repository.
- Upload the plugin folder to your WordPress installation’s
wp-content/plugins
directory. - In the WordPress admin, go to Plugins and activate Simple Greeting Plugin.
-
Customization:
- Go to Settings > Greeting Settings in the WordPress admin menu.
- Enter your custom greeting message and save changes.
- Visit the Dashboard to see your personalized greeting message in action!
Future Plans
As I continue to build my PHP and WordPress skills, I plan to:
- Add user role-specific greetings.
- Expand customization options.
- Improve styling for an enhanced user experience.
Support & Feedback
If you enjoyed this plugin, please like, comment, and subscribe to support my learning journey in PHP and WordPress development. Feedback is always welcome!