{"id":3211,"date":"2009-08-06T12:06:22","date_gmt":"2009-08-06T19:06:22","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=3211"},"modified":"2012-10-17T09:41:40","modified_gmt":"2012-10-17T16:41:40","slug":"snippets","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/snippets\/","title":{"rendered":"Code Snippets"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"page-snippet-cat.php","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":""},"tags":[],"acf":[],"jetpack-related-posts":[{"id":3245,"url":"https:\/\/css-tricks.com\/snippets\/jquery\/","url_meta":{"origin":3211,"position":0},"title":"jQuery Code Snippets","date":"August 6, 2009","format":false,"excerpt":"Our archive of grab'n'go copy'n'paste jQuery snippets to help with common problems.","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6253,"url":"https:\/\/css-tricks.com\/snippets\/wordpress\/facebook-like-button\/","url_meta":{"origin":3211,"position":1},"title":"Facebook “Like” Button for WordPress","date":"April 23, 2010","format":false,"excerpt":"Some very easy copy-and-paste code here to add to the template for blog posts to allow for Facebook \"liking\" of the article. Probably best in the single.php template underneath where it outputs the content of the post.","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3841,"url":"https:\/\/css-tricks.com\/snippets\/php\/server-side-image-resizer\/","url_meta":{"origin":3211,"position":2},"title":"Server Side Image Resizer","date":"September 4, 2009","format":false,"excerpt":"The code uses PHP to resize an image (currently only jpeg). Using this method, the resized image is of much better quality than a browser-side resizing. The file size of the new downsized image is also smaller (quicker to download). The code comes in two parts: imageResizer() is used to\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4167,"url":"https:\/\/css-tricks.com\/snippets\/html\/embedding-flash\/","url_meta":{"origin":3211,"position":3},"title":"Embedding Flash","date":"October 21, 2009","format":false,"excerpt":"This is different than the default code that Flash provides. That typically involves the tag and is not valid XHTML. This doesn't use that, and is fully valid.","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3803,"url":"https:\/\/css-tricks.com\/snippets\/php\/count-script-excecution-time\/","url_meta":{"origin":3211,"position":4},"title":"Count Script Excecution Time","date":"September 4, 2009","format":false,"excerpt":"$execution_time = microtime(); \/\/ Start counting \/\/ Your code $execution_time = microtime() - $execution_time; printf('It took %.5f sec', $execution_time);","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3305,"url":"https:\/\/css-tricks.com\/snippets\/wordpress\/embed-a-page-inside-a-page\/","url_meta":{"origin":3211,"position":5},"title":"Embed a Page inside a Page","date":"August 10, 2009","format":false,"excerpt":"The above code can be used within the regular page loop. Replace **ID** with the ID of the page you wish to embed.","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/3211"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=3211"}],"version-history":[{"count":5,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/3211\/revisions"}],"predecessor-version":[{"id":18926,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/pages\/3211\/revisions\/18926"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=3211"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=3211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}