set( $name, $data ); } /** * acf_get_form_data * * Gets data about the current form. * * @date 6/10/13 * @since 5.0.0 * * @param string $name The store name. * @return mixed */ function acf_get_form_data( $name = '' ) { return acf_get_store( 'form' )->get( $name ); } /** * acf_form_data * * Called within a form to set important information and render hidden inputs. * * @date 15/10/13 * @since 5.0.0 * * @param void * @return void */ function acf_form_data( $data = array() ) { // Apply defaults. $data = wp_parse_args( $data, array( /** @type string The current screen (post, user, taxonomy, etc). */ 'screen' => 'post', /** @type int|string The ID of current post being edited. */ 'post_id' => 0, /** @type bool Enables AJAX validation. */ 'validation' => true, ) ); // Create nonce using screen. $data['nonce'] = wp_create_nonce( $data['screen'] ); // Append "changed" input used within "_wp_post_revision_fields" action. $data['changed'] = 0; // Set data. acf_set_form_data( $data ); // Render HTML. ?>