Skip to content

Commit

Permalink
replacing $attached_post_type with $post_type_labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcachran committed Jun 1, 2015
1 parent 7465ce8 commit e6f4df8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmb2-attached-posts-field.php
Expand Up @@ -81,7 +81,7 @@ public function render( $field, $escaped_value, $object_id, $object_type, $field

// Open our retrieved, or found posts, list
echo '<div class="retrieved-wrap column-wrap">';
echo '<h4 class="attached-posts-section">' . sprintf( __( 'Available %s', 'cmb' ), $attached_post_type->labels->name ) . '</h4>';
echo '<h4 class="attached-posts-section">' . sprintf( __( 'Available %s', 'cmb' ), implode( '/', $post_type_labels ) ) . '</h4>';

// Set .has_thumbnail
$has_thumbnail = $field->options( 'show_thumbnails' ) ? ' has-thumbnails' : '';
Expand Down Expand Up @@ -118,7 +118,7 @@ public function render( $field, $escaped_value, $object_id, $object_type, $field

// Open our attached posts list
echo '<div class="attached-wrap column-wrap">';
echo '<h4 class="attached-posts-section">' . sprintf( __( 'Attached %s', 'cmb' ), $attached_post_type->labels->name ) . '</h4>';
echo '<h4 class="attached-posts-section">' . sprintf( __( 'Attached %s', 'cmb' ), implode( '/', $post_type_labels ) ) . '</h4>';

if ( $filter_boxes ) {
printf( $filter_boxes, 'attached-search' );
Expand Down

0 comments on commit e6f4df8

Please sign in to comment.