How do I recover a deleted flipbook in Wordpress that keeps the ID number hidden?

36 Views Asked by At

In WordPress admin I installed the plugin Flip Book (Flip Book WordPress Plugin Version 2.0 | by flipbuilder.com) then installed three books (three editions of the same publication), then I wanted to delete the third and overwrite it due to some changes, so I deleted the 3rd Book by ID, but then adding the Book again was counted with ID number 4. There is no undo button in the Admin console for this. Any idea? The app is of course in PHP and I found the script where deleting is processed:

Now my table looks like below, with 1, 2, and 4 flipbooks listed and I want to get back the number 3 ID instead of 4.

Istalled Books Add New

ID
Name
Shortcode   
Created
Author
    1
Delete | View
SP2ed528 flipbook   [flipbook id="1"]   2022-11-07 20:44:33 
    2
Delete | View
scurtpe2_599    [flipbook id="2"]   2022-11-13 22:57:43 
    4
Delete | View
flipbook    [flipbook id="4"]   2022-11-24 11:16:25

The code for deleting the installed Book is found in the app directory of the plugin \public_html\wp-content\plugins\flipbook-plugin\app

in the file class-flipbook-view.php

and it looks like this


function process_delete_action()
    {
        $deleted = 0;
        
        if ( isset($_REQUEST['action']) && ($_REQUEST['action'] == 'delete') && isset( $_REQUEST['bookid'] ) )
        {
            if ( is_array( $_REQUEST['bookid'] ) )
            {
                foreach( $_REQUEST['bookid'] as $id)
                {
                    $ret = $this->controller->delete_book($id);
                    if ($ret > 0)
                        $deleted += $ret;
                }
            }
            else
            {
                $deleted = $this->controller->delete_book( $_REQUEST['bookid'] );
            }
        }
    
        if ($deleted > 0)
        {
            echo '<div class="updated"><p>';
            printf( _n('%d book deleted.', '%d books deleted.', $deleted), $deleted );
            echo '</p></div>';
        }
        
    }

Would appreciate any ideas.

Thanks

I should have tried an option to replace the files of the 3d flipbook offered by the CMS of the plugin, but sadly deleted it. When installing the same book as a new one, the count continued with the 4th ID, not the 3 as I expected.

0

There are 0 best solutions below