Skip to:
Content

bbPress.org

Changeset 6444


Ignore:
Timestamp:
05/29/2017 08:43:46 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Settings: Update int handling of bbp_past_edit_lock().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r6442 r6444  
    167167
    168168/**
    169  * Check the date against the _bbp_edit_lock setting.
     169 * Check a date against the length of time something can be edited.
    170170 *
    171171 * @since 2.0.0 bbPress (r3133)
     
    179179 * @uses apply_filters() Allow output to be manipulated
    180180 *
    181  * @return bool
     181 * @return bool True if date is past, False if not
    182182 */
    183183function bbp_past_edit_lock( $post_date_gmt = '' ) {
    184184
    185     // Assume editing is allowed
     185    // Default value
    186186    $retval = false;
    187187
     
    190190
    191191        // Get number of minutes to allow editing for
    192         $minutes = get_option( '_bbp_edit_lock', '5' );
     192        $minutes = (int) get_option( '_bbp_edit_lock', 5 );
    193193
    194194        // "0" minutes set, so allow forever
    195         if ( 0 === (int) $minutes ) {
     195        if ( 0 === $minutes ) {
    196196            $retval = true;
    197197
Note: See TracChangeset for help on using the changeset viewer.