{"id":78957,"date":"2017-12-19T07:40:44","date_gmt":"2017-12-19T07:40:44","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/acf-timber-integration\/"},"modified":"2021-02-10T10:42:35","modified_gmt":"2021-02-10T10:42:35","slug":"acf-timber-integration","status":"publish","type":"plugin","link":"https:\/\/scn.wordpress.org\/plugins\/acf-timber-integration\/","author":12087984,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4.0","stable_tag":"trunk","tested":"5.6.17","requires":"3.7","requires_php":"","requires_plugins":"","header_name":"ACF Timber Integration","header_author":"Dream Production","header_description":"Automatically enables in the Timber twig context variable all user-defined advanced custom fields.","assets_banners_color":"752929","last_updated":"2021-02-10 10:42:35","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/dreamproduction.com\/","rating":5,"author_block_rating":0,"active_installs":200,"downloads":7452,"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":1789312,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":1789312,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":1789312,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":1789312,"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":[2211,2217,597,17809,17808],"plugin_category":[59],"plugin_contributors":[150679,89164,150678],"plugin_business_model":[],"class_list":["post-78957","plugin","type-plugin","status-publish","hentry","plugin_tags-acf","plugin_tags-advanced-custom-fields","plugin_tags-integration","plugin_tags-timber","plugin_tags-twig","plugin_category-utilities-and-tools","plugin_contributors-danieltelbis","plugin_contributors-dream-production","plugin_contributors-sticksu","plugin_committers-danieltelbis","plugin_committers-dream-production"],"banners":{"banner":"https:\/\/ps.w.org\/acf-timber-integration\/assets\/banner-772x250.png?rev=1789312","banner_2x":"https:\/\/ps.w.org\/acf-timber-integration\/assets\/banner-1544x500.png?rev=1789312","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/acf-timber-integration\/assets\/icon-128x128.png?rev=1789312","icon_2x":"https:\/\/ps.w.org\/acf-timber-integration\/assets\/icon-256x256.png?rev=1789312","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin is intended for developers that are using Advanced Custom Fields and Timber to develop their themes.<\/p>\n\n<p>By enabling this plugin the user-defined advanced custom fields will be available in the Timber context variable as follows:<\/p>\n\n<ul>\n<li>Fields defined for settings pages will be available everywhere under the \"options\" key<\/li>\n<li>Fields defined for posts, pages and custom post types will be available on the \\Timber\\Post object under the \"fields\" key<\/li>\n<li>Fields defined for terms will be available on the \\Timber\\Term object under the \"fields\" key<\/li>\n<li><p>Fields defined for users will be available on the \\Timber\\User object under the \"fields\" key<\/p><\/li>\n<li><p>Defined menus will also be available everywhere under the \"menus\" key<\/p><\/li>\n<\/ul>\n\n<p>Also adds twig functions for images:<\/p>\n\n<ul>\n<li>srcset - used to generate srcset attribute tag.\nUsage: <code>&lt;img src=\"{{ post.thumbnail.src('large') }}\" {{ srcset(post.thumbnail,'large') }} \/&gt;<\/code><\/li>\n<li>image_attr - used to generate srcset, width, height and alt.\nUsage: <code>&lt;img src=\"{{ post.thumbnail.src('large') }}\" {{ image_attr(post.thumbnail,'large') }} \/&gt;<\/code><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install Advanced Custom Field v5 or Advanced Custom Fields Pro<\/li>\n<li>Install Timber Wordpress Plugin<\/li>\n<li>Install ACF Timber Integration<\/li>\n<li>Start creating twig files<\/li>\n<li>Profit<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='why%20not%20just%20use%20the%20get_field%28%29%20function%20directly%20in%20the%20twig%20file%3F'><h3>Why not just use the get_field() function directly in the twig file?<\/h3><\/dt>\n<dd><p>Because that's not a truly MVC approach. You can still use the get_field() function in twig, but it's easier for the frontend developer to have everything available directly in the context variable.<\/p><\/dd>\n<dt id='timber%20already%20plays%20nice%20with%20advanced%20custom%20fields%2C%20why%20would%20i%20use%20your%20plugin%3F'><h3>Timber already plays nice with Advanced Custom Fields, why would I use your plugin?<\/h3><\/dt>\n<dd><p>Timber does not transform Images, Galleries, Posts, Taxonomies or Users to the equivalent Timber Object when using get_field() or accessing the field directly in the post object. You will need to cast each of these in order to use them as Timber Objects without using our plugin.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Fixed compatibility with latest ACF and Timber plugins *<\/li>\n<li>Removed object group cache system and use ACF to get object groups *<\/li>\n<li>Removed ACF 4 support *<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>Fixed error notice if no nav menu is registered.<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Fixed missing fields on ajax requests<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Added posts fields limit, use acf_timber_posts_fields_max_depth filter to modify depth.<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Minor bug fixes.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Added field group cache and cache clear.<\/li>\n<li>Added ACF 4 support.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added clone and group field support.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Plugin initialization.<\/li>\n<li>Added main functionality.<\/li>\n<\/ul>","raw_excerpt":"Automatically enables in the Timber twig context variable all user-defined advanced custom fields.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/78957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=78957"}],"author":[{"embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dream-production"}],"wp:attachment":[{"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=78957"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=78957"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=78957"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=78957"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=78957"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/scn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=78957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}