Cybo Advanced Field EngineCyboweb Technologies · Documentation · v1.0.2

cafe_update_option()

Purpose

Saves a global option value.

Syntax

cafe_update_option( string $selector, mixed $value ): bool

Parameters

Parameter Type Default Description
$selector string - Field name or field key.
$value mixed - New value. An empty value removes it.

Return value

true on success, false on failure.

Example

cafe_update_option(
	'company_phone',
	'+31612345678'
);

Notes

  • No permission check: check current_user_can( 'manage_options' ) before saving user input.
  • Fires the same save hooks as cafe_update_field() with object type option and object ID 0.