acf/input/admin_head


目录

Description

Used to output additional <head> HTML to pages where ACF fields appear.

This action is similar to the WordPress admin_head, except that it is only fired on pages where ACF fields appear – such as when editing posts, users, taxonomy terms, options pages and front-end forms.

Changelog

Example

This example demonstrates how to output additional inline style and script tags to customize fields.

functions.php

<?php
add_action('acf/input/admin_head', 'my_acf_admin_head');
function my_acf_admin_head() {
    ?>
    <style type="text/css">
        /* CSS here. */
    </style>
    <script type="text/javascript">
    (function( $ ){
        // Javascript here.
    })(jQuery);
    </script>
    <?php
}

版本号 #1
由 壳壳虫 创建于 2026-08-29 15:44:03 UTC
由 壳壳虫 更新于 2026-08-29 15:44:03 UTC