/** * @package ACF * @author WP Engine * * © 2025 Advanced Custom Fields (ACF®). All rights reserved. * "ACF" is a trademark of WP Engine. * Licensed under the GNU General Public License v2 or later. * https://www.gnu.org/licenses/gpl-2.0.html */ /** * Process updating bidirectional fields. * * @since 6.2 * * @param array $target_item_ids The post, user or term IDs which should be updated with the origin item ID. * @param integer|string $post_id The ACF encoded origin post, user or term ID. * @param array $field The field being updated on the origin post, user or term ID. * @param string|false $target_prefix The ACF prefix for a post, user or term ID required for the update_field call for this field type. */ function acf_update_bidirectional_values( $target_item_ids, $post_id, $field, $target_prefix = false ) { // Bail early if we're already updating a bidirectional relationship to prevent recursion. if ( acf_get_data( 'acf_doing_bidirectional_update' ) ) { return; } // Support disabling bidirectionality globally. if ( ! acf_get_setting( 'enable_bidirection' ) ) { return; } if ( empty( $field['bidirectional'] ) || empty( $field['bidirectional_target'] ) ) { return; } $decoded = acf_decode_post_id( $post_id ); $item_id = $decoded['id']; $valid_target_types = acf_get_valid_bidirectional_target_types( $decoded['type'] ); $valid_targets = array(); foreach ( $field['bidirectional_target'] as $target_field ) { $target_field_object = get_field_object( $target_field ); if ( empty( $target_field_object ) || ! is_array( $target_field_object ) ) { continue; } if ( in_array( $target_field_object['type'], $valid_target_types, true ) ) { $valid_targets[] = $target_field; } } if ( ! empty( $valid_targets ) ) { // Get current values for this field. $current_values = array_filter( acf_get_array( get_field( $field['key'], $post_id, false ) ) ); $new_values = array_filter( acf_get_array( $target_item_ids ) ); $additions = array_diff( $new_values, $current_values ); $subtractions = array_diff( $current_values, $new_values ); // Prefix additions and subtractions for destinations which aren't posts. if ( ! empty( $target_prefix ) ) { $mapper = function ( $v ) use ( $target_prefix ) { return $target_prefix . '_' . $v; }; $additions = array_map( $mapper, $additions ); $subtractions = array_map( $mapper, $subtractions ); } acf_set_data( 'acf_doing_bidirectional_update', true ); // Loop over each target, processing additions and removals. foreach ( $valid_targets as $target_field ) { foreach ( $additions as $addition ) { $current_value = acf_get_array( get_field( $target_field, $addition, false ) ); update_field( $target_field, array_unique( array_merge( $current_value, array( $item_id ) ) ), $addition ); } foreach ( $subtractions as $subtraction ) { $current_value = acf_get_array( get_field( $target_field, $subtraction, false ) ); update_field( $target_field, array_unique( array_diff( $current_value, array( $item_id ) ) ), $subtraction ); } } acf_set_data( 'acf_doing_bidirectional_update', false ); } } /** * Allows third party fields to enable support as a target field type for a particular object type * * @since 6.2 * * @param string $object_type The object type that will be updated on the target field, such as 'term', 'user' or 'post'. * * @return array An array of valid field type names (slugs) for the target of the bidirectional field. */ function acf_get_valid_bidirectional_target_types( $object_type ) { $valid_target_types = array(); switch ( $object_type ) { case 'term': $valid_target_types = array( 'taxonomy' ); break; case 'user': $valid_target_types = array( 'user' ); break; case 'post': $valid_target_types = array( 'relationship', 'post_object' ); break; } return apply_filters( 'acf/bidirectional/supported_field_types_for_post', $valid_target_types, $object_type ); } /** * Build the complete choices argument for rendering the select2 field for bidirectional target based on the currently selected choices * * @since 6.2 * * @param array $choices The currently selected choices (as an array of field keys). * * @return array */ function acf_build_bidirectional_target_current_choices( $choices ) { if ( empty( $choices ) ) { return array(); } $results = array(); foreach ( $choices as $choice ) { if ( empty( $choice ) || ! is_string( $choice ) ) { continue; } $field_object = get_field_object( $choice ); if ( is_array( $field_object ) && ! empty( $field_object['label'] ) ) { $results[ $choice ] = $field_object['label']; } else { $results[ $choice ] = $choice; } } return $results; } /** * Build valid fields for a bidirectional relationship for select2 display * * @since 6.2 * * @param array $results The original results array. * @param array $options The options provided to the select2 AJAX search. * * @return array */ function acf_build_bidirectional_relationship_field_target_args( $results, $options ) { $valid_field_types = apply_filters( 'acf/bidirectional/supported_target_field_types', array( 'relationship', 'post_object', 'user', 'taxonomy' ) ); $field_groups = array_filter( acf_get_field_groups(), function ( $field_group ) { return $field_group['active']; } ); $valid_fields = array(); foreach ( $field_groups as $field_group ) { $fields = acf_get_fields( $field_group ); foreach ( $fields as $field ) { if ( in_array( $field['type'], $valid_field_types, true ) ) { if ( empty( $valid_fields[ $field_group['title'] ] ) ) { $valid_fields[ $field_group['title'] ] = array(); } $valid_fields[ $field_group['title'] ][ $field['key'] ] = array( 'type' => $field['type'], 'label' => $field['label'], ); if ( isset( $options['parent_key'] ) && $options['parent_key'] === $field['key'] ) { $valid_fields[ $field_group['title'] ][ $field['key'] ]['this_field'] = true; } } } } foreach ( $valid_fields as $field_group_name => $fields ) { $field_group = array( 'text' => $field_group_name, 'children' => array(), ); foreach ( $fields as $key => $data ) { $field_group['children'][] = array( 'id' => $key, 'text' => $data['label'], 'field_type' => $data['type'], /* translators: %s A field type name, such as "Relationship" */ 'human_field_type' => sprintf( __( '%s Field', 'acf' ), acf_get_field_type_prop( $data['type'], 'label' ) ), 'this_field' => ! empty( $data['this_field'] ), ); } $results['results'][] = $field_group; } return $results; } add_action( 'acf/fields/select/query/key=_acf_bidirectional_target', 'acf_build_bidirectional_relationship_field_target_args', 10, 2 ); /** * Renders the field settings required for bidirectional fields * * @since 6.2 * * @param array $field The field object passed into field setting functions. */ function acf_render_bidirectional_field_settings( $field ) { if ( ! acf_get_setting( 'enable_bidirection' ) ) { return; } acf_render_field_setting( $field, array( 'label' => __( 'Bidirectional', 'acf' ), 'instructions' => __( 'Update a field on the selected values, referencing back to this ID', 'acf' ), 'type' => 'true_false', 'name' => 'bidirectional', 'ui' => 1, ) ); acf_render_field_setting( $field, array( 'name' => 'bidirectional_notes', 'type' => 'message', 'message' => acf_get_bidirectional_field_settings_instruction_text(), 'conditions' => array( 'field' => 'bidirectional', 'operator' => '==', 'value' => 1, ), ) ); acf_render_field_setting( $field, array( 'type' => 'select', 'name' => 'bidirectional_target', 'label' => __( 'Target Field', 'acf' ), 'instructions' => __( 'Select field(s) to store the reference back to the item being updated. You may select this field. Target fields must be compatible with where this field is being displayed. For example, if this field is displayed on a Taxonomy, your target field should be of type Taxonomy', 'acf' ), 'class' => 'bidrectional_target', 'choices' => acf_build_bidirectional_target_current_choices( $field['bidirectional_target'] ), 'conditions' => array( 'field' => 'bidirectional', 'operator' => '==', 'value' => 1, ), 'ui' => 1, 'multiple' => 1, 'ajax' => 1, ) ); } /** * Returns the translated instructional text for the message field for the bidirectional field settings. * * @since 6.2 * * @return string The html containing the instructional message. */ function acf_get_bidirectional_field_settings_instruction_text() { /* translators: %s the URL to ACF's bidirectional relationship documentation */ $message = '

' . sprintf( __( 'Enabling the bidirectional setting allows you to update a value in the target fields for each value selected for this field, adding or removing the Post ID, Taxonomy ID or User ID of the item being updated. For more information, please read the documentation.', 'acf' ), acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/bidirectional-relationships/', 'docs', 'bidirectional' ) ) . '

