Skip to:
Content

bbPress.org

Changeset 4518


Ignore:
Timestamp:
11/25/2012 07:35:43 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Dropdown:

  • Use 'post_parent' instead of 'child_of' in bbp_get_dropdown().
  • Add 'exclude' to array of default arguments.
  • Fixes bug with not excluding post ID's, and not using the correct post parent ID.
  • Props jmdodd.
  • Fixes #2061.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/template-tags.php

    r4512 r4518  
    12131213     *               though you can have that as none (pass 'show_none' arg))
    12141214     *  - sort_column: Sort by? Defaults to 'menu_order, post_title'
    1215      *  - child_of: Child of. Defaults to 0
     1215     *  - post_parent: Post parent. Defaults to 0
    12161216     *  - post_status: Which all post_statuses to find in? Can be an array
    12171217     *                  or CSV of publish, category, closed, private, spam,
     
    12531253            'selected'           => 0,
    12541254            'sort_column'        => 'menu_order',
    1255             'child_of'           => '0',
     1255            'post_parent'        => 0,
     1256            'exclude'            => array(),
    12561257            'numberposts'        => -1,
    12571258            'orderby'            => 'menu_order',
     
    12791280        }
    12801281
     1282        // Force array
     1283        if ( !empty( $r['exclude'] ) && !is_array( $r['exclude'] ) ) {
     1284            $r['exclude'] = explode( ',', $r['exclude'] );
     1285        }
     1286
    12811287        /** Post Status *******************************************************/
    12821288
     
    13151321            'post_status' => $r['post_status'],
    13161322            'sort_column' => $r['sort_column'],
    1317             'child_of'    => $r['child_of'],
     1323            'post_parent' => $r['post_parent'],
     1324            'exclude'     => $r['exclude'],
    13181325            'numberposts' => $r['numberposts'],
    13191326            'orderby'     => $r['orderby'],
Note: See TracChangeset for help on using the changeset viewer.