Skip to:
Content

bbPress.org

Changeset 5076


Ignore:
Timestamp:
08/15/2013 06:10:05 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Add is_admin() and $pagenow checks to bbp_is_deactivation() and bbp_is_activation(). Hat tip alex-ye. Fixes #2386.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/update.php

    r4995 r5076  
    5151 */
    5252function bbp_is_activation( $basename = '' ) {
     53    global $pagenow;
     54
    5355    $bbp    = bbpress();
    5456    $action = false;
     57
     58    // Bail if not in admin/plugins
     59    if ( ! ( is_admin() && ( 'plugins.php' === $pagenow ) ) ) {
     60        return false;
     61    }
    5562
    5663    if ( ! empty( $_REQUEST['action'] ) && ( '-1' !== $_REQUEST['action'] ) ) {
     
    93100 */
    94101function bbp_is_deactivation( $basename = '' ) {
     102    global $pagenow;
     103
    95104    $bbp    = bbpress();
    96105    $action = false;
    97    
     106
     107    // Bail if not in admin/plugins
     108    if ( ! ( is_admin() && ( 'plugins.php' === $pagenow ) ) ) {
     109        return false;
     110    }
     111
    98112    if ( ! empty( $_REQUEST['action'] ) && ( '-1' !== $_REQUEST['action'] ) ) {
    99113        $action = $_REQUEST['action'];
Note: See TracChangeset for help on using the changeset viewer.