id ) { return; } if ( ! current_user_can( 'edit_posts' ) ) { return; } $counts = (array) wp_count_posts( CPT::POST_TYPE ); $total = 0; foreach ( array( 'publish', 'future', 'draft', 'pending', 'private' ) as $status ) { $total += isset( $counts[ $status ] ) ? (int) $counts[ $status ] : 0; } if ( $total > 0 ) { return; } $add_url = admin_url( 'post-new.php?post_type=' . CPT::POST_TYPE ); echo '
' . esc_html__( 'No testimonials yet.', 'advanced-testimonial' ) . ' ' . esc_html__( 'Add your first testimonial, or import the starter demo to see how everything looks.', 'advanced-testimonial' ) . '
'; echo ''; echo '' . esc_html__( 'Add New', 'advanced-testimonial' ) . ' '; if ( current_user_can( 'manage_options' ) ) { echo '
'; } echo ''; echo '