plugin install
This commit is contained in:
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -60,7 +59,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function is_enabled() {
|
||||
|
||||
return acf_is_filter_enabled( 'clone' );
|
||||
@@ -78,7 +76,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
*
|
||||
* @return $field - the field array holding all the field options
|
||||
*/
|
||||
|
||||
function load_field( $field ) {
|
||||
|
||||
// bail early if not enabled
|
||||
@@ -106,7 +103,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $parent (array)
|
||||
* @return $fields
|
||||
*/
|
||||
|
||||
function acf_get_fields( $fields, $parent ) {
|
||||
|
||||
// bail early if empty
|
||||
@@ -167,7 +163,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $parent (array)
|
||||
* @return (array)
|
||||
*/
|
||||
|
||||
function get_cloned_fields( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -243,7 +238,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $clone_field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function acf_clone_field( $field, $clone_field ) {
|
||||
|
||||
// bail early if this field is being cloned by some other kind of field (future proof)
|
||||
@@ -323,7 +317,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $clone_field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function acf_clone_clone_field( $field, $clone_field ) {
|
||||
|
||||
// modify the $clone_field name
|
||||
@@ -363,7 +356,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function prepare_field_for_db( $field ) {
|
||||
|
||||
// bail early if no sub fields
|
||||
@@ -414,7 +406,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $field (array) the field array holding all the field options
|
||||
* @return $value
|
||||
*/
|
||||
|
||||
function load_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no sub fields
|
||||
@@ -524,7 +515,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value
|
||||
@@ -582,7 +572,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// bail early if no sub fields
|
||||
@@ -635,7 +624,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_field_block( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -662,7 +650,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_field_table( $field ) {
|
||||
|
||||
?>
|
||||
@@ -724,7 +711,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
|
||||
// temp enable 'local' to allow .json fields to be displayed
|
||||
@@ -825,7 +811,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $value (mixed)
|
||||
* @return (array)
|
||||
*/
|
||||
|
||||
function get_clone_setting_choices( $value ) {
|
||||
|
||||
// vars
|
||||
@@ -859,7 +844,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $selector (mixed)
|
||||
* @return (string)
|
||||
*/
|
||||
|
||||
function get_clone_setting_choice( $selector = '' ) {
|
||||
|
||||
// bail early no selector
|
||||
@@ -899,7 +883,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $field (array)
|
||||
* @return (string)
|
||||
*/
|
||||
|
||||
function get_clone_setting_field_choice( $field ) {
|
||||
|
||||
// bail early if no field
|
||||
@@ -933,7 +916,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $field_group (array)
|
||||
* @return (string)
|
||||
*/
|
||||
|
||||
function get_clone_setting_group_choice( $field_group ) {
|
||||
|
||||
// bail early if no field group
|
||||
@@ -956,7 +938,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_query() {
|
||||
|
||||
// validate
|
||||
@@ -1144,7 +1125,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function acf_prepare_field( $field ) {
|
||||
|
||||
// bail early if not cloned
|
||||
@@ -1172,7 +1152,6 @@ if ( ! class_exists( 'acf_field_clone' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function validate_value( $valid, $value, $field, $input ) {
|
||||
|
||||
// bail early if no $value
|
||||
|
||||
@@ -95,7 +95,6 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
* @param $layout (array)
|
||||
* @return $layout (array)
|
||||
*/
|
||||
|
||||
function get_valid_layout( $layout = array() ) {
|
||||
|
||||
// parse
|
||||
@@ -128,7 +127,6 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
*
|
||||
* @return $field - the field array holding all the field options
|
||||
*/
|
||||
|
||||
function load_field( $field ) {
|
||||
|
||||
// bail early if no field layouts
|
||||
@@ -225,7 +223,6 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// defaults
|
||||
@@ -326,7 +323,6 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_layout( $field, $layout, $i, $value ) {
|
||||
|
||||
// vars
|
||||
@@ -897,6 +893,10 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
|
||||
// loop rows
|
||||
foreach ( $value as $i => $row ) {
|
||||
// ensure row is an array
|
||||
if ( ! is_array( $row ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// get layout
|
||||
$l = $row['acf_fc_layout'];
|
||||
@@ -1221,7 +1221,6 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function delete_field( $field ) {
|
||||
|
||||
if ( ! empty( $field['layouts'] ) ) {
|
||||
@@ -1255,7 +1254,6 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
*
|
||||
* @return $field - the modified field
|
||||
*/
|
||||
|
||||
function duplicate_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -1496,7 +1494,6 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function validate_any_field( $field ) {
|
||||
|
||||
// width has changed
|
||||
@@ -1519,7 +1516,6 @@ if ( ! class_exists( 'acf_field_flexible_content' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function translate_field( $field ) {
|
||||
|
||||
// translate
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -64,7 +63,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// localize
|
||||
@@ -87,7 +85,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_get_attachment() {
|
||||
|
||||
// Validate requrest.
|
||||
@@ -133,7 +130,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_update_attachment() {
|
||||
|
||||
if ( ! isset( $_POST['nonce'] ) ) {
|
||||
@@ -211,7 +207,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_get_sort_order() {
|
||||
|
||||
// vars
|
||||
@@ -392,7 +387,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// Enqueue uploader assets.
|
||||
@@ -522,7 +516,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
acf_render_field_setting(
|
||||
$field,
|
||||
@@ -734,7 +727,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// Bail early if no value.
|
||||
@@ -800,7 +792,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function validate_value( $valid, $value, $field, $input ) {
|
||||
|
||||
if ( empty( $value ) || ! is_array( $value ) ) {
|
||||
@@ -829,7 +820,6 @@ if ( ! class_exists( 'acf_field_gallery' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// Bail early if no value.
|
||||
|
||||
Reference in New Issue
Block a user