{"id":1520,"date":"2020-06-17T09:33:57","date_gmt":"2020-06-17T09:33:57","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/project-hygiene\/snippets-should-be-prefixed-properly\/"},"modified":"2022-06-15T06:52:34","modified_gmt":"2022-06-15T06:52:34","slug":"projecthygienepagesnippetprefix","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/project-hygiene\/projecthygienepagesnippetprefix","title":{"rendered":"Snippets should be prefixed properly"},"content":{"rendered":"\n<p> Introduced in version 1.11 (29 June 2020) <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p> It is a good idea to prefix layouts with a short string Snip_ .<br> This makes it much easier to find all (custom) snippets in your project.  <\/p>\n\n\n\n<p> <strong>Non-compliant example:<\/strong> <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"195\" height=\"23\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/06\/non-compliant_snippet_prefix1-1.jpg\" alt=\"\" class=\"wp-image-1528\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"190\" height=\"28\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/06\/non-compliant_snippet_prefix2-2.jpg\" alt=\"\" class=\"wp-image-1530\"\/><\/figure>\n\n\n\n<p> <strong>Compliant example:<\/strong> <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"176\" height=\"30\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/06\/compliant_snippet_prefix-1.jpg\" alt=\"\" class=\"wp-image-1526\"\/><\/figure>\n\n\n\n<p>You can fix this violation by renaming your layout with prefix <strong>Snip_<\/strong><\/p>\n","protected":false},"featured_media":0,"parent":100,"menu_order":29,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-1520","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1520"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1520"}],"version-history":[{"count":2,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1520\/revisions"}],"predecessor-version":[{"id":1531,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1520\/revisions\/1531"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/100"}],"next":[{"title":"Sub-microflows should be prefixed correctly","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/project-hygiene\/microflowprefixsubmicroflows","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1110"}],"prev":[{"title":"Scheduled event microflows should be prefixed correctly","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/project-hygiene\/microflowprefixscheduled","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1113"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1520"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=1520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}