Plugin / Advanced Custom Fields: Extended

ACF Extended

Frequently Asked Questions (FAQ)

Create a folder /acfe-php/ in your theme. Go to your field group administration, check to ‘Sync PHP’ option in the sidebar and save the field group.
Once you activated PHP or Json Sync on a field group, you must manually delete the file group_xxxxxxxxxx in your theme folder in order disable it. This behavior is applied to avoid any data desynchronization.
Fields are saved in the option: {post_type}_options. Frontend usage example: get_field('my_field', 'page_options')
Fields are saved in the option: tax_{taxonomy}_options. Frontend usage example: get_field('my_field', 'tax_category_options')
Usage example: Create a field group “Page: Relation” displaying on the post type: page Inside it, create a relationship field, allowing the post type: post Create an another field group “Post: Relation” displaying on the post type: post Inside it, create a relationship field, allowing the post type: page Activate the “Bidirectional” setting and select the “Page: Relation” relationship field Edit any page, and select any post of the post type post in the relationship field The page is now also saved in the said post relationship field
Templates, styles & scripts settings are saved in each layouts. They can be accessed manually via get_field('my_flexible') for example. The settings are saved in the following keys: acfe_flexible_render_template, acfe_flexible_render_style and acfe_flexible_render_script. ACF Extended has two functions which will automatically include those files: echo get_flexible($selector, $post_id) or the_flexible($selector, $post_id) ($post_id is optional). Usage example: the_flexible('my_flexible');. When using this function, you have access to the following global variables: $layout, $field & $is_preview (when Dynamic Preview setting is enabled). More informations are available on the official website
More informations are available on the official website
You can use the following filters: // add_filter('acfe/flexible/thumbnail/name=my_flexible', 'acf_flexible_layout_thumbnail', 10, 3); // add_filter('acfe/flexible/thumbnail/key=field_xxxxxx', 'acf_flexible_layout_thumbnail', 10, 3); // add_filter('acfe/flexible/layout/thumbnail/name=my_flexible&layout=my_layout', 'acf_flexible_layout_thumbnail', 10, 3); // add_filter('acfe/flexible/layout/thumbnail/key=field_xxxxxx&layout=my_layout', 'acf_flexible_layout_thumbnail', 10, 3); add_filter('acfe/flexible/layout/thumbnail/layout=my_layout', 'acf_flexible_layout_thumbnail', 10, 3); function acf_flexible_layout_thumbnail($thumbnail, $field, $layout){ // Must return an URL or Attachment ID return 'https://www.example.com/my-image.jpg'; }
You can use the following actions: // add_action('acfe/flexible/preview/name=my_flexible', 'acf_flexible_preview', 10, 2); // add_action('acfe/flexible/preview/key=field_xxxxxx', 'acf_flexible_preview', 10, 2); add_action('acfe/flexible/preview', 'acf_flexible_preview', 10, 2); function acf_flexible_preview($field, $layout){ echo 'My Preview'; // It is important to use 'die', as we are in an Ajax request die; } // add_action('acfe/flexible/layout/preview/name=my_flexible&layout=my_layout', 'acf_flexible_layout_preview', 10, 2); // add_action('acfe/flexible/layout/preview/key=field_xxxxxx&layout=my_layout', 'acf_flexible_layout_preview', 10, 2); add_action('acfe/flexible/layout/preview/layout=my_layout', 'acf_flexible_layout_preview', 10, 2); function acf_flexible_layout_preview($field, $layout){ echo 'My Preview'; // It is important to use 'die', as we are in an Ajax request die; }
You can use the following actions: // add_action('acfe/flexible/enqueue/name=my_flexible', 'acf_flexible_enqueue', 10, 2); // add_action('acfe/flexible/enqueue/key=field_xxxxxx', 'acf_flexible_enqueue', 10, 2); add_action('acfe/flexible/enqueue', 'acf_flexible_enqueue', 10, 2); function acf_flexible_enqueue($field, $is_preview){ // Only in Ajax preview if($is_preview){ wp_enqueue_style('my-style-preview', 'https://www.example.com/style-preview.css'); } wp_enqueue_style('my-style', 'https://www.example.com/style.css'); } // add_action('acfe/flexible/layout/enqueue/name=my_flexible&layout=my_layout', 'acf_flexible_layout_enqueue', 10, 3); // add_action('acfe/flexible/layout/enqueue/key=field_xxxxxx&layout=my_layout', 'acf_flexible_layout_enqueue', 10, 3); add_action('acfe/flexible/layout/enqueue/layout=my_layout', 'acf_flexible_layout_enqueue', 10, 3); function acf_flexible_layout_enqueue($field, $layout, $is_preview){ // Only in Ajax preview if($is_preview){ wp_enqueue_style('my-style-preview', 'https://www.example.com/style-preview.css'); } wp_enqueue_style('my-style', 'https://www.example.com/style.css'); }
You can use the following actions: // add_filter('acfe/flexible/render/template', 'acf_flexible_layout_render_template', 10, 4); // add_filter('acfe/flexible/render/template/name=my_flexible', 'acf_flexible_layout_render_template', 10, 4); // add_filter('acfe/flexible/render/template/key=field_xxxxxx', 'acf_flexible_layout_render_template', 10, 4); // add_filter('acfe/flexible/layout/render/template/name=my_flexible&layout=my_layout', 'acf_flexible_layout_render_template', 10, 4); // add_filter('acfe/flexible/layout/render/template/key=field_xxxxxx&layout=my_layout', 'acf_flexible_layout_render_template', 10, 4); add_filter('acfe/flexible/layout/render/template/layout=my_layout', 'acf_flexible_layout_render_template', 10, 4); function acf_flexible_layout_render_template($template, $field, $layout, $is_preview){ // Only in Ajax preview if($is_preview){ return get_stylesheet_directory() . '/my-template-preview.php'; } return get_stylesheet_directory() . '/my-template.php'; } // add_filter('acfe/flexible/render/style', 'acf_flexible_layout_render_style', 10, 4); // add_filter('acfe/flexible/render/style/name=my_flexible', 'acf_flexible_layout_render_style', 10, 4); // add_filter('acfe/flexible/render/style/key=field_xxxxxx', 'acf_flexible_layout_render_style', 10, 4); // add_filter('acfe/flexible/layout/render/style/name=my_flexible&layout=my_layout', 'acf_flexible_layout_render_style', 10, 4); // add_filter('acfe/flexible/layout/render/style/key=field_xxxxxx&layout=my_layout', 'acf_flexible_layout_render_style', 10, 4); add_filter('acfe/flexible/layout/render/style/layout=my_layout', 'acf_flexible_layout_render_style', 10, 4); function acf_flexible_layout_render_style($style, $field, $layout, $is_preview){ // Only in Ajax preview if($is_preview){ return get_stylesheet_directory_uri() . '/my-style-preview.css'; } return get_stylesheet_directory_uri() . '/my-style.css'; } // add_filter('acfe/flexible/render/script', 'acf_flexible_layout_render_script', 10, 4); // add_filter('acfe/flexible/render/script/name=my_flexible', 'acf_flexible_layout_render_script', 10, 4); // add_filter('acfe/flexible/render/script/key=field_xxxxxx', 'acf_flexible_layout_render_script', 10, 4); // add_filter('acfe/flexible/layout/render/script/name=my_flexible&layout=my_layout', 'acf_flexible_layout_render_script', 10, 4); // add_filter('acfe/flexible/layout/render/script/key=field_xxxxxx&layout=my_layout', 'acf_flexible_layout_render_script', 10, 4); add_filter('acfe/flexible/layout/render/script/layout=my_layout', 'acf_flexible_layout_render_script', 10, 4); function acf_flexible_layout_render_script($script, $field, $layout, $is_preview){ // Only in Ajax preview if($is_preview){ return get_stylesheet_directory_uri() . '/my-script-preview.js'; } return get_stylesheet_directory_uri() . '/my-script.js'; }
You can use the following action: add_action('acf/init', 'my_acfe_modules'); function my_acfe_modules(){ // Disable Ajax Author box acf_update_setting('acfe/modules/author', false); // Disable ACF > Block Types acf_update_setting('acfe/modules/dynamic_block_types', false); // Disable Forms acf_update_setting('acfe/modules/dynamic_forms', false); // Disable Tools > Post Types acf_update_setting('acfe/modules/dynamic_post_types', false); // Disable Tools > Taxonomies acf_update_setting('acfe/modules/dynamic_taxonomies', false); // Disable ACF > Options Pages acf_update_setting('acfe/modules/dynamic_options_pages', false); // Disable Settings > Options acf_update_setting('acfe/modules/options', false); // Disable Taxonomies enhancements acf_update_setting('acfe/modules/taxonomies', false); }

Ratings

5
24 reviews

Rating breakdown

Details Information

Version

0.8.2

First Released

18 Mar, 2019

Total Downloads

24,376

Wordpress Version

4.9 or higher

Tested up to:

5.2.4

Require PHP Version:

5.6 or higher

Tags

Contributors

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.