hube2 / acf-filters-and-functions Goto Github PK
View Code? Open in Web Editor NEWGeneral filters and function for use with Advanced Custom Fields WP Plugin
General filters and function for use with Advanced Custom Fields WP Plugin
add when I have time
Add this when I have time
In the conditional that start at line 46 the variable $page_parent are modified within the right values but you probably forgot to pass it at the line 55 on the get_ancestors function.
Should be modified to add actions to number fields added to a document after the it has run. This should be possible by altering the jQuery selector rather than looping through each of the number fields in the document, just need to work out how.
I put this into my functions.php and after that I got the notice two times if I have set WP_DEBUG to true
Undefined index: class in /wordpress/wp-content/plugins/advanced-custom-fields-pro/acf/api/api-field.php on line 579
Hi,
I'm really interested at using this code, but I didn't get it to work yet.
Would it be possible to tell me where / in which file you have put this code?
Kind regards,
Crombez Silke
When a user deletes an image from the gallery in wp-admin I need it to be deleted from the media library too. I have a function using the acf/update_value hook which works uncorrectly. When a user simply updates a post, WordPress removes all images from the media library and current gallery field. Please tell me how to fix it?
Hi !
I came across your solution to add a default value field to the image field type and it seems to be exactly what I'm looking for.
Thanks for that !
Nevertheless when I try to open the file manager by clicking on the new button :
An error occure :
Is it because of a new version of ACF or is it comming from me ?
The code I used :
function add_default_value_to_image_field( $field ) {
acf_render_field_setting( $field, array(
'label' => 'Image par défaut',
'type' => 'image',
'name' => 'default_value',
));
}
add_action('acf/render_field_settings/type=image', 'add_default_value_to_image_field');
Thanks
as it says, could be useful
I have a dog family tree I'm building and this code works great!
A child can choose a mother or father and that exchange of data works great. The tricky part is when a parent chooses a child. The parent will show up on both the mother and father fields. Is there anyway to maybe choose a different field key depending on the gender of the parent?
For example, if the parent's gender is male then the field key is 'father field key' else field key is 'mother field key'
essentially there are three fields involved.
dog_father
dog_mother
dog_child
On the child profile selecting a father and mother is no problem.
On the parent profile selecting a child will put the parent on both dog_father and dog_mother field because I have a filter for both those fields have a bidirectional relationship with dog_child.
I want to be able to determine how I can target dog_father if the gender (another custom field) is male and dog_mother if gender is female.
Is something like this possible with your code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.