{"id":3739,"date":"2016-06-06T13:57:00","date_gmt":"2016-06-06T13:57:00","guid":{"rendered":"https:\/\/purelysupp.com\/wordpress\/?p=3739"},"modified":"2022-10-17T13:47:57","modified_gmt":"2022-10-17T13:47:57","slug":"show-an-urgent-message-in-the-wordpress-admin","status":"publish","type":"post","link":"https:\/\/purelysupp.com\/wordpress\/wordpress-functionality\/show-an-urgent-message-in-the-wordpress-admin\/","title":{"rendered":"Show an Urgent Message in the WordPress Admin"},"content":{"rendered":"\n<p>Add the following code to your WordPress theme&#8217;s function.php file, or a functionality plugin<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Generic function to show a message to the user using WP's\n * standard CSS classes to make use of the already-defined\n * message colour scheme.\n *\n * @param $message The message you want to tell the user.\n * @param $errormsg If true, the message is an error, so use\n * the red message style. If false, the message is a status\n  * message, so use the yellow information message style.\n *\/\nfunction showMessage($message, $errormsg = false)\n{\n\tif ($errormsg) {\n\t\techo '&lt;div id=\"message\" class=\"error\">';\n\t}\n\telse {\n\t\techo '&lt;div id=\"message\" class=\"updated fade\">';\n\t}\n\n\techo \"&lt;p>&lt;strong>$message&lt;\/strong>&lt;\/p>&lt;\/div>\";\n}  <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Add the following code to your WordPress theme&#8217;s function.php file, or a functionality plugin<\/p>\n","protected":false},"author":1,"featured_media":3806,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","iawp_total_views":3,"wds_primary_category":87,"footnotes":""},"categories":[87],"tags":[239,110,84],"class_list":{"0":"post-3739","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wordpress-functionality","8":"tag-admin-message","9":"tag-code","10":"tag-wp-core","11":"entry"},"featured_image_src":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2022\/09\/matrix-source-code-600x400.jpg","featured_image_src_square":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2022\/09\/matrix-source-code-600x600.jpg","author_info":{"display_name":"Jack Alltrade","author_link":"https:\/\/purelysupp.com\/wordpress\/author\/jacka11trade\/"},"_links":{"self":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3739"}],"version-history":[{"count":2,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3739\/revisions"}],"predecessor-version":[{"id":10717,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3739\/revisions\/10717"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media\/3806"}],"wp:attachment":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}