+1
All I need is a tool to delete orphaned ACF meta data. When you’re creating a site you frequently rename fields that have data already. It would be nice to just have a button that removes ACF meta data that’s no longer part of a field group.
If it’s possible to add $post_id to render_field, why doesn’t ACF just do it? It might not be used all the time, but having access to the post ID is always a good idea.
No support available for this topic? It’s been over 2 weeks…
Nevermind, I figured it out. The problem was that the plugin’s init function was being run earlier than the init function that registered the taxonomies. Giving my plugin’s init action a later priority got everything working correctly.
@hube2 So it must be the SVG plugin (Safe SVG in my case) that extends getimagesize() and other functions so they can read the viewBox attribute of SVG images. That’s good to know, thanks!
It turns out it’s the viewBox parameter that’s being used to calculate the SVG’s width and height. That’s incorrect as the viewBox simply defines the base rectangle and ratio. Only when an SVG has explicit width and height parameters should it be treated as a static size.
@kiwicreative Thanks for the response. My SVG actually doesn’t have any width or height attributes, just the standard viewBox coordinates. I manually clean up every SVG I use and never include set widths or heights. Now that you mention it though, I’m wondering if it’s using the viewBox coordinates to check the dimensions? I guess that would be up to the SVG plugin? I’ll need to do some poking around…
I think you misunderstood the second part. When you put HTML into the Field Label box, this HTML gets rendered in the field listing of the Field Group. For example, if for the Field Label I put:
<span style="display: block; font-size: 26px; font-weight: bold; line-height: 1.3em; color: #ccc; padding-bottom: 20px; border-bottom: 1px solid #333;">My Custom Header</span>
Then in the Field Group, it will display like this:
What I’m saying is that it should strip all HTML and CSS only in the field listing for the field group. Obviously on whichever page or post this field group is assigned to the HTML would render normally.
Why does this field show drafts by default? Is there a reason? This should definitely be an option in the UI and not require any hooks.
Thank you for this!!! I was racking my brain trying to figure out why my fields were not importing across the multisite, and it turns out they did import, just weren’t showing in Custom Fields. I completely agree with you that there should be some indication in Custom Fields that there are active field groups.
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!
Are you ready to start building block themes with WordPress 5.9? ACF Blocks in ACF PRO 5.12 helps you bridge the gap. Learn how: https://t.co/ViL7VURG1M
— Advanced Custom Fields (@wp_acf) May 3, 2022
© 2022 Advanced Custom Fields.
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.