{"id":8211338,"date":"2016-09-22T18:15:46","date_gmt":"2016-09-22T18:15:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/shortcode-message-parameter\/"},"modified":"2016-09-22T18:15:46","modified_gmt":"2016-09-22T18:15:46","slug":"shortcode-message-parameter","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/shortcode-message-parameter\/","title":{"rendered":"Shortcode message parameter"},"content":{"rendered":"<p>I&#8217;ve encountered an issue which is not necessarily a bug, hopefully you can shed light on whether or not this is intentional behavior. The message parameter of the <code>wa_restricted<\/code> shortcode works fine if someone is not logged in. However, if someone <em>is<\/em> logged in but does not fulfill the role requirement as specified in the shortcode, a default error message is shown. This message is registered as a protected class property and isn&#8217;t affected by the parameter or any admin settings. It seems to me that you should be able to define one error message across the board whether a user is logged in or not. Unless there is a specific reason for this, could you change the render function to use the <code>message<\/code> param and use the default as a fallback?<\/p>\n","protected":false},"template":"","class_list":["post-8211338","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8211338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8211338\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8211338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}