Support

Account

Forum Replies Created

  • We have developed a plugin for this. Feel free to use it. It will soon find it’s way to Packagist too.

    https://github.com/triggerfishab/edit-links-for-acf-relationship-field

  • Any thought on this anyone?

    I too would like this feature.

  • You can use the following code (just replace the “CODE” with the code you already have).

    <?php if ( ! get_query_var( 'page' ) ) : ?> 
    	<?php the_field( 'the_field_you_want_to_display' ); ?>
    <?php else : ?>
    	CODE
    <?php endif; ?>
  • You could use the following function to fetch all the details of the oEmbed and then use the title and description property.

    function tf_get_oembed_details( $url ) {
    	require_once( ABSPATH . WPINC . '/class-oembed.php' );
    	$oembed = _wp_oembed_get_object();
    	
    	$provider = $oembed->get_provider( $url );
    	
    	if ( ! $provider ) {
    		return false;
    	}
    	
    	return $oembed->fetch( $provider, $url );
    }
  • To follow up on the idea John Huebner mentioned to use the acf/update_value filter.

    First you will need the field key of the field you have named “mc_sort_id”.
    To get that go to the Field Group admin page, click the “display field key” button in help dropdown, then copy the “mc_sort_id”-field key (looking something like this “field_1231313”).
    Then you should be able to use the following code in your functions.php file.
    Just remember to replace “my_repeater_field” with the name of your repeater field and also replace “field_xxxxxxxx” with the field key you copied above.

    function my_acf_update_value( $value, $post_id, $field  ) {
    	$mc_sort_id_FIELD_KEY = 'field_xxxxxxxx'; // Set this to the field key of your field called "mc_sort_id".
    	
    	$order = [];
    
    	foreach ( $repeater as $i => $row ) {
    		$order[ $i ] = $row[ $mc_sort_id_FIELD_KEY ];
    	}
    
    	array_multisort( $order, SORT_ASC, $value );
    	
    	return $value;
    }
    add_filter( 'acf/update_value/name=my_repeater_field', 'my_acf_update_value', 10, 3 );
  • Hi again Elliot.

    I saw that you added the update.php string to the if clause on line 70 to so that the settings version is actually being set when we are checking for an update. Unfortunately you seem to have gotten the wrong $pagenow value, the correct value for $pagenow when your on the update page is update-core.php.
    When I now changed the string into update-core.php it no longer prompts you to update 🙂

  • Hey Elliot,

    I just experienced the same problem and did some debugging and found that $this->settings[‘version’] is an empty string on line 220 in the function named check_update.

    // compare versions
    if( version_compare($info->version, $this->settings['version'], '<=') )
    {
        return $transient;
    }

    The problem seem to be the if clause at line 70.
    if( $pagenow == 'plugins.php' )
    Because the user might not be on the plugins.php page the version in the settings array will not be set, and defaults to an empty string on line 36.

Viewing 7 posts - 1 through 7 (of 7 total)