📜  在自定义主题或插件中包含 ACF - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:29.302000             🧑  作者: Mango

代码示例1
// customize ACF path
add_filter('acf/settings/path', 'my_acf_settings_path');
function my_acf_settings_path( $path ) {
    $path = get_stylesheet_directory() . '/inc/advanced-custom-fields-pro/';
    return $path;
}
// customize ACF dir
add_filter('acf/settings/dir', 'my_acf_settings_dir');
function my_acf_settings_dir( $dir ) {
    $dir = get_stylesheet_directory_uri() . '/inc/advanced-custom-fields-pro/';
    return $dir;
}
// Include ACF
include_once( get_stylesheet_directory() . '/inc/advanced-custom-fields-pro/acf.php' );