Skip to content

Commit

Permalink
prevent changing acf image field on frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
crstauf authored Jan 2, 2024
1 parent 9d5f1fb commit 1729557
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cssllc-acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ public function action__acf_input_admin_head() : void {
* @return array<string, mixed>
*/
public function filter__acf_load_field_type_image( array $field ) : array {
if ( ! is_admin() ) {
return $field;
}

$screen = get_current_screen();

if ( 'acf-field-group' === $screen->id ) {
Expand Down

0 comments on commit 1729557

Please sign in to comment.