{"id":49748,"date":"2016-07-21T08:28:31","date_gmt":"2016-07-21T08:28:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/acf-theme-code\/"},"modified":"2023-11-28T01:28:24","modified_gmt":"2023-11-28T01:28:24","slug":"acf-theme-code","status":"publish","type":"plugin","link":"https:\/\/es-mx.wordpress.org\/plugins\/acf-theme-code\/","author":10551713,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.5.6","stable_tag":"trunk","tested":"6.4.8","requires":"4.9.0","requires_php":"5.6","requires_plugins":null,"header_name":"Advanced Custom Fields: Theme Code","header_author":"Ben Pearson and Phil Kurth","header_description":"","assets_banners_color":"f1f1f1","last_updated":"2023-11-28 01:28:24","external_support_url":"https:\/\/hookturn.io\/contact\/","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/hookturn.io\/downloads\/acf-theme-code-pro\/","header_author_uri":"https:\/\/hookturn.io","rating":5,"author_block_rating":0,"active_installs":10000,"downloads":151098,"num_ratings":42,"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":1,"5":41},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":1458037,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":1458037,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2795416,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2795416,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2795417,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"The code required to implement each field is displayed for you in the Theme Code section."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2211,2217,569,662],"plugin_category":[59],"plugin_contributors":[87196,170546],"plugin_business_model":[216238],"class_list":["post-49748","plugin","type-plugin","status-publish","hentry","plugin_tags-acf","plugin_tags-advanced-custom-fields","plugin_tags-automation","plugin_tags-php","plugin_category-utilities-and-tools","plugin_contributors-benpearson","plugin_contributors-philkurth","plugin_business_model-commercial","plugin_committers-aaronrutley","plugin_committers-philkurth"],"banners":{"banner":"https:\/\/ps.w.org\/acf-theme-code\/assets\/banner-772x250.png?rev=2795416","banner_2x":"https:\/\/ps.w.org\/acf-theme-code\/assets\/banner-1544x500.png?rev=2795416","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/acf-theme-code\/assets\/icon-128x128.png?rev=1458037","icon_2x":"https:\/\/ps.w.org\/acf-theme-code\/assets\/icon-256x256.png?rev=1458037","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/acf-theme-code\/assets\/screenshot-1.png?rev=2795417","caption":"El c\u00f3digo necesario para implementar cada campo se muestra en la secci\u00f3n \u00abC\u00f3digo del tema\u00bb."}],"raw_content":"<!--section=description-->\n<p>The <em>ACF Theme Code<\/em> plugin automatically generates the code needed to implement <em><a href=\"https:\/\/en-au.wordpress.org\/plugins\/advanced-custom-fields\/\">Advanced Custom Fields<\/a><\/em> in your themes.<\/p>\n\n<p>[youtube https:\/\/www.youtube.com\/watch?v=g9APGNJMy7k]<\/p>\n\n<blockquote>\n  <p>Video note: This free version of <em>ACF Theme Code<\/em> now supports ACF 6.<\/p>\n<\/blockquote>\n\n<h4>Features<\/h4>\n\n<p><strong>Reduce your development time.<\/strong><\/p>\n\n<ul>\n<li>When you publish, edit or update an ACF Field Group, the code required to implement your fields is displayed in the <em>Theme Code<\/em> section at the bottom of your Edit Field Group page.<\/li>\n<li>Use the clipboard icons in this section quickly copy and paste the code blocks into your theme templates.<\/li>\n<\/ul>\n\n<p><strong>Quality, flexible, custom code.<\/strong><\/p>\n\n<ul>\n<li>The code generated by <em>Theme Code Pro<\/em> is based on the <a href=\"https:\/\/www.advancedcustomfields.com\/resources\/\">official <em>Advanced Custom Fields<\/em> documentation<\/a> and includes <a href=\"https:\/\/developer.wordpress.org\/themes\/theme-security\/data-sanitization-escaping\/#escaping-securing-output\">escaping<\/a> for secure output.<\/li>\n<li>All code generated has been thoroughly tested and is created with speed and flexibility of implementation in mind.<\/li>\n<\/ul>\n\n<p><strong>Comprehensive field support<\/strong><\/p>\n\n<ul>\n<li>This version of <em>ACF Theme Code<\/em> generates code for all the field types included in the free version of <em><a href=\"https:\/\/en-au.wordpress.org\/plugins\/advanced-custom-fields\/\">Advanced Custom Fields<\/a><\/em> (see the full list of field types and settings below).<\/li>\n<li>The code generated is specific to the field names and field settings you use for each of your fields.<\/li>\n<\/ul>\n\n<h4>ACF Theme Code PRO<\/h4>\n\n<p><em><strong><a href=\"https:\/\/hookturn.io\/downloads\/acf-theme-code-pro\/\">ACF Theme Code PRO<\/a><\/strong><\/em> is the premium version of this plugin. It has the following additional features.<\/p>\n\n<ul>\n<li>Support for all the complex field types that are included in <em><a href=\"https:\/\/www.advancedcustomfields.com\/pro\/]\">Advanced Custom Fields PRO<\/a><\/em>.\n\n<ul>\n<li>Repeater<\/li>\n<li>Flexible Content<\/li>\n<li>Gallery<\/li>\n<li>Clone<\/li>\n<\/ul><\/li>\n<li>The addition of a <em>Theme Code Location Registration Tool<\/em> to the ACF <em>Tools<\/em> page that generates code for registering locations.\n\n<ul>\n<li><strong>Blocks<\/strong><\/li>\n<li>Options Pages<\/li>\n<\/ul><\/li>\n<li>Support for more complex ACF Field Group Locations.\n\n<ul>\n<li><strong>Block<\/strong><\/li>\n<li>Options Page<\/li>\n<li>Widget<\/li>\n<li>Taxonomy<\/li>\n<li>Comment<\/li>\n<li>Attachment<\/li>\n<li>Current User<\/li>\n<li>User Form<\/li>\n<\/ul><\/li>\n<li>Support for a range of third party fields.<\/li>\n<\/ul>\n\n<p><strong><a href=\"https:\/\/hookturn.io\/downloads\/acf-theme-code-pro\/\">Upgrade or learn more about ACF Theme Code PRO<\/a><\/strong>.<\/p>\n\n<h4>ACF fields supported<\/h4>\n\n<p>This free version of <em>ACF Theme Code<\/em> generates code for the following ACF field types and settings:<\/p>\n\n<ul>\n<li>Text<\/li>\n<li>Text Area<\/li>\n<li>Number<\/li>\n<li>Range<\/li>\n<li>Email<\/li>\n<li>URL<\/li>\n<li>Password<\/li>\n<li>Image (return types Array, URL and ID)<\/li>\n<li>File (return types Array, URL and ID)<\/li>\n<li>WYSIWYG Editor<\/li>\n<li>oEmbed<\/li>\n<li>Select (values Single and Multiple, return types Value, Label and Array)<\/li>\n<li>Checkbox (return types Value, Label and Array)<\/li>\n<li>Radio Button (return types Value, Label and Array)<\/li>\n<li>Button Group (return types Value, Label and Array)<\/li>\n<li>True \/ False<\/li>\n<li>Link (return types Array and URL)<\/li>\n<li>Post Object (values Single and Multiple, return types Post Object and Post ID)<\/li>\n<li>Page Link (values Single and Multiple)<\/li>\n<li>Relationship (return types Post Object and Post ID)<\/li>\n<li>Taxonomy (appearances Checkbox, Multi Select, Radio Buttons and Select, return types Term Object and Term ID)<\/li>\n<li>User (values Single and Multiple, return types User Array, User Object and User ID)<\/li>\n<li>Google Map<\/li>\n<li>Date Picker<\/li>\n<li>Date Time Picker<\/li>\n<li>Colour Picker<\/li>\n<li>Group<\/li>\n<\/ul>\n\n<h4>Requirements<\/h4>\n\n<ul>\n<li><em>Advanced Custom Fields<\/em> or <em>ACF PRO<\/em> (version 5.8.9 or higher)<\/li>\n<\/ul>\n\n<h4>Thank you<\/h4>\n\n<p>Thanks to all of our beta testers. Including Elliot Condon, Phil Smart, Richard Johnston and James Bundey.<\/p>\n\n<h4>Translations<\/h4>\n\n<p>Would you like to use the ACF Theme Code plugin in your native language? Then why not <em><a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/acf-theme-code\/\">contribute a translation<\/a><\/em> via translate.wordpress.org.<\/p>\n\n<p>If you are new to translating plugins, there is a helpful <em><a href=\"https:\/\/make.wordpress.org\/polyglots\/handbook\/translating\/first-steps\/\">First Steps<\/a><\/em> guide available.<\/p>\n\n<p><em><a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/acf-theme-code\/\">View the current state translations for ACF Theme Code<\/a><\/em>.<\/p>\n\n<p>Any and all assistance with translations is greatly appreciated. Please let us know if you need any help with submitting translations.<\/p>\n\n<!--section=installation-->\n<p>From your WordPress dashboard<\/p>\n\n<ol>\n<li>Visit <em>Plugins<\/em> &gt; <em>Add New<\/em>.<\/li>\n<li>Search for \u201cACF Theme Code\u201d.<\/li>\n<li>Activate <em>ACF Theme Code for Advanced Custom Fields<\/em> from your <em>Plugins<\/em> page.<\/li>\n<li><em>Publish<\/em>, <em>Edit<\/em> or <em>Update<\/em> an ACF Field Group.<\/li>\n<li>Scroll down the <em>Edit Field Group<\/em> page to the <em>Theme Code<\/em> section to see the code generated.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20this%20plugin%20support%20acf%20pro%3F'><h3>Does this plugin support ACF PRO?<\/h3><\/dt>\n<dd><p>This free version of <em>ACF Theme Code<\/em> supports all the field types from <em>ACF PRO<\/em> that are also found in the free version of <em>Advanced Custom Fields<\/em>.<\/p>\n\n<p>The <em><a href=\"https:\/\/hookturn.io\/downloads\/acf-theme-code-pro\/\">ACF Theme Code PRO<\/a><\/em> plugin also supports extra fields found only in <em>ACF PRO<\/em>. These include the Repeater, Flexible Content, Gallery and Clone fields. It also supports <em>ACF PRO<\/em> features <strong>ACF Blocks<\/strong> and Options Pages.<\/p><\/dd>\n<dt id='does%20this%20plugin%20generate%20the%20code%20needed%20for%20different%20field%20group%20locations%3F'><h3>Does this plugin generate the code needed for different field group Locations?<\/h3><\/dt>\n<dd><p>This free version of <em>ACF Theme Code<\/em> supports all the Post and Page field group Locations.<\/p>\n\n<p>The <em><a href=\"https:\/\/hookturn.io\/downloads\/acf-theme-code-pro\/\">ACF Theme Code PRO<\/a><\/em> plugin also supports a bunch of other field group Locations. These include <strong>Block<\/strong>, Options Page, Widget, Taxonomy, Comment, Attachment, Current User and User Form.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.5.6<\/h4>\n\n<ul>\n<li>Compatibility with WordPress 6.4<\/li>\n<\/ul>\n\n<h4>2.5.5<\/h4>\n\n<ul>\n<li>Add new stylesheet to integrate all components with ACF 6<\/li>\n<li>Update scroll to code functionality to support ACF 6<\/li>\n<\/ul>\n\n<h4>2.5.4<\/h4>\n\n<ul>\n<li>Add support for ACF 6<\/li>\n<\/ul>\n\n<h4>2.5.3<\/h4>\n\n<ul>\n<li>Add full support for localization (i18n)\n\n<ul>\n<li>Please let us know if you're interested in helping translate ACF Theme Code into your language.<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>2.5.2<\/h4>\n\n<ul>\n<li>Compatibility with WordPress 5.8.0<\/li>\n<li>Fix CSS and JS enqueue bugs<\/li>\n<\/ul>\n\n<h4>2.5.0<\/h4>\n\n<ul>\n<li>Improve support for WordPress 5.4.<\/li>\n<li>Improve support for all field types included in ACF PRO 5.8.9 (including all their various settings).<\/li>\n<li>Improve codebase by syncing both free and pro foundations to facilitate faster development cycles and future features.<\/li>\n<li>Add escaping to code rendered to bring it in line with recent updates to ACF field documentation. See\u00a0https:\/\/twitter.com\/wp_acf\/status\/1181344882775875584.<\/li>\n<li>Add 'Copy All' fields button (previously only Theme Code Pro feature).<\/li>\n<li>Add various enhancements to code rendered for the following fields and field settings:\n\n<ul>\n<li>Gallery field (return types Array, URL and ID)<\/li>\n<li>Image (return types Array, URL and ID)<\/li>\n<li>File (return types Array, URL and ID)<\/li>\n<li>Select (values Single and Multiple, return types Value, Label and Array)<\/li>\n<li>Checkbox (return types Value, Label and Array)<\/li>\n<li>Radio Button (return type Array)<\/li>\n<li>Button Group (return type Array)<\/li>\n<li>True \/ False<\/li>\n<li>Link (return types Array and URL)<\/li>\n<li>Post Object (values Single and Multiple, return types Post Object and Post ID)<\/li>\n<li>Page Link (values Single and Multiple)<\/li>\n<li>Relationship (return types Post Object and Post ID)<\/li>\n<li>Taxonomy (appearances Checkbox, Multi Select, Radio Buttons and Select, return types Term Object and Term ID)<\/li>\n<li>User (values Single and Multiple, return types User Array, User Object and User ID)<\/li>\n<li>Google Map<\/li>\n<\/ul><\/li>\n<li>Add Location UI and move location related upgrade notice to code block<\/li>\n<li>Fix issue with location related upgrade notice where it wouldn't show if only Options location was selected.<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Compatibility with WordPress 5.2.2<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>All ACF v5 Free Fields Supported including: Group, Button, Range and Link fields.<\/li>\n<li>Fix: Bug with locations section on PHP 7.2<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>Fix: Updated clipboard.js &amp; bug fix for the copy to clipboard feature<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Fix: Updates to array count functionality for PHP 5.4<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Core : Support for ACF Pro when bundled in a Theme<\/li>\n<li>Fix : HTML output by the File field is now valid<\/li>\n<li>Core : Notice for location rule support (now in ACF Theme Code Pro)<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Core: Quicklinks feature with anchor links to the relevant theme code block<\/li>\n<li>Core: Notice updates &amp; various bug fixes<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Fix: Use the_sub_field method for nested File fields with return format URL<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Field: Post Object field now works correctly for ACF 4<\/li>\n<li>Core: Various internal code improvements<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Fields: All field formatting improved inline with ACF Theme Code Pro<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Core: First version<\/li>\n<\/ul>","raw_excerpt":"Automatically generate the code needed to implement Advanced Custom Fields in your themes.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/49748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=49748"}],"author":[{"embeddable":true,"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/aaronrutley"}],"wp:attachment":[{"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=49748"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=49748"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=49748"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=49748"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=49748"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/es-mx.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=49748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}