'; return $message; } card magic – Page 24 – Erdnase Magic Store

Spend $20, Get 20% Off — Auto Applied 💸 Dismiss

Skip to content
  • Why Erdnase?
  • How To Pay
  • FAQ
  • Contacts
  • Bonuses
100% Secure Payments & Bulletproof Privacy.
Cart
Erdnase Magic Store
0
Erdnase Magic Store
  • Store
    • New Arrivals
    • Presale
    • Magic Videos
    • Original DVDs
    • Mentalism Videos
    • Cardistry
    • Ebooks
    • Leaked Material
    • Exclusive
    • Free Downloads
  • Sign In
  • 0
  • Toggle website search
    New Arrivals
    Magic Videos
    Mentalism Videos
    Ebooks
    Exclusive
    Presale
    Original DVDs
    Cardistry
    Leaked Material
    Free Downloads
    Sign In Wishlist  

card magic

  • View:
  • 24
  • 48
  • Ben Earl – Deep Magic Seminars – No Shuffling Allowed – Week 2 Quick View
    • Sale!
      Ben Earl – Deep Magic Seminars – No Shuffling Allowed – Week 2 Quick View
    • Magic Videos, New Arrivals
    • Ben Earl – Deep Magic Seminars – No Shuffling Allowed – Week 2

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Ben Earl – Deep Magic Seminars – New Theory Switching – Week 2 Quick View
    • Sale!
      Ben Earl – Deep Magic Seminars – New Theory Switching – Week 2 Quick View
    • Magic Videos, New Arrivals
    • Ben Earl – Deep Magic Seminars – New Theory Switching – Week 2

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Ben Earl – Deep Magic Seminars – Brilliant Basics – Week 2 Quick View
    • Sale!
      Ben Earl – Deep Magic Seminars – Brilliant Basics – Week 2 Quick View
    • Magic Videos, New Arrivals
    • Ben Earl – Deep Magic Seminars – Brilliant Basics – Week 2

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Asi Wind – Masterclass Live – Week Three: July 19th 2020 (+Bonus Zoom Session) Quick View
    • Sale!
      Asi Wind – Masterclass Live – Week Three: July 19th 2020 (+Bonus Zoom Session) Quick View
    • Magic Videos, New Arrivals
    • Asi Wind – Masterclass Live – Week Three: July 19th 2020 (+Bonus Zoom Session)

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Docc Hilford – Penguin Live Lecture 2 Quick View
    • Sale!
      Docc Hilford – Penguin Live Lecture 2 Quick View
    • Magic Videos, Mentalism Videos, New Arrivals
    • Docc Hilford – Penguin Live Lecture 2

    • $39.95 Original price was: $39.95.$2.99Current price is: $2.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Aboutmagic – Fishing card (Gimmick not included) Quick View
    • Sale!
      Aboutmagic – Fishing card (Gimmick not included) Quick View
    • Magic Videos, New Arrivals
    • Aboutmagic – Fishing card (Gimmick not included)

    • $59.95 Original price was: $59.95.$1.99Current price is: $1.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Vinny Sagoo – SCUTTLE (Gaff not included) Quick View
    • Sale!
      Vinny Sagoo – SCUTTLE (Gaff not included) Quick View
    • Magic Videos, New Arrivals
    • Vinny Sagoo – SCUTTLE (Gaff not included)

    • $19.95 Original price was: $19.95.$1.99Current price is: $1.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Joseph B – Zero Quick View
    • Sale!
      Joseph B – Zero Quick View
    • Magic Videos, New Arrivals
    • Joseph B – Zero

    • $7.52 Original price was: $7.52.$1.99Current price is: $1.99.
    • ZERO is a super routine with three endings! A climax of surprises that will leave the spectator speechless! Really easy to perform! You can really get a great effect with little effort!
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Think Nguyen – ADCAAN – Any Deck, Card At Any Number Quick View
    • Sale!
      Think Nguyen – ADCAAN – Any Deck, Card At Any Number Quick View
    • Magic Videos, New Arrivals
    • Think Nguyen – ADCAAN – Any Deck, Card At Any Number

    • $9.99 Original price was: $9.99.$1.99Current price is: $1.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Harry Nardi – Pocket Day Dream Quick View
    • Sale!
      Harry Nardi – Pocket Day Dream Quick View
    • Magic Videos, New Arrivals
    • Harry Nardi – Pocket Day Dream

    • $9.95 Original price was: $9.95.$1.99Current price is: $1.99.
    • Use any deck, even a borrowed incomplete one, and fool EVERYONE with this awesome pocket miracle.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Asi Wind – Masterclass Live – Week One: July 5th 2020 Quick View
    • Sale!
      Asi Wind – Masterclass Live – Week One: July 5th 2020 Quick View
    • Magic Videos, New Arrivals
    • Asi Wind – Masterclass Live – Week One: July 5th 2020

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Asi Wind – Masterclass Live – Week Two: July 12th 2020 Quick View
    • Sale!
      Asi Wind – Masterclass Live – Week Two: July 12th 2020 Quick View
    • Magic Videos, New Arrivals
    • Asi Wind – Masterclass Live – Week Two: July 12th 2020

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Ben Earl – Deep Magic Seminars – The Flow Deal – Week 1 (Video + pdf) Quick View
    • Sale!
      Ben Earl – Deep Magic Seminars – The Flow Deal – Week 1 (Video + pdf) Quick View
    • Magic Videos, New Arrivals
    • Ben Earl – Deep Magic Seminars – The Flow Deal – Week 1 (Video + pdf)

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Ben Earl – Deep Magic Seminars – No Shuffling Allowed – Week 1 (Video + pdf) Quick View
    • Sale!
      Ben Earl – Deep Magic Seminars – No Shuffling Allowed – Week 1 (Video + pdf) Quick View
    • Magic Videos, New Arrivals
    • Ben Earl – Deep Magic Seminars – No Shuffling Allowed – Week 1 (Video + pdf)

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Ben Earl – Deep Magic Seminars – New Theory Switching – Week 1 (Video + pdf) Quick View
    • Sale!
      Ben Earl – Deep Magic Seminars – New Theory Switching – Week 1 (Video + pdf) Quick View
    • Magic Videos, New Arrivals
    • Ben Earl – Deep Magic Seminars – New Theory Switching – Week 1 (Video + pdf)

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Ben Earl – Deep Magic Seminars – Brilliant Basics – Week 1 (Video + pdf) Quick View
    • Sale!
      Ben Earl – Deep Magic Seminars – Brilliant Basics – Week 1 (Video + pdf) Quick View
    • Magic Videos, New Arrivals
    • Ben Earl – Deep Magic Seminars – Brilliant Basics – Week 1 (Video + pdf)

    • $25.00 Original price was: $25.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Jack Tighe – The Dribble Glimpse Quick View
    • Sale!
      Jack Tighe – The Dribble Glimpse Quick View
    • Magic Videos, New Arrivals
    • Jack Tighe – The Dribble Glimpse

    • $12.00 Original price was: $12.00.$2.50Current price is: $2.50.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Laurent Villiger – Warper (Gimmick not included) Quick View
    • Sale!
      Laurent Villiger – Warper (Gimmick not included) Quick View
    • Uncategorized
    • Laurent Villiger – Warper (Gimmick not included)

    • $25.00 Original price was: $25.00.$1.99Current price is: $1.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Cameron Francis – Numbered (PDF + Video) Quick View
    • Sale!
      Cameron Francis – Numbered (PDF + Video) Quick View
    • Ebooks, Magic Videos, New Arrivals
    • Cameron Francis – Numbered (PDF + Video)

    • $20.00 Original price was: $20.00.$3.99Current price is: $3.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • The Vault – Casey Lewis – Cloud Pass Quick View
    • Sale!
      The Vault – Casey Lewis – Cloud Pass Quick View
    • Magic Videos, New Arrivals
    • The Vault – Casey Lewis – Cloud Pass

    • $10.00 Original price was: $10.00.$1.99Current price is: $1.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Mario Tarasini and Zaw Shinn – Burmese Vanish Quick View
    • Sale!
      Mario Tarasini and Zaw Shinn – Burmese Vanish Quick View
    • Magic Videos, New Arrivals
    • Mario Tarasini and Zaw Shinn – Burmese Vanish

    • $9.99 Original price was: $9.99.$1.99Current price is: $1.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Christopher Dearman and Uday Jadugar – Stacked (Gimmick not included) Quick View
    • Sale!
      Christopher Dearman and Uday Jadugar – Stacked (Gimmick not included) Quick View
    • Magic Videos, New Arrivals
    • Christopher Dearman and Uday Jadugar – Stacked (Gimmick not included)

    • $30.00 Original price was: $30.00.$1.99Current price is: $1.99.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Guillaume Botta – ACAAN(s) 23 (french audio only) Quick View
    • Sale!
      Guillaume Botta – ACAAN(s) 23 (french audio only) Quick View
    • Magic Videos, New Arrivals
    • Guillaume Botta – ACAAN(s) 23 (french audio only)

    • $23.00 Original price was: $23.00.$2.99Current price is: $2.99.
    • Découvrez 4 routines autour du légendaire ACAAN, des effets simples, pratiques et puissants qui dérogent aux règles classiques pour un impact encore plus fort...
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • Ekaterina – Chicago Opener Quick View
    • Sale!
      Ekaterina – Chicago Opener Quick View
    • Magic Videos, New Arrivals
    • Ekaterina – Chicago Opener

    • $5.00 Original price was: $5.00.$1.00Current price is: $1.00.
    • Add to cart
    Add to Wishlist
    Add to Wishlist
  • 1
  • 2
  • 3
  • …
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • …
  • 42
  • 43
  • 44

Search

Filter by price

Price: —

Product categories

  • New Arrivals
  • Magic Videos
  • Mentalism Videos
  • Ebooks
  • Leaked Material
  • Exclusive
  • Presale
  • Group Buy
  • Cardistry
  • Free Downloads
  • Original DVDs
  • Unlisted
  • Uncategorized

Product categories

  • New Arrivals
  • Magic Videos
  • Mentalism Videos
  • Ebooks
  • Exclusive
  • Presale
  • Original DVDs
  • Cardistry
  • Leaked Materials
  • Free Downloads

About project

  • Why Erdnase?
  • How To Pay
  • FAQ
  • Contact
  • Bonuses

Subscribe to newsletter

Get site news, new product recommendations and discount codes to your email a few times a month. You can unsubscribe at any time.

© 2026, Erdnase Magic Store. Terms & Conditions

Product categories

New Arrivals
Magic Videos
Mentalism Videos
Ebooks
Exclusive
Presale
Original DVDs
Cardistry
Leaked Materials
Free Downloads

About project

Why Erdnase?
How To Pay
FAQ
Contact
Bonuses

Subscribe to newsletter

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

  • © 2026, Erdnase Magic Store.
  • Terms & Conditions

Product categories

New Arrivals
Magic Videos
Mentalism Videos
Ebooks
Exclusive
Presale
Original DVDs
Cardistry
Leaked Materials
Free Downloads

About project

Why Erdnase?
How To Pay
FAQ
Contact
Bonuses

Subscribe to newsletter

Get site news, new product recommendations and discount codes to your email a few times a month. You can unsubscribe at any time.

© 2026, Erdnase Magic Store. Terms & Conditions

×
×

Cart