Changeset 3563 for branches/plugin/bbp-admin/bbp-metaboxes.php
- Timestamp:
- 10/30/2011 11:34:25 PM (15 years ago)
- File:
-
- 1 edited
-
branches/plugin/bbp-admin/bbp-metaboxes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/bbp-metaboxes.php
r3505 r3563 251 251 /** Type ******************************************************************/ 252 252 253 $forum['type'] = array( 254 'forum' => __( 'Forum', 'bbpress' ), 255 'category' => __( 'Category', 'bbpress' ) 256 ); 257 $type_output = '<select name="bbp_forum_type" id="bbp_forum_type_select">' . "\n"; 258 259 foreach( $forum['type'] as $value => $label ) 260 $type_output .= "\t" . '<option value="' . $value . '"' . selected( bbp_is_forum_category( $post->ID ) ? 'category' : 'forum', $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n"; 261 262 $type_output .= '</select>'; 263 264 /** Status ****************************************************************/ 265 266 $forum['status'] = array( 267 'open' => __( 'Open', 'bbpress' ), 268 'closed' => __( 'Closed', 'bbpress' ) 269 ); 270 $status_output = '<select name="bbp_forum_status" id="bbp_forum_status_select">' . "\n"; 271 272 foreach( $forum['status'] as $value => $label ) 273 $status_output .= "\t" . '<option value="' . $value . '"' . selected( bbp_is_forum_closed( $post->ID, false ) ? 'closed' : 'open', $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n"; 274 275 $status_output .= '</select>'; 276 277 /** Visibility ************************************************************/ 278 279 $forum['visibility'] = array( 280 bbp_get_public_status_id() => __( 'Public', 'bbpress' ), 281 bbp_get_private_status_id() => __( 'Private', 'bbpress' ), 282 bbp_get_hidden_status_id() => __( 'Hidden', 'bbpress' ) 283 ); 284 $visibility_output = '<select name="bbp_forum_visibility" id="bbp_forum_visibility_select">' . "\n"; 285 286 foreach( $forum['visibility'] as $value => $label ) 287 $visibility_output .= "\t" . '<option value="' . $value . '"' . selected( bbp_get_forum_visibility( $post->ID ), $value, false ) . '>' . esc_html( $label ) . '</option>' . "\n"; 288 289 $visibility_output .= '</select>'; 290 291 /** Output ****************************************************************/ ?> 253 ?> 292 254 293 255 <p> 294 256 <strong class="label"><?php _e( 'Type:', 'bbpress' ); ?></strong> 295 257 <label class="screen-reader-text" for="bbp_forum_type_select"><?php _e( 'Type:', 'bbpress' ) ?></label> 296 <?php echo $type_output; ?> 297 </p> 258 <?php bbp_form_forum_type_dropdown( $post->ID ); ?> 259 </p> 260 261 <?php 262 263 /** Status ****************************************************************/ 264 265 ?> 298 266 299 267 <p> 300 268 <strong class="label"><?php _e( 'Status:', 'bbpress' ); ?></strong> 301 269 <label class="screen-reader-text" for="bbp_forum_status_select"><?php _e( 'Status:', 'bbpress' ) ?></label> 302 <?php echo $status_output; ?> 303 </p> 270 <?php bbp_form_forum_status_dropdown( $post->ID ); ?> 271 </p> 272 273 <?php 274 275 /** Visibility ************************************************************/ 276 277 ?> 304 278 305 279 <p> 306 280 <strong class="label"><?php _e( 'Visibility:', 'bbpress' ); ?></strong> 307 281 <label class="screen-reader-text" for="bbp_forum_visibility_select"><?php _e( 'Visibility:', 'bbpress' ) ?></label> 308 <?php echo $visibility_output; ?>282 <?php bbp_form_forum_visibility_dropdown( $post->ID ); ?> 309 283 </p> 310 284 311 285 <hr /> 286 287 <?php 288 289 /** Parent ****************************************************************/ 290 291 ?> 312 292 313 293 <p>
Note: See TracChangeset
for help on using the changeset viewer.