Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/06/2005 01:38:55 AM (19 years ago)
Author:
matt
Message:

Timeout edits for non-admins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-includes/template-functions.php

    r23 r35  
    327327
    328328function post_edit_link() {
     329    global $current_user;
     330    $how_old = bb_current_time() - get_post_timestamp();
     331    $limit   = bb_get_option('edit_lock') * 60;
     332
     333    if ( ( $current_user->user_type < 1 ) && ( $how_old > $limit ) )
     334        return false;
     335
    329336    if ( can_edit( get_post_author_id() ) )
    330337        echo "<a href='" . bb_get_option('uri') . 'edit.php?id=' . get_post_id() . "'>Edit</a>";
Note: See TracChangeset for help on using the changeset viewer.