Created
July 5, 2020 22:57
-
-
Save mt8/8b4bc38d1db91364e02c03916af07064 to your computer and use it in GitHub Desktop.
[WordPress] ACFのフィールドをreadonlyにして表示専用にする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'acf/load_field/key=field_xxxxxxxxxxxxx', | |
function ( $field ) { | |
$field[ 'readonly' ] = 1; | |
return $field; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment