Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kelvintechnical/simple-greeting_plugin


https://github.com/kelvintechnical/simple-greeting_plugin

Last synced: about 1 month ago
JSON representation

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: Using echo to display output, defining functions, and conditionally setting messages based on time.


  • WordPress Hooks: Leveraging add_action() to display content in specific areas of WordPress, like the admin dashboard.


  • Settings API: Creating a custom settings page with register_setting() and add_options_page(), and saving/retrieving options with get_option().


  • Sanitization and Security: Implementing functions like esc_attr() to ensure safe output and using get_option() for secure data handling.

How to Use




  1. 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.




  2. 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!



Follow Me on X