| @@ -224,8 +224,9 @@ | ||
| 224 | 224 | } |
| 225 | 225 | ?> |
| 226 | 226 | <h2 class="nav-tab-wrapper"> |
| 227 | 227 | <?php foreach ( $tabs as $option_key => $tab_title ) : ?> |
| 228 | + <?php // phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace -- Inline alternative-syntax conditional in template markup; keep on one line. ?> | |
| 228 | 229 | <a class="nav-tab<?php if ( self::is_page( $option_key ) ) : ?> nav-tab-active<?php endif; ?>" href="<?php menu_page_url( $option_key ); ?>"><?php echo wp_kses_post( $tab_title ); ?></a> |
| 229 | 230 | <?php endforeach; ?> |
| 230 | 231 | </h2> |
| 231 | 232 | <?php |
| @@ -261,9 +262,9 @@ | ||
| 261 | 262 | |
| 262 | 263 | if ( $tab_group ) { |
| 263 | 264 | $boxes = CMB2_Boxes::get_by( 'tab_group', $tab_group ); |
| 264 | 265 | |
| 265 | - foreach ( $boxes as $cmb_id => $cmb ) { | |
| 266 | + foreach ( $boxes as $cmb ) { | |
| 266 | 267 | $option_key = $cmb->options_page_keys(); |
| 267 | 268 | |
| 268 | 269 | // Must have an option key, must be an options page box. |
| 269 | 270 | if ( ! isset( $option_key[0] ) || 'options-page' !== $cmb->mb_object_type() ) { |
| @@ -368,8 +369,9 @@ | ||
| 368 | 369 | case 'option_key': |
| 369 | 370 | case 'cmb': |
| 370 | 371 | return $this->{$field}; |
| 371 | 372 | default: |
| 373 | + // translators: 1: class name, 2: property name. | |
| 372 | 374 | throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) ); |
| 373 | 375 | } |
| 374 | 376 | } |
| 375 | 377 | } |