is_licensed()){ // Sanitize the user input. $data = $_POST[$id]; // Update the meta field. update_post_meta($post_id, $id, $data); }else{ $forms = array_diff($forms, array($post_id)); } }else{ update_post_meta($post_id, $id, 0); $forms = array_diff($forms, array($post_id)); } update_option("_ajaxy_umajax_forms", $forms); } } /** * Render Meta Box content. * * @param WP_Post $post The post object. */ public function render_metabox($post) { global $Ajaxy_UM_Forms_License; // Add an nonce field so we can check for it later. wp_nonce_field('um_ajax_inner_custom_box', 'um_ajax_inner_custom_box_nonce'); // Use get_post_meta to retrieve an existing value from the database. $id = "_ajaxy_umajax_enable"; $active = get_post_meta($post->ID, $id, true); // Display the form, using the current value. ?>