Support » Plugin: Frontend Publishing » disable delete post?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Hassan Akhtar

    (@khaxan)

    The plugin doesn’t provide this functionality by default. However I think there’s a way to implement this. Here are the steps you need to follow:

    1. Open the plugin editor and select front-end publishing from the drop down.
    2. Open ajax.php
    3. Search for this line:

    $result = wp_delete_post( $_POST['post_id'], true );

    And replace it with:

    $result = wp_delete_post( $_POST['post_id'], false );

    Now, all the deleted posts will go to the trash section and you can easily restore them.

    Alternatively you could hide the delete column with CSS. Just add this to your theme’s style.css:

    #wpfepp-posts .wpfepp-row td.post-delete{
        display: none;
    }

    Let me know if you have any questions.

    Thread Starter cmtusa

    (@cmtusa)

    Thanks. Tried both, but neither worked. Any other ideas?

    Plugin Author Hassan Akhtar

    (@khaxan)

    The first one is bound to work. Replacing that line of code will send deleted posts to the trash instead of deleting them permanently. Is this not happening?

    As for the second solution, I made a tiny mistake. Try adding this to style.css instead of what I told you before:

    #fep-posts .fep-row td.post-delete{
        display: none;
    }
    Thread Starter cmtusa

    (@cmtusa)

    Do i do the same to get rid of the EDIT option?

    Thread Starter cmtusa

    (@cmtusa)

    I tried to do the same thing for the EDIT tab:

    #fep-posts .fep-row td.post-edit{
    display: none;
    }

    but it didn’t work. Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘disable delete post?’ is closed to new replies.