Skip to content

save_aeria_fields

Alberto Parziale edited this page Aug 30, 2019 · 1 revision

save_aeria_fields

save_aeria_fields($args)

Description

No need to repetitively call update_post_meta! Aeria lets you save fields easily.

This function works using WP's update_post_meta. Please note that the fields must be atomic, so multiple fields (like sections or repeaters) have to be exploded.

Parameters

  • $args array, containing these parameters:
    • "metabox" is the name of the metabox.
    • "post_ID" is the ID of the post containing the fields we want to edit.
    • "fields" is an array containing the field => value pairs to save.

Return value

The function doesn't return any value.

Example

save_aeria_fields(["metabox" => "metaexample","post_ID" => 108, "fields" => ["input-text-email" => "[email protected]"]]);
Clone this wiki locally