|
@@ 380-400 (lines=21) @@
|
| 377 |
|
echo '<header><h2 class="jp-jetpack-connect__container-subtitle">' . esc_html( $title ) . '</h2></header>'; |
| 378 |
|
} |
| 379 |
|
|
| 380 |
|
static function show_branches( $section, $title = null ) { |
| 381 |
|
if ( $title ) { |
| 382 |
|
$title .= ': '; |
| 383 |
|
} |
| 384 |
|
echo '<div id="section-' . esc_attr( $section ) . '">'; |
| 385 |
|
|
| 386 |
|
$manifest = Jetpack_Beta::get_beta_manifest(); |
| 387 |
|
$count = 0; |
| 388 |
|
if ( empty( $manifest->{$section} ) ) { |
| 389 |
|
return; |
| 390 |
|
} |
| 391 |
|
$branches = (array) $manifest->{$section}; |
| 392 |
|
$count_all = count( $branches ); |
| 393 |
|
|
| 394 |
|
foreach ( $branches as $branch_name => $branch ) { |
| 395 |
|
$count ++; |
| 396 |
|
$is_last = $count_all === $count ? true : false; |
| 397 |
|
self::show_branch( $title . $branch_name, $branch_name, $branch, $section, $is_last ); |
| 398 |
|
} |
| 399 |
|
echo '</div>'; |
| 400 |
|
} |
| 401 |
|
|
| 402 |
|
static function show_tags( $section, $title = null ) { |
| 403 |
|
if ( $title ) { |
|
@@ 402-422 (lines=21) @@
|
| 399 |
|
echo '</div>'; |
| 400 |
|
} |
| 401 |
|
|
| 402 |
|
static function show_tags( $section, $title = null ) { |
| 403 |
|
if ( $title ) { |
| 404 |
|
$title .= ': '; |
| 405 |
|
} |
| 406 |
|
echo '<div id="section-' . esc_attr( $section ) . '">'; |
| 407 |
|
|
| 408 |
|
$manifest = Jetpack_Beta::get_org_data(); |
| 409 |
|
$count = 0; |
| 410 |
|
if ( empty( $manifest->versions ) ) { |
| 411 |
|
return; |
| 412 |
|
} |
| 413 |
|
$tags = array_reverse( (array) $manifest->versions ); |
| 414 |
|
$count_all = count( $tags ); |
| 415 |
|
|
| 416 |
|
foreach ( $tags as $tag => $url ) { |
| 417 |
|
$count ++; |
| 418 |
|
$is_last = $count_all === $count ? true : false; |
| 419 |
|
self::show_tag( $title . $tag, $tag, $url, $section, $is_last ); |
| 420 |
|
} |
| 421 |
|
echo '</div>'; |
| 422 |
|
} |
| 423 |
|
|
| 424 |
|
static function show_stable_branch() { |
| 425 |
|
$org_data = Jetpack_Beta::get_org_data(); |