field-advanced-link.php
3 months ago
field-button-group.php
1 week ago
field-button.php
7 months ago
field-checkbox.php
3 months ago
field-clone.php
2 years ago
field-code-editor.php
3 months ago
field-column.php
3 years ago
field-dynamic-render.php
3 years ago
field-file.php
3 months ago
field-flexible-content-actions-title.php
3 months ago
field-flexible-content-actions-toggle.php
3 months ago
field-flexible-content-actions.php
3 months ago
field-flexible-content-async.php
4 months ago
field-flexible-content-compatibility.php
3 months ago
field-flexible-content-controls.php
9 months ago
field-flexible-content-hide.php
3 months ago
field-flexible-content-hooks.php
9 months ago
field-flexible-content-modal-edit.php
9 months ago
field-flexible-content-modal-select.php
3 months ago
field-flexible-content-modal-settings.php
3 months ago
field-flexible-content-popup.php
3 months ago
field-flexible-content-preview.php
3 months ago
field-flexible-content-state.php
9 months ago
field-flexible-content-thumbnail.php
9 months ago
field-flexible-content-wysiwyg.php
9 months ago
field-flexible-content.php
3 months ago
field-forms.php
3 months ago
field-gallery.php
3 months ago
field-google-map.php
3 months ago
field-group.php
3 months ago
field-hidden.php
3 years ago
field-image.php
3 months ago
field-post-object.php
3 months ago
field-post-statuses.php
3 months ago
field-post-types.php
3 months ago
field-radio.php
3 months ago
field-recaptcha.php
3 months ago
field-relationship.php
3 months ago
field-repeater.php
3 months ago
field-select.php
3 months ago
field-slug.php
1 year ago
field-taxonomies.php
3 months ago
field-taxonomy-terms.php
3 months ago
field-taxonomy.php
3 months ago
field-textarea.php
3 months ago
field-user-roles.php
3 months ago
field-user.php
3 months ago
field-wysiwyg.php
3 months ago
field-dynamic-render.php
46 lines
| 1 | <?php |
| 2 | |
| 3 | if(!defined('ABSPATH')){ |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | if(!class_exists('acfe_field_dynamic_render')): |
| 8 | |
| 9 | class acfe_field_dynamic_render extends acf_field{ |
| 10 | |
| 11 | /** |
| 12 | * initialize |
| 13 | */ |
| 14 | function initialize(){ |
| 15 | |
| 16 | $this->name = 'acfe_dynamic_render'; |
| 17 | $this->label = __('Dynamic Render', 'acfe'); |
| 18 | $this->category = 'layout'; |
| 19 | $this->defaults = array( |
| 20 | 'render' => '' |
| 21 | ); |
| 22 | |
| 23 | } |
| 24 | |
| 25 | |
| 26 | /** |
| 27 | * render_field |
| 28 | * |
| 29 | * @param $field |
| 30 | */ |
| 31 | function render_field($field){ |
| 32 | |
| 33 | // check callback |
| 34 | // check isset() for backward compatibility with the old acfe_dynamic_message field type |
| 35 | if(isset($field['render']) && is_callable($field['render'])){ |
| 36 | call_user_func_array($field['render'], array($field)); |
| 37 | } |
| 38 | |
| 39 | } |
| 40 | |
| 41 | } |
| 42 | |
| 43 | // initialize |
| 44 | acf_register_field_type('acfe_field_dynamic_render'); |
| 45 | |
| 46 | endif; |