{"id":86200,"date":"2018-05-24T04:05:20","date_gmt":"2018-05-24T04:05:20","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/lh-add-roles-to-body-class\/"},"modified":"2022-07-29T04:45:14","modified_gmt":"2022-07-29T04:45:14","slug":"lh-add-roles-to-body-class","status":"publish","type":"plugin","link":"https:\/\/km.wordpress.org\/plugins\/lh-add-roles-to-body-class\/","author":2531614,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.01","stable_tag":"trunk","tested":"6.0.11","requires":"5.0","requires_php":"","requires_plugins":"","header_name":"LH Add Roles to Body Class","header_author":"Peter Shaw","header_description":"Simply adds the currently logged in users roles as classes to the body tag in the front and back end","assets_banners_color":"1494d8","last_updated":"2022-07-29 04:45:14","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/lhero.org\/portfolio\/lh-add-roles-to-body-class\/","header_plugin_uri":"https:\/\/lhero.org\/portfolio\/lh-add-roles-to-body-class\/","header_author_uri":"https:\/\/shawfactor.com\/","rating":5,"author_block_rating":0,"active_installs":40,"downloads":1475,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2763235,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2763235,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":1880441,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":1880441,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2858,1241,246,3710,90],"plugin_category":[57],"plugin_contributors":[83584],"plugin_business_model":[],"class_list":["post-86200","plugin","type-plugin","status-publish","hentry","plugin_tags-body","plugin_tags-class","plugin_tags-html","plugin_tags-role","plugin_tags-tag","plugin_category-taxonomy","plugin_contributors-shawfactor","plugin_committers-shawfactor"],"banners":{"banner":"https:\/\/ps.w.org\/lh-add-roles-to-body-class\/assets\/banner-772x250.jpg?rev=1880441","banner_2x":"https:\/\/ps.w.org\/lh-add-roles-to-body-class\/assets\/banner-1544x500.jpg?rev=1880441","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/lh-add-roles-to-body-class\/assets\/icon-128x128.png?rev=2763235","icon_2x":"https:\/\/ps.w.org\/lh-add-roles-to-body-class\/assets\/icon-256x256.png?rev=2763235","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Ever wanted to style your content differently depending on the role of the logged in user viewing your content?<\/p>\n\n<p>Well now you can, simply activate the plugin and you are right to go.<\/p>\n\n<p><strong>Like this plugin? Please consider <a href=\"https:\/\/wordpress.org\/support\/view\/plugin-reviews\/lh-add-roles-to-body-class\/\">leaving a 5-star review<\/a>.<\/strong><\/p>\n\n<p><strong>Love this plugin or want to help the LocalHero Project? Please consider <a href=\"https:\/\/lhero.org\/portfolio\/lh-add-roles-to-body-class\/\">making a donation<\/a>.<\/strong><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the entire <code>lh-add-roles-to-body-class<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>That is it<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='why%20would%20i%20want%20this%3F'><h3>Why would I want this?<\/h3><\/dt>\n<dd><p>So you can add CSS selectors based on those classes to override and modify your site design.<\/p>\n\n<p>For example a red background for an administrator<\/p>\n\n<p>.role-administrator { background-color: red; }<\/p><\/dd>\n<dt id='what%20if%20i%20need%20a%20feature%20that%20is%20not%20in%20the%20plugin%3F'><h3>What if I need a feature that is not in the plugin?<\/h3><\/dt>\n<dd><p>Please contact me for custom work and enhancements here: <a href=\"https:\/\/shawfactor.com\/contact\/\">https:\/\/shawfactor.com\/contact\/<\/a><\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p><strong>1.00 May 20, 2018<\/strong><br \/>\nInitial release<\/p>\n\n<p><strong>1.01 June 12, 2019<\/strong><br \/>\nBettter code architecture<\/p>","raw_excerpt":"Adds the currently logged in users role (or roles) to the body class in both the front and back end.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/86200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=86200"}],"author":[{"embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/shawfactor"}],"wp:attachment":[{"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=86200"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=86200"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=86200"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=86200"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=86200"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/km.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=86200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}