WordPress ACF Readonly

1024px-WordPress_logo.svg

ACF, shorthand for Advanced Custom Fields, is one of the most exclusive plugins there is. It really takes the pain out of custom field creation and makes it really easy to extend your WordPress setup fast. Recenlty I wanted to set some field, which is filled automatically, to read-only to prevent wrong values in this specific field. So I thought ACF covers that. But it turned out this is not possible via the UI (afaik).
Therefore I looked up the documentation and found acf/load_field.

Add the following filter to your functions.php in order to set a field (field_readonly) to readonly:

function acf_set_readonly($field) {
if($field['_name'] == 'field_readonly')
$field['readonly'] = 1;
return $field;
}
add_filter('acf/load_field', 'acf_set_readonly');

Disable NextGen Gallery Cache

1024px-WordPress_logo.svg

NextGen Gallery is the most popular WordPress gallery plugin. It comes with a lot of options, features, extensions, …
Also several caching concepts are implemented, one of it being “template caching”. To disable NextGen Gallery Cache entirely I’ve found 2 possible options:

As a query parameter: ?ngg_force_update=1
As a constant (in wp-config.php): define('PHOTOCRATI_CACHE', false);

Hope this helps somebody.