From 299ae1db6d794047963b16480a52e53aeef6551d Mon Sep 17 00:00:00 2001 From: Paul Bearne Date: Tue, 2 Feb 2016 10:25:13 -0500 Subject: [PATCH] Added message if no post aren't found I know there should data, but if not the function just returning without a message make you feel that you are got the options wrong. This just makes if clear that it is working but you need to add some data --- cmb2-attached-posts-field.php | 1 + 1 file changed, 1 insertion(+) diff --git a/cmb2-attached-posts-field.php b/cmb2-attached-posts-field.php index f549230..3328933 100644 --- a/cmb2-attached-posts-field.php +++ b/cmb2-attached-posts-field.php @@ -69,6 +69,7 @@ public function render( $field, $escaped_value, $object_id, $object_type, $field // If there are no posts found, just stop if ( ! $posts ) { + printf( __( 'No entries found for the %s post types' , 'cmb' ), $post_type_labels ); return; }