Added dependency plugins
This commit is contained in:
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
|
||||
// vars
|
||||
$disabled = false;
|
||||
|
||||
|
||||
// empty
|
||||
if( empty($field['conditional_logic']) ) {
|
||||
|
||||
$disabled = true;
|
||||
$field['conditional_logic'] = array(
|
||||
|
||||
// group 0
|
||||
array(
|
||||
|
||||
// rule 0
|
||||
array()
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="acf-field acf-field-true-false acf-field-setting-conditional_logic" data_type="true_false" data-name="conditional_logic">
|
||||
<td class="acf-label">
|
||||
<label><?php _e("Conditional Logic",'acf'); ?></label>
|
||||
</td>
|
||||
<td class="acf-input">
|
||||
<?php
|
||||
|
||||
acf_render_field(array(
|
||||
'type' => 'true_false',
|
||||
'name' => 'conditional_logic',
|
||||
'prefix' => $field['prefix'],
|
||||
'value' => $disabled ? 0 : 1,
|
||||
'ui' => 1,
|
||||
'class' => 'conditional-toggle',
|
||||
));
|
||||
|
||||
?>
|
||||
<div class="rule-groups" <?php if($disabled): ?>style="display:none;"<?php endif; ?>>
|
||||
|
||||
<?php foreach( $field['conditional_logic'] as $group_id => $group ):
|
||||
|
||||
// validate
|
||||
if( empty($group) ) continue;
|
||||
|
||||
|
||||
// vars
|
||||
// $group_id must be completely different to $rule_id to avoid JS issues
|
||||
$group_id = "group_{$group_id}";
|
||||
$h4 = ($group_id == "group_0") ? __("Show this field if",'acf') : __("or",'acf');
|
||||
|
||||
?>
|
||||
<div class="rule-group" data-id="<?php echo $group_id; ?>">
|
||||
|
||||
<h4><?php echo $h4; ?></h4>
|
||||
|
||||
<table class="acf-table -clear">
|
||||
<tbody>
|
||||
<?php foreach( $group as $rule_id => $rule ):
|
||||
|
||||
// valid rule
|
||||
$rule = wp_parse_args( $rule, array(
|
||||
'field' => '',
|
||||
'operator' => '==',
|
||||
'value' => '',
|
||||
));
|
||||
|
||||
|
||||
// vars
|
||||
// $group_id must be completely different to $rule_id to avoid JS issues
|
||||
$rule_id = "rule_{$rule_id}";
|
||||
$prefix = "{$field['prefix']}[conditional_logic][{$group_id}][{$rule_id}]";
|
||||
|
||||
?>
|
||||
<tr class="rule" data-id="<?php echo $rule_id; ?>">
|
||||
<td class="param">
|
||||
<?php
|
||||
|
||||
$choices = array();
|
||||
$choices[ $rule['field'] ] = $rule['field'];
|
||||
|
||||
// create field
|
||||
acf_render_field(array(
|
||||
'type' => 'select',
|
||||
'prefix' => $prefix,
|
||||
'name' => 'field',
|
||||
'value' => $rule['field'],
|
||||
'choices' => $choices,
|
||||
'class' => 'conditional-rule-param',
|
||||
'disabled' => $disabled,
|
||||
));
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="operator">
|
||||
<?php
|
||||
|
||||
$choices = array(
|
||||
'==' => __("is equal to",'acf'),
|
||||
'!=' => __("is not equal to",'acf'),
|
||||
);
|
||||
|
||||
|
||||
// create field
|
||||
acf_render_field(array(
|
||||
'type' => 'select',
|
||||
'prefix' => $prefix,
|
||||
'name' => 'operator',
|
||||
'value' => $rule['operator'],
|
||||
'choices' => $choices,
|
||||
'class' => 'conditional-rule-operator',
|
||||
'disabled' => $disabled,
|
||||
));
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
|
||||
$choices = array();
|
||||
$choices[ $rule['value'] ] = $rule['value'];
|
||||
|
||||
// create field
|
||||
acf_render_field(array(
|
||||
'type' => 'select',
|
||||
'prefix' => $prefix,
|
||||
'name' => 'value',
|
||||
'value' => $rule['value'],
|
||||
'choices' => $choices,
|
||||
'class' => 'conditional-rule-value',
|
||||
'disabled' => $disabled,
|
||||
));
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="add">
|
||||
<a href="#" class="button add-conditional-rule"><?php _e("and",'acf'); ?></a>
|
||||
</td>
|
||||
<td class="remove">
|
||||
<a href="#" class="acf-icon -minus remove-conditional-rule"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<h4><?php _e("or",'acf'); ?></h4>
|
||||
|
||||
<a href="#" class="button add-conditional-group"><?php _e("Add rule group",'acf'); ?></a>
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
|
||||
// add prefix
|
||||
$field['prefix'] = "acf_fields[{$field['ID']}]";
|
||||
|
||||
|
||||
// vars
|
||||
$atts = array(
|
||||
'class' => "acf-field-object acf-field-object-{$field['type']}",
|
||||
'data-id' => $field['ID'],
|
||||
'data-key' => $field['key'],
|
||||
'data-type' => $field['type'],
|
||||
);
|
||||
|
||||
$meta = array(
|
||||
'ID' => $field['ID'],
|
||||
'key' => $field['key'],
|
||||
'parent' => $field['parent'],
|
||||
'menu_order' => $field['menu_order'],
|
||||
'save' => '',
|
||||
);
|
||||
|
||||
|
||||
// class
|
||||
$atts['class'] = str_replace('_', '-', $atts['class']);
|
||||
|
||||
?>
|
||||
<div <?php echo acf_esc_attr( $atts ); ?>>
|
||||
|
||||
<div class="meta">
|
||||
<?php foreach( $meta as $k => $v ):
|
||||
|
||||
acf_hidden_input(array( 'class' => "input-{$k}", 'name' => "{$field['prefix']}[{$k}]", 'value' => $v ));
|
||||
|
||||
endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="handle">
|
||||
<ul class="acf-hl acf-tbody">
|
||||
<li class="li-field-order">
|
||||
<span class="acf-icon acf-sortable-handle" title="<?php _e('Drag to reorder','acf'); ?>"><?php echo ($i + 1); ?></span>
|
||||
</li>
|
||||
<li class="li-field-label">
|
||||
<strong>
|
||||
<a class="edit-field" title="<?php _e("Edit field",'acf'); ?>" href="#"><?php echo acf_get_field_label($field); ?></a>
|
||||
</strong>
|
||||
<div class="row-options">
|
||||
<a class="edit-field" title="<?php _e("Edit field",'acf'); ?>" href="#"><?php _e("Edit",'acf'); ?></a>
|
||||
<a class="duplicate-field" title="<?php _e("Duplicate field",'acf'); ?>" href="#"><?php _e("Duplicate",'acf'); ?></a>
|
||||
<a class="move-field" title="<?php _e("Move field to another group",'acf'); ?>" href="#"><?php _e("Move",'acf'); ?></a>
|
||||
<a class="delete-field" title="<?php _e("Delete field",'acf'); ?>" href="#"><?php _e("Delete",'acf'); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="li-field-name"><?php echo $field['name']; ?></li>
|
||||
<li class="li-field-key"><?php echo $field['key']; ?></li>
|
||||
<li class="li-field-type"><?php echo acf_get_field_type_label($field['type']); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="settings">
|
||||
<table class="acf-table">
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
// label
|
||||
acf_render_field_setting($field, array(
|
||||
'label' => __('Field Label','acf'),
|
||||
'instructions' => __('This is the name which will appear on the EDIT page','acf'),
|
||||
'name' => 'label',
|
||||
'type' => 'text',
|
||||
'class' => 'field-label'
|
||||
), true);
|
||||
|
||||
|
||||
// name
|
||||
acf_render_field_setting($field, array(
|
||||
'label' => __('Field Name','acf'),
|
||||
'instructions' => __('Single word, no spaces. Underscores and dashes allowed','acf'),
|
||||
'name' => 'name',
|
||||
'type' => 'text',
|
||||
'class' => 'field-name'
|
||||
), true);
|
||||
|
||||
|
||||
// type
|
||||
acf_render_field_setting($field, array(
|
||||
'label' => __('Field Type','acf'),
|
||||
'instructions' => '',
|
||||
'type' => 'select',
|
||||
'name' => 'type',
|
||||
'choices' => acf_get_field_types(),
|
||||
'class' => 'field-type'
|
||||
), true);
|
||||
|
||||
|
||||
// instructions
|
||||
acf_render_field_setting($field, array(
|
||||
'label' => __('Instructions','acf'),
|
||||
'instructions' => __('Instructions for authors. Shown when submitting data','acf'),
|
||||
'type' => 'textarea',
|
||||
'name' => 'instructions',
|
||||
'rows' => 5
|
||||
), true);
|
||||
|
||||
|
||||
// required
|
||||
acf_render_field_setting($field, array(
|
||||
'label' => __('Required?','acf'),
|
||||
'instructions' => '',
|
||||
'type' => 'true_false',
|
||||
'name' => 'required',
|
||||
'ui' => 1,
|
||||
'class' => 'field-required'
|
||||
), true);
|
||||
|
||||
|
||||
// 3rd party settings
|
||||
do_action('acf/render_field_settings', $field);
|
||||
|
||||
|
||||
// type specific settings
|
||||
do_action("acf/render_field_settings/type={$field['type']}", $field);
|
||||
|
||||
|
||||
// conditional logic
|
||||
acf_get_view('field-group-field-conditional-logic', array( 'field' => $field ));
|
||||
|
||||
|
||||
// wrapper
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Wrapper Attributes','acf'),
|
||||
'instructions' => '',
|
||||
'type' => 'number',
|
||||
'name' => 'width',
|
||||
'prefix' => $field['prefix'] . '[wrapper]',
|
||||
'value' => $field['wrapper']['width'],
|
||||
'prepend' => __('width', 'acf'),
|
||||
'append' => '%',
|
||||
'wrapper' => array(
|
||||
'data-name' => 'wrapper',
|
||||
'class' => 'acf-field-setting-wrapper'
|
||||
)
|
||||
), 'tr');
|
||||
|
||||
acf_render_field_wrap(array(
|
||||
'label' => '',
|
||||
'instructions' => '',
|
||||
'type' => 'text',
|
||||
'name' => 'class',
|
||||
'prefix' => $field['prefix'] . '[wrapper]',
|
||||
'value' => $field['wrapper']['class'],
|
||||
'prepend' => __('class', 'acf'),
|
||||
'wrapper' => array(
|
||||
'data-append' => 'wrapper'
|
||||
)
|
||||
), 'tr');
|
||||
|
||||
acf_render_field_wrap(array(
|
||||
'label' => '',
|
||||
'instructions' => '',
|
||||
'type' => 'text',
|
||||
'name' => 'id',
|
||||
'prefix' => $field['prefix'] . '[wrapper]',
|
||||
'value' => $field['wrapper']['id'],
|
||||
'prepend' => __('id', 'acf'),
|
||||
'wrapper' => array(
|
||||
'data-append' => 'wrapper'
|
||||
)
|
||||
), 'tr');
|
||||
|
||||
?>
|
||||
<tr class="acf-field acf-field-save">
|
||||
<td class="acf-label"></td>
|
||||
<td class="acf-input">
|
||||
<ul class="acf-hl">
|
||||
<li>
|
||||
<a class="button edit-field" title="<?php _e("Close Field",'acf'); ?>" href="#"><?php _e("Close Field",'acf'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,52 @@
|
||||
<div class="acf-field-list-wrap">
|
||||
|
||||
<ul class="acf-hl acf-thead">
|
||||
<li class="li-field-order"><?php _e('Order','acf'); ?></li>
|
||||
<li class="li-field-label"><?php _e('Label','acf'); ?></li>
|
||||
<li class="li-field-name"><?php _e('Name','acf'); ?></li>
|
||||
<li class="li-field-key"><?php _e('Key','acf'); ?></li>
|
||||
<li class="li-field-type"><?php _e('Type','acf'); ?></li>
|
||||
</ul>
|
||||
|
||||
<div class="acf-field-list">
|
||||
|
||||
<div class="no-fields-message" <?php if( $fields ){ echo 'style="display:none;"'; } ?>>
|
||||
<?php _e("No fields. Click the <strong>+ Add Field</strong> button to create your first field.",'acf'); ?>
|
||||
</div>
|
||||
|
||||
<?php if( $fields ):
|
||||
|
||||
foreach( $fields as $i => $field ):
|
||||
|
||||
acf_get_view('field-group-field', array( 'field' => $field, 'i' => $i ));
|
||||
|
||||
endforeach;
|
||||
|
||||
endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="acf-hl acf-tfoot">
|
||||
<li class="acf-fr">
|
||||
<a href="#" class="button button-primary button-large add-field"><?php _e('+ Add Field','acf'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<?php if( !$parent ):
|
||||
|
||||
// get clone
|
||||
$clone = acf_get_valid_field(array(
|
||||
'ID' => 'acfcloneindex',
|
||||
'key' => 'acfcloneindex',
|
||||
'label' => __('New Field','acf'),
|
||||
'name' => 'new_field',
|
||||
'type' => 'text'
|
||||
));
|
||||
|
||||
?>
|
||||
<script type="text/html" id="tmpl-acf-field">
|
||||
<?php acf_get_view('field-group-field', array( 'field' => $clone, 'i' => 0 )); ?>
|
||||
</script>
|
||||
<?php endif;?>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
// global
|
||||
global $field_group;
|
||||
|
||||
?>
|
||||
<div class="acf-field">
|
||||
<div class="acf-label">
|
||||
<label><?php _e("Rules",'acf'); ?></label>
|
||||
<p class="description"><?php _e("Create a set of rules to determine which edit screens will use these advanced custom fields",'acf'); ?></p>
|
||||
</div>
|
||||
<div class="acf-input">
|
||||
<div class="rule-groups">
|
||||
|
||||
<?php foreach( $field_group['location'] as $i => $group ):
|
||||
|
||||
// bail ealry if no group
|
||||
if( empty($group) ) return;
|
||||
|
||||
|
||||
// view
|
||||
acf_get_view('html-location-group', array(
|
||||
'group' => $group,
|
||||
'group_id' => "group_{$i}"
|
||||
));
|
||||
|
||||
endforeach; ?>
|
||||
|
||||
<h4><?php _e("or",'acf'); ?></h4>
|
||||
|
||||
<a href="#" class="button add-location-group"><?php _e("Add rule group",'acf'); ?></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
if( typeof acf !== 'undefined' ) {
|
||||
|
||||
acf.postbox.render({
|
||||
'id': 'acf-field-group-locations',
|
||||
'label': 'left'
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
|
||||
// global
|
||||
global $field_group;
|
||||
|
||||
|
||||
// active
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Active','acf'),
|
||||
'instructions' => '',
|
||||
'type' => 'true_false',
|
||||
'name' => 'active',
|
||||
'prefix' => 'acf_field_group',
|
||||
'value' => $field_group['active'],
|
||||
'ui' => 1,
|
||||
//'ui_on_text' => __('Active', 'acf'),
|
||||
//'ui_off_text' => __('Inactive', 'acf'),
|
||||
));
|
||||
|
||||
|
||||
// style
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Style','acf'),
|
||||
'instructions' => '',
|
||||
'type' => 'select',
|
||||
'name' => 'style',
|
||||
'prefix' => 'acf_field_group',
|
||||
'value' => $field_group['style'],
|
||||
'choices' => array(
|
||||
'default' => __("Standard (WP metabox)",'acf'),
|
||||
'seamless' => __("Seamless (no metabox)",'acf'),
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
// position
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Position','acf'),
|
||||
'instructions' => '',
|
||||
'type' => 'select',
|
||||
'name' => 'position',
|
||||
'prefix' => 'acf_field_group',
|
||||
'value' => $field_group['position'],
|
||||
'choices' => array(
|
||||
'acf_after_title' => __("High (after title)",'acf'),
|
||||
'normal' => __("Normal (after content)",'acf'),
|
||||
'side' => __("Side",'acf'),
|
||||
),
|
||||
'default_value' => 'normal'
|
||||
));
|
||||
|
||||
|
||||
// label_placement
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Label placement','acf'),
|
||||
'instructions' => '',
|
||||
'type' => 'select',
|
||||
'name' => 'label_placement',
|
||||
'prefix' => 'acf_field_group',
|
||||
'value' => $field_group['label_placement'],
|
||||
'choices' => array(
|
||||
'top' => __("Top aligned",'acf'),
|
||||
'left' => __("Left Aligned",'acf'),
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
// instruction_placement
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Instruction placement','acf'),
|
||||
'instructions' => '',
|
||||
'type' => 'select',
|
||||
'name' => 'instruction_placement',
|
||||
'prefix' => 'acf_field_group',
|
||||
'value' => $field_group['instruction_placement'],
|
||||
'choices' => array(
|
||||
'label' => __("Below labels",'acf'),
|
||||
'field' => __("Below fields",'acf'),
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
// menu_order
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Order No.','acf'),
|
||||
'instructions' => __('Field groups with a lower order will appear first','acf'),
|
||||
'type' => 'number',
|
||||
'name' => 'menu_order',
|
||||
'prefix' => 'acf_field_group',
|
||||
'value' => $field_group['menu_order'],
|
||||
));
|
||||
|
||||
|
||||
// description
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Description','acf'),
|
||||
'instructions' => __('Shown in field group list','acf'),
|
||||
'type' => 'text',
|
||||
'name' => 'description',
|
||||
'prefix' => 'acf_field_group',
|
||||
'value' => $field_group['description'],
|
||||
));
|
||||
|
||||
|
||||
// hide on screen
|
||||
acf_render_field_wrap(array(
|
||||
'label' => __('Hide on screen','acf'),
|
||||
'instructions' => __('<b>Select</b> items to <b>hide</b> them from the edit screen.','acf') . '<br /><br />' . __("If multiple field groups appear on an edit screen, the first field group's options will be used (the one with the lowest order number)",'acf'),
|
||||
'type' => 'checkbox',
|
||||
'name' => 'hide_on_screen',
|
||||
'prefix' => 'acf_field_group',
|
||||
'value' => $field_group['hide_on_screen'],
|
||||
'toggle' => true,
|
||||
'choices' => array(
|
||||
'permalink' => __("Permalink", 'acf'),
|
||||
'the_content' => __("Content Editor",'acf'),
|
||||
'excerpt' => __("Excerpt", 'acf'),
|
||||
'custom_fields' => __("Custom Fields", 'acf'),
|
||||
'discussion' => __("Discussion", 'acf'),
|
||||
'comments' => __("Comments", 'acf'),
|
||||
'revisions' => __("Revisions", 'acf'),
|
||||
'slug' => __("Slug", 'acf'),
|
||||
'author' => __("Author", 'acf'),
|
||||
'format' => __("Format", 'acf'),
|
||||
'page_attributes' => __("Page Attributes", 'acf'),
|
||||
'featured_image' => __("Featured Image", 'acf'),
|
||||
'categories' => __("Categories", 'acf'),
|
||||
'tags' => __("Tags", 'acf'),
|
||||
'send-trackbacks' => __("Send Trackbacks", 'acf'),
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
// 3rd party settings
|
||||
do_action('acf/render_field_group_settings', $field_group);
|
||||
|
||||
?>
|
||||
<div class="acf-hidden">
|
||||
<input type="hidden" name="acf_field_group[key]" value="<?php echo $field_group['key']; ?>" />
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
if( typeof acf !== 'undefined' ) {
|
||||
|
||||
acf.postbox.render({
|
||||
'id': 'acf-field-group-options',
|
||||
'label': 'left'
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* html-admin-tools
|
||||
*
|
||||
* View to output admin tools for both archive and single
|
||||
*
|
||||
* @date 20/10/17
|
||||
* @since 5.6.3
|
||||
*
|
||||
* @param string $screen_id The screen ID used to display metaboxes
|
||||
* @param string $active The active Tool
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
$class = $active ? 'single' : 'grid';
|
||||
|
||||
?>
|
||||
<div class="wrap" id="acf-admin-tools">
|
||||
|
||||
<h1><?php _e('Tools', 'acf'); ?> <?php if( $active ): ?><a class="page-title-action" href="<?php echo acf_get_admin_tools_url(); ?>">Back to all tools</a><?php endif; ?></h1>
|
||||
|
||||
<div class="acf-meta-box-wrap -<?php echo $class; ?>">
|
||||
<?php do_meta_boxes( $screen_id, 'normal', '' ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
<div class="rule-group" data-id="<?php echo $group_id; ?>">
|
||||
|
||||
<h4><?php echo ($group_id == 'group_0') ? __("Show this field group if",'acf') : __("or",'acf'); ?></h4>
|
||||
|
||||
<table class="acf-table -clear">
|
||||
<tbody>
|
||||
<?php foreach( $group as $i => $rule ):
|
||||
|
||||
// append id
|
||||
$rule['id'] = "rule_{$i}";
|
||||
$rule['group'] = $group_id;
|
||||
|
||||
|
||||
// valid rule
|
||||
$rule = acf_get_valid_location_rule($rule);
|
||||
|
||||
|
||||
// view
|
||||
acf_get_view('html-location-rule', array(
|
||||
'rule' => $rule
|
||||
));
|
||||
|
||||
endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,85 @@
|
||||
<tr data-id="<?php echo $rule['id']; ?>">
|
||||
<td class="param">
|
||||
<?php
|
||||
|
||||
// vars
|
||||
$choices = acf_get_location_rule_types();
|
||||
|
||||
|
||||
// array
|
||||
if( is_array($choices) ) {
|
||||
|
||||
acf_render_field(array(
|
||||
'type' => 'select',
|
||||
'name' => 'param',
|
||||
'prefix' => $rule['prefix'],
|
||||
'value' => $rule['param'],
|
||||
'choices' => $choices,
|
||||
'class' => 'refresh-location-rule'
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="operator">
|
||||
<?php
|
||||
|
||||
// vars
|
||||
$choices = acf_get_location_rule_operators( $rule );
|
||||
|
||||
|
||||
// array
|
||||
if( is_array($choices) ) {
|
||||
|
||||
acf_render_field(array(
|
||||
'type' => 'select',
|
||||
'name' => 'operator',
|
||||
'prefix' => $rule['prefix'],
|
||||
'value' => $rule['operator'],
|
||||
'choices' => $choices
|
||||
));
|
||||
|
||||
// custom
|
||||
} else {
|
||||
|
||||
echo $choices;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
|
||||
// vars
|
||||
$choices = acf_get_location_rule_values( $rule );
|
||||
|
||||
|
||||
// array
|
||||
if( is_array($choices) ) {
|
||||
|
||||
acf_render_field(array(
|
||||
'type' => 'select',
|
||||
'name' => 'value',
|
||||
'prefix' => $rule['prefix'],
|
||||
'value' => $rule['value'],
|
||||
'choices' => $choices
|
||||
));
|
||||
|
||||
// custom
|
||||
} else {
|
||||
|
||||
echo $choices;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="add">
|
||||
<a href="#" class="button add-location-rule"><?php _e("and",'acf'); ?></a>
|
||||
</td>
|
||||
<td class="remove">
|
||||
<a href="#" class="acf-icon -minus remove-location-rule"></a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,235 @@
|
||||
<?php
|
||||
|
||||
// vars
|
||||
$button = __('Upgrade Sites');
|
||||
|
||||
?>
|
||||
<div id="acf-upgrade-wrap" class="wrap">
|
||||
|
||||
<h1><?php _e("Advanced Custom Fields Database Upgrade",'acf'); ?></h1>
|
||||
|
||||
<p><?php echo sprintf( __("The following sites require a DB upgrade. Check the ones you want to update and then click %s.", 'acf'), '"' . $button . '"'); ?></p>
|
||||
|
||||
<p><input type="submit" name="upgrade" value="<?php echo $button; ?>" class="button" id="upgrade-sites"></p>
|
||||
|
||||
<table class="wp-list-table widefat">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="manage-column check-column" scope="col"><input type="checkbox" id="sites-select-all"></td>
|
||||
<th class="manage-column" scope="col" style="width:33%;"><label for="sites-select-all"><?php _e("Site", 'acf'); ?></label></th>
|
||||
<th><?php _e("Description", 'acf'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="manage-column check-column" scope="col"><input type="checkbox" id="sites-select-all-2"></td>
|
||||
<th class="manage-column" scope="col"><label for="sites-select-all-2"><?php _e("Site", 'acf'); ?></label></th>
|
||||
<th><?php _e("Description", 'acf'); ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="the-list">
|
||||
|
||||
<?php foreach( $sites as $i => $site ): ?>
|
||||
|
||||
<tr<?php if( $i % 2 == 0 ): ?> class="alternate"<?php endif; ?>>
|
||||
<th class="check-column" scope="row">
|
||||
<?php if( $site['updates'] ): ?>
|
||||
<input type="checkbox" value="<?php echo $site['blog_id']; ?>" name="checked[]">
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<td>
|
||||
<strong><?php echo $site['name']; ?></strong><br /><?php echo $site['url']; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if( $site['updates'] ): ?>
|
||||
<span class="response"><?php printf(__('Site requires database upgrade from %s to %s', 'acf'), $site['acf_version'], $plugin_version); ?></span>
|
||||
<?php else: ?>
|
||||
<?php _e("Site is up to date", 'acf'); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<p><input type="submit" name="upgrade" value="<?php echo $button; ?>" class="button" id="upgrade-sites-2"></p>
|
||||
|
||||
<p class="show-on-complete"><?php echo sprintf( __('Database Upgrade complete. <a href="%s">Return to network dashboard</a>', 'acf'), network_admin_url() ); ?></p>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
/* hide show */
|
||||
.show-on-complete {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
|
||||
var upgrader = {
|
||||
|
||||
$buttons: null,
|
||||
|
||||
$inputs: null,
|
||||
i: 0,
|
||||
|
||||
init : function(){
|
||||
|
||||
// reference
|
||||
var self = this;
|
||||
|
||||
|
||||
// vars
|
||||
this.$buttons = $('#upgrade-sites, #upgrade-sites-2');
|
||||
|
||||
|
||||
// events
|
||||
this.$buttons.on('click', function( e ){
|
||||
|
||||
// prevent default
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
// confirm
|
||||
var answer = confirm("<?php _e('It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'acf'); ?>");
|
||||
|
||||
|
||||
// bail early if no confirm
|
||||
if( !answer ) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// populate inputs
|
||||
self.$inputs = $('#the-list input:checked');
|
||||
|
||||
|
||||
// upgrade
|
||||
self.upgrade();
|
||||
|
||||
});
|
||||
|
||||
|
||||
// return
|
||||
return this;
|
||||
|
||||
},
|
||||
|
||||
upgrade: function(){
|
||||
|
||||
// reference
|
||||
var self = this;
|
||||
|
||||
|
||||
// bail early if no sites
|
||||
if( !this.$inputs.length ) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// complete
|
||||
if( this.i >= this.$inputs.length ) {
|
||||
|
||||
this.complete();
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// disable buttons
|
||||
this.$buttons.attr('disabled', 'disabled');
|
||||
|
||||
|
||||
// vars
|
||||
var $input = this.$inputs.eq( this.i ),
|
||||
$tr = $input.closest('tr'),
|
||||
text = '<?php _e('Upgrade complete', 'acf'); ?>';
|
||||
|
||||
|
||||
// add loading
|
||||
$tr.find('.response').html('<i class="acf-loading"></i></span> <?php printf(__('Upgrading data to version %s', 'acf'), $plugin_version); ?>');
|
||||
|
||||
|
||||
// get results
|
||||
var xhr = $.ajax({
|
||||
url: '<?php echo admin_url('admin-ajax.php'); ?>',
|
||||
dataType: 'json',
|
||||
type: 'post',
|
||||
data: {
|
||||
action: 'acf/admin/db_update',
|
||||
nonce: '<?php echo wp_create_nonce('acf_db_update'); ?>',
|
||||
blog_id: $input.val(),
|
||||
},
|
||||
success: function( json ){
|
||||
|
||||
// remove input
|
||||
$input.prop('checked', false);
|
||||
$input.remove();
|
||||
|
||||
|
||||
// vars
|
||||
var message = acf.get_ajax_message(json);
|
||||
|
||||
|
||||
// bail early if no message text
|
||||
if( !message.text ) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// update text
|
||||
text = '<pre>' + message.text + '</pre>';
|
||||
|
||||
},
|
||||
complete: function(){
|
||||
|
||||
$tr.find('.response').html( text );
|
||||
|
||||
|
||||
// upgrade next site
|
||||
self.next();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
next: function(){
|
||||
|
||||
this.i++;
|
||||
|
||||
this.upgrade();
|
||||
|
||||
},
|
||||
|
||||
complete: function(){
|
||||
|
||||
// enable buttons
|
||||
this.$buttons.removeAttr('disabled');
|
||||
|
||||
|
||||
// show message
|
||||
$('.show-on-complete').show();
|
||||
|
||||
}
|
||||
|
||||
}.init();
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
// calculate add-ons (non pro only)
|
||||
$plugins = array();
|
||||
|
||||
if( !acf_get_setting('pro') ) {
|
||||
|
||||
if( is_plugin_active('acf-repeater/acf-repeater.php') ) $plugins[] = __("Repeater",'acf');
|
||||
if( is_plugin_active('acf-flexible-content/acf-flexible-content.php') ) $plugins[] = __("Flexible Content",'acf');
|
||||
if( is_plugin_active('acf-gallery/acf-gallery.php') ) $plugins[] = __("Gallery",'acf');
|
||||
if( is_plugin_active('acf-options-page/acf-options-page.php') ) $plugins[] = __("Options Page",'acf');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="acf-upgrade-notice">
|
||||
|
||||
<div class="inner">
|
||||
|
||||
<div class="acf-icon logo">
|
||||
<i class="acf-sprite-logo"></i>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<h2><?php _e("Database Upgrade Required",'acf'); ?></h2>
|
||||
|
||||
<p><?php printf(__("Thank you for updating to %s v%s!", 'acf'), acf_get_setting('name'), acf_get_setting('version') ); ?><br /><?php _e("Before you start using the new awesome features, please update your database to the newest version.", 'acf'); ?></p>
|
||||
|
||||
<?php if( !empty($plugins) ): ?>
|
||||
<p><?php printf(__("Please also ensure any premium add-ons (%s) have first been updated to the latest version.", 'acf'), implode(', ', $plugins) ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<p><a id="acf-notice-action" href="<?php echo $button_url; ?>" class="button button-primary"><?php echo $button_text; ?></a></p>
|
||||
|
||||
<?php if( $confirm ): ?>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
|
||||
$("#acf-notice-action").on("click", function(){
|
||||
|
||||
var answer = confirm("<?php _e( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'acf' ); ?>");
|
||||
return answer;
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,109 @@
|
||||
<div id="acf-upgrade-wrap" class="wrap">
|
||||
|
||||
<h1><?php _e("Advanced Custom Fields Database Upgrade",'acf'); ?></h1>
|
||||
|
||||
<?php if( $updates ): ?>
|
||||
|
||||
<p><?php _e('Reading upgrade tasks...', 'acf'); ?></p>
|
||||
|
||||
<p class="show-on-ajax"><i class="acf-loading"></i> <?php printf(__('Upgrading data to version %s', 'acf'), $plugin_version); ?></p>
|
||||
|
||||
<p class="show-on-complete"><?php echo sprintf( __('Database Upgrade complete. <a href="%s">See what\'s new</a>', 'acf' ), admin_url('edit.php?post_type=acf-field-group&page=acf-settings-info') ); ?></p>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
/* hide show */
|
||||
.show-on-ajax,
|
||||
.show-on-complete {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
|
||||
var upgrader = {
|
||||
|
||||
init: function(){
|
||||
|
||||
// reference
|
||||
var self = this;
|
||||
|
||||
|
||||
// allow user to read message for 1 second
|
||||
setTimeout(function(){
|
||||
|
||||
self.upgrade();
|
||||
|
||||
}, 1000);
|
||||
|
||||
|
||||
// return
|
||||
return this;
|
||||
},
|
||||
|
||||
upgrade: function(){
|
||||
|
||||
// reference
|
||||
var self = this;
|
||||
|
||||
|
||||
// show message
|
||||
$('.show-on-ajax').show();
|
||||
|
||||
|
||||
// get results
|
||||
var xhr = $.ajax({
|
||||
url: '<?php echo admin_url('admin-ajax.php'); ?>',
|
||||
dataType: 'json',
|
||||
type: 'post',
|
||||
data: {
|
||||
action: 'acf/admin/db_update',
|
||||
nonce: '<?php echo wp_create_nonce('acf_db_update'); ?>'
|
||||
},
|
||||
success: function( json ){
|
||||
|
||||
// vars
|
||||
var message = acf.get_ajax_message(json);
|
||||
|
||||
|
||||
// bail early if no message text
|
||||
if( !message.text ) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// show message
|
||||
$('.show-on-ajax').html( message.text );
|
||||
|
||||
},
|
||||
complete: function( json ){
|
||||
|
||||
// remove spinner
|
||||
$('.acf-loading').hide();
|
||||
|
||||
|
||||
// show complete
|
||||
$('.show-on-complete').show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}.init();
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<p><?php _e('No updates available.', 'acf'); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
<div class="wrap acf-settings-wrap">
|
||||
|
||||
<h1><?php _e("Add-ons",'acf'); ?></h1>
|
||||
|
||||
<div class="add-ons-list">
|
||||
|
||||
<?php if( !empty($json) ): ?>
|
||||
|
||||
<?php foreach( $json as $addon ):
|
||||
|
||||
$addon = wp_parse_args($addon, array(
|
||||
"title" => "",
|
||||
"slug" => "",
|
||||
"description" => "",
|
||||
"thumbnail" => "",
|
||||
"url" => "",
|
||||
"btn" => __("Download & Install",'acf'),
|
||||
"btn_color" => ""
|
||||
));
|
||||
|
||||
?>
|
||||
|
||||
<div class="acf-box add-on add-on-<?php echo $addon['slug']; ?>">
|
||||
|
||||
<div class="thumbnail">
|
||||
<a target="_blank" href="<?php echo $addon['url']; ?>">
|
||||
<img src="<?php echo $addon['thumbnail']; ?>" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="inner">
|
||||
<h3><a target="_blank" href="<?php echo $addon['url']; ?>"><?php echo $addon['title']; ?></a></h3>
|
||||
<p><?php echo $addon['description']; ?></p>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<?php if( apply_filters("acf/is_add_on_active/slug={$addon['slug']}", false ) ): ?>
|
||||
<a class="button" disabled="disabled"><?php _e("Installed",'acf'); ?></a>
|
||||
<?php else: ?>
|
||||
<a class="button <?php echo $addon['btn_color']; ?>" target="_blank" href="<?php echo $addon['url']; ?>" ><?php _e($addon['btn']); ?></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if( !empty($addon['footer']) ): ?>
|
||||
<p><?php echo $addon['footer']; ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,183 @@
|
||||
<div class="wrap about-wrap acf-wrap">
|
||||
|
||||
<h1><?php _e("Welcome to Advanced Custom Fields",'acf'); ?> <?php echo $version; ?></h1>
|
||||
<div class="about-text"><?php printf(__("Thank you for updating! ACF %s is bigger and better than ever before. We hope you like it.", 'acf'), $version); ?></div>
|
||||
<div class="acf-icon logo">
|
||||
<i class="acf-sprite-logo"></i>
|
||||
</div>
|
||||
|
||||
<h2 class="nav-tab-wrapper">
|
||||
<?php foreach( $tabs as $tab_slug => $tab_title ): ?>
|
||||
<a class="nav-tab<?php if( $active == $tab_slug ): ?> nav-tab-active<?php endif; ?>" href="<?php echo admin_url("edit.php?post_type=acf-field-group&page=acf-settings-info&tab={$tab_slug}"); ?>"><?php echo $tab_title; ?></a>
|
||||
<?php endforeach; ?>
|
||||
</h2>
|
||||
|
||||
<?php if( $active == 'new' ): ?>
|
||||
|
||||
<h2 class="about-headline-callout"><?php _e("A smoother custom field experience", 'acf'); ?></h2>
|
||||
|
||||
<div class="feature-section acf-three-col">
|
||||
<div>
|
||||
<img src="https://assets.advancedcustomfields.com/info/5.0.0/select2.png">
|
||||
<h3><?php _e("Improved Usability", 'acf'); ?></h3>
|
||||
<p><?php _e("Including the popular Select2 library has improved both usability and speed across a number of field types including post object, page link, taxonomy and select.", 'acf'); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<img src="https://assets.advancedcustomfields.com/info/5.0.0/design.png">
|
||||
<h3><?php _e("Improved Design", 'acf'); ?></h3>
|
||||
<p><?php _e("Many fields have undergone a visual refresh to make ACF look better than ever! Noticeable changes are seen on the gallery, relationship and oEmbed (new) fields!", 'acf'); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<img src="https://assets.advancedcustomfields.com/info/5.0.0/sub-fields.png">
|
||||
<h3><?php _e("Improved Data", 'acf'); ?></h3>
|
||||
<p><?php _e("Redesigning the data architecture has allowed sub fields to live independently from their parents. This allows you to drag and drop fields in and out of parent fields!", 'acf'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 class="about-headline-callout"><?php _e("Goodbye Add-ons. Hello PRO", 'acf'); ?></h2>
|
||||
|
||||
<div class="feature-section acf-three-col">
|
||||
|
||||
<div>
|
||||
<h3><?php _e("Introducing ACF PRO", 'acf'); ?></h3>
|
||||
<p><?php _e("We're changing the way premium functionality is delivered in an exciting way!", 'acf'); ?></p>
|
||||
<p><?php printf(__('All 4 premium add-ons have been combined into a new <a href="%s">Pro version of ACF</a>. With both personal and developer licenses available, premium functionality is more affordable and accessible than ever before!', 'acf'), esc_url('https://www.advancedcustomfields.com/pro')); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3><?php _e("Powerful Features", 'acf'); ?></h3>
|
||||
<p><?php _e("ACF PRO contains powerful features such as repeatable data, flexible content layouts, a beautiful gallery field and the ability to create extra admin options pages!", 'acf'); ?></p>
|
||||
<p><?php printf(__('Read more about <a href="%s">ACF PRO features</a>.', 'acf'), esc_url('https://www.advancedcustomfields.com/pro')); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3><?php _e("Easy Upgrading", 'acf'); ?></h3>
|
||||
<p><?php printf(__('To help make upgrading easy, <a href="%s">login to your store account</a> and claim a free copy of ACF PRO!', 'acf'), esc_url('https://www.advancedcustomfields.com/my-account/')); ?></p>
|
||||
<p><?php printf(__('We also wrote an <a href="%s">upgrade guide</a> to answer any questions, but if you do have one, please contact our support team via the <a href="%s">help desk</a>', 'acf'), esc_url('https://www.advancedcustomfields.com/resources/updates/upgrading-v4-v5/'), esc_url('https://support.advancedcustomfields.com')); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 class="about-headline-callout"><?php _e("Under the Hood", 'acf'); ?></h2>
|
||||
|
||||
<div class="feature-section acf-three-col">
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Smarter field settings", 'acf'); ?></h4>
|
||||
<p><?php _e("ACF now saves its field settings as individual post objects", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("More AJAX", 'acf'); ?></h4>
|
||||
<p><?php _e("More fields use AJAX powered search to speed up page loading", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Local JSON", 'acf'); ?></h4>
|
||||
<p><?php _e("New auto export to JSON feature improves speed", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Better version control", 'acf'); ?></h4>
|
||||
<p><?php _e("New auto export to JSON feature allows field settings to be version controlled", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Swapped XML for JSON", 'acf'); ?></h4>
|
||||
<p><?php _e("Import / Export now uses JSON in favour of XML", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("New Forms", 'acf'); ?></h4>
|
||||
<p><?php _e("Fields can now be mapped to comments, widgets and all user forms!", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<h4><?php _e("New Field", 'acf'); ?></h4>
|
||||
<p><?php _e("A new field for embedding content has been added", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("New Gallery", 'acf'); ?></h4>
|
||||
<p><?php _e("The gallery field has undergone a much needed facelift", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("New Settings", 'acf'); ?></h4>
|
||||
<p><?php _e("Field group settings have been added for label placement and instruction placement", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Better Front End Forms", 'acf'); ?></h4>
|
||||
<p><?php _e("acf_form() can now create a new post on submission", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Better Validation", 'acf'); ?></h4>
|
||||
<p><?php _e("Form validation is now done via PHP + AJAX in favour of only JS", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Relationship Field", 'acf'); ?></h4>
|
||||
<p><?php _e("New Relationship field setting for 'Filters' (Search, Post Type, Taxonomy)", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Moving Fields", 'acf'); ?></h4>
|
||||
<p><?php _e("New field group functionality allows you to move a field between groups & parents", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Page Link", 'acf'); ?></h4>
|
||||
<p><?php _e("New archives group in page_link field selection", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><?php _e("Better Options Pages", 'acf'); ?></h4>
|
||||
<p><?php _e("New functions for options page allow creation of both parent and child menu pages", 'acf'); ?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php elseif( $active == 'changelog' ): ?>
|
||||
|
||||
<p class="about-description"><?php printf(__("We think you'll love the changes in %s.", 'acf'), $version); ?></p>
|
||||
|
||||
<?php
|
||||
|
||||
$items = file_get_contents( acf_get_path('readme.txt') );
|
||||
$items = explode('= ' . $version . ' =', $items);
|
||||
|
||||
$items = end( $items );
|
||||
$items = current( explode("\n\n", $items) );
|
||||
$items = array_filter( array_map('trim', explode("*", $items)) );
|
||||
|
||||
?>
|
||||
<ul class="changelog">
|
||||
<?php foreach( $items as $item ):
|
||||
|
||||
$item = explode('http', $item);
|
||||
|
||||
?>
|
||||
<li><?php echo $item[0]; ?><?php if( isset($item[1]) ): ?><a href="http<?php echo $item[1]; ?>" target="_blank">[...]</a><?php endif; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user