It looks like nothing was found at this location. Maybe try one of the links below or a search?
* * @since 1.7.3 */ public function fetch_revisions_list() { // Run a security check. check_ajax_referer( 'wpforms-builder', 'nonce' ); wp_send_json_success( [ 'html' => $this->render_revisions_list(), ] ); } /** * Restore the revision (if needed) and reload the Form Builder. * * @since 1.7.3 * * @return void */ public function process_restore() { $is_restore_request = isset( $_GET['action'] ) && $_GET['action'] === 'restore_revision'; // Bail early. if ( ! $is_restore_request || ! $this->form_id || ! $this->form || ! $this->revision_id || ! $this->revision || ! check_admin_referer( 'restore_revision', 'wpforms_nonce' ) ) { return; } $restored_id = wp_restore_post_revision( $this->revision ); if ( $restored_id ) { wp_safe_redirect( wpforms()->obj( 'revisions' )->get_url( [ 'form_id' => $restored_id, ] ) ); exit; } } /** * Create initial revision for existing form. * * When a new form is created with revisions enabled, WordPress immediately creates first revision which is identical to the form. But when * a form was created with revisions disabled, this initial revision does not exist. Revisions are saved after post update, so modifying * a form that have no initial revision will update the post first, then a revision of this updated post will be saved. The version of * the form that existed before this update is now gone. To avoid losing this pre-revisions state, we create this initial revision * when the Form Builder loads, if needed. * * @since 1.7.3 * * @return void */ public function maybe_create_initial_revision() { // On new form creation there's no revisions yet, bail. Also, when revisions are disabled. // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( isset( $_GET['newform'] ) || ! wp_revisions_enabled( $this->form ) ) { return; } $revisions = wp_get_post_revisions( $this->form_id, [ 'fields' => 'ids', 'numberposts' => 1, ] ); if ( $revisions ) { return; } $initial_revision_id = wp_save_post_revision( $this->form_id ); $initial_revision = wp_get_post_revision( $initial_revision_id ); // Initial revision should belong to the author of the original form. if ( $initial_revision->post_author !== $this->form->post_author ) { wp_update_post( [ 'ID' => $initial_revision_id, 'post_author' => $this->form->post_author, ] ); } } /** * Pass localized strings to frontend. * * @since 1.7.3 * * @param array $strings All strings that will be passed to frontend. * @param WP_Post $form Current form object. * * @return array */ public function get_localized_strings( $strings, $form ) { $strings['revision_update_confirm'] = esc_html__( 'You’re about to save a form revision. Continuing will make this the current version.', 'wpforms-lite' ); return $strings; } }
It looks like nothing was found at this location. Maybe try one of the links below or a search?