Hi @sam ! Sorry to relive this old topic..
Can you share your workaround to solve this problem? I’m facing exactly the same difficulties.. Can’t find nothing similar to help
@dnavarrojr, your user need to see the field?
Why not just creating a location rule, restricting the visibility only to admin?
Hello @elliot!
Buddy, is there some news on this point?
I’m working on a project that need to rename certain uploaded files, and I’m trying to do this with a WP hook (sanitize_file_name):
function new_filename_hash($filename) {
$info = pathinfo($filename);
$ext = empty($info['extension']) ? '' : '.' . $info['extension'];
$name = basename($filename, $ext);
return md5($name) . $ext;
}
add_filter('sanitize_file_name', 'new_filename_hash', 10);
Itβs ok, but furthermore, I also would like to include some string based on the field name, but I get the same limitations of our friend @k12m.
I think that your ajax suggestion could be a great solution, but I’m asking you about this just in case of a novelty π
Thank you!
yesterday @elliot told us that will launch the update version in the next days (maybe today).
For now, I recommend you to update a single file of your ACF PRO:
advanced-custom-fields-pro/admin/update.php
locate the line 72 and replace the actual loop code with the one posted by elliot (that one marked as the solution for the post).
cheers
the same here.
@elliot,
I’m using the same forum topic because the subject is strictly related..
what we’re needing is a function like: get_layout_object()
using the get_sub_field_object() will give us the object of certain field inside the layout, but we don’t need this, we need the layout label.
Any clues?
Hello guys!
I’m here just to reiterate the request for this functionality π
Hello @elliot, thanks for your response!
Definitely it’s correct.
Just try to access here (the local url http://dev/spa/wp/wp-content/uploads/2014/02/02082_apeacefulscottishevening_2560x1440-120×60.jpg), and it’s ok!
For now, I’m using one of the default WP sizes (medium), and adjusting the size with css.
I’ll upload the project to the production server, and will test if it could be a local server problem (MAMP). Will post here the results.
Thanks
Hello @elliot,
sorry about that, I had never used this feature before!
this is the admin-ajax.php html response:
{"next_page_exists":0,"html":"<li><a href=\"http:\/\/dev\/spa\/wp\/destaque\/destaque-1\/\" data-post_id=\"36\"><img src=\"http:\/\/dev\/spa\/wp\/wp-content\/uploads\/2014\/02\/02082_apeacefulscottishevening_2560x1440-120x60.jpg\" \/><span class=\"relationship-item-info\"><\/span>Destaque 1<span class=\"acf-button-add\"><\/span><\/a><\/li><li><a href=\"http:\/\/dev\/spa\/wp\/destaque\/destaque-2\/\" data-post_id=\"38\"><img src=\"http:\/\/dev\/spa\/wp\/wp-content\/uploads\/2014\/02\/02014_thisoldhouse_2560x1440-120x60.jpg\" \/><span class=\"relationship-item-info\"><\/span>Destaque 2<span class=\"acf-button-add\"><\/span><\/a><\/li>"}
and the attached image shows the json response (think you need some additional info about this JSON reponse, correct?)
Hello @elliot,
thanks for your attention!
the console ajax error responses are shown in the image below:
https://www.dropbox.com/s/m3a9c8igkzh9j5p/Captura%20de%20tela%202014-02-12%2013.14.19.png
in firefox, this is the markup shown in the elements console (the image url is correct, but look that there is a “qbfrdtrjcpyjcqxlodhz” class in the img element).
https://www.dropbox.com/s/7v9jo4ptyvtu4bn/Captura%20de%20tela%202014-02-12%2013.22.27.png
In this case, I have only two relationship itens.
If I access the img url link, the image shows up.
Additional infos: running in a local server (MAMP)
@Dominic, this is exactly what I reported in my post π
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.