autoblog source to show if user has capability

When viewing a published listing I only want users who are logged in to view the link to the original source.

What code do I wrap in a is_user_logged_in() statement?

  • Ash
    • WordPress Hacker

    Hello there

    I hope you are well today and thanks for asking the question.

    Please go to /plugins/autoblog/autoblogincludes/autoblogprocess.php line no 879, change the if condition to

    if ( !empty( $ablog['source'] )  && current_user_can('YOUR_CAPABILITY') ) {

    It should work.

    Please let me know if it is helpful and feel free to ask more question if you have.



  • Atlanta
    • Syntax Hero

    Thanks @ashok

    I tested it with current_user_can(‘manage_network’:wink: but it didn’t work.

    I also processed a new feed just in case it was stamped at time of import and I couldn’t change previous feeds but the source still shows.

    It was the autoblogprocess in classes folder that I changed. I couldn’t find one in autoblogincludes.



  • Ash
    • WordPress Hacker

    @Atlanta: It’s working for me. Not sure, why it’s not working for you.

    To be clarified again, you want to show the original source(and link) to those users who has capability of manage_network, right? If yes, then it should work.

    Are you using any caching plugin? If yes, please delete your cache. If not, would it be possible for me to take a closer look in your server? Please send me details.

    To send details, please use our contact form:

    Select: I have a different question

    Subject: Attn-Ash

    Details: Send all required details (ftp details) with a link of this thread, so that I can track.

    Also post a note here once you send the info.

    I will be happy to take a look :slight_smile:



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.