Add fix for acf symlink realpath issue

This commit is contained in:
Markus Ankenbrand 2018-12-04 22:57:58 -05:00
parent 866c3d3cd2
commit f56520fbad

View file

@ -1,5 +1,14 @@
<?php <?php
// This is supposed to prevent the symlink/absolute path issue https://github.com/elliotcondon/acf/issues/124
// see https://github.com/elliotcondon/acf/issues/124#issuecomment-118247299
add_action('init', "initHook", 0); // We use the 0 to bypass priority
function initHook() {
if(function_exists('acf')) {
acf()->settings["dir"] = WP_CONTENT_URL."/plugins/advanced-custom-fields/";
}
}
add_action( 'wp_enqueue_scripts', 'td_theme_styles' ); add_action( 'wp_enqueue_scripts', 'td_theme_styles' );
function td_theme_styles() { function td_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );