{"id":13759598,"url":"https://github.com/humanmade/hm-messages","last_synced_at":"2025-06-30T23:09:59.079Z","repository":{"id":7179359,"uuid":"8481432","full_name":"humanmade/hm-messages","owner":"humanmade","description":"A simple error / success messages API for WordPress","archived":false,"fork":false,"pushed_at":"2017-01-19T04:04:23.000Z","size":5,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-06-30T16:14:52.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humanmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-28T15:05:15.000Z","updated_at":"2023-08-22T22:29:35.000Z","dependencies_parsed_at":"2022-07-21T14:19:41.355Z","dependency_job_id":null,"html_url":"https://github.com/humanmade/hm-messages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/humanmade/hm-messages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-messages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-messages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-messages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-messages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humanmade","download_url":"https://codeload.github.com/humanmade/hm-messages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-messages/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262864257,"owners_count":23376461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T13:00:55.985Z","updated_at":"2025-06-30T23:09:59.042Z","avatar_url":"https://github.com/humanmade.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"hm-messages\n===========\n\nA simple error / success messages API for WordPress\n\nhm-messages provides an API to send / display success or failure messages in a WordPress theme or wp-admin. Each message is only shown once to the user; hm-messages uses cookies to pass messages between page reqyuests.\n\nTo send a message:\n\n```\nhm_error_message( 'Please enter a title' );\n```\n\nTo then display any messages, place the following whereever you want the messages to show:\n\n```\nhm_the_messages();\n```\n\nMessaging also supports contexts so it is possible to show different messages in different places. For example, to display messages to do with login above a login form:\n\n```\nhm_success_message( 'You have been emailed your password', 'login' );\n```\n\nAnd output `login` messsages:\n\n```\nhm_the_messages( 'login' );\n```\n\n### Functions\n\n```\nhm_error_message( $message, $context ); // display an error message\nhm_success_message( $message, $context ); // display an success message\n\nhm_the_messages( $context ); // display all messages (optionally from a given context)\nhm_get_the_messages( $context ); // get all messages as a html string (optionally from a given context)\n\nhm_get_messages( $context, $clear_messages = true ); // get the messages as an array, optionally clearing the messages once retreived\n```\n\n### Gotcha's\n\nYou must have a call to `wp_footer` in your theme's `footer.php`.\n\nStyling for messages is not provided, style `.message.error` and `.message.success` in your theme's CSS file.\n\n## Contribution guidelines ##\n\nsee https://github.com/humanmade/hm-messages/blob/master/CONTRIBUTING.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Fhm-messages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanmade%2Fhm-messages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Fhm-messages/lists"}