{"id":7586,"date":"2018-09-13T15:33:32","date_gmt":"2018-09-13T15:33:32","guid":{"rendered":"https:\/\/wordherd.io\/?p=7586"},"modified":"2018-09-13T15:33:32","modified_gmt":"2018-09-13T15:33:32","slug":"acf-force-basic-uploader","status":"publish","type":"post","link":"https:\/\/wordherd.io\/es\/blog\/acf-force-basic-uploader\/","title":{"rendered":"Force Basic Uploader in ACF"},"content":{"rendered":"<p class=\"wp-block-paragraph\">WordHerd just finished building a custom user database and profile search in WordPress for a customer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Issue with Publicly Accessible ACF Image Fields<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When building the user database we needed to add additional image fields to user profiles. The issue was that when a user logged in to edit their profile they would have access to the media library through the image uploader.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Converting ACF Image Fields to the Basic Uploader<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In order to resolve this we found a great solution from a Guru on the ACF forum, but we had to tweak the code slightly. Below is a tweaked version of the code he provided. The only difference is that the original was meant for the front-end, where as this is for the admin user edit page.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ force basic uploader for a certain field\nfunction my_acf_force_basic_uploader( $field ) {\n\n\/\/ set the uploader setting before rendering the field\nacf_update_setting('uploader', 'basic');\n\nreturn $field;\n}\n\n\/\/ target the field using its name (Replace field_name)\nadd_filter('acf\/prepare_field\/name=field_name', 'my_acf_force_basic_uploader');<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The filter assigns a custom function&nbsp;<em>my_acf_force_basic_uploader<\/em> to the ACF field before it&#8217;s rendered. This allows us to filter the field data before display, which is where we use <em>acf_update_setting<\/em> to change the uploader to <em>&#8216;basic&#8217;<\/em>, telling ACF not to use the media library uploader.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reference&nbsp;post:&nbsp;https:\/\/support.advancedcustomfields.com\/forums\/topic\/enable-basic-uploader-for-frontend-comments\/<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">WordHerd provides website migration services from any CMS platform to WordPress. In addition to moving your content and converting your theme, we can also migrate custom data to Advanced Custom Fields (ACF) through our powerful processing tool, the Wrangler. If you have a CMS or customer that you need help moving <a href=\"\/es\/free-site-evaluation\/\">get a free evaluation<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>WordHerd just finished building a custom user database and profile search in WordPress for a customer. The Issue with Publicly Accessible ACF Image Fields When building the user database we needed to add additional image fields to user profiles. The issue was that when a user logged in to edit their profile they would have [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":13986,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"categories":[15],"tags":[606,607,608,609,200],"builders":[],"industry":[],"platform":[],"class_list":["post-7586","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-acf","tag-advanced-custom-fields","tag-wordherd","tag-wordherd-migration-services","tag-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Force Basic Uploader in ACF - WordHerd WordPress Migration<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wordherd.io\/es\/blog\/acf-force-basic-uploader\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Force Basic Uploader in ACF - WordHerd WordPress Migration\" \/>\n<meta property=\"og:description\" content=\"WordHerd just finished building a custom user database and profile search in WordPress for a customer. The Issue with Publicly Accessible ACF Image Fields When building the user database we needed to add additional image fields to user profiles. The issue was that when a user logged in to edit their profile they would have [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wordherd.io\/es\/blog\/acf-force-basic-uploader\/\" \/>\n<meta property=\"og:site_name\" content=\"WordHerd WordPress Migration\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/wordherdio\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-13T15:33:32+00:00\" \/>\n<meta name=\"author\" content=\"WordHerd\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wordherdio\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"WordHerd\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/\"},\"author\":{\"name\":\"WordHerd\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/person\\\/373419b97c0fbc45a3a16462bdba0fac\"},\"headline\":\"Force Basic Uploader in ACF\",\"datePublished\":\"2018-09-13T15:33:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/\"},\"wordCount\":253,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/acf-basic-uploader-1.png\",\"keywords\":[\"ACF\",\"Advanced Custom Fields\",\"wordherd\",\"wordherd migration services\",\"WordPress\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/\",\"url\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/\",\"name\":\"Force Basic Uploader in ACF - WordHerd WordPress Migration\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/acf-basic-uploader-1.png\",\"datePublished\":\"2018-09-13T15:33:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/acf-basic-uploader-1.png\",\"contentUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/acf-basic-uploader-1.png\",\"width\":856,\"height\":144,\"caption\":\"acf basic uploader 1\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/acf-force-basic-uploader\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wordherd.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Force Basic Uploader in ACF\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#website\",\"url\":\"https:\\\/\\\/wordherd.io\\\/\",\"name\":\"WordHerd WordPress Migration\",\"description\":\"Website Migration Services\",\"publisher\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wordherd.io\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\",\"name\":\"WordHerd WordPress Migration\",\"url\":\"https:\\\/\\\/wordherd.io\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/wordherd-trademark.png\",\"contentUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/wordherd-trademark.png\",\"width\":1000,\"height\":315,\"caption\":\"WordHerd WordPress Migration\"},\"image\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/person\\\/373419b97c0fbc45a3a16462bdba0fac\",\"name\":\"WordHerd\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"caption\":\"WordHerd\"},\"sameAs\":[\"https:\\\/\\\/wordherd.io\",\"https:\\\/\\\/www.facebook.com\\\/wordherdio\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wordherd\",\"https:\\\/\\\/x.com\\\/wordherdio\"],\"url\":\"https:\\\/\\\/wordherd.io\\\/es\\\/blog\\\/author\\\/wordherd\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Force Basic Uploader in ACF - WordHerd WordPress Migration","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wordherd.io\/es\/blog\/acf-force-basic-uploader\/","og_locale":"es_ES","og_type":"article","og_title":"Force Basic Uploader in ACF - WordHerd WordPress Migration","og_description":"WordHerd just finished building a custom user database and profile search in WordPress for a customer. The Issue with Publicly Accessible ACF Image Fields When building the user database we needed to add additional image fields to user profiles. The issue was that when a user logged in to edit their profile they would have [&hellip;]","og_url":"https:\/\/wordherd.io\/es\/blog\/acf-force-basic-uploader\/","og_site_name":"WordHerd WordPress Migration","article_author":"https:\/\/www.facebook.com\/wordherdio\/","article_published_time":"2018-09-13T15:33:32+00:00","author":"WordHerd","twitter_card":"summary_large_image","twitter_creator":"@wordherdio","twitter_misc":{"Escrito por":"WordHerd","Tiempo de lectura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/#article","isPartOf":{"@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/"},"author":{"name":"WordHerd","@id":"https:\/\/wordherd.io\/#\/schema\/person\/373419b97c0fbc45a3a16462bdba0fac"},"headline":"Force Basic Uploader in ACF","datePublished":"2018-09-13T15:33:32+00:00","mainEntityOfPage":{"@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/"},"wordCount":253,"commentCount":0,"publisher":{"@id":"https:\/\/wordherd.io\/#organization"},"image":{"@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/#primaryimage"},"thumbnailUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/acf-basic-uploader-1.png","keywords":["ACF","Advanced Custom Fields","wordherd","wordherd migration services","WordPress"],"articleSection":["WordPress"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/","url":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/","name":"Force Basic Uploader in ACF - WordHerd WordPress Migration","isPartOf":{"@id":"https:\/\/wordherd.io\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/#primaryimage"},"image":{"@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/#primaryimage"},"thumbnailUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/acf-basic-uploader-1.png","datePublished":"2018-09-13T15:33:32+00:00","breadcrumb":{"@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/#primaryimage","url":"https:\/\/wordherd.io\/wp-content\/uploads\/acf-basic-uploader-1.png","contentUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/acf-basic-uploader-1.png","width":856,"height":144,"caption":"acf basic uploader 1"},{"@type":"BreadcrumbList","@id":"https:\/\/wordherd.io\/blog\/acf-force-basic-uploader\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wordherd.io\/"},{"@type":"ListItem","position":2,"name":"Force Basic Uploader in ACF"}]},{"@type":"WebSite","@id":"https:\/\/wordherd.io\/#website","url":"https:\/\/wordherd.io\/","name":"Migraci\u00f3n de WordHerd a WordPress","description":"Servicios de migraci\u00f3n de sitios web","publisher":{"@id":"https:\/\/wordherd.io\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wordherd.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/wordherd.io\/#organization","name":"Migraci\u00f3n de WordHerd a WordPress","url":"https:\/\/wordherd.io\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/wordherd.io\/#\/schema\/logo\/image\/","url":"https:\/\/wordherd.io\/wp-content\/uploads\/wordherd-trademark.png","contentUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/wordherd-trademark.png","width":1000,"height":315,"caption":"WordHerd WordPress Migration"},"image":{"@id":"https:\/\/wordherd.io\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/wordherd.io\/#\/schema\/person\/373419b97c0fbc45a3a16462bdba0fac","name":"WordHerd","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","caption":"WordHerd"},"sameAs":["https:\/\/wordherd.io","https:\/\/www.facebook.com\/wordherdio\/","https:\/\/www.linkedin.com\/company\/wordherd","https:\/\/x.com\/wordherdio"],"url":"https:\/\/wordherd.io\/es\/blog\/author\/wordherd\/"}]}},"_links":{"self":[{"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/posts\/7586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/comments?post=7586"}],"version-history":[{"count":0,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/posts\/7586\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/media\/13986"}],"wp:attachment":[{"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/media?parent=7586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/categories?post=7586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/tags?post=7586"},{"taxonomy":"builders","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/builders?post=7586"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/industry?post=7586"},{"taxonomy":"platform","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/platform?post=7586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}