Skip to:
Content

bbPress.org

Ticket #1512: 1512.diff

File 1512.diff, 766 bytes (added by MZAWeb, 12 years ago)
  • bbp-includes/bbp-common-template.php

     
    12091209                $retval    = '';
    12101210                $posts     = get_posts( $r );
    12111211
     1212                /** If the $selected item is not in the resultset, let's add it so it
     1213                 *  doesn't break when updating  **************************************/
     1214
     1215                if ( !empty( $posts ) && intval( $r['selected'] ) > 0 && !in_array( $r['selected'], wp_list_pluck( $posts, 'ID' ) ) ) {
     1216                        $selected_post = get_post( $r['selected'] );
     1217                        $posts[]       = $selected_post;
     1218                }
     1219
    12121220                /** Drop Down *********************************************************/
    12131221
    12141222                // Items found