WordPress.org

Ready to get started?Download WordPress

Forums

Top 10 - Popular posts plugin for WordPress
[resolved] Ignore hits from other admins (4 posts)

  1. heartki
    Member
    Posted 1 year ago #

    Hi. Just wanted to say this plugin was what I was looking for. Simple tracking of hits, compatible with caching plugins.

    Is there a way to ignore/discard not just the author's hits on its own post, but any site admin (or a specific list of admins)?

    Even if the functionality isn't scheduled anytime soon, I'd take any code hack you can give me.

    Thanks.

    http://wordpress.org/extend/plugins/top-10/

  2. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    I haven't tested this yet, but you can try on line 66 of top-10.php file:

    Replace
    if (!(($post_author)&&(!$tptn_settings['track_authors']))) {

    with

    if (!( current_user_can( 'manage_options' ) ) || (!(($post_author)&&(!$tptn_settings['track_authors'])))) {

    As usual, please remember to backup files and databases before making these changes. Double check to ensure that the brackets are properly opened and closed.

  3. heartki
    Member
    Posted 1 year ago #

    Worked just fine.
    Nice response speed btw.

    Thanks.

  4. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Your welcome

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic