Support

Account

Home Forums Add-ons Repeater Field Putting jQuery in footer Reply To: Putting jQuery in footer

  • Hi @elliot,
    Ideally a function to override it’s position in the header so that the plugin would be intact for any potential updates (unless, of course, you were considering changing it in an update.)

    I tried modifying the wp_register_scripts like so :

    
    		$scripts = array();
    		$scripts[] = array(
    			'handle' => 'acf-field-group',
    			'src' => $this->settings['dir'] . 'js/field-group.min.js',
    			'deps' => array('jquery'),
    			'in_footer' => true
    		);
    		$scripts[] = array(
    			'handle' => 'acf-input',
    			'src' => $this->settings['dir'] . 'js/input.min.js',
    			'deps' => array('jquery'),
    			'in_footer' => true
    		);
    		$scripts[] = array(
    			'handle' => 'acf-datepicker',
    			'src' => $this->settings['dir'] . 'core/fields/date_picker/jquery.ui.datepicker.js',
    			'deps' => array('jquery', 'acf-input'),
    			'in_footer' => true
    		);
    		
    		
    		foreach( $scripts as $script )
    		{
    			wp_register_script( $script['handle'], $script['src'], $script['deps'], $this->settings['version'], $script['in_footer']);
    		}

    but I can’t find where they are enqueued. And it seems I’m looking in the wrong place as there is no jquery migrate here.