• Hi. I want my users to be able to submit posts via this plug-in, but I want to use the regular edit functionality. This is how it worked before the most recent update, but now I get thrown into the same edit page that my users do.

    Is there a way to fix this? As it stands, I can only get to the regular edit via the Dashboard/All Posts/find the post and then choose Edit from there — but if I choose one of the Edit Post options that appear on the post itself, I go to the WP User Frontend version.

    Thanks for any help!

    https://www.ads-software.com/plugins/wp-user-frontend/

Viewing 6 replies - 1 through 6 (of 6 total)
  • For me it’s always been the case that the edit button for the front end post is over ridden, as per settings, linking to the wpuf editor for all user roles. I think it would be great if perhaps the admin bar edit link still worked as usual. Then an admin has the option of default edit or wpuf edit.

    Thread Starter kreichelt

    (@kreichelt)

    I have disabled the plug-in, much as I liked it. Losing the regular edit option for me makes this a non-starter. Hopefully, I’ll hear back that there’s a setting I just need to fix!!

    If you want to edit the plugin functions file,

    In wp-user-frontend/wpuf-functions.php

    /**
     * Edit post link for frontend
     *
     * @since 0.7
     * @param string $url url of the original post edit link
     * @param int $post_id
     * @return string url of the current edit post page
     */
    function wpuf_edit_post_link( $url, $post_id ) {
        if ( is_admin() ) {
            return $url;
        }
    
        $override = wpuf_get_option( 'override_editlink', 'wpuf_general', 'yes' );
        if ( $override == 'yes' ) {
            $url = '';
            if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) == 'yes' ) {
                $edit_page = (int) wpuf_get_option( 'edit_page_id', 'wpuf_general' );
                $url = get_permalink( $edit_page );
    
                $url = wp_nonce_url( $url . '?pid=' . $post_id, 'wpuf_edit' );
            }
        }
    
        return $url;
    }
    
    add_filter( 'get_edit_post_link', 'wpuf_edit_post_link', 10, 2 );

    add

    && ! current_user_can('manage_options')

    to
    if ( $override == 'yes' )

    so that line looks like this

    if ( $override == 'yes' && ! current_user_can('manage_options')) {

    tested, the edit link only gets the over ride for non admins.

    However, if you do this, as an admin you have no option to use the front end editor

    Thread Starter kreichelt

    (@kreichelt)

    Wow, thanks for this! I’ll try it out if I don’t hear back a response on whether there’s some available setting…

    the edit-link over-ride setting is either on or off, it doesn’t distinguish roles, without a mod like I provided.
    I’d like option of back or front end editing for admins, if not the admin bar link, then perhaps a template tag which could show an additional edit link for admins only.

    Good luck!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘What setting do I use to use regular edit options for admins?’ is closed to new replies.