This topic contains 16 reply and 2 voices, and was last updated by towhid 4 years, 4 months ago
Viewing 15 Posts - 1 through 15 (of 16 total)
Author Posts
May 17, 2015 at 2:44 am 44175
towhid Hi I am ok with the WPUF edit links for posts but i would like to have normal WP edit links for pages How can i do that ? Thanks as this is very important Alex
May 17, 2015 at 1:15 pm 44192
towhid towhid

Hello Alex,

Can you please let me know what do you mean by normal? I am not clear the question.

Thank you 🙂

May 17, 2015 at 2:07 pm 44199
Alexandre Alexandre

Hi

I mean the standard WP edit link without WPUF

you know when you have a basic wordpress installation, you have an edit link on every page

this edit link is replaced by WPUF edit link

May 17, 2015 at 3:13 pm 44209
towhid towhid

Hello Alexandre,

Please navigate to User Frontend->Settings->General Options->Override the post edit link = No.

And that will redirect to post or page backend edit page.

Thank you 🙂

May 17, 2015 at 5:22 pm 44250
Alexandre Alexandre

Hi Towhid

Ok tx !

May 17, 2015 at 7:41 pm 44275
Alexandre Alexandre

Hi

Actually i want to override the post edit link ONLY for posts

not for pages

as people only publish posts, not pages

how can i do that ?

Tx

May 18, 2015 at 4:39 pm 44361
towhid towhid

Hello Alexandre,

Please allow me some time. I will come back to you with a right solution.

Thanks.

May 18, 2015 at 5:03 pm 44378
Alexandre Alexandre

Hi Towhid

Ok thank you

as this is very important for us

tx

Alex

May 20, 2015 at 7:52 pm 44689
Alexandre Alexandre

Hi

We have searched through the files, where we could say :

IF it is an article >> override the edit link

IF it is a page >> dont override the edit link

but we didnt find the right file where to do this

May 21, 2015 at 11:54 am 44756
towhid towhid

Hello Alexandre,

Please open wp-user-frontend/class/login.php and find out below functions. These two functions can help you to get hints to implementation this certain task.

function is_override_enabled() {
        $override = wpuf_get_option( 'register_link_override', 'wpuf_profile', 'off' );

        if ( $override !== 'on' ) {
            return false;
        }

        return true;
    }
function wp_login_page_redirect() {
        global $pagenow;

        if ( ! is_admin() && $pagenow == 'wp-login.php' && isset( $_GET['action'] ) && $_GET['action'] == 'register' ) {

            if ( wpuf_get_option( 'register_link_override', 'wpuf_profile' ) != 'on' ) {
                return;
            }

            $reg_page = get_permalink( wpuf_get_option( 'reg_override_page', 'wpuf_profile' ) );
            wp_redirect( $reg_page );
            exit;
        }
    }

Thanks

May 21, 2015 at 2:57 pm 44781
Alexandre Alexandre

Hi

Looks like you are talking about another probleme, these functions concern the login page

and we’re looking for a fix to the edit link issue

May 21, 2015 at 3:23 pm 44782
towhid towhid

Hello Alexandre,

Examine “login.php” page. You will get a clue how a login override. Find out the mapping.

Thanks

May 21, 2015 at 3:57 pm 44787
Alexandre Alexandre

Hi

Towhid

Actually i have no problem with the login override

I need a solution to the edit link override

tx

Alex

May 26, 2015 at 12:34 am 45136
Alexandre Alexandre

Hi

Any update ???

Tx

May 26, 2015 at 1:12 pm 45163
towhid towhid

Hello Alexandre,

I am really sorry for my misunderstanding of login functions.
Here is the solution of edit link override function.

Step 1: Please open wp-user-frontend/wpuf-functions.php

Step 2: Find out these lines of code

$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' );
        }
    }

Step 3: Replace this lines of code with above and see what happen.

if (is_single() ){
        $override = wpuf_get_option( 'override_editlink', 'wpuf_general', 'yes' );
        if ( $override == 'yes' ) {
            $url = '';
            if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard', 'yes' ) == 'yes' ) {
                $url = wp_nonce_url( $url . '?pid=' . $post_id, 'wpuf_edit' );
                echo $url;
            }
        } 
    }

Please let me know the result when done.

Thanks

May 27, 2015 at 3:50 am 45265
Alexandre Alexandre

Hi Towhid

Wrong code, the right code is this one : so far it seems to work, tx !

if (is_single() ){
$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' );
        }
    }
 }
Viewing 15 Posts - 1 through 15 (of 16 total